Source Code

These source-code files were from the printout at the MIT Museum, with many thanks to Deborah Douglas, the Museum's Curator of Science and Technology, for releasing it to us. The printout was digitally photographed by Paul Fjeld. A team of volunteers transcribed the source code manually from these images or, where appropriate, modified already-transcribed but similar source Luminary 131 (Apollo 13) source code to agree with the images from the printout. Note that the page images presented online are of reduced quality, and that higher-quality 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 001 OF AGC PROGRAM LMY99 BY NASA 2021112-061
	16:27 JULY 14,1969
Note that the date is the date of the printout, not the date of the program revision.

059185,000002:                                                                                                  ## Copyright:   Public domain.
059186,000003:                                                                                                  ## Filename:    ALARM_AND_ABORT.agc
059187,000004:                                                                                                  ## Purpose:     Part of the source code for Luminary 1A build 099.
059188,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
059189,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 11.
059190,000007:                                                                                                  ## Assembler:   yaYUL
059191,000008:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
059192,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo.
059193,000010:                                                                                                  ## Pages:       1381-1385
059194,000011:                                                                                                  ## Mod history: 2009-05-10 SN   (Sergio Navarro).  Started adapting
059195,000012:                                                                                                  ##                              from the Luminary131/ file of the same
059196,000013:                                                                                                  ##                              name, using Luminary099 page images.
059197,000014:                                                                                                  ##              2009-06-05 RSB  Fixed a type.
059198,000015:                                                                                                  ##              2011-01-06 JL   Fixed pseudo-label indentation.
059199,000016:                                                                                                  ##              2016-12-13 RSB  GOTOP00H -> GOTOPOOH
059200,000017:                                                                                                  ##              2016-12-18 RSB  Proofed text comments with octopus/ProoferComments
059201,000018:                                                                                                  ##                              and corrected the errors found.
059202,000019:                                                                                                  ##              2021-05-30 ABS  OCT21103 -> OCT1103
059203,000020:                                                                                                  ##
059204,000021:                                                                                                  ## This source code has been transcribed or otherwise adapted from
059205,000022:                                                                                                  ## digitized images of a hardcopy from the MIT Museum.  The digitization
059206,000023:                                                                                                  ## was performed by Paul Fjeld, and arranged for by Deborah Douglas of
059207,000024:                                                                                                  ## the Museum.  Many thanks to both.  The images (with suitable reduction
059208,000025:                                                                                                  ## in storage size and consequent reduction in image quality as well) are
059209,000026:                                                                                                  ## available online at www.ibiblio.org/apollo.  If for some reason you
059210,000027:                                                                                                  ## find that the images are illegible, contact me at info@sandroid.org
059211,000028:                                                                                                  ## about getting access to the (much) higher-quality images which Paul
059212,000029:                                                                                                  ## actually created.
059213,000030:                                                                                                  ##
059214,000031:                                                                                                  ## Notations on the hardcopy document read, in part:
059215,000032:                                                                                                  ##
059216,000033:                                                                                                  ##      Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
059217,000034:                                                                                                  ##      16:27 JULY 14, 1969 
059218,000035: 

Page 1381

059220,000037:                                                                                                  #  THE FOLLOWING SUBROUTINE MAY BE CALLED TO DISPLAY A NON-ABORTIVE ALARM CONDITION.  IT MAY BE CALLED
059221,000038:                                                                                                  #  EITHER IN INTERRUPT OR UNDER EXECUTIVE CONTROL.
059222,000039: 
059223,000040:                                                                                                  #  CALLING SEQUENCE IS AS FOLLOWS:
059224,000041:                                                                                                  #                TC      ALARM
059225,000042:                                                                                                  #                OCT     AAANN           ALARM NO. NN IN GENERAL AREA AAA.
059226,000043:                                                                                                  #                                        (RETURNS HERE)
059227,000044: 
059228,000045:    5567                                           BLOCK    02                                    
059229,000046:    4000                                           SETLOC   FFTAG7                                
059230,000047:    4000                                           BANK                                           
059231,000048: 
059232,000049:    5567     0375                                  EBANK=   FAILREG                               
059233,000050: 
059234,000051:    5567                                           COUNT*   $$/ALARM                              
059235,000052: 
059236,000053:                                                                                                  #  ALARM TURNS ON THE PROGRAM ALARM LIGHT, BUT DOES NOT DISPLAY.
059237,000054: 
059238,000055:    5567           00004        ALARM              INHINT                                         
059239,000056: 
059240,000057:    5570           30002                           CA       Q                                     
059241,000058:    5571           55363        ALARM2             TS       ALMCADR                               
059242,000059:    5572           50002                           INDEX    Q                                     
059243,000060:    5573           30000                           CA       0                                     
059244,000061:    5574           54001        BORTENT            TS       L                                     
059245,000062: 
059246,000063:    5575           30006        PRIOENT            CA       BBANK                                 
059247,000064:    5576           00006                 +1        EXTEND                                         
059248,000065:    5577           04007                           ROR      SUPERBNK                              #  ADD SUPER BITS.
059249,000066:    5600           55364                           TS       ALMCADR    +1                         
059250,000067: 
059251,000068:    5601           30002        LARMENT            CA       Q                                     #  STORE RETURN FOR ALARM
059252,000069:    5602           54061                           TS       ITEMP1                                
059253,000070: 
059254,000071:    5603           10375        CHKFAIL1           CCS      FAILREG                               #  IS ANYTHING IN FAILREG
059255,000072:    5604           15607                           TCF      CHKFAIL2                              #  YES TRY NEXT REG
059256,000073:    5605           22375                           LXCH     FAILREG                               
059257,000074:    5606           15621                           TCF      PROGLARM                              #  TURN ALARM LIGHT ON FOR FIRST ALARM
059258,000075: 
059259,000076:    5607           10376        CHKFAIL2           CCS      FAILREG    +1                         
059260,000077:    5610           15613                           TCF      FAIL3                                 
059261,000078:    5611           22376                           LXCH     FAILREG    +1                         
059262,000079:    5612           15624                           TCF      MULTEXIT                              
059263,000080: 
059264,000081:    5613           30377        FAIL3              CA       FAILREG    +2                         
059265,000082:    5614           74733                           MASK     POSMAX                                
059266,000083:    5615           10000                           CCS      A                                     
059267,000084:    5616           15630                           TCF      MULTFAIL                              
059268,000085:    5617           22377                           LXCH     FAILREG    +2                         
059269,000086:    5620           15624                           TCF      MULTEXIT                              
059270,000087: 

Page 1382

059272,000089: 
059273,000090:    5621           41036        PROGLARM           CS       DSPTAB     +11D                       
059274,000091:    5622           75642                           MASK     OCT40400                              
059275,000092:    5623           27036                           ADS      DSPTAB     +11D                       
059276,000093: 
059277,000094: 
059278,000095:    5624           56061        MULTEXIT           XCH      ITEMP1                                #  OBTAIN RETURN ADDRESS IN A
059279,000096:    5625           00003                           RELINT                                         
059280,000097:    5626           50000                           INDEX    A                                     
059281,000098:    5627           00001                           TC       1                                     
059282,000099: 
059283,000100:    5630           30001        MULTFAIL           CA       L                                     
059284,000101:    5631           64735                           AD       BIT15                                 
059285,000102:    5632           54377                           TS       FAILREG    +2                         
059286,000103: 
059287,000104:    5633           15624                           TCF      MULTEXIT                              
059288,000105: 
059289,000106:                                                                                                  #  PRIOLARM DISPLAYS V05N09 VIA PRIODSPR WITH 3 RETURNS TO THE USER FROM THE ASTRONAUT AT CALL LOC +1,+2,+3 AND
059290,000107:                                                                                                  #  AN IMMEDIATE RETURN TO THE USER AT CALL LOC +4.  EXAMPLE FOLLOWS,
059291,000108:                                                                                                  #                CAF     OCTXX           ALARM CODE
059292,000109:                                                                                                  #                TC      BANKCALL
059293,000110:                                                                                                  #                CADR    PRIOLARM
059294,000111:                                                                                                  #                ...     ...
059295,000112:                                                                                                  #                ...     ...
059296,000113:                                                                                                  #                ...     ...             ASTRONAUT RETURN
059297,000114:                                                                                                  #                TC      PHASCHNG        IMMEDIATE RETURN TO USER.  RESTART
059298,000115:                                                                                                  #                OCT     X.1             PHASE CHANGE FOR PRIO DISPLAY
059299,000116: 
059300,000117: 10,3562                                           BANK     10                                    
059301,000118: 10,2000                                           SETLOC   DISPLAYS                              
059302,000119: 10,2000                                           BANK                                           
059303,000120: 
059304,000121: 10,3562                                           COUNT*   $$/DSPLA                              
059305,000122: 10,3562           00004        PRIOLARM           INHINT                                         #  * * * KEEP IN DISPLAY ROUTINES BANK
059306,000123: 10,3563           54001                           TS       L                                     #  SAVE ALARM CODE
059307,000124: 
059308,000125: 10,3564           30133                           CA       BUF2                                  #  2 CADR OF PRIOLARM USER
059309,000126: 10,3565           55363                           TS       ALMCADR                               
059310,000127: 10,3566           30134                           CA       BUF2       +1                         
059311,000128: 10,3567           05576                           TC       PRIOENT    +1                         #  * LEAVE L ALONE
059312,000129: 10,3570           77467        -2SEC              DEC      -200       B-14                       #  *** DONT MOVE
059313,000130: 10,3571           35006                           CAF      V05N09                                
059314,000131: 10,3572           12504                           TCF      PRIODSPR                              
059315,000132: 
059316,000133:    5634                                           BLOCK    02                                    
059317,000134:    4000                                           SETLOC   FFTAG7                                
059318,000135:    4000                                           BANK                                           
059319,000136: 
059320,000137:    5634                                           COUNT*   $$/ALARM                              
059321,000138:    5634           00004        BAILOUT            INHINT                                         
059322,000139:    5635           30002                           CA       Q                                     

Page 1383

059324,000141:    5636           55363                           TS       ALMCADR                               
059325,000142: 
059326,000143:    5637           50002                           INDEX    Q                                     
059327,000144:    5640           30000                           CAF      0                                     
059328,000145:    5641           05574                           TC       BORTENT                               
059329,000146:    5642           40400        OCT40400           OCT      40400                                 
059330,000147: 
059331,000148:    5643           00004                           INHINT                                         
059332,000149:    5644           34752        WHIMPER            CA       TWO                                   
059333,000150:    5645           60005                           AD       Z                                     
059334,000151:    5646           54017                           TS       BRUPT                                 
059335,000152:    5647           50017                           RESUME                                         
059336,000153:    5650           04635                           TC       POSTJUMP                              #  RESUME SENDS CONTROL HERE
059337,000154:    5651           12765                           CADR     ENEMA                                 
059338,000155:    5652           00004        POODOO             INHINT                                         
059339,000156:    5653           30002                           CA       Q                                     
059340,000157:    5654           55363        ABORT2             TS       ALMCADR                               
059341,000158:    5655           50002                           INDEX    Q                                     
059342,000159:    5656           30000                           CAF      0                                     
059343,000160:    5657           05574                           TC       BORTENT                               
059344,000161:    5660           77770        OCT77770           OCT      77770                                 #  DON'T MOVE
059345,000162: 
059346,000163:    5661           34765                           CAF      OCT35                                 #  4.35SPOT FOR GOPOODOO
059347,000164:    5662           54001                           TS       L                                     
059348,000165:    5663           40000                           COM                                            
059349,000166:    5664           52761                           DXCH     -PHASE4                               
059350,000167:    5665           00004        GOPOODOO           INHINT                                         
059351,000168:    5666           04616                           TC       BANKCALL                              #  RESET STATEFLG, REINTFLG, AND NODOFLAG.
059352,000169:    5667           27755                           CADR     FLAGS                                 
059353,000170:    5670           30103                           CA       FLAGWRD7                              #  IS SERVICER CURRENTLY IN OPERATION?
059354,000171:    5671           74746                           MASK     V37FLBIT                              
059355,000172:    5672           10000                           CCS      A                                     
059356,000173:    5673           15701                           TCF      STRTIDLE                              
059357,000174:    5674           04616                           TC       BANKCALL                              #  TERMINATE GRPS 1, 3, 5, AND 6
059358,000175:    5675           12652                           CADR     V37KLEAN                              
059359,000176:    5676           04616                           TC       BANKCALL                              #  TERMINATE GRPS 2, 4, 1, 3, 5, AND 6
059360,000177:    5677           12643                           CADR     MR.KLEAN                              #        (I.E., GRP 4 LAST)
059361,000178:    5700           15644                           TCF      WHIMPER                               
059362,000179:    5701           35743        STRTIDLE           CAF      BBSERVDL                              
059363,000180:    5702           04727                           TC       SUPERSW                               
059364,000181:    5703           04616                           TC       BANKCALL                              #  PUT SERVICER INTO ITS "GROUND" STATE
059365,000182:    5704           57321                           CADR     SERVIDLE                              #  AND PROCEED TO GOTOPOOH.
059366,000183:    5705           00004        CCSHOLE            INHINT                                         
059367,000184:    5706           30002                           CA       Q                                     
059368,000185:    5707           05654                           TC       ABORT2                                
059369,000186:    5710           01103        OCT1103            OCT      1103                                  
059370,000187:    5711           00004        CURTAINS           INHINT                                         
059371,000188:    5712           30002                           CA       Q                                     
059372,000189:    5713           05571                           TC       ALARM2                                
059373,000190:    5714           00217        OCT217             OCT      00217                                 

Page 1384

059375,000192:    5715           01363                           TC       ALMCADR                               #  RETURN TO USER
059376,000193: 
059377,000194:    5716           00004        BAILOUT1           INHINT                                         
059378,000195:    5717           53364                           DXCH     ALMCADR                               
059379,000196:    5720           35742                           CAF      ADR40400                              
059380,000197:    5721           54061        BOTHABRT           TS       ITEMP1                                
059381,000198:    5722           50002                           INDEX    Q                                     
059382,000199:    5723           30000                           CAF      0                                     
059383,000200:    5724           54001                           TS       L                                     
059384,000201:    5725           15603                           TCF      CHKFAIL1                              
059385,000202:    5726           00004        POODOO1            INHINT                                         
059386,000203:    5727           53364                           DXCH     ALMCADR                               
059387,000204:    5730           35741                           CAF      ADR77770                              
059388,000205:    5731           15721                           TCF      BOTHABRT                              
059389,000206: 
059390,000207:    5732           00004        ALARM1             INHINT                                         
059391,000208:    5733           53364                           DXCH     ALMCADR                               
059392,000209:    5734           00004        ALMNCADR           INHINT                                         
059393,000210:    5735           50002                           INDEX    Q                                     
059394,000211:    5736           30000                           CA       0                                     
059395,000212:    5737           54001                           TS       L                                     
059396,000213:    5740           15601                           TCF      LARMENT                               
059397,000214: 
059398,000215:    5741           15660        ADR77770           TCF      OCT77770                              
059399,000216:    5742           15642        ADR40400           TCF      OCT40400                              
059400,000217:    5743     5155               DOALARM            EQUALS   ENDOFJOB                              
059401,000218:    5743  E7,1515                                  EBANK=   DVCNTR                                
059402,000219:    5743           56067        BBSERVDL           BBCON    SERVIDLE                              
059403,000220: 
059404,000221:                                                                                                  #  CALLING SEQUENCE FOR VARALARM
059405,000222:                                                                                                  #                CAF     (ALARM)
059406,000223:                                                                                                  #                TC      VARALARM
059407,000224: 
059408,000225:                                                                                                  #  VARALARM TURNS ON PROGRAM ALARM LIGHT BUT DOES NOT DISPLAY
059409,000226: 
059410,000227:    5744           00004        VARALARM           INHINT                                         
059411,000228: 
059412,000229:    5745           54001                           TS       L                                     #  SAVE USERS ALARM CODE
059413,000230: 
059414,000231:    5746           30002                           CA       Q                                     #  SAVE USERS Q
059415,000232:    5747           55363                           TS       ALMCADR                               
059416,000233: 
059417,000234:    5750           05575                           TC       PRIOENT                               
059418,000235:    5751           00014        OCT14              OCT      14                                    #  DONT MOVE
059419,000236: 
059420,000237:    5752           01363                           TC       ALMCADR                               #  RETURN TO USER
059421,000238: 
059422,000239:    5753     5644               ABORT              EQUALS   WHIMPER                               
059423,000240: 13,3755                                           BANK     13                                    
059424,000241: 13,2000                                           SETLOC   ABTFLGS                               
059425,000242: 13,2000                                           BANK                                           

Page 1385

059427,000244: 13,3755                                           COUNT*   $$/ALARM                              
059428,000245: 
059429,000246: 13,3755           44747        FLAGS              CS       STATEBIT                              
059430,000247: 13,3756           70077                           MASK     FLAGWRD3                              
059431,000248: 13,3757           54077                           TS       FLAGWRD3                              
059432,000249: 13,3760           44745                           CS       REINTBIT                              
059433,000250: 13,3761           70106                           MASK     FLGWRD10                              
059434,000251: 13,3762           54106                           TS       FLGWRD10                              
059435,000252: 13,3763           44753                           CS       NODOBIT                               
059436,000253: 13,3764           70076                           MASK     FLAGWRD2                              
059437,000254: 13,3765           54076                           TS       FLAGWRD2                              
059438,000255: 13,3766           00002                           TC       Q                                     
059439,000256: 

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