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.

059950,000002:                                                                                                  ## Copyright:   Public domain.
059951,000003:                                                                                                  ## Filename:    KEYRUPT_UPRUPT.agc
059952,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus build 237.
059953,000005:                                                                                                  ##              This is for the Command Module's (CM) Apollo Guidance
059954,000006:                                                                                                  ##              Computer (AGC), for Apollo 8.
059955,000007:                                                                                                  ## Assembler:   yaYUL
059956,000008:                                                                                                  ## Contact:     Jim Lawton <jim DOT lawton AT gmail DOT com>
059957,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
059958,000010:                                                                                                  ## Page Scans:  www.ibiblio.org/apollo/ScansForConversion/Colossus237/
059959,000011:                                                                                                  ## Mod history: 2011-04-17 JL   Adapted from corresponding Colossus 249 file.
059960,000012:                                                                                                  ##              2017-01-01 RSB  Proofed comment text using octopus/ProoferComments,
059961,000013:                                                                                                  ##                              and fixed errors found.
059962,000014:                                                                                                  ##              2017-01-15 RSB  Fixed comment-text errors identified by diff'ing
059963,000015:                                                                                                  ##                              against Colossus 249.
059964,000016:                                                                                                  ##              2017-03-13 RSB  Comment-text fixes noted in proofing Luminary 116.
059965,000017:                                                                                                  ##              2021-05-30 ABS  UPCK -> UPOK
059966,000018: 

Page 1413

059968,000020: 14,3751                                           BANK     14                                    
059969,000021: 07,2000                                           SETLOC   KEYRUPT                               
059970,000022: 07,2000                                           BANK                                           
059971,000023: 07,3613                                           COUNT*   $$/KEYUP                              
059972,000024: 
059973,000025: 07,3613           54016        KEYRUPT1           TS       BANKRUPT                              
059974,000026: 07,3614           56002                           XCH      Q                                     
059975,000027: 07,3615           54012                           TS       QRUPT                                 
059976,000028: 07,3616           04414                           TC       LODSAMPT                              #  TIME IS SNATCHED IN RUPT FOR NOUN 65.
059977,000029: 07,3617           34362                           CAF      LOW5                                  
059978,000030: 07,3620           00006                           EXTEND                                         
059979,000031: 07,3621           02015                           RAND     MNKEYIN                               #  CHECK IF KEYS 5M-1M ON
059980,000032: 07,3622           54073        KEYCOM             TS       RUPTREG4                              
059981,000033: 07,3623           40101                           CS       FLAGWRD5                              
059982,000034: 07,3624           74674                           MASK     BIT15                                 
059983,000035: 07,3625           26101                           ADS      FLAGWRD5                              
059984,000036: 
059985,000037: 07,3626           34371        ACCEPTUP           CAF      CHRPRIO                               #  (NOTE: RUPTREG4 = KEYTEMP1)
059986,000038: 07,3627           05027                           TC       NOVAC                                 
059987,000039: 07,3630     0777                                  EBANK=   DSPCOUNT                              
059988,000040: 07,3630           02000 60101                     2CADR    CHARIN                                
059989,000041: 07,3632           30073                           CA       RUPTREG4                              
059990,000042: 07,3633           50064                           INDEX    LOCCTR                                
059991,000043: 07,3634           54154                           TS       MPAC                                  #  LEAVE 5 BIT KEY CDE IN MPAC FOR CHARIN
059992,000044: 07,3635           05222                           TC       RESUME                                
059993,000045: 

Page 1414

059995,000047:                                                                                                  #  UPRUPT PROGRAM
059996,000048: 
059997,000049: 07,3636           54016        UPRUPT             TS       BANKRUPT                              
059998,000050: 07,3637           56002                           XCH      Q                                     
059999,000051: 07,3640           54012                           TS       QRUPT                                 
060000,000052: 07,3641           04414                           TC       LODSAMPT                              #  TIME IS SNATCHED IN RUPT FOR NOUN 65.
060001,000053: 07,3642           34714                           CAF      ZERO                                  
060002,000054: 07,3643           56045                           XCH      INLINK                                
060003,000055: 07,3644           54073                           TS       KEYTEMP1                              
060004,000056: 07,3645           34710                           CAF      BIT3                                  #  TURN ON UPACT LIGHT
060005,000057: 07,3646           00006                           EXTEND                                         #  (BIT 3 OF CHANNEL 11)
060006,000058: 07,3647           05011                           WOR      DSALMOUT                              
060007,000059: 07,3650           34362        UPRPT1             CAF      LOW5                                  #  TEST FOR TRIPLE CHAR REDUNDANCY
060008,000060: 07,3651           70073                           MASK     KEYTEMP1                              #  LOW5 OF WORD
060009,000061: 07,3652           56073                           XCH      KEYTEMP1                              #  LOW5 INTO KEYTEMP1
060010,000062: 07,3653           00006                           EXTEND                                         
060011,000063: 07,3654           74701                           MP       BIT10                                 #  SHIFT RIGHT 5
060012,000064: 07,3655           54734                           TS       KEYTEMP2                              
060013,000065: 07,3656           74362                           MASK     LOW5                                  #  MID 5
060014,000066: 07,3657           63713                           AD       HI10                                  
060015,000067: 07,3660           03710                           TC       UPTEST                                
060016,000068: 07,3661           34701                           CAF      BIT10                                 
060017,000069: 07,3662           00006                           EXTEND                                         
060018,000070: 07,3663           70734                           MP       KEYTEMP2                              #  SHIFT RIGHT 5
060019,000071: 07,3664           74362                           MASK     LOW5                                  #  HIGH 5
060020,000072: 07,3665           40000                           COM                                            
060021,000073: 07,3666           03710                           TC       UPTEST                                
060022,000074: 
060023,000075: 07,3667           43716        UPOK               CS       ELRCODE                               #  CODE IS GOOD. IF CODE = 'ERROR RESET',
060024,000076: 07,3670           60073                           AD       KEYTEMP1                              #  CLEAR UPLOCKFL(SET BIT4 OF FLAGWRD7 = 0)
060025,000077: 07,3671           00006                           EXTEND                                         #  IF CODE DOES NOT = 'ERROR RESET', ACCEPT
060026,000078: 07,3672           13700                           BZF      CLUPLOCK                              #  CODE ONLY IF UPLOCKFL IS CLEAR (=0).
060027,000079: 
060028,000080: 07,3673           34707                           CAF      BIT4                                  #  TEST UPLOCKFL FOR 0 OR 1.
060029,000081: 07,3674           70103                           MASK     FLAGWRD7                              
060030,000082: 07,3675           10000                           CCS      A                                     
060031,000083: 07,3676           05222                           TC       RESUME                                #  UPLOCKFL = 1
060032,000084: 07,3677           03626                           TC       ACCEPTUP                              #  UPLOCKFL = 0
060033,000085: 
060034,000086: 07,3700           44707        CLUPLOCK           CS       BIT4                                  #  CLEAR UPLOCKFL (I.E., SET BIT 4 OF
060035,000087: 07,3701           70103                           MASK     FLAGWRD7                              #  FLAGWRD7 = 0)
060036,000088: 07,3702           54103                           TS       FLAGWRD7                              
060037,000089: 07,3703           03626                           TC       ACCEPTUP                              
060038,000090: 
060039,000091:                                                                                                  #                                          CODE IS BAD
060040,000092: 07,3704           40103        TMFAIL2            CS       FLAGWRD7                              #  LOCK OUT FURTHER UPLINK ACTIVITY
060041,000093: 07,3705           74707                           MASK     BIT4                                  #  (BY SETTING UPLOCKFL = 1) UNTIL
060042,000094: 07,3706           26103                           ADS      FLAGWRD7                              #  'ERROR RESET' IS SENT VIA UPLINK.
060043,000095: 07,3707           05222                           TC       RESUME                                
060044,000096: 07,3710           60073        UPTEST             AD       KEYTEMP1                              

Page 1415

060046,000098: 07,3711           10000                           CCS      A                                     
060047,000099: 07,3712           03704                           TC       TMFAIL2                               
060048,000100: 07,3713           77740        HI10               OCT      77740                                 
060049,000101: 07,3714           03704                           TC       TMFAIL2                               
060050,000102: 07,3715           00002                           TC       Q                                     
060051,000103: 
060052,000104: 07,3716           00022        ELRCODE            OCT      22                                    
060053,000105: 
060054,000106:                                                                                                  #  'UPLINK ACTIVITY LIGHT' IS TURNED OFF BY .....
060055,000107:                                                                                                  #           1.     VBRELDSP
060056,000108:                                                                                                  #           2.     ERROR RESET
060057,000109:                                                                                                  #           3.     UPDATE PROGRAM(P27) ENTERED BY V70,V71,V72,AND V73.
060058,000110: 
060059,000111: 
060060,000112:                                                                                                  #                                    -
060061,000113:                                                                                                  #  THE RECEPTION OF A BAD CODE(I.E  CCC FAILURE) LOCKS OUT FURTHER UPLINK ACTIVITY BY SETTING BIT4 OF FLAGWRD7 = 1.
060062,000114:                                                                                                  #  THIS INDICATION WILL BE TRANSFERRED TO THE GROUND BY THE DOWNLINK WHICH DOWNLINKS ALL FLAGWORDS.
060063,000115:                                                                                                  #  WHEN UPLINK ACTIVITY IS LOCKED OUT ,IT CAN BE ALLOWED WHEN THE GROUND UPLINKS AND 'ERROR RESET' CODE.
060064,000116:                                                                                                  #  (IT IS RECOMMENDED THAT THE 'ERROR LIGHT RESET' CODE IS PRECEEDED BY 16 BITS THE FIRST OF WHICH IS 1 FOLLOWED
060065,000117:                                                                                                  #  BY 15 ZEROES. THIS WILL ELIMINATE EXTRANEOUS BITS FROM INLINK WHICH MAY HAVE BEEN LEFT OVER FROM THE ORIGINAL
060066,000118:                                                                                                  #  FAILURE)
060067,000119:                                                                                                  #  UPLINK ACTIVITY IS ALSO ALLOWED(UNLOCKED) DURING FRESH START WHEN FRESH START SETS BIT4 OF FLAGWRD7 = 0.

End of include-file KEYRUPT,_UPRUPT.agc.  Parent file is MAIN.agc