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.

061866,000002:                                                                                                  ## Copyright:   Public domain.
061867,000003:                                                                                                  ## Filename:    ALARM_AND_ABORT.agc
061868,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus build 237.  
061869,000005:                                                                                                  ##              This is for the Command Module's (CM) Apollo Guidance
061870,000006:                                                                                                  ##              Computer (AGC), for Apollo 8.
061871,000007:                                                                                                  ## Assembler:   yaYUL
061872,000008:                                                                                                  ## Contact:     Onno Hommes <ohommes@alumni.cmu.edu>
061873,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
061874,000010:                                                                                                  ## Page Scans:  www.ibiblio.org/apollo/ScansForConversion/Colossus237/
061875,000011:                                                                                                  ## Mod history: 2010-05-30 OH   Adapted from corresponding Colossus 249 file.
061876,000012:                                                                                                  ##              2010-12-04 JL   Remove Colossus 249 header comments. Change to double-has page numbers.
061877,000013:                                                                                                  ##              2011-02-07 JL   Minor fixes.
061878,000014:                                                                                                  ##              2017-01-01 RSB  Proofed comment text using octopus/ProoferComments,
061879,000015:                                                                                                  ##                              but no errors found.
061880,000016:                                                                                                  ##              2017-01-07 RSB  Fixed comment errors detected in cross-diff vs
061881,000017:                                                                                                  ##                              Colossus 249.
061882,000018: 

Page 1457

061884,000020:                                                                                                  #           THE FOLLOWING SUBROUTINE MAY BE CALLED TO DISPLAY A NON-ABORTIVE ALARM CONDITION. IT MAY BE CALLED
061885,000021:                                                                                                  #  EITHER IN INTERRUPT OR UNDER EXECUTIVE CONTROL.
061886,000022: 
061887,000023:                                                                                                  #           CALLING SEQUENCE IS AS FOLLOWS:
061888,000024: 
061889,000025:                                                                                                  #           TC     ALARM
061890,000026:                                                                                                  #           OCT    AAANN           ALARM NO. NN IN GENERAL AREA AAA.
061891,000027:                                                                                                  #                                  (RETURNS HERE)
061892,000028: 
061893,000029:    5537                                           BLOCK    02                                    
061894,000030:    4000                                           SETLOC   FFTAG7                                
061895,000031:    4000                                           BANK                                           
061896,000032: 
061897,000033:    5537     0375                                  EBANK=   FAILREG                               
061898,000034: 
061899,000035:    5537                                           COUNT    02/ALARM                              
061900,000036: 
061901,000037:                                                                                                  #  ALARM TURNS ON THE PROGRAM ALARM LIGHT, BUT DOES NOT DISPLAY.
061902,000038: 
061903,000039:    5537           00004        ALARM              INHINT                                         
061904,000040: 
061905,000041:    5540           30002                           CA       Q                                     
061906,000042:    5541           55363        ALARM2             TS       ALMCADR                               
061907,000043:    5542           50002                           INDEX    Q                                     
061908,000044:    5543           30000                           CA       0                                     
061909,000045:    5544           54001        BORTENT            TS       L                                     
061910,000046: 
061911,000047:    5545           30006        PRIOENT            CA       BBANK                                 
061912,000048:    5546           00006                 +1        EXTEND                                         
061913,000049:    5547           04007                           ROR      SUPERBNK                              #  ADD SUPER BITS.
061914,000050:    5550           55364                           TS       ALMCADR    +1                         
061915,000051: 
061916,000052:    5551           30002        LARMENT            CA       Q                                     #  STORE RETURN FOR ALARM
061917,000053:    5552           54061                           TS       ITEMP1                                
061918,000054: 
061919,000055:    5553           10375        CHKFAIL1           CCS      FAILREG                               #  IS ANYTHING IN FAILREG
061920,000056:    5554           15557                           TCF      CHKFAIL2                              #  YES TRY NEXT REG
061921,000057:    5555           22375                           LXCH     FAILREG                               
061922,000058:    5556           15571                           TCF      PROGLARM                              #  TURN ALARM LIGHT ON FOR FIRST ALARM
061923,000059: 
061924,000060:    5557           10376        CHKFAIL2           CCS      FAILREG    +1                         
061925,000061:    5560           15563                           TCF      FAIL3                                 
061926,000062:    5561           22376                           LXCH     FAILREG    +1                         
061927,000063:    5562           15574                           TCF      MULTEXIT                              
061928,000064: 
061929,000065:    5563           30377        FAIL3              CA       FAILREG    +2                         
061930,000066:    5564           74672                           MASK     POSMAX                                
061931,000067:    5565           10000                           CCS      A                                     
061932,000068:    5566           15600                           TCF      MULTFAIL                              
061933,000069:    5567           22377                           LXCH     FAILREG    +2                         

Page 1458

061935,000071:    5570           15574                           TCF      MULTEXIT                              
061936,000072: 
061937,000073:    5571           41036        PROGLARM           CS       DSPTAB     +11D                       
061938,000074:    5572           75612                           MASK     OCT40400                              
061939,000075:    5573           27036                           ADS      DSPTAB     +11D                       
061940,000076: 
061941,000077:    5574           56061        MULTEXIT           XCH      ITEMP1                                #  OBTAIN RETURN ADDRESS IN A
061942,000078:    5575           00003                           RELINT                                         
061943,000079:    5576           50000                           INDEX    A                                     
061944,000080:    5577           00001                           TC       1                                     
061945,000081: 
061946,000082:    5600           30001        MULTFAIL           CA       L                                     
061947,000083:    5601           64674                           AD       BIT15                                 
061948,000084:    5602           54377                           TS       FAILREG    +2                         
061949,000085: 
061950,000086:    5603           15574                           TCF      MULTEXIT                              
061951,000087: 
061952,000088:                                                                                                  #  PRIOLARM DISPLAYS V05N09 VIA PRIODSPR WITH 3 RETURNS TO THE USER FROM THE ASTRONAUT AT CALL LOC +1,+2,+3 AND
061953,000089:                                                                                                  #  AN IMMEDIATE RETURN TO THE USER AT CALL LOC +4. EXAMPLE FOLLOWS,
061954,000090:                                                                                                  #                                                   CAF    OCTXX           ALARM CODE
061955,000091:                                                                                                  #                                                   TC     BANKCALL
061956,000092:                                                                                                  #                                                   CADR   PRIOLARM
061957,000093: 
061958,000094:                                                                                                  #                                                   ...    ...
061959,000095:                                                                                                  #                                                   ...    ...
061960,000096:                                                                                                  #                                                   ...    ...             ASTRONAUT RETURN
061961,000097:                                                                                                  #                                                   TC     PHASCHNG        IMMEDIATE RETURN TO USER. RESTART
061962,000098:                                                                                                  #                                                   OCT    X.1             PHASE CHANGE FOR PRIO DISPLAY
061963,000099: 
061964,000100: 10,3671                                           BANK     10                                    
061965,000101: 10,2000                                           SETLOC   DISPLAYS                              
061966,000102: 10,2000                                           BANK                                           
061967,000103: 
061968,000104: 10,3671                                           COUNT    10/DSPLA                              
061969,000105: 
061970,000106: 10,3671           00004        PRIOLARM           INHINT                                         #  * * * KEEP IN DISPLAY ROUTINES BANK
061971,000107: 10,3672           54001                           TS       L                                     #  SAVE ALARM CODE
061972,000108: 
061973,000109: 10,3673           30133                           CA       BUF2                                  #  2 CADR OF PRIOLARM USER
061974,000110: 10,3674           55363                           TS       ALMCADR                               
061975,000111: 10,3675           30134                           CA       BUF2       +1                         
061976,000112: 10,3676           05546                           TC       PRIOENT    +1                         #  * LEAVE L ALONE
061977,000113: 10,3677           77467        -2SEC              DEC      -200       B-14                       #  *** DONT MOVE
061978,000114: 10,3700           34743                           CAF      V05N09                                
061979,000115: 10,3701           12632                           TCF      PRIODSPR                              
061980,000116: 
061981,000117:    5604                                           BLOCK    02                                    
061982,000118:    4000                                           SETLOC   FFTAG7                                
061983,000119:    4000                                           BANK                                           
061984,000120: 

Page 1459

061986,000122:    5604                                           COUNT    02/ALARM                              
061987,000123: 
061988,000124:    5604           00004        BAILOUT            INHINT                                         
061989,000125:    5605           30002                           CA       Q                                     
061990,000126:    5606           55363                           TS       ALMCADR                               
061991,000127: 
061992,000128:    5607           50002                           INDEX    Q                                     
061993,000129:    5610           30000                           CAF      0                                     
061994,000130:    5611           05544                           TC       BORTENT                               
061995,000131:    5612           40400        OCT40400           OCT      40400                                 
061996,000132: 
061997,000133:    5613           00004                           INHINT                                         
061998,000134:    5614           34711        WHIMPER            CA       TWO                                   
061999,000135:    5615           60005                           AD       Z                                     
062000,000136:    5616           54017                           TS       BRUPT                                 
062001,000137:    5617           50017                           RESUME                                         
062002,000138:    5620           04574                           TC       POSTJUMP                              #  RESUME SENDS CONTROL HERE
062003,000139:    5621           12632                           CADR     ENEMA                                 
062004,000140:    5622           00004        POODOO             INHINT                                         
062005,000141:    5623           30002                           CA       Q                                     
062006,000142:    5624           55363        ABORT2             TS       ALMCADR                               
062007,000143:    5625           50002                           INDEX    Q                                     
062008,000144:    5626           30000                           CAF      0                                     
062009,000145:    5627           05544                           TC       BORTENT                               
062010,000146:    5630           77770        OCT77770           OCT      77770                                 #  DONT MOVE
062011,000147:    5631           44712                           CS       BIT1                                  
062012,000148:    5632           70075                           MASK     FLAGWRD1                              
062013,000149:    5633           54075                           TS       FLAGWRD1                              #  RESET AVEGFLAG
062014,000150:    5634           44705                           CS       BIT6                                  
062015,000151:    5635           70103                           MASK     FLAGWRD7                              
062016,000152:    5636           54103                           TS       FLAGWRD7                              #  RESET V37FLAG
062017,000153: 
062018,000154:    5637           04555                           TC       BANKCALL                              
062019,000155:    5640           12465                           CADR     MR.KLEAN                              
062020,000156:    5641           05614                           TC       WHIMPER                               
062021,000157: 
062022,000158:    5642           00004        CCSHOLE            INHINT                                         
062023,000159:    5643           30002                           CA       Q                                     
062024,000160:    5644           05624                           TC       ABORT2                                
062025,000161:    5645           01103        OCT1103            OCT      1103                                  
062026,000162:    5646           00004        CURTAINS           INHINT                                         
062027,000163:    5647           30002                           CA       Q                                     
062028,000164:    5650           05541                           TC       ALARM2                                
062029,000165:    5651           00217        OCT217             OCT      00217                                 
062030,000166:    5652           01363                           TC       ALMCADR                               #  RETURN TO USER
062031,000167: 
062032,000168:    5653     5112               DOALARM            EQUALS   ENDOFJOB                              
062033,000169:                                                                                                  #  CALLING SEQUENCE FOR VARALARM
062034,000170: 
062035,000171:                                                                                                  #                                                   CAF    (ALARM)

Page 1460

062037,000173:                                                                                                  #                                                   TC     VARALARM
062038,000174: 
062039,000175:                                                                                                  #  VARALARM TURNS ON PROGRAM ALARM LIGHT BUT DOES NOT DISPLAY
062040,000176:    5653           00004        VARALARM           INHINT                                         
062041,000177: 
062042,000178:    5654           54001                           TS       L                                     #  SAVE USERS ALARM CODE
062043,000179: 
062044,000180:    5655           30002                           CA       Q                                     #  SAVE USERS Q
062045,000181:    5656           55363                           TS       ALMCADR                               
062046,000182: 
062047,000183:    5657           05545                           TC       PRIOENT                               
062048,000184:    5660           00014        OCT14              OCT      14                                    #  DONT MOVE
062049,000185: 
062050,000186:    5661           01363                           TC       ALMCADR                               #  RETURN TO USER
062051,000187: 
062052,000188:    5662     5604               ABORT              EQUALS   BAILOUT                               #  *** TEMPORARY UNTIL ABORT CALLS OUT

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