Source Code

These source-code files were derived from scans of the Colossus 237 (Apollo 8 Command Module) program listing from the private collection of original AGC developer Fred Martin. Scanning was by Ron Burkey. Pre-existing Colossus 249 (Apollo 9 CM) source files were used as a template, and changes between Colossus 249 and Colossus 237 were manually transcribed by a team of volunteers. Note that the page images presented online are of reduced quality, and that additional images are available. Report any conversion errors or legibility problems in page images to info@sandroid.org. Notations on the program listing read, in part:

	GAP: ASSEMBLE REVISION 237 OF AGC PROGRAM COLOSSUS 
	BY NASA 2021111-031  1:17 AUG. 24, 1968
Note that the date is the date of the printout, not the date of the program revision.

018070,000002:                                                                                                  ## Copyright:   Public domain.
018071,000003:                                                                                                  ## Filename:    SYSTEM_TEST_STANDARD_LEAD_INS.agc
018072,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus build 237.
018073,000005:                                                                                                  ##              This is for the Command Module's (CM) Apollo Guidance
018074,000006:                                                                                                  ##              Computer (AGC), for Apollo 8.
018075,000007:                                                                                                  ## Assembler:   yaYUL
018076,000008:                                                                                                  ## Contact:     Jim Lawton <jim DOT lawton AT gmail DOT com>
018077,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
018078,000010:                                                                                                  ## Page Scans:  www.ibiblio.org/apollo/ScansForConversion/Colossus237/
018079,000011:                                                                                                  ## Mod history: 2011-01-27 JL   Adapted from corresponding Colossus 249 file.
018080,000012:                                                                                                  ##              2016-12-30 RSB  Proofed comment text using octopus/ProoferComments,
018081,000013:                                                                                                  ##                              and corrected errors found.
018082,000014:                                                                                                  ##              2017-01-20 RSB  Fixed comment-text errors noted while diff'ing
018083,000015:                                                                                                  ##                              vs Colossus 249.
018084,000016: 

Page 411

018086,000018: 22,3310  E5,1671                                  EBANK=   XSM                                   
018087,000019: 
018088,000020: 33,2000                                           BANK     33                                    
018089,000021: 04,2000                                           SETLOC   E/PROG                                
018090,000022: 04,2000                                           BANK                                           
018091,000023: 
018092,000024: 04,2557                                           COUNT*   $$/P07                                
018093,000025: 
018094,000026:                                                                                                  #           SPECIAL PROGRAMS TO EASE THE PANGS OF ERASABLE MEMORY PROGRAMS.
018095,000027: 
018096,000028:                                                                                                  #  E/BKCALL   FOR DOING BANKCALLS FROM AND RETURNING TO ERASABLE.
018097,000029: 
018098,000030:                                                                                                  #           THIS ROUTINE IS CALLABLE FROM ERASABLE OR FIXED.  LIKE BANKCALL, HOWEVER, SWITCHING BETWEEN S3 AND S4
018099,000031:                                                                                                  #  IS NOT POSSIBLE.
018100,000032: 
018101,000033:                                                                                                  #           THE CALLING SEQUENCE IS:
018102,000034: 
018103,000035:                                                                                                  #                                                   TC     BANKCALL
018104,000036:                                                                                                  #                                                   CADR   E/BKCALL
018105,000037:                                                                                                  #                                                   CADR   ROUTINE         WHERE YOU WANT TO GO IN FIXED.
018106,000038:                                                                                                  #                                                   RETURN HERE FROM DISPLAY TERMINATE, BAD STALL OR TC Q.
018107,000039:                                                                                                  #                                                   RETURN HERE FROM DISPLAY PROCEED OR GOOD RETURN FROM STALL.
018108,000040:                                                                                                  #                                                   RETURN HERE FROM DISPLAY ENTER OR RECYCLE.
018109,000041: 
018110,000042:                                                                                                  #           THIS ROUTINE REQUIRES TWO ERASABLES (EBUF2, +1) IN UNSWITCHED WHICH ARE UNSHARED BY INTERRUPTS AND
018111,000043:                                                                                                  #  OTHER EMEMORY PROGRAMS.
018112,000044: 
018113,000045:                                                                                                  #           A + L ARE PRESERVED THROUGH BANKCALL AND E/BKCALL.
018114,000046: 
018115,000047: 04,2557           52134        E/BKCALL           DXCH     BUF2                                  #  SAVE A,L AND GET DP RETURN.
018116,000048: 04,2560           52365                           DXCH     EBUF2                                 #  SAVE DP RETURN.
018117,000049: 04,2561           24364                           INCR     EBUF2                                 #  RETURN +1 BECAUSE DOUBLE CADR.
018118,000050: 04,2562           30006                           CA       BBANK                                 
018119,000051: 04,2563           74747                           MASK     LOW10                                 #  GET CURRENT EBANK.  (SBANK SOMEDAY)
018120,000052: 04,2564           26365                           ADS      EBUF2      +1                         #  FORM BBCON.  (WAS FBANK)
018121,000053: 04,2565           50364                           NDX      EBUF2                                 
018122,000054: 04,2566           27777                           CA       0          -1                         #  GET CADR OF ROUTINE.
018123,000055: 04,2567           04561                           TC       SWCALL                                #  GO TO ROUTINE, SETTING Q TO SWRETURN
018124,000056:                                                                                                  #                                          AND RESTORING A + L.
018125,000057: 04,2570           02574                           TC       +4                                    #  TX Q, V34, OR BAD STALL RETURN.
018126,000058: 04,2571           02573                           TC       +2                                    #  PROCEED OR GOOD STALL RETURN.
018127,000059: 04,2572           24364                           INCR     EBUF2                                 #  ENTER OR RECYCLE RETURN.
018128,000060: 04,2573           24364                           INCR     EBUF2                                 
018129,000061: 04,2574           52365        E/SWITCH           DXCH     EBUF2                                 
018130,000062: 04,2575           52006                           DTCB                                           
018131,000063: 

Page 412

018133,000065:                                                                                                  #  E/CALL          FOR CALLING A FIXED MEMORY INTERPRETIVE SUBROUTINE FROM ERASABLE AND RETURNING TO ERASABLE.
018134,000066: 
018135,000067:                                                                                                  #           THE CALLING SEQUENCE IS...
018136,000068:                                                                                                  #                                                   RTB
018137,000069:                                                                                                  #                                                          E/CALL
018138,000070:                                                                                                  #                                                   CADR   ROUTINE         THE INTERPRETIVE SUBROUTINE YOU WANT.
018139,000071:                                                                                                  #                                                                          RETURNS HERE IN INTERPRETIVE.
018140,000072: 
018141,000073: 04,2576           22164        E/CALL             LXCH     LOC                                   #  ADRES -1 OF CADR.
018142,000074: 04,2577           50001                           INDEX    L                                     
018143,000075: 04,2600           30001                           CA       L                                     #  CADR IN A.
018144,000076: 04,2601           24001                           INCR     L                                     
018145,000077: 04,2602           24001                           INCR     L                                     #  RETURN ADRES IN L.
018146,000078: 04,2603           52365                           DXCH     EBUF2                                 #  STORE CADR AND RETURN.
018147,000079: 04,2604           06006                           TC       INTPRET                               
018148,000080: 04,2605           77624                           CALL                                           
018149,000081: 04,2606           00364                                    EBUF2                                 #  INDIRECTLY EXECUTE ROUTINE.  IT MUST
018150,000082: 04,2607           77776                           EXIT                                           #  LEAVE VIA RVQ OR EQUIVALENT.
018151,000083: 04,2610           22365                           LXCH     EBUF2      +1                         #  PICK UP RETURN.
018152,000084: 04,2611           16010                           TCF      INTPRET    +2                         #  SET LOC AND RETURB TO CALLER
018153,000085: 

Page 413

018155,000087:                                                                                                  #  E/JOBWAK        FOR WAKING UP ERASABLE MEMORY JOBS.
018156,000088: 
018157,000089:                                                                                                  #           THIS ROUTINE MUST BE CALLED IN INTERRUPT OR WITH INTERRUPTS INHIBITED.
018158,000090: 
018159,000091:                                                                                                  #           THE CALLING SEQUENCE IS:
018160,000092: 
018161,000093:                                                                                                  #                                                   INHINT
018162,000094:                                                                                                  #                                                     .
018163,000095:                                                                                                  #                                                     .
018164,000096:                                                                                                  #                                                   CA     WAKEADR         ADDRESS OF SLEEPING JOB
018165,000097:                                                                                                  #                                                   TC     IBNKCALL
018166,000098:                                                                                                  #                                                   CADR   E/JOBWAK
018167,000099:                                                                                                  #                                                     .                    RETURNS HERE
018168,000100:                                                                                                  #                                                     .
018169,000101:                                                                                                  #                                                     .
018170,000102:                                                                                                  #                                                   RELINT                 IF YOU DID AN INHINT.
018171,000103: 
018172,000104: 33,2000                                           BANK     33                                    
018173,000105: 04,2000                                           SETLOC   E/PROG                                
018174,000106: 04,2000                                           BANK                                           
018175,000107: 
018176,000108: 04,2612                                           COUNT*   $$/P07                                
018177,000109: 
018178,000110: 04,2612           05074        E/JOBWAK           TC       JOBWAKE                               #  ARRIVE IWTH ADRES IN A.
018179,000111: 04,2613           44700                           CS       BIT11                                 
018180,000112: 04,2614           50064                           NDX      LOCCTR                                
018181,000113: 04,2615           26164                           ADS      LOC                                   #  KNOCK FIXED MEMORY BIT OUT OF ADRES.
018182,000114: 04,2616           00072                           TC       RUPTREG3                              #  RETURN
018183,000115: 
018184,000116: 
018185,000117:                                                                                                  #  THESE PROGRAMS ARE PROVIDED TO ALLOW OVERLAY OF BANKS 30 THRU 33 OF THE 205 VERSIONS OF SYSTEM TESTS AND
018186,000118:                                                                                                  #  PRELAUNCH ALIGN.  THE INTENT IS TO ALLOW THE STG AND HYBRID LABS TO RUN ALL THE TESTS WITH COLOSSUS.
018187,000119: 
018188,000120: 
018189,000121: 33,2000                                           BANK     33                                    
018190,000122: 33,2000                                           SETLOC   TESTLEAD                              
018191,000123: 33,2000                                           BANK                                           
018192,000124: 
018193,000125: 33,2000                                           COUNT    33/COMST                              
018194,000126: 
018195,000127: 33,2000  E5,1425                                  EBANK=   QPLACE                                
018196,000128: 
018197,000129: 33,2000           03426        COMPVER            TC       GCOMPVER                              #  MUST BE 33,2000.
018198,000130: 
018199,000131: 33,2001           03133        GTSCPSS1           TC       GTSCPSS                               #  MUST BE AT 33,2001
018200,000132: 
018201,000133: 33,2002           05243        REDO               TC       NEWMODEX                              #  DISPLAY MM 07.
018202,000134: 33,2003           00007                           MM       07         B-14                       #  FALL INTO IMUTEST

End of include-file SYSTEM_TEST_STANDARD_LEAD_INS.agc.  Parent file is MAIN.agc