Source Code

This is an attempt to recreate Luminary 99 Rev 2, otherwise known as LUM99R2, from Luminary 99 Rev 1 and ephemeris data from Luminary 116. The differences are confined to the last 10-12 lines of the CONTROLLED CONSTANTS. Luminary 99 Rev 1 source-code was transcribed from a printout in the MIT Museum, while Luminary 116 source code was transcribed from a printout belonging to Don Eyles. AGC developer James Kernan, the "rope mother" for the Apollo 11 Lunar Module's AGC, explains as follows: "At the last minute, Dan Lickly, our chief engineer, appeared with ephemerides updates and it took two tries to get it right. The result was that we created Lum99 Revision 1 and Lum99 Revision 2." It is suspected that the former is what's in the MIT Museum, and the latter is what we are trying to recreate here. As for which revision actually flew in Apollo 11, all of the other available surviving evidence points to Rev 1 rather than to Rev 2, so we're just not sure!

058058,000002:                                                                                                  ## Copyright:   Public domain.
058059,000003:                                                                                                  ## Filename:    ALARM_AND_ABORT.agc
058060,000004:                                                                                                  ## Purpose:     Part of the source code for Luminary 1A build 099.
058061,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
058062,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 11.
058063,000007:                                                                                                  ## Assembler:   yaYUL
058064,000008:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
058065,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo.
058066,000010:                                                                                                  ## Pages:       1381-1385
058067,000011:                                                                                                  ## Mod history: 2009-05-10 SN   (Sergio Navarro).  Started adapting
058068,000012:                                                                                                  ##                              from the Luminary131/ file of the same
058069,000013:                                                                                                  ##                              name, using Luminary099 page images.
058070,000014:                                                                                                  ##              2009-06-05 RSB  Fixed a type.
058071,000015:                                                                                                  ##              2011-01-06 JL   Fixed pseudo-label indentation.
058072,000016:                                                                                                  ##              2016-12-13 RSB  GOTOP00H -> GOTOPOOH
058073,000017:                                                                                                  ##              2016-12-18 RSB  Proofed text comments with octopus/ProoferComments
058074,000018:                                                                                                  ##                              and corrected the errors found.
058075,000019:                                                                                                  ##              2017-03-03 RSB  Snapshot of Luminary 99 Rev 1. 
058076,000020: 

Page 1381

058078,000022:                                                                                                  #  THE FOLLOWING SUBROUTINE MAY BE CALLED TO DISPLAY A NON-ABORTIVE ALARM CONDITION.  IT MAY BE CALLED
058079,000023:                                                                                                  #  EITHER IN INTERRUPT OR UNDER EXECUTIVE CONTROL.
058080,000024: 
058081,000025:                                                                                                  #  CALLING SEQUENCE IS AS FOLLOWS:
058082,000026:                                                                                                  #                TC      ALARM
058083,000027:                                                                                                  #                OCT     AAANN           ALARM NO. NN IN GENERAL AREA AAA.
058084,000028:                                                                                                  #                                        (RETURNS HERE)
058085,000029: 
058086,000030:    5567                                           BLOCK    02                                    
058087,000031:    4000                                           SETLOC   FFTAG7                                
058088,000032:    4000                                           BANK                                           
058089,000033: 
058090,000034:    5567     0375                                  EBANK=   FAILREG                               
058091,000035: 
058092,000036:    5567                                           COUNT*   $$/ALARM                              
058093,000037: 
058094,000038:                                                                                                  #  ALARM TURNS ON THE PROGRAM ALARM LIGHT, BUT DOES NOT DISPLAY.
058095,000039: 
058096,000040:    5567           00004        ALARM              INHINT                                         
058097,000041: 
058098,000042:    5570           30002                           CA       Q                                     
058099,000043:    5571           55363        ALARM2             TS       ALMCADR                               
058100,000044:    5572           50002                           INDEX    Q                                     
058101,000045:    5573           30000                           CA       0                                     
058102,000046:    5574           54001        BORTENT            TS       L                                     
058103,000047: 
058104,000048:    5575           30006        PRIOENT            CA       BBANK                                 
058105,000049:    5576           00006                 +1        EXTEND                                         
058106,000050:    5577           04007                           ROR      SUPERBNK                              #  ADD SUPER BITS.
058107,000051:    5600           55364                           TS       ALMCADR    +1                         
058108,000052: 
058109,000053:    5601           30002        LARMENT            CA       Q                                     #  STORE RETURN FOR ALARM
058110,000054:    5602           54061                           TS       ITEMP1                                
058111,000055: 
058112,000056:    5603           10375        CHKFAIL1           CCS      FAILREG                               #  IS ANYTHING IN FAILREG
058113,000057:    5604           15607                           TCF      CHKFAIL2                              #  YES TRY NEXT REG
058114,000058:    5605           22375                           LXCH     FAILREG                               
058115,000059:    5606           15621                           TCF      PROGLARM                              #  TURN ALARM LIGHT ON FOR FIRST ALARM
058116,000060: 
058117,000061:    5607           10376        CHKFAIL2           CCS      FAILREG    +1                         
058118,000062:    5610           15613                           TCF      FAIL3                                 
058119,000063:    5611           22376                           LXCH     FAILREG    +1                         
058120,000064:    5612           15624                           TCF      MULTEXIT                              
058121,000065: 
058122,000066:    5613           30377        FAIL3              CA       FAILREG    +2                         
058123,000067:    5614           74733                           MASK     POSMAX                                
058124,000068:    5615           10000                           CCS      A                                     
058125,000069:    5616           15630                           TCF      MULTFAIL                              
058126,000070:    5617           22377                           LXCH     FAILREG    +2                         
058127,000071:    5620           15624                           TCF      MULTEXIT                              
058128,000072: 

Page 1382

058130,000074: 
058131,000075:    5621           41036        PROGLARM           CS       DSPTAB     +11D                       
058132,000076:    5622           75642                           MASK     OCT40400                              
058133,000077:    5623           27036                           ADS      DSPTAB     +11D                       
058134,000078: 
058135,000079: 
058136,000080:    5624           56061        MULTEXIT           XCH      ITEMP1                                #  OBTAIN RETURN ADDRESS IN A
058137,000081:    5625           00003                           RELINT                                         
058138,000082:    5626           50000                           INDEX    A                                     
058139,000083:    5627           00001                           TC       1                                     
058140,000084: 
058141,000085:    5630           30001        MULTFAIL           CA       L                                     
058142,000086:    5631           64735                           AD       BIT15                                 
058143,000087:    5632           54377                           TS       FAILREG    +2                         
058144,000088: 
058145,000089:    5633           15624                           TCF      MULTEXIT                              
058146,000090: 
058147,000091:                                                                                                  #  PRIOLARM DISPLAYS V05N09 VIA PRIODSPR WITH 3 RETURNS TO THE USER FROM THE ASTRONAUT AT CALL LOC +1,+2,+3 AND
058148,000092:                                                                                                  #  AN IMMEDIATE RETURN TO THE USER AT CALL LOC +4.  EXAMPLE FOLLOWS,
058149,000093:                                                                                                  #                CAF     OCTXX           ALARM CODE
058150,000094:                                                                                                  #                TC      BANKCALL
058151,000095:                                                                                                  #                CADR    PRIOLARM
058152,000096:                                                                                                  #                ...     ...
058153,000097:                                                                                                  #                ...     ...
058154,000098:                                                                                                  #                ...     ...             ASTRONAUT RETURN
058155,000099:                                                                                                  #                TC      PHASCHNG        IMMEDIATE RETURN TO USER.  RESTART
058156,000100:                                                                                                  #                OCT     X.1             PHASE CHANGE FOR PRIO DISPLAY
058157,000101: 
058158,000102: 10,3562                                           BANK     10                                    
058159,000103: 10,2000                                           SETLOC   DISPLAYS                              
058160,000104: 10,2000                                           BANK                                           
058161,000105: 
058162,000106: 10,3562                                           COUNT*   $$/DSPLA                              
058163,000107: 10,3562           00004        PRIOLARM           INHINT                                         #  * * * KEEP IN DISPLAY ROUTINES BANK
058164,000108: 10,3563           54001                           TS       L                                     #  SAVE ALARM CODE
058165,000109: 
058166,000110: 10,3564           30133                           CA       BUF2                                  #  2 CADR OF PRIOLARM USER
058167,000111: 10,3565           55363                           TS       ALMCADR                               
058168,000112: 10,3566           30134                           CA       BUF2       +1                         
058169,000113: 10,3567           05576                           TC       PRIOENT    +1                         #  * LEAVE L ALONE
058170,000114: 10,3570           77467        -2SEC              DEC      -200       B-14                       #  *** DONT MOVE
058171,000115: 10,3571           35006                           CAF      V05N09                                
058172,000116: 10,3572           12504                           TCF      PRIODSPR                              
058173,000117: 
058174,000118:    5634                                           BLOCK    02                                    
058175,000119:    4000                                           SETLOC   FFTAG7                                
058176,000120:    4000                                           BANK                                           
058177,000121: 
058178,000122:    5634                                           COUNT*   $$/ALARM                              
058179,000123:    5634           00004        BAILOUT            INHINT                                         
058180,000124:    5635           30002                           CA       Q                                     

Page 1383

058182,000126:    5636           55363                           TS       ALMCADR                               
058183,000127: 
058184,000128:    5637           50002                           INDEX    Q                                     
058185,000129:    5640           30000                           CAF      0                                     
058186,000130:    5641           05574                           TC       BORTENT                               
058187,000131:    5642           40400        OCT40400           OCT      40400                                 
058188,000132: 
058189,000133:    5643           00004                           INHINT                                         
058190,000134:    5644           34752        WHIMPER            CA       TWO                                   
058191,000135:    5645           60005                           AD       Z                                     
058192,000136:    5646           54017                           TS       BRUPT                                 
058193,000137:    5647           50017                           RESUME                                         
058194,000138:    5650           04635                           TC       POSTJUMP                              #  RESUME SENDS CONTROL HERE
058195,000139:    5651           12765                           CADR     ENEMA                                 
058196,000140:    5652           00004        POODOO             INHINT                                         
058197,000141:    5653           30002                           CA       Q                                     
058198,000142:    5654           55363        ABORT2             TS       ALMCADR                               
058199,000143:    5655           50002                           INDEX    Q                                     
058200,000144:    5656           30000                           CAF      0                                     
058201,000145:    5657           05574                           TC       BORTENT                               
058202,000146:    5660           77770        OCT77770           OCT      77770                                 #  DON'T MOVE
058203,000147: 
058204,000148:    5661           34765                           CAF      OCT35                                 #  4.35SPOT FOR GOPOODOO
058205,000149:    5662           54001                           TS       L                                     
058206,000150:    5663           40000                           COM                                            
058207,000151:    5664           52761                           DXCH     -PHASE4                               
058208,000152:    5665           00004        GOPOODOO           INHINT                                         
058209,000153:    5666           04616                           TC       BANKCALL                              #  RESET STATEFLG, REINTFLG, AND NODOFLAG.
058210,000154:    5667           27755                           CADR     FLAGS                                 
058211,000155:    5670           30103                           CA       FLAGWRD7                              #  IS SERVICER CURRENTLY IN OPERATION?
058212,000156:    5671           74746                           MASK     V37FLBIT                              
058213,000157:    5672           10000                           CCS      A                                     
058214,000158:    5673           15701                           TCF      STRTIDLE                              
058215,000159:    5674           04616                           TC       BANKCALL                              #  TERMINATE GRPS 1, 3, 5, AND 6
058216,000160:    5675           12652                           CADR     V37KLEAN                              
058217,000161:    5676           04616                           TC       BANKCALL                              #  TERMINATE GRPS 2, 4, 1, 3, 5, AND 6
058218,000162:    5677           12643                           CADR     MR.KLEAN                              #        (I.E., GRP 4 LAST)
058219,000163:    5700           15644                           TCF      WHIMPER                               
058220,000164:    5701           35743        STRTIDLE           CAF      BBSERVDL                              
058221,000165:    5702           04727                           TC       SUPERSW                               
058222,000166:    5703           04616                           TC       BANKCALL                              #  PUT SERVICER INTO ITS "GROUND" STATE
058223,000167:    5704           57321                           CADR     SERVIDLE                              #  AND PROCEED TO GOTOPOOH.
058224,000168:    5705           00004        CCSHOLE            INHINT                                         
058225,000169:    5706           30002                           CA       Q                                     
058226,000170:    5707           05654                           TC       ABORT2                                
058227,000171:    5710           01103        OCT21103           OCT      1103                                  
058228,000172:    5711           00004        CURTAINS           INHINT                                         
058229,000173:    5712           30002                           CA       Q                                     
058230,000174:    5713           05571                           TC       ALARM2                                
058231,000175:    5714           00217        OCT217             OCT      00217                                 

Page 1384

058233,000177:    5715           01363                           TC       ALMCADR                               #  RETURN TO USER
058234,000178: 
058235,000179:    5716           00004        BAILOUT1           INHINT                                         
058236,000180:    5717           53364                           DXCH     ALMCADR                               
058237,000181:    5720           35742                           CAF      ADR40400                              
058238,000182:    5721           54061        BOTHABRT           TS       ITEMP1                                
058239,000183:    5722           50002                           INDEX    Q                                     
058240,000184:    5723           30000                           CAF      0                                     
058241,000185:    5724           54001                           TS       L                                     
058242,000186:    5725           15603                           TCF      CHKFAIL1                              
058243,000187:    5726           00004        POODOO1            INHINT                                         
058244,000188:    5727           53364                           DXCH     ALMCADR                               
058245,000189:    5730           35741                           CAF      ADR77770                              
058246,000190:    5731           15721                           TCF      BOTHABRT                              
058247,000191: 
058248,000192:    5732           00004        ALARM1             INHINT                                         
058249,000193:    5733           53364                           DXCH     ALMCADR                               
058250,000194:    5734           00004        ALMNCADR           INHINT                                         
058251,000195:    5735           50002                           INDEX    Q                                     
058252,000196:    5736           30000                           CA       0                                     
058253,000197:    5737           54001                           TS       L                                     
058254,000198:    5740           15601                           TCF      LARMENT                               
058255,000199: 
058256,000200:    5741           15660        ADR77770           TCF      OCT77770                              
058257,000201:    5742           15642        ADR40400           TCF      OCT40400                              
058258,000202:    5743     5155               DOALARM            EQUALS   ENDOFJOB                              
058259,000203:    5743  E7,1515                                  EBANK=   DVCNTR                                
058260,000204:    5743           56067        BBSERVDL           BBCON    SERVIDLE                              
058261,000205: 
058262,000206:                                                                                                  #  CALLING SEQUENCE FOR VARALARM
058263,000207:                                                                                                  #                CAF     (ALARM)
058264,000208:                                                                                                  #                TC      VARALARM
058265,000209: 
058266,000210:                                                                                                  #  VARALARM TURNS ON PROGRAM ALARM LIGHT BUT DOES NOT DISPLAY
058267,000211: 
058268,000212:    5744           00004        VARALARM           INHINT                                         
058269,000213: 
058270,000214:    5745           54001                           TS       L                                     #  SAVE USERS ALARM CODE
058271,000215: 
058272,000216:    5746           30002                           CA       Q                                     #  SAVE USERS Q
058273,000217:    5747           55363                           TS       ALMCADR                               
058274,000218: 
058275,000219:    5750           05575                           TC       PRIOENT                               
058276,000220:    5751           00014        OCT14              OCT      14                                    #  DONT MOVE
058277,000221: 
058278,000222:    5752           01363                           TC       ALMCADR                               #  RETURN TO USER
058279,000223: 
058280,000224:    5753     5644               ABORT              EQUALS   WHIMPER                               
058281,000225: 13,3755                                           BANK     13                                    
058282,000226: 13,2000                                           SETLOC   ABTFLGS                               
058283,000227: 13,2000                                           BANK                                           

Page 1385

058285,000229: 13,3755                                           COUNT*   $$/ALARM                              
058286,000230: 
058287,000231: 13,3755           44747        FLAGS              CS       STATEBIT                              
058288,000232: 13,3756           70077                           MASK     FLAGWRD3                              
058289,000233: 13,3757           54077                           TS       FLAGWRD3                              
058290,000234: 13,3760           44745                           CS       REINTBIT                              
058291,000235: 13,3761           70106                           MASK     FLGWRD10                              
058292,000236: 13,3762           54106                           TS       FLGWRD10                              
058293,000237: 13,3763           44753                           CS       NODOBIT                               
058294,000238: 13,3764           70076                           MASK     FLAGWRD2                              
058295,000239: 13,3765           54076                           TS       FLAGWRD2                              
058296,000240: 13,3766           00002                           TC       Q                                     
058297,000241: 

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