Source Code

These source-code files are part of a reconstructed copy of Luminary 98, a development version of the Apollo 11 Lunar Module (LM) Apollo Guidance Computer (AGC) software.

The reconstruction began with source code of Luminary 99 revision 1 previously transcribed from a digitized copy of that program. The code was then updated by undoing changes described in original Luminary memo 85, using asterisks indicating changed lines in the listing as a guide. While no listing of this version is known to exist, nor are the memory-bank checksums available, the reconstruction is believed to be correct because it was an an intermediate step in reconstructing Luminary 97 whose reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152G. Note that page numbers in the reconstructed code match those on the Luminary 099 revision 001 printout, although the added code would likely have changed page numbers for a real Luminary 98 listing.

Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository.

057749,000002:                                                                                                  ## Copyright:   Public domain.
057750,000003:                                                                                                  ## Filename:    ALARM_AND_ABORT.agc
057751,000004:                                                                                                  ## Purpose:     A section of Luminary revision 98.
057752,000005:                                                                                                  ##              It is part of the reconstructed source code for the a
057753,000006:                                                                                                  ##              development version of the flight software for the Lunar 
057754,000007:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 11.
057755,000008:                                                                                                  ##              The code has been recreated from a copy of Luminary 99
057756,000009:                                                                                                  ##              revision 001, using asterisks indicating changed lines in
057757,000010:                                                                                                  ##              the listing and Luminary Memo #85, which lists changes between
057758,000011:                                                                                                  ##              Luminary 98 and 99.
057759,000012:                                                                                                  ## Reference:   pp. 1381-1385
057760,000013:                                                                                                  ## Assembler:   yaYUL
057761,000014:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
057762,000015:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
057763,000016:                                                                                                  ## Mod history: 2019-07-28 MAS  Created from Luminary 99.
057764,000017:                                                                                                  ##              2021-05-30 ABS  OCT21103 -> OCT1103
057765,000018: 

Page 1381

057767,000020:                                                                                                  #  THE FOLLOWING SUBROUTINE MAY BE CALLED TO DISPLAY A NON-ABORTIVE ALARM CONDITION.  IT MAY BE CALLED
057768,000021:                                                                                                  #  EITHER IN INTERRUPT OR UNDER EXECUTIVE CONTROL.
057769,000022: 
057770,000023:                                                                                                  #  CALLING SEQUENCE IS AS FOLLOWS:
057771,000024:                                                                                                  #                TC      ALARM
057772,000025:                                                                                                  #                OCT     AAANN           ALARM NO. NN IN GENERAL AREA AAA.
057773,000026:                                                                                                  #                                        (RETURNS HERE)
057774,000027: 
057775,000028:    5567                                           BLOCK    02                                    
057776,000029:    4000                                           SETLOC   FFTAG7                                
057777,000030:    4000                                           BANK                                           
057778,000031: 
057779,000032:    5567     0375                                  EBANK=   FAILREG                               
057780,000033: 
057781,000034:    5567                                           COUNT*   $$/ALARM                              
057782,000035: 
057783,000036:                                                                                                  #  ALARM TURNS ON THE PROGRAM ALARM LIGHT, BUT DOES NOT DISPLAY.
057784,000037: 
057785,000038:    5567           00004        ALARM              INHINT                                         
057786,000039: 
057787,000040:    5570           30002                           CA       Q                                     
057788,000041:    5571           55363        ALARM2             TS       ALMCADR                               
057789,000042:    5572           50002                           INDEX    Q                                     
057790,000043:    5573           30000                           CA       0                                     
057791,000044:    5574           54001        BORTENT            TS       L                                     
057792,000045: 
057793,000046:    5575           30006        PRIOENT            CA       BBANK                                 
057794,000047:    5576           00006                 +1        EXTEND                                         
057795,000048:    5577           04007                           ROR      SUPERBNK                              #  ADD SUPER BITS.
057796,000049:    5600           55364                           TS       ALMCADR    +1                         
057797,000050: 
057798,000051:    5601           30002        LARMENT            CA       Q                                     #  STORE RETURN FOR ALARM
057799,000052:    5602           54061                           TS       ITEMP1                                
057800,000053: 
057801,000054:    5603           10375        CHKFAIL1           CCS      FAILREG                               #  IS ANYTHING IN FAILREG
057802,000055:    5604           15607                           TCF      CHKFAIL2                              #  YES TRY NEXT REG
057803,000056:    5605           22375                           LXCH     FAILREG                               
057804,000057:    5606           15621                           TCF      PROGLARM                              #  TURN ALARM LIGHT ON FOR FIRST ALARM
057805,000058: 
057806,000059:    5607           10376        CHKFAIL2           CCS      FAILREG    +1                         
057807,000060:    5610           15613                           TCF      FAIL3                                 
057808,000061:    5611           22376                           LXCH     FAILREG    +1                         
057809,000062:    5612           15624                           TCF      MULTEXIT                              
057810,000063: 
057811,000064:    5613           30377        FAIL3              CA       FAILREG    +2                         
057812,000065:    5614           74733                           MASK     POSMAX                                
057813,000066:    5615           10000                           CCS      A                                     
057814,000067:    5616           15630                           TCF      MULTFAIL                              
057815,000068:    5617           22377                           LXCH     FAILREG    +2                         
057816,000069:    5620           15624                           TCF      MULTEXIT                              
057817,000070: 

Page 1382

057819,000072: 
057820,000073:    5621           41036        PROGLARM           CS       DSPTAB     +11D                       
057821,000074:    5622           75642                           MASK     OCT40400                              
057822,000075:    5623           27036                           ADS      DSPTAB     +11D                       
057823,000076: 
057824,000077: 
057825,000078:    5624           56061        MULTEXIT           XCH      ITEMP1                                #  OBTAIN RETURN ADDRESS IN A
057826,000079:    5625           00003                           RELINT                                         
057827,000080:    5626           50000                           INDEX    A                                     
057828,000081:    5627           00001                           TC       1                                     
057829,000082: 
057830,000083:    5630           30001        MULTFAIL           CA       L                                     
057831,000084:    5631           64735                           AD       BIT15                                 
057832,000085:    5632           54377                           TS       FAILREG    +2                         
057833,000086: 
057834,000087:    5633           15624                           TCF      MULTEXIT                              
057835,000088: 
057836,000089:                                                                                                  #  PRIOLARM DISPLAYS V05N09 VIA PRIODSPR WITH 3 RETURNS TO THE USER FROM THE ASTRONAUT AT CALL LOC +1,+2,+3 AND
057837,000090:                                                                                                  #  AN IMMEDIATE RETURN TO THE USER AT CALL LOC +4.  EXAMPLE FOLLOWS,
057838,000091:                                                                                                  #                CAF     OCTXX           ALARM CODE
057839,000092:                                                                                                  #                TC      BANKCALL
057840,000093:                                                                                                  #                CADR    PRIOLARM
057841,000094:                                                                                                  #                ...     ...
057842,000095:                                                                                                  #                ...     ...
057843,000096:                                                                                                  #                ...     ...             ASTRONAUT RETURN
057844,000097:                                                                                                  #                TC      PHASCHNG        IMMEDIATE RETURN TO USER.  RESTART
057845,000098:                                                                                                  #                OCT     X.1             PHASE CHANGE FOR PRIO DISPLAY
057846,000099: 
057847,000100: 10,3562                                           BANK     10                                    
057848,000101: 10,2000                                           SETLOC   DISPLAYS                              
057849,000102: 10,2000                                           BANK                                           
057850,000103: 
057851,000104: 10,3562                                           COUNT*   $$/DSPLA                              
057852,000105: 10,3562           00004        PRIOLARM           INHINT                                         #  * * * KEEP IN DISPLAY ROUTINES BANK
057853,000106: 10,3563           54001                           TS       L                                     #  SAVE ALARM CODE
057854,000107: 
057855,000108: 10,3564           30133                           CA       BUF2                                  #  2 CADR OF PRIOLARM USER
057856,000109: 10,3565           55363                           TS       ALMCADR                               
057857,000110: 10,3566           30134                           CA       BUF2       +1                         
057858,000111: 10,3567           05576                           TC       PRIOENT    +1                         #  * LEAVE L ALONE
057859,000112: 10,3570           77467        -2SEC              DEC      -200       B-14                       #  *** DONT MOVE
057860,000113: 10,3571           35006                           CAF      V05N09                                
057861,000114: 10,3572           12504                           TCF      PRIODSPR                              
057862,000115: 
057863,000116:    5634                                           BLOCK    02                                    
057864,000117:    4000                                           SETLOC   FFTAG7                                
057865,000118:    4000                                           BANK                                           
057866,000119: 
057867,000120:    5634                                           COUNT*   $$/ALARM                              
057868,000121:    5634           00004        BAILOUT            INHINT                                         
057869,000122:    5635           30002                           CA       Q                                     

Page 1383

057871,000124:    5636           55363                           TS       ALMCADR                               
057872,000125: 
057873,000126:    5637           50002                           INDEX    Q                                     
057874,000127:    5640           30000                           CAF      0                                     
057875,000128:    5641           05574                           TC       BORTENT                               
057876,000129:    5642           40400        OCT40400           OCT      40400                                 
057877,000130: 
057878,000131:    5643           00004                           INHINT                                         
057879,000132:    5644           34752        WHIMPER            CA       TWO                                   
057880,000133:    5645           60005                           AD       Z                                     
057881,000134:    5646           54017                           TS       BRUPT                                 
057882,000135:    5647           50017                           RESUME                                         
057883,000136:    5650           04635                           TC       POSTJUMP                              #  RESUME SENDS CONTROL HERE
057884,000137:    5651           12765                           CADR     ENEMA                                 
057885,000138:    5652           00004        POODOO             INHINT                                         
057886,000139:    5653           30002                           CA       Q                                     
057887,000140:    5654           55363        ABORT2             TS       ALMCADR                               
057888,000141:    5655           50002                           INDEX    Q                                     
057889,000142:    5656           30000                           CAF      0                                     
057890,000143:    5657           05574                           TC       BORTENT                               
057891,000144:    5660           77770        OCT77770           OCT      77770                                 #  DON'T MOVE
057892,000145: 
057893,000146:    5661           34765                           CAF      OCT35                                 #  4.35SPOT FOR GOPOODOO
057894,000147:    5662           54001                           TS       L                                     
057895,000148:    5663           40000                           COM                                            
057896,000149:    5664           52761                           DXCH     -PHASE4                               
057897,000150:    5665           00004        GOPOODOO           INHINT                                         
057898,000151:    5666           04616                           TC       BANKCALL                              #  RESET STATEFLG, REINTFLG, AND NODOFLAG.
057899,000152:    5667           27755                           CADR     FLAGS                                 
057900,000153:    5670           30103                           CA       FLAGWRD7                              #  IS SERVICER CURRENTLY IN OPERATION?
057901,000154:    5671           74746                           MASK     V37FLBIT                              
057902,000155:    5672           10000                           CCS      A                                     
057903,000156:    5673           15701                           TCF      STRTIDLE                              
057904,000157:    5674           04616                           TC       BANKCALL                              #  TERMINATE GRPS 1, 3, 5, AND 6
057905,000158:    5675           12652                           CADR     V37KLEAN                              
057906,000159:    5676           04616                           TC       BANKCALL                              #  TERMINATE GRPS 2, 4, 1, 3, 5, AND 6
057907,000160:    5677           12643                           CADR     MR.KLEAN                              #        (I.E., GRP 4 LAST)
057908,000161:    5700           15644                           TCF      WHIMPER                               
057909,000162:    5701           35743        STRTIDLE           CAF      BBSERVDL                              
057910,000163:    5702           04727                           TC       SUPERSW                               
057911,000164:    5703           04616                           TC       BANKCALL                              #  PUT SERVICER INTO ITS "GROUND" STATE
057912,000165:    5704           57321                           CADR     SERVIDLE                              #  AND PROCEED TO GOTOPOOH.
057913,000166:    5705           00004        CCSHOLE            INHINT                                         
057914,000167:    5706           30002                           CA       Q                                     
057915,000168:    5707           05654                           TC       ABORT2                                
057916,000169:    5710           01103        OCT1103            OCT      1103                                  
057917,000170:    5711           00004        CURTAINS           INHINT                                         
057918,000171:    5712           30002                           CA       Q                                     
057919,000172:    5713           05571                           TC       ALARM2                                
057920,000173:    5714           00217        OCT217             OCT      00217                                 

Page 1384

057922,000175:    5715           01363                           TC       ALMCADR                               #  RETURN TO USER
057923,000176: 
057924,000177:    5716           00004        BAILOUT1           INHINT                                         
057925,000178:    5717           53364                           DXCH     ALMCADR                               
057926,000179:    5720           35742                           CAF      ADR40400                              
057927,000180:    5721           54061        BOTHABRT           TS       ITEMP1                                
057928,000181:    5722           50002                           INDEX    Q                                     
057929,000182:    5723           30000                           CAF      0                                     
057930,000183:    5724           54001                           TS       L                                     
057931,000184:    5725           15603                           TCF      CHKFAIL1                              
057932,000185:    5726           00004        POODOO1            INHINT                                         
057933,000186:    5727           53364                           DXCH     ALMCADR                               
057934,000187:    5730           35741                           CAF      ADR77770                              
057935,000188:    5731           15721                           TCF      BOTHABRT                              
057936,000189: 
057937,000190:    5732           00004        ALARM1             INHINT                                         
057938,000191:    5733           53364                           DXCH     ALMCADR                               
057939,000192:    5734           00004        ALMNCADR           INHINT                                         
057940,000193:    5735           50002                           INDEX    Q                                     
057941,000194:    5736           30000                           CA       0                                     
057942,000195:    5737           54001                           TS       L                                     
057943,000196:    5740           15601                           TCF      LARMENT                               
057944,000197: 
057945,000198:    5741           15660        ADR77770           TCF      OCT77770                              
057946,000199:    5742           15642        ADR40400           TCF      OCT40400                              
057947,000200:    5743     5155               DOALARM            EQUALS   ENDOFJOB                              
057948,000201:    5743  E7,1515                                  EBANK=   DVCNTR                                
057949,000202:    5743           56067        BBSERVDL           BBCON    SERVIDLE                              
057950,000203: 
057951,000204:                                                                                                  #  CALLING SEQUENCE FOR VARALARM
057952,000205:                                                                                                  #                CAF     (ALARM)
057953,000206:                                                                                                  #                TC      VARALARM
057954,000207: 
057955,000208:                                                                                                  #  VARALARM TURNS ON PROGRAM ALARM LIGHT BUT DOES NOT DISPLAY
057956,000209: 
057957,000210:    5744           00004        VARALARM           INHINT                                         
057958,000211: 
057959,000212:    5745           54001                           TS       L                                     #  SAVE USERS ALARM CODE
057960,000213: 
057961,000214:    5746           30002                           CA       Q                                     #  SAVE USERS Q
057962,000215:    5747           55363                           TS       ALMCADR                               
057963,000216: 
057964,000217:    5750           05575                           TC       PRIOENT                               
057965,000218:    5751           00014        OCT14              OCT      14                                    #  DONT MOVE
057966,000219: 
057967,000220:    5752           01363                           TC       ALMCADR                               #  RETURN TO USER
057968,000221: 
057969,000222:    5753     5644               ABORT              EQUALS   WHIMPER                               
057970,000223: 13,3755                                           BANK     13                                    
057971,000224: 13,2000                                           SETLOC   ABTFLGS                               
057972,000225: 13,2000                                           BANK                                           

Page 1385

057974,000227: 13,3755                                           COUNT*   $$/ALARM                              
057975,000228: 
057976,000229: 13,3755           44747        FLAGS              CS       STATEBIT                              
057977,000230: 13,3756           70077                           MASK     FLAGWRD3                              
057978,000231: 13,3757           54077                           TS       FLAGWRD3                              
057979,000232: 13,3760           44745                           CS       REINTBIT                              
057980,000233: 13,3761           70106                           MASK     FLGWRD10                              
057981,000234: 13,3762           54106                           TS       FLGWRD10                              
057982,000235: 13,3763           44753                           CS       NODOBIT                               
057983,000236: 13,3764           70076                           MASK     FLAGWRD2                              
057984,000237: 13,3765           54076                           TS       FLAGWRD2                              
057985,000238: 13,3766           00002                           TC       Q                                     
057986,000239: 

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