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.

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

Page 1413

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

Page 1414

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

Page 1415

060035,000097: 07,3711           10000                           CCS      A                                     
060036,000098: 07,3712           03704                           TC       TMFAIL2                               
060037,000099: 07,3713           77740        HI10               OCT      77740                                 
060038,000100: 07,3714           03704                           TC       TMFAIL2                               
060039,000101: 07,3715           00002                           TC       Q                                     
060040,000102: 
060041,000103: 07,3716           00022        ELRCODE            OCT      22                                    
060042,000104: 
060043,000105:                                                                                                  #  'UPLINK ACTIVITY LIGHT' IS TURNED OFF BY .....
060044,000106:                                                                                                  #           1.     VBRELDSP
060045,000107:                                                                                                  #           2.     ERROR RESET
060046,000108:                                                                                                  #           3.     UPDATE PROGRAM(P27) ENTERED BY V70,V71,V72,AND V73.
060047,000109: 
060048,000110: 
060049,000111:                                                                                                  #                                    -
060050,000112:                                                                                                  #  THE RECEPTION OF A BAD CODE(I.E  CCC FAILURE) LOCKS OUT FURTHER UPLINK ACTIVITY BY SETTING BIT4 OF FLAGWRD7 = 1.
060051,000113:                                                                                                  #  THIS INDICATION WILL BE TRANSFERRED TO THE GROUND BY THE DOWNLINK WHICH DOWNLINKS ALL FLAGWORDS.
060052,000114:                                                                                                  #  WHEN UPLINK ACTIVITY IS LOCKED OUT ,IT CAN BE ALLOWED WHEN THE GROUND UPLINKS AND 'ERROR RESET' CODE.
060053,000115:                                                                                                  #  (IT IS RECOMMENDED THAT THE 'ERROR LIGHT RESET' CODE IS PRECEEDED BY 16 BITS THE FIRST OF WHICH IS 1 FOLLOWED
060054,000116:                                                                                                  #  BY 15 ZEROES. THIS WILL ELIMINATE EXTRANEOUS BITS FROM INLINK WHICH MAY HAVE BEEN LEFT OVER FROM THE ORIGINAL
060055,000117:                                                                                                  #  FAILURE)
060056,000118:                                                                                                  #  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