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
	20'35 OCT. 28,1968
Note that the date is the date of the printout, not the date of the program revision.

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

Page 1381

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

Page 1382

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

Page 1383

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

Page 1384

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

Page 1385

059405,000243: 13,3755                                           COUNT*   $$/ALARM                              
059406,000244: 
059407,000245: 13,3755           44747        FLAGS              CS       STATEBIT                              
059408,000246: 13,3756           70077                           MASK     FLAGWRD3                              
059409,000247: 13,3757           54077                           TS       FLAGWRD3                              
059410,000248: 13,3760           44745                           CS       REINTBIT                              
059411,000249: 13,3761           70106                           MASK     FLGWRD10                              
059412,000250: 13,3762           54106                           TS       FLGWRD10                              
059413,000251: 13,3763           44753                           CS       NODOBIT                               
059414,000252: 13,3764           70076                           MASK     FLAGWRD2                              
059415,000253: 13,3765           54076                           TS       FLAGWRD2                              
059416,000254: 13,3766           00002                           TC       Q                                     
059417,000255: 

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