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.

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

Page 1457

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

Page 1458

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

Page 1459

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

Page 1460

062048,000173:                                                                                                  #                                                   TC     VARALARM
062049,000174: 
062050,000175:                                                                                                  #  VARALARM TURNS ON PROGRAM ALARM LIGHT BUT DOES NOT DISPLAY
062051,000176:    5653           00004        VARALARM           INHINT                                         
062052,000177: 
062053,000178:    5654           54001                           TS       L                                     #  SAVE USERS ALARM CODE
062054,000179: 
062055,000180:    5655           30002                           CA       Q                                     #  SAVE USERS Q
062056,000181:    5656           55363                           TS       ALMCADR                               
062057,000182: 
062058,000183:    5657           05545                           TC       PRIOENT                               
062059,000184:    5660           00014        OCT14              OCT      14                                    #  DONT MOVE
062060,000185: 
062061,000186:    5661           01363                           TC       ALMCADR                               #  RETURN TO USER
062062,000187: 
062063,000188:    5662     5604               ABORT              EQUALS   BAILOUT                               #  *** TEMPORARY UNTIL ABORT CALLS OUT

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