Source Code

These source-code files were transcribed from scans made from Don Eyles's personal copy of Luminary 069. They were scanned at archive.org's Boston facility, and the scanning was sponsored by Onno Hommes. The code was transcribed from these scans by a team of volunteers who are referenced in the program comments. Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". In some cases, where similar code blocks exist in previously-transcribed AGC programs (primarily Luminary 99, from Apollo 11) those code blocks were used as a starting point and then corrected to agree with the Luminary 69 scans. The full scans are available at the Virtual AGC project's collection at archive.org, while more-convenient reduced-size (but reduced-quality) images are available at the main Virtual AGC website. Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository. Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 069 OF AGC PROGRAM LUMINARY BY NASA 2021112-011
	19:02 NOV. 25,1968
Note that the date is the date of the printout, not the date of the program revision.

059561,000002:                                                                                                  ## Copyright:   Public domain.
059562,000003:                                                                                                  ## Filename:    ALARM_AND_ABORT.agc
059563,000004:                                                                                                  ## Purpose:     The main source file for Luminary revision 069.
059564,000005:                                                                                                  ##              It is part of the source code for the original release
059565,000006:                                                                                                  ##              of the flight software for the Lunar Module's (LM) Apollo
059566,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 10. The actual flown
059567,000008:                                                                                                  ##              version was Luminary 69 revision 2, which included a
059568,000009:                                                                                                  ##              newer lunar gravity model and only affected module 2.
059569,000010:                                                                                                  ##              This file is intended to be a faithful transcription, except
059570,000011:                                                                                                  ##              that the code format has been changed to conform to the
059571,000012:                                                                                                  ##              requirements of the yaYUL assembler rather than the
059572,000013:                                                                                                  ##              original YUL assembler.
059573,000014:                                                                                                  ## Reference:   pp. 1375-1378
059574,000015:                                                                                                  ## Assembler:   yaYUL
059575,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
059576,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
059577,000018:                                                                                                  ## Mod history: 2016-12-13 MAS  Created from Luminary 99.
059578,000019:                                                                                                  ##              2016-12-18 MAS  Updated from comment-proofed Luminary 99 version.
059579,000020:                                                                                                  ##              2017-01-04 RRB  Updated for Luminary 69.
059580,000021:                                                                                                  ##              2017-01-28 RSB  Proofed comment text using octopus/prooferComments
059581,000022:                                                                                                  ##                              but no errors found.
059582,000023: 

Page 1375

059584,000025:                                                                                                  #           THE FOLLOWING SUBROUTINE MAY BE CALLED TO DISPLAY A NON-ABORTIVE ALARM CONDITION. IT MAY BE CALLED
059585,000026:                                                                                                  #  EITHER IN INTERRUPT OR UNDER EXECUTIVE CONTROL.
059586,000027: 
059587,000028:                                                                                                  #  CALLING SEQUENCE IS AS FOLLOWS:
059588,000029:                                                                                                  #                TC      ALARM
059589,000030:                                                                                                  #                OCT     AAANN           ALARM NO. NN IN GENERAL AREA AAA.
059590,000031:                                                                                                  #                                        (RETURNS HERE)
059591,000032: 
059592,000033:    5567                                           BLOCK    02                                    
059593,000034:    4000                                           SETLOC   FFTAG7                                
059594,000035:    4000                                           BANK                                           
059595,000036: 
059596,000037:    5567     0375                                  EBANK=   FAILREG                               
059597,000038: 
059598,000039:    5567                                           COUNT*   $$/ALARM                              
059599,000040:                                                                                                  #  ALARM TURNS ON THE PROGRAM ALARM LIGHT, BUT DOES NOT DISPLAY.
059600,000041: 
059601,000042:    5567           00004        ALARM              INHINT                                         
059602,000043: 
059603,000044:    5570           30002                           CA       Q                                     
059604,000045:    5571           55363        ALARM2             TS       ALMCADR                               
059605,000046:    5572           50002                           INDEX    Q                                     
059606,000047:    5573           30000                           CA       0                                     
059607,000048:    5574           54001        BORTENT            TS       L                                     
059608,000049: 
059609,000050:    5575           30006        PRIOENT            CA       BBANK                                 
059610,000051:    5576           00006                 +1        EXTEND                                         
059611,000052:    5577           04007                           ROR      SUPERBNK                              #  ADD SUPER BITS.
059612,000053:    5600           55364                           TS       ALMCADR    +1                         
059613,000054: 
059614,000055:    5601           30002        LARMENT            CA       Q                                     #  STORE RETURN FOR ALARM
059615,000056:    5602           54061                           TS       ITEMP1                                
059616,000057: 
059617,000058:    5603           10375        CHKFAIL1           CCS      FAILREG                               #  IS ANYTHING IN FAILREG
059618,000059:    5604           15607                           TCF      CHKFAIL2                              #  YES TRY NEXT REG
059619,000060:    5605           22375                           LXCH     FAILREG                               
059620,000061:    5606           15621                           TCF      PROGLARM                              #  TURN ALARM LIGHT ON FOR FIRST ALARM
059621,000062: 
059622,000063:    5607           10376        CHKFAIL2           CCS      FAILREG    +1                         
059623,000064:    5610           15613                           TCF      FAIL3                                 
059624,000065:    5611           22376                           LXCH     FAILREG    +1                         
059625,000066:    5612           15624                           TCF      MULTEXIT                              
059626,000067: 
059627,000068:    5613           30377        FAIL3              CA       FAILREG    +2                         
059628,000069:    5614           74733                           MASK     POSMAX                                
059629,000070:    5615           10000                           CCS      A                                     
059630,000071:    5616           15630                           TCF      MULTFAIL                              
059631,000072:    5617           22377                           LXCH     FAILREG    +2                         
059632,000073:    5620           15624                           TCF      MULTEXIT                              
059633,000074: 

Page 1376

059635,000076: 
059636,000077:    5621           41036        PROGLARM           CS       DSPTAB     +11D                       
059637,000078:    5622           75642                           MASK     OCT40400                              
059638,000079:    5623           27036                           ADS      DSPTAB     +11D                       
059639,000080: 
059640,000081:    5624           56061        MULTEXIT           XCH      ITEMP1                                #  OBTAIN RETURN ADDRESS IN A
059641,000082:    5625           00003                           RELINT                                         
059642,000083:    5626           50000                           INDEX    A                                     
059643,000084:    5627           00001                           TC       1                                     
059644,000085: 
059645,000086:    5630           30001        MULTFAIL           CA       L                                     
059646,000087:    5631           64735                           AD       BIT15                                 
059647,000088:    5632           54377                           TS       FAILREG    +2                         
059648,000089: 
059649,000090:    5633           15624                           TCF      MULTEXIT                              
059650,000091: 
059651,000092:                                                                                                  #  PRIOLARM DISPLAYS V05N09 VIA PRIODSPR WITH 3 RETURNS TO THE USER FROM THE ASTRONAUT AT CALL LOC +1,+2,+3 AND
059652,000093:                                                                                                  #  AN IMMEDIATE RETURN TO THE USER AT CALL LOC +4.  EXAMPLE FOLLOWS,
059653,000094:                                                                                                  #                CAF     OCTXX           ALARM CODE
059654,000095:                                                                                                  #                TC      BANKCALL
059655,000096:                                                                                                  #                CADR    PRIOLARM
059656,000097: 
059657,000098:                                                                                                  #                ...     ...
059658,000099:                                                                                                  #                ...     ...
059659,000100:                                                                                                  #                ...     ...             ASTRONAUT RETURN
059660,000101:                                                                                                  #                TC      PHASCHNG        IMMEDIATE RETURN TO USER.  RESTART
059661,000102:                                                                                                  #                OCT     X.1             PHASE CHANGE FOR PRIO DISPLAY
059662,000103: 
059663,000104: 10,3451                                           BANK     10                                    
059664,000105: 10,2000                                           SETLOC   DISPLAYS                              
059665,000106: 10,2000                                           BANK                                           
059666,000107: 
059667,000108: 10,3451                                           COUNT*   $$/DSPLA                              
059668,000109: 10,3451           00004        PRIOLARM           INHINT                                         #  * * * KEEP IN DISPLAY ROUTINES BANK
059669,000110: 10,3452           54001                           TS       L                                     #  SAVE ALARM CODE
059670,000111: 
059671,000112: 10,3453           30133                           CA       BUF2                                  #  2 CADR OF PRIOLARM USER
059672,000113: 10,3454           55363                           TS       ALMCADR                               
059673,000114: 10,3455           30134                           CA       BUF2       +1                         
059674,000115: 10,3456           05576                           TC       PRIOENT    +1                         #  * LEAVE L ALONE
059675,000116: 10,3457           77467        -2SEC              DEC      -200       B-14                       #  *** DONT MOVE
059676,000117: 10,3460           35006                           CAF      V05N09                                
059677,000118: 10,3461           12357                           TCF      PRIODSPR                              
059678,000119: 
059679,000120:    5634                                           BLOCK    02                                    
059680,000121:    4000                                           SETLOC   FFTAG7                                
059681,000122:    4000                                           BANK                                           
059682,000123: 
059683,000124:    5634                                           COUNT*   $$/ALARM                              
059684,000125:    5634           00004        BAILOUT            INHINT                                         
059685,000126:    5635           30002                           CA       Q                                     

Page 1377

059687,000128:    5636           55363                           TS       ALMCADR                               
059688,000129: 
059689,000130:    5637           50002                           INDEX    Q                                     
059690,000131:    5640           30000                           CAF      0                                     
059691,000132:    5641           05574                           TC       BORTENT                               
059692,000133:    5642           40400        OCT40400           OCT      40400                                 
059693,000134: 
059694,000135:    5643           00004                           INHINT                                         
059695,000136:    5644           34752        WHIMPER            CA       TWO                                   
059696,000137:    5645           60005                           AD       Z                                     
059697,000138:    5646           54017                           TS       BRUPT                                 
059698,000139:    5647           50017                           RESUME                                         
059699,000140:    5650           04635                           TC       POSTJUMP                              #  RESUME SENDS CONTROL HERE
059700,000141:    5651           12766                           CADR     ENEMA                                 
059701,000142:    5652           00004        POODOO             INHINT                                         
059702,000143:    5653           30002                           CA       Q                                     
059703,000144:    5654           55363        ABORT2             TS       ALMCADR                               
059704,000145:    5655           50002                           INDEX    Q                                     
059705,000146:    5656           30000                           CAF      0                                     
059706,000147:    5657           05574                           TC       BORTENT                               
059707,000148:    5660           77770        OCT77770           OCT      77770                                 #  DON'T MOVE
059708,000149: 
059709,000150:    5661           34765                           CAF      OCT35                                 #  4.35SPOT FOR GOPOODOO
059710,000151:    5662           54001                           TS       L                                     
059711,000152:    5663           40000                           COM                                            
059712,000153:    5664           52761                           DXCH     -PHASE4                               
059713,000154:    5665           00004        GOPOODOO           INHINT                                         
059714,000155:    5666           30103                           CA       FLAGWRD7                              #  IS SERVICER CURRENTLY IN OPERATION?
059715,000156:    5667           74746                           MASK     V37FLBIT                              
059716,000157:    5670           10000                           CCS      A                                     
059717,000158:    5671           15675                           TCF      STRTIDLE                              
059718,000159:    5672           04616                           TC       BANKCALL                              
059719,000160:    5673           12643                           CADR     MR.KLEAN                              
059720,000161:    5674           15644                           TCF      WHIMPER                               
059721,000162:    5675           04635        STRTIDLE           TC       POSTJUMP                              #  PUT SERVICER INTO ITS "GROUND" STATE
059722,000163:    5676           65711                           CADR     SERVIDLE                              #  AND PROCEED TO GOTOPOOH.
059723,000164:    5677           00004        CCSHOLE            INHINT                                         
059724,000165:    5700           30002                           CA       Q                                     
059725,000166:    5701           05654                           TC       ABORT2                                
059726,000167:    5702           01103        OCT21103           OCT      1103                                  
059727,000168:    5703           00004        CURTAINS           INHINT                                         
059728,000169:    5704           30002                           CA       Q                                     
059729,000170:    5705           05571                           TC       ALARM2                                
059730,000171:    5706           00217        OCT217             OCT      00217                                 
059731,000172:    5707           01363                           TC       ALMCADR                               #  RETURN TO USER
059732,000173: 
059733,000174:    5710           00004        BAILOUT1           INHINT                                         
059734,000175:    5711           53364                           DXCH     ALMCADR                               
059735,000176:    5712           35734                           CAF      ADR40400                              
059736,000177:    5713           54061        BOTHABRT           TS       ITEMP1                                

Page 1378

059738,000179:    5714           50002                           INDEX    Q                                     
059739,000180:    5715           30000                           CAF      0                                     
059740,000181:    5716           54001                           TS       L                                     
059741,000182:    5717           15603                           TCF      CHKFAIL1                              
059742,000183:    5720           00004        POODOO1            INHINT                                         
059743,000184:    5721           53364                           DXCH     ALMCADR                               
059744,000185:    5722           35733                           CAF      ADR77770                              
059745,000186:    5723           15713                           TCF      BOTHABRT                              
059746,000187: 
059747,000188:    5724           00004        ALARM1             INHINT                                         
059748,000189:    5725           53364                           DXCH     ALMCADR                               
059749,000190:    5726           00004        ALMNCADR           INHINT                                         
059750,000191:    5727           50002                           INDEX    Q                                     
059751,000192:    5730           30000                           CA       0                                     
059752,000193:    5731           54001                           TS       L                                     
059753,000194:    5732           15601                           TCF      LARMENT                               
059754,000195: 
059755,000196:    5733           15660        ADR77770           TCF      OCT77770                              
059756,000197:    5734           15642        ADR40400           TCF      OCT40400                              
059757,000198:    5735     5155               DOALARM            EQUALS   ENDOFJOB                              
059758,000199: 
059759,000200:                                                                                                  #  CALLING SEQUENCE FOR VARALARM
059760,000201:                                                                                                  #                CAF     (ALARM)
059761,000202:                                                                                                  #                TC      VARALARM
059762,000203: 
059763,000204:                                                                                                  #  VARALARM TURNS ON PROGRAM ALARM LIGHT BUT DOES NOT DISPLAY
059764,000205: 
059765,000206:    5735           00004        VARALARM           INHINT                                         
059766,000207: 
059767,000208:    5736           54001                           TS       L                                     #  SAVE USERS ALARM CODE
059768,000209: 
059769,000210:    5737           30002                           CA       Q                                     #  SAVE USERS Q
059770,000211:    5740           55363                           TS       ALMCADR                               
059771,000212: 
059772,000213:    5741           05575                           TC       PRIOENT                               
059773,000214:    5742           00014        OCT14              OCT      14                                    #  DONT MOVE
059774,000215: 
059775,000216:    5743           01363                           TC       ALMCADR                               #  RETURN TO USER
059776,000217: 
059777,000218:    5744     5644               ABORT              EQUALS   WHIMPER                               
059778,000219: 

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