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.

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

Page 411

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

Page 412

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

Page 413

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