Source Code
These source-code files are part of a reconstructed copy of Luminary 69/2,
the flown, final release of the Apollo 10 Lunar Module (LM) Apollo Guidance Computer (AGC) software.
The reconstruction is based on the source code of Luminary 69 — i.e., the initial, unflown version, "revision 0" — of which a contemporary listing was available. The code was then updated by incorporating the differences between Luminary 69 and Luminary 69/2, known from other contemporary documentation. The only such difference is the implementation in Luminary 69/2 of the "R-2 Lunar Potential Model", the source code for which was taken from program Luminary 99/1 (Apollo 11 LM), of which a contemporary listing was also available. Finally, the now-reconstructed Luminary 69/2 was then validated by assembling it to executable form and verifying that its memory banks had the correct checksums, known from still other contemporary documentation. Note that page numbers in the reconstructed code match those in the original Luminary 69 program listing, or in the ORBITAL INTEGRATION log section, in Luminary 99/1. Page numbers would certainly differ somewhat in a contemporary Luminary 69/2 listing. Moreover, annotations that were not present in the contemporary source code have been added to the reconstructed code to justify each change in Luminary 69/2 relative to Luminary 69. Here's a guide to the Apollo documentation referenced in those annotations:
|
059314,000002: ## Copyright: Public domain.
059315,000003: ## Filename: ALARM_AND_ABORT.agc
059316,000004: ## Purpose: A section of LUM69 revision 2.
059317,000005: ## It is part of the reconstructed source code for the flown
059318,000006: ## version of the flight software for the Lunar Module's (LM)
059319,000007: ## Apollo Guidance Computer (AGC) for Apollo 10. The code has
059320,000008: ## been recreated from a copy of Luminary revsion 069, using
059321,000009: ## changes present in Luminary 099 which were described in
059322,000010: ## Luminary memos 75 and 78. The code has been adapted such
059323,000011: ## that the resulting bugger words exactly match those specified
059324,000012: ## for LUM69 revision 2 in NASA drawing 2021152B, which gives
059325,000013: ## relatively high confidence that the reconstruction is correct.
059326,000014: ## Reference: pp. 1375-1378
059327,000015: ## Assembler: yaYUL
059328,000016: ## Contact: Ron Burkey <info@sandroid.org>.
059329,000017: ## Website: www.ibiblio.org/apollo/index.html
059330,000018: ## Mod history: 2019-07-27 MAS Created from Luminary 69.
059331,000019: ## 2021-05-30 ABS OCT21103 -> OCT1103
059332,000020:
Page 1375 |
059334,000022: # THE FOLLOWING SUBROUTINE MAY BE CALLED TO DISPLAY A NON-ABORTIVE ALARM CONDITION. IT MAY BE CALLED
059335,000023: # EITHER IN INTERRUPT OR UNDER EXECUTIVE CONTROL.
059336,000024:
059337,000025: # CALLING SEQUENCE IS AS FOLLOWS:
059338,000026: # TC ALARM
059339,000027: # OCT AAANN ALARM NO. NN IN GENERAL AREA AAA.
059340,000028: # (RETURNS HERE)
059341,000029:
059342,000030: 5567 BLOCK 02
059343,000031: 4000 SETLOC FFTAG7
059344,000032: 4000 BANK
059345,000033:
059346,000034: 5567 0375 EBANK= FAILREG
059347,000035:
059348,000036: 5567 COUNT* $$/ALARM
059349,000037: # ALARM TURNS ON THE PROGRAM ALARM LIGHT, BUT DOES NOT DISPLAY.
059350,000038:
059351,000039: 5567 00004 ALARM INHINT
059352,000040:
059353,000041: 5570 30002 CA Q
059354,000042: 5571 55363 ALARM2 TS ALMCADR
059355,000043: 5572 50002 INDEX Q
059356,000044: 5573 30000 CA 0
059357,000045: 5574 54001 BORTENT TS L
059358,000046:
059359,000047: 5575 30006 PRIOENT CA BBANK
059360,000048: 5576 00006 +1 EXTEND
059361,000049: 5577 04007 ROR SUPERBNK # ADD SUPER BITS.
059362,000050: 5600 55364 TS ALMCADR +1
059363,000051:
059364,000052: 5601 30002 LARMENT CA Q # STORE RETURN FOR ALARM
059365,000053: 5602 54061 TS ITEMP1
059366,000054:
059367,000055: 5603 10375 CHKFAIL1 CCS FAILREG # IS ANYTHING IN FAILREG
059368,000056: 5604 15607 TCF CHKFAIL2 # YES TRY NEXT REG
059369,000057: 5605 22375 LXCH FAILREG
059370,000058: 5606 15621 TCF PROGLARM # TURN ALARM LIGHT ON FOR FIRST ALARM
059371,000059:
059372,000060: 5607 10376 CHKFAIL2 CCS FAILREG +1
059373,000061: 5610 15613 TCF FAIL3
059374,000062: 5611 22376 LXCH FAILREG +1
059375,000063: 5612 15624 TCF MULTEXIT
059376,000064:
059377,000065: 5613 30377 FAIL3 CA FAILREG +2
059378,000066: 5614 74733 MASK POSMAX
059379,000067: 5615 10000 CCS A
059380,000068: 5616 15630 TCF MULTFAIL
059381,000069: 5617 22377 LXCH FAILREG +2
059382,000070: 5620 15624 TCF MULTEXIT
059383,000071:
Page 1376 |
059385,000073:
059386,000074: 5621 41036 PROGLARM CS DSPTAB +11D
059387,000075: 5622 75642 MASK OCT40400
059388,000076: 5623 27036 ADS DSPTAB +11D
059389,000077:
059390,000078: 5624 56061 MULTEXIT XCH ITEMP1 # OBTAIN RETURN ADDRESS IN A
059391,000079: 5625 00003 RELINT
059392,000080: 5626 50000 INDEX A
059393,000081: 5627 00001 TC 1
059394,000082:
059395,000083: 5630 30001 MULTFAIL CA L
059396,000084: 5631 64735 AD BIT15
059397,000085: 5632 54377 TS FAILREG +2
059398,000086:
059399,000087: 5633 15624 TCF MULTEXIT
059400,000088:
059401,000089: # PRIOLARM DISPLAYS V05N09 VIA PRIODSPR WITH 3 RETURNS TO THE USER FROM THE ASTRONAUT AT CALL LOC +1,+2,+3 AND
059402,000090: # AN IMMEDIATE RETURN TO THE USER AT CALL LOC +4. EXAMPLE FOLLOWS,
059403,000091: # CAF OCTXX ALARM CODE
059404,000092: # TC BANKCALL
059405,000093: # CADR PRIOLARM
059406,000094:
059407,000095: # ... ...
059408,000096: # ... ...
059409,000097: # ... ... ASTRONAUT RETURN
059410,000098: # TC PHASCHNG IMMEDIATE RETURN TO USER. RESTART
059411,000099: # OCT X.1 PHASE CHANGE FOR PRIO DISPLAY
059412,000100:
059413,000101: 10,3451 BANK 10
059414,000102: 10,2000 SETLOC DISPLAYS
059415,000103: 10,2000 BANK
059416,000104:
059417,000105: 10,3451 COUNT* $$/DSPLA
059418,000106: 10,3451 00004 PRIOLARM INHINT # * * * KEEP IN DISPLAY ROUTINES BANK
059419,000107: 10,3452 54001 TS L # SAVE ALARM CODE
059420,000108:
059421,000109: 10,3453 30133 CA BUF2 # 2 CADR OF PRIOLARM USER
059422,000110: 10,3454 55363 TS ALMCADR
059423,000111: 10,3455 30134 CA BUF2 +1
059424,000112: 10,3456 05576 TC PRIOENT +1 # * LEAVE L ALONE
059425,000113: 10,3457 77467 -2SEC DEC -200 B-14 # *** DONT MOVE
059426,000114: 10,3460 35006 CAF V05N09
059427,000115: 10,3461 12357 TCF PRIODSPR
059428,000116:
059429,000117: 5634 BLOCK 02
059430,000118: 4000 SETLOC FFTAG7
059431,000119: 4000 BANK
059432,000120:
059433,000121: 5634 COUNT* $$/ALARM
059434,000122: 5634 00004 BAILOUT INHINT
059435,000123: 5635 30002 CA Q
Page 1377 |
059437,000125: 5636 55363 TS ALMCADR
059438,000126:
059439,000127: 5637 50002 INDEX Q
059440,000128: 5640 30000 CAF 0
059441,000129: 5641 05574 TC BORTENT
059442,000130: 5642 40400 OCT40400 OCT 40400
059443,000131:
059444,000132: 5643 00004 INHINT
059445,000133: 5644 34752 WHIMPER CA TWO
059446,000134: 5645 60005 AD Z
059447,000135: 5646 54017 TS BRUPT
059448,000136: 5647 50017 RESUME
059449,000137: 5650 04635 TC POSTJUMP # RESUME SENDS CONTROL HERE
059450,000138: 5651 12766 CADR ENEMA
059451,000139: 5652 00004 POODOO INHINT
059452,000140: 5653 30002 CA Q
059453,000141: 5654 55363 ABORT2 TS ALMCADR
059454,000142: 5655 50002 INDEX Q
059455,000143: 5656 30000 CAF 0
059456,000144: 5657 05574 TC BORTENT
059457,000145: 5660 77770 OCT77770 OCT 77770 # DON'T MOVE
059458,000146:
059459,000147: 5661 34765 CAF OCT35 # 4.35SPOT FOR GOPOODOO
059460,000148: 5662 54001 TS L
059461,000149: 5663 40000 COM
059462,000150: 5664 52761 DXCH -PHASE4
059463,000151: 5665 00004 GOPOODOO INHINT
059464,000152: 5666 30103 CA FLAGWRD7 # IS SERVICER CURRENTLY IN OPERATION?
059465,000153: 5667 74746 MASK V37FLBIT
059466,000154: 5670 10000 CCS A
059467,000155: 5671 15675 TCF STRTIDLE
059468,000156: 5672 04616 TC BANKCALL
059469,000157: 5673 12643 CADR MR.KLEAN
059470,000158: 5674 15644 TCF WHIMPER
059471,000159: 5675 04635 STRTIDLE TC POSTJUMP # PUT SERVICER INTO ITS "GROUND" STATE
059472,000160: 5676 65711 CADR SERVIDLE # AND PROCEED TO GOTOPOOH.
059473,000161: 5677 00004 CCSHOLE INHINT
059474,000162: 5700 30002 CA Q
059475,000163: 5701 05654 TC ABORT2
059476,000164: 5702 01103 OCT1103 OCT 1103
059477,000165: 5703 00004 CURTAINS INHINT
059478,000166: 5704 30002 CA Q
059479,000167: 5705 05571 TC ALARM2
059480,000168: 5706 00217 OCT217 OCT 00217
059481,000169: 5707 01363 TC ALMCADR # RETURN TO USER
059482,000170:
059483,000171: 5710 00004 BAILOUT1 INHINT
059484,000172: 5711 53364 DXCH ALMCADR
059485,000173: 5712 35734 CAF ADR40400
059486,000174: 5713 54061 BOTHABRT TS ITEMP1
Page 1378 |
059488,000176: 5714 50002 INDEX Q
059489,000177: 5715 30000 CAF 0
059490,000178: 5716 54001 TS L
059491,000179: 5717 15603 TCF CHKFAIL1
059492,000180: 5720 00004 POODOO1 INHINT
059493,000181: 5721 53364 DXCH ALMCADR
059494,000182: 5722 35733 CAF ADR77770
059495,000183: 5723 15713 TCF BOTHABRT
059496,000184:
059497,000185: 5724 00004 ALARM1 INHINT
059498,000186: 5725 53364 DXCH ALMCADR
059499,000187: 5726 00004 ALMNCADR INHINT
059500,000188: 5727 50002 INDEX Q
059501,000189: 5730 30000 CA 0
059502,000190: 5731 54001 TS L
059503,000191: 5732 15601 TCF LARMENT
059504,000192:
059505,000193: 5733 15660 ADR77770 TCF OCT77770
059506,000194: 5734 15642 ADR40400 TCF OCT40400
059507,000195: 5735 5155 DOALARM EQUALS ENDOFJOB
059508,000196:
059509,000197: # CALLING SEQUENCE FOR VARALARM
059510,000198: # CAF (ALARM)
059511,000199: # TC VARALARM
059512,000200:
059513,000201: # VARALARM TURNS ON PROGRAM ALARM LIGHT BUT DOES NOT DISPLAY
059514,000202:
059515,000203: 5735 00004 VARALARM INHINT
059516,000204:
059517,000205: 5736 54001 TS L # SAVE USERS ALARM CODE
059518,000206:
059519,000207: 5737 30002 CA Q # SAVE USERS Q
059520,000208: 5740 55363 TS ALMCADR
059521,000209:
059522,000210: 5741 05575 TC PRIOENT
059523,000211: 5742 00014 OCT14 OCT 14 # DONT MOVE
059524,000212:
059525,000213: 5743 01363 TC ALMCADR # RETURN TO USER
059526,000214:
059527,000215: 5744 5644 ABORT EQUALS WHIMPER
059528,000216:
End of include-file ALARM_AND_ABORT.agc. Parent file is MAIN.agc