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.

059586,000002:                                                                                                  ## Copyright:   Public domain.
059587,000003:                                                                                                  ## Filename:    ALARM_AND_ABORT.agc
059588,000004:                                                                                                  ## Purpose:     The main source file for Luminary revision 069.
059589,000005:                                                                                                  ##              It is part of the source code for the original release
059590,000006:                                                                                                  ##              of the flight software for the Lunar Module's (LM) Apollo
059591,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 10. The actual flown
059592,000008:                                                                                                  ##              version was Luminary 69 revision 2, which included a
059593,000009:                                                                                                  ##              newer lunar gravity model and only affected module 2.
059594,000010:                                                                                                  ##              This file is intended to be a faithful transcription, except
059595,000011:                                                                                                  ##              that the code format has been changed to conform to the
059596,000012:                                                                                                  ##              requirements of the yaYUL assembler rather than the
059597,000013:                                                                                                  ##              original YUL assembler.
059598,000014:                                                                                                  ## Reference:   pp. 1375-1378
059599,000015:                                                                                                  ## Assembler:   yaYUL
059600,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
059601,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
059602,000018:                                                                                                  ## Mod history: 2016-12-13 MAS  Created from Luminary 99.
059603,000019:                                                                                                  ##              2016-12-18 MAS  Updated from comment-proofed Luminary 99 version.
059604,000020:                                                                                                  ##              2017-01-04 RRB  Updated for Luminary 69.
059605,000021:                                                                                                  ##              2017-01-28 RSB  Proofed comment text using octopus/prooferComments
059606,000022:                                                                                                  ##                              but no errors found.
059607,000023:                                                                                                  ##              2021-05-30 ABS  OCT21103 -> OCT1103
059608,000024: 

Page 1375

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

Page 1376

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

Page 1377

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

Page 1378

059764,000180:    5714           50002                           INDEX    Q                                     
059765,000181:    5715           30000                           CAF      0                                     
059766,000182:    5716           54001                           TS       L                                     
059767,000183:    5717           15603                           TCF      CHKFAIL1                              
059768,000184:    5720           00004        POODOO1            INHINT                                         
059769,000185:    5721           53364                           DXCH     ALMCADR                               
059770,000186:    5722           35733                           CAF      ADR77770                              
059771,000187:    5723           15713                           TCF      BOTHABRT                              
059772,000188: 
059773,000189:    5724           00004        ALARM1             INHINT                                         
059774,000190:    5725           53364                           DXCH     ALMCADR                               
059775,000191:    5726           00004        ALMNCADR           INHINT                                         
059776,000192:    5727           50002                           INDEX    Q                                     
059777,000193:    5730           30000                           CA       0                                     
059778,000194:    5731           54001                           TS       L                                     
059779,000195:    5732           15601                           TCF      LARMENT                               
059780,000196: 
059781,000197:    5733           15660        ADR77770           TCF      OCT77770                              
059782,000198:    5734           15642        ADR40400           TCF      OCT40400                              
059783,000199:    5735     5155               DOALARM            EQUALS   ENDOFJOB                              
059784,000200: 
059785,000201:                                                                                                  #  CALLING SEQUENCE FOR VARALARM
059786,000202:                                                                                                  #                CAF     (ALARM)
059787,000203:                                                                                                  #                TC      VARALARM
059788,000204: 
059789,000205:                                                                                                  #  VARALARM TURNS ON PROGRAM ALARM LIGHT BUT DOES NOT DISPLAY
059790,000206: 
059791,000207:    5735           00004        VARALARM           INHINT                                         
059792,000208: 
059793,000209:    5736           54001                           TS       L                                     #  SAVE USERS ALARM CODE
059794,000210: 
059795,000211:    5737           30002                           CA       Q                                     #  SAVE USERS Q
059796,000212:    5740           55363                           TS       ALMCADR                               
059797,000213: 
059798,000214:    5741           05575                           TC       PRIOENT                               
059799,000215:    5742           00014        OCT14              OCT      14                                    #  DONT MOVE
059800,000216: 
059801,000217:    5743           01363                           TC       ALMCADR                               #  RETURN TO USER
059802,000218: 
059803,000219:    5744     5644               ABORT              EQUALS   WHIMPER                               
059804,000220: 

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