Source Code
This is a reconstruction of the AGC program Luminary 99 Rev 0. It was the third release
of the Lunar Module flight software targeted for use in Apollo 11, after Luminary 96 and 97.
A bug (which had been around since at least Apollo 10, Luminary 69) was
discovered in Rev 0 shortly before the Apollo 11 flight, resulting in a last minute
revision into Rev 1,
which is what actually flew rather than
the Rev 0 presented here. A hardcopy of Rev 0 is known to
exist — it belonged to AGC developer Allan Klumpp for many years — but
unfortunately the Virtual AGC Project has not had access to that hardcopy. Thus
the code you see here had been reconstructed (we believe accurately) rather than
transcribed. The first step of the reconstruction of the Rev 0 source code was
the transcription of the Rev 1 source code from a hardcopy in the MIT Museum collection.
The process of reverting the active portion of the source code (i.e., other than
program comments) from Rev 1 to Rev 0 was very minor, consisting
only of moving the position of the STARTSB1 label in
FRESH START AND RESTART. Allan had previously given
us the checksums of the memory banks of Rev 0, and we have verified the program presented here has checksums
identical to all banks of Allan's listing of Rev 0. The notations on Allan's Rev 0 program listing read,
in part:GAP: ASSEMBLE REVISION 099 OF AGC PROGRAM LUMINARY BY NASA 2021112-051 A single program comment is known to differ between Rev 0 and Rev 1, but these are harder to reconstruct and verify than changes to the active portion of the code. Thus it is possible that there are additional differences between the program comments in Rev 0 and Rev 1 that are unknown to us, and therefore are not reflected in the code presented here. |
060319,000002: ## Copyright: Public domain.
060320,000003: ## Filename: ALARM_AND_ABORT.agc
060321,000004: ## Purpose: Part of the reconstructed source code for LMY99 Rev 0,
060322,000005: ## otherwise known as Luminary Rev 99, the third release
060323,000006: ## of the Apollo Guidance Computer (AGC) software for Apollo 11.
060324,000007: ## It differs from LMY99 Rev 1 (the flown version) only in the
060325,000008: ## placement of a single label. The corrections shown here have
060326,000009: ## been verified to have the same bank checksums as AGC developer
060327,000010: ## Allan Klumpp's copy of Luminary Rev 99, and so are believed
060328,000011: ## to be accurate. This file is intended to be a faithful
060329,000012: ## recreation, except that the code format has been changed to
060330,000013: ## conform to the requirements of the yaYUL assembler rather than
060331,000014: ## the original YUL assembler.
060332,000015: ##
060333,000016: ## Assembler: yaYUL
060334,000017: ## Contact: Ron Burkey <info@sandroid.org>.
060335,000018: ## Website: www.ibiblio.org/apollo.
060336,000019: ## Pages: 1381-1385
060337,000020: ## Mod history: 2009-05-10 SN (Sergio Navarro). Started adapting
060338,000021: ## from the Luminary131/ file of the same
060339,000022: ## name, using Luminary099 page images.
060340,000023: ## 2009-06-05 RSB Fixed a type.
060341,000024: ## 2011-01-06 JL Fixed pseudo-label indentation.
060342,000025: ## 2016-12-13 RSB GOTOP00H -> GOTOPOOH
060343,000026: ## 2016-12-18 RSB Proofed text comments with octopus/ProoferComments
060344,000027: ## and corrected the errors found.
060345,000028: ## 2017-08-01 MAS Created from LMY99 Rev 1.
060346,000029: ## 2021-05-30 ABS OCT21103 -> OCT1103
060347,000030:
060348,000031: ## This source code has been transcribed or otherwise adapted from
060349,000032: ## digitized images of a hardcopy from the MIT Museum. The digitization
060350,000033: ## was performed by Paul Fjeld, and arranged for by Deborah Douglas of
060351,000034: ## the Museum. Many thanks to both. The images (with suitable reduction
060352,000035: ## in storage size and consequent reduction in image quality as well) are
060353,000036: ## available online at www.ibiblio.org/apollo. If for some reason you
060354,000037: ## find that the images are illegible, contact me at info@sandroid.org
060355,000038: ## about getting access to the (much) higher-quality images which Paul
060356,000039: ## actually created.
060357,000040: ##
060358,000041: ## The code has been modified to match LMY99 Revision 0, otherwise
060359,000042: ## known as Luminary Revision 99, the Apollo 11 software release preceeding
060360,000043: ## the listing from which it was transcribed. It has been verified to
060361,000044: ## contain the same bank checksums as AGC developer Allan Klumpp's listing
060362,000045: ## of Luminary Revision 99 (for which we do not have scans).
060363,000046: ##
060364,000047: ## Notations on Allan Klumpp's listing read, in part:
060365,000048: ##
060366,000049: ## ASSEMBLE REVISION 099 OF AGC PROGRAM LUMINARY BY NASA 2021112-51
060367,000050:
Page 1381 |
060369,000052: # THE FOLLOWING SUBROUTINE MAY BE CALLED TO DISPLAY A NON-ABORTIVE ALARM CONDITION. IT MAY BE CALLED
060370,000053: # EITHER IN INTERRUPT OR UNDER EXECUTIVE CONTROL.
060371,000054:
060372,000055: # CALLING SEQUENCE IS AS FOLLOWS:
060373,000056: # TC ALARM
060374,000057: # OCT AAANN ALARM NO. NN IN GENERAL AREA AAA.
060375,000058: # (RETURNS HERE)
060376,000059:
060377,000060: 5567 BLOCK 02
060378,000061: 4000 SETLOC FFTAG7
060379,000062: 4000 BANK
060380,000063:
060381,000064: 5567 0375 EBANK= FAILREG
060382,000065:
060383,000066: 5567 COUNT* $$/ALARM
060384,000067:
060385,000068: # ALARM TURNS ON THE PROGRAM ALARM LIGHT, BUT DOES NOT DISPLAY.
060386,000069:
060387,000070: 5567 00004 ALARM INHINT
060388,000071:
060389,000072: 5570 30002 CA Q
060390,000073: 5571 55363 ALARM2 TS ALMCADR
060391,000074: 5572 50002 INDEX Q
060392,000075: 5573 30000 CA 0
060393,000076: 5574 54001 BORTENT TS L
060394,000077:
060395,000078: 5575 30006 PRIOENT CA BBANK
060396,000079: 5576 00006 +1 EXTEND
060397,000080: 5577 04007 ROR SUPERBNK # ADD SUPER BITS.
060398,000081: 5600 55364 TS ALMCADR +1
060399,000082:
060400,000083: 5601 30002 LARMENT CA Q # STORE RETURN FOR ALARM
060401,000084: 5602 54061 TS ITEMP1
060402,000085:
060403,000086: 5603 10375 CHKFAIL1 CCS FAILREG # IS ANYTHING IN FAILREG
060404,000087: 5604 15607 TCF CHKFAIL2 # YES TRY NEXT REG
060405,000088: 5605 22375 LXCH FAILREG
060406,000089: 5606 15621 TCF PROGLARM # TURN ALARM LIGHT ON FOR FIRST ALARM
060407,000090:
060408,000091: 5607 10376 CHKFAIL2 CCS FAILREG +1
060409,000092: 5610 15613 TCF FAIL3
060410,000093: 5611 22376 LXCH FAILREG +1
060411,000094: 5612 15624 TCF MULTEXIT
060412,000095:
060413,000096: 5613 30377 FAIL3 CA FAILREG +2
060414,000097: 5614 74733 MASK POSMAX
060415,000098: 5615 10000 CCS A
060416,000099: 5616 15630 TCF MULTFAIL
060417,000100: 5617 22377 LXCH FAILREG +2
060418,000101: 5620 15624 TCF MULTEXIT
060419,000102:
Page 1382 |
060421,000104:
060422,000105: 5621 41036 PROGLARM CS DSPTAB +11D
060423,000106: 5622 75642 MASK OCT40400
060424,000107: 5623 27036 ADS DSPTAB +11D
060425,000108:
060426,000109:
060427,000110: 5624 56061 MULTEXIT XCH ITEMP1 # OBTAIN RETURN ADDRESS IN A
060428,000111: 5625 00003 RELINT
060429,000112: 5626 50000 INDEX A
060430,000113: 5627 00001 TC 1
060431,000114:
060432,000115: 5630 30001 MULTFAIL CA L
060433,000116: 5631 64735 AD BIT15
060434,000117: 5632 54377 TS FAILREG +2
060435,000118:
060436,000119: 5633 15624 TCF MULTEXIT
060437,000120:
060438,000121: # PRIOLARM DISPLAYS V05N09 VIA PRIODSPR WITH 3 RETURNS TO THE USER FROM THE ASTRONAUT AT CALL LOC +1,+2,+3 AND
060439,000122: # AN IMMEDIATE RETURN TO THE USER AT CALL LOC +4. EXAMPLE FOLLOWS,
060440,000123: # CAF OCTXX ALARM CODE
060441,000124: # TC BANKCALL
060442,000125: # CADR PRIOLARM
060443,000126: # ... ...
060444,000127: # ... ...
060445,000128: # ... ... ASTRONAUT RETURN
060446,000129: # TC PHASCHNG IMMEDIATE RETURN TO USER. RESTART
060447,000130: # OCT X.1 PHASE CHANGE FOR PRIO DISPLAY
060448,000131:
060449,000132: 10,3562 BANK 10
060450,000133: 10,2000 SETLOC DISPLAYS
060451,000134: 10,2000 BANK
060452,000135:
060453,000136: 10,3562 COUNT* $$/DSPLA
060454,000137: 10,3562 00004 PRIOLARM INHINT # * * * KEEP IN DISPLAY ROUTINES BANK
060455,000138: 10,3563 54001 TS L # SAVE ALARM CODE
060456,000139:
060457,000140: 10,3564 30133 CA BUF2 # 2 CADR OF PRIOLARM USER
060458,000141: 10,3565 55363 TS ALMCADR
060459,000142: 10,3566 30134 CA BUF2 +1
060460,000143: 10,3567 05576 TC PRIOENT +1 # * LEAVE L ALONE
060461,000144: 10,3570 77467 -2SEC DEC -200 B-14 # *** DONT MOVE
060462,000145: 10,3571 35006 CAF V05N09
060463,000146: 10,3572 12504 TCF PRIODSPR
060464,000147:
060465,000148: 5634 BLOCK 02
060466,000149: 4000 SETLOC FFTAG7
060467,000150: 4000 BANK
060468,000151:
060469,000152: 5634 COUNT* $$/ALARM
060470,000153: 5634 00004 BAILOUT INHINT
060471,000154: 5635 30002 CA Q
Page 1383 |
060473,000156: 5636 55363 TS ALMCADR
060474,000157:
060475,000158: 5637 50002 INDEX Q
060476,000159: 5640 30000 CAF 0
060477,000160: 5641 05574 TC BORTENT
060478,000161: 5642 40400 OCT40400 OCT 40400
060479,000162:
060480,000163: 5643 00004 INHINT
060481,000164: 5644 34752 WHIMPER CA TWO
060482,000165: 5645 60005 AD Z
060483,000166: 5646 54017 TS BRUPT
060484,000167: 5647 50017 RESUME
060485,000168: 5650 04635 TC POSTJUMP # RESUME SENDS CONTROL HERE
060486,000169: 5651 12765 CADR ENEMA
060487,000170: 5652 00004 POODOO INHINT
060488,000171: 5653 30002 CA Q
060489,000172: 5654 55363 ABORT2 TS ALMCADR
060490,000173: 5655 50002 INDEX Q
060491,000174: 5656 30000 CAF 0
060492,000175: 5657 05574 TC BORTENT
060493,000176: 5660 77770 OCT77770 OCT 77770 # DON'T MOVE
060494,000177:
060495,000178: 5661 34765 CAF OCT35 # 4.35SPOT FOR GOPOODOO
060496,000179: 5662 54001 TS L
060497,000180: 5663 40000 COM
060498,000181: 5664 52761 DXCH -PHASE4
060499,000182: 5665 00004 GOPOODOO INHINT
060500,000183: 5666 04616 TC BANKCALL # RESET STATEFLG, REINTFLG, AND NODOFLAG.
060501,000184: 5667 27755 CADR FLAGS
060502,000185: 5670 30103 CA FLAGWRD7 # IS SERVICER CURRENTLY IN OPERATION?
060503,000186: 5671 74746 MASK V37FLBIT
060504,000187: 5672 10000 CCS A
060505,000188: 5673 15701 TCF STRTIDLE
060506,000189: 5674 04616 TC BANKCALL # TERMINATE GRPS 1, 3, 5, AND 6
060507,000190: 5675 12652 CADR V37KLEAN
060508,000191: 5676 04616 TC BANKCALL # TERMINATE GRPS 2, 4, 1, 3, 5, AND 6
060509,000192: 5677 12643 CADR MR.KLEAN # (I.E., GRP 4 LAST)
060510,000193: 5700 15644 TCF WHIMPER
060511,000194: 5701 35743 STRTIDLE CAF BBSERVDL
060512,000195: 5702 04727 TC SUPERSW
060513,000196: 5703 04616 TC BANKCALL # PUT SERVICER INTO ITS "GROUND" STATE
060514,000197: 5704 57321 CADR SERVIDLE # AND PROCEED TO GOTOPOOH.
060515,000198: 5705 00004 CCSHOLE INHINT
060516,000199: 5706 30002 CA Q
060517,000200: 5707 05654 TC ABORT2
060518,000201: 5710 01103 OCT1103 OCT 1103
060519,000202: 5711 00004 CURTAINS INHINT
060520,000203: 5712 30002 CA Q
060521,000204: 5713 05571 TC ALARM2
060522,000205: 5714 00217 OCT217 OCT 00217
Page 1384 |
060524,000207: 5715 01363 TC ALMCADR # RETURN TO USER
060525,000208:
060526,000209: 5716 00004 BAILOUT1 INHINT
060527,000210: 5717 53364 DXCH ALMCADR
060528,000211: 5720 35742 CAF ADR40400
060529,000212: 5721 54061 BOTHABRT TS ITEMP1
060530,000213: 5722 50002 INDEX Q
060531,000214: 5723 30000 CAF 0
060532,000215: 5724 54001 TS L
060533,000216: 5725 15603 TCF CHKFAIL1
060534,000217: 5726 00004 POODOO1 INHINT
060535,000218: 5727 53364 DXCH ALMCADR
060536,000219: 5730 35741 CAF ADR77770
060537,000220: 5731 15721 TCF BOTHABRT
060538,000221:
060539,000222: 5732 00004 ALARM1 INHINT
060540,000223: 5733 53364 DXCH ALMCADR
060541,000224: 5734 00004 ALMNCADR INHINT
060542,000225: 5735 50002 INDEX Q
060543,000226: 5736 30000 CA 0
060544,000227: 5737 54001 TS L
060545,000228: 5740 15601 TCF LARMENT
060546,000229:
060547,000230: 5741 15660 ADR77770 TCF OCT77770
060548,000231: 5742 15642 ADR40400 TCF OCT40400
060549,000232: 5743 5155 DOALARM EQUALS ENDOFJOB
060550,000233: 5743 E7,1515 EBANK= DVCNTR
060551,000234: 5743 56067 BBSERVDL BBCON SERVIDLE
060552,000235:
060553,000236: # CALLING SEQUENCE FOR VARALARM
060554,000237: # CAF (ALARM)
060555,000238: # TC VARALARM
060556,000239:
060557,000240: # VARALARM TURNS ON PROGRAM ALARM LIGHT BUT DOES NOT DISPLAY
060558,000241:
060559,000242: 5744 00004 VARALARM INHINT
060560,000243:
060561,000244: 5745 54001 TS L # SAVE USERS ALARM CODE
060562,000245:
060563,000246: 5746 30002 CA Q # SAVE USERS Q
060564,000247: 5747 55363 TS ALMCADR
060565,000248:
060566,000249: 5750 05575 TC PRIOENT
060567,000250: 5751 00014 OCT14 OCT 14 # DONT MOVE
060568,000251:
060569,000252: 5752 01363 TC ALMCADR # RETURN TO USER
060570,000253:
060571,000254: 5753 5644 ABORT EQUALS WHIMPER
060572,000255: 13,3755 BANK 13
060573,000256: 13,2000 SETLOC ABTFLGS
060574,000257: 13,2000 BANK
Page 1385 |
060576,000259: 13,3755 COUNT* $$/ALARM
060577,000260:
060578,000261: 13,3755 44747 FLAGS CS STATEBIT
060579,000262: 13,3756 70077 MASK FLAGWRD3
060580,000263: 13,3757 54077 TS FLAGWRD3
060581,000264: 13,3760 44745 CS REINTBIT
060582,000265: 13,3761 70106 MASK FLGWRD10
060583,000266: 13,3762 54106 TS FLGWRD10
060584,000267: 13,3763 44753 CS NODOBIT
060585,000268: 13,3764 70076 MASK FLAGWRD2
060586,000269: 13,3765 54076 TS FLAGWRD2
060587,000270: 13,3766 00002 TC Q
060588,000271:
End of include-file ALARM_AND_ABORT.agc. Parent file is MAIN.agc