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. |
009990,000002: ## Copyright: Public domain.
009991,000003: ## Filename: RESTART_TABLES.agc
009992,000004: ## Purpose: Part of the reconstructed source code for LMY99 Rev 0,
009993,000005: ## otherwise known as Luminary Rev 99, the third release
009994,000006: ## of the Apollo Guidance Computer (AGC) software for Apollo 11.
009995,000007: ## It differs from LMY99 Rev 1 (the flown version) only in the
009996,000008: ## placement of a single label. The corrections shown here have
009997,000009: ## been verified to have the same bank checksums as AGC developer
009998,000010: ## Allan Klumpp's copy of Luminary Rev 99, and so are believed
009999,000011: ## to be accurate. This file is intended to be a faithful
010000,000012: ## recreation, except that the code format has been changed to
010001,000013: ## conform to the requirements of the yaYUL assembler rather than
010002,000014: ## the original YUL assembler.
010003,000015: ##
010004,000016: ## Assembler: yaYUL
010005,000017: ## Contact: Ron Burkey <info@sandroid.org>.
010006,000018: ## Website: www.ibiblio.org/apollo.
010007,000019: ## Pages: 238-243
010008,000020: ## Mod history: 2009-05-10 SN (Sergio Navarro). Started adapting
010009,000021: ## from the Luminary131/ file of the same
010010,000022: ## name, using Luminary099 page images.
010011,000023: ## 2016-12-13 RSB Proofed text comments with octopus/ProoferComments
010012,000024: ## and corrected the errors found. Made some
010013,000025: ## P00 fixes.
010014,000026: ## 2017-02-08 RSB Comment-text fixes identified while proofing Artemis 72.
010015,000027: ## 2017-08-01 MAS Created from LMY99 Rev 1.
010016,000028:
010017,000029: ## This source code has been transcribed or otherwise adapted from
010018,000030: ## digitized images of a hardcopy from the MIT Museum. The digitization
010019,000031: ## was performed by Paul Fjeld, and arranged for by Deborah Douglas of
010020,000032: ## the Museum. Many thanks to both. The images (with suitable reduction
010021,000033: ## in storage size and consequent reduction in image quality as well) are
010022,000034: ## available online at www.ibiblio.org/apollo. If for some reason you
010023,000035: ## find that the images are illegible, contact me at info@sandroid.org
010024,000036: ## about getting access to the (much) higher-quality images which Paul
010025,000037: ## actually created.
010026,000038: ##
010027,000039: ## The code has been modified to match LMY99 Revision 0, otherwise
010028,000040: ## known as Luminary Revision 99, the Apollo 11 software release preceeding
010029,000041: ## the listing from which it was transcribed. It has been verified to
010030,000042: ## contain the same bank checksums as AGC developer Allan Klumpp's listing
010031,000043: ## of Luminary Revision 99 (for which we do not have scans).
010032,000044: ##
010033,000045: ## Notations on Allan Klumpp's listing read, in part:
010034,000046: ##
010035,000047: ## ASSEMBLE REVISION 099 OF AGC PROGRAM LUMINARY BY NASA 2021112-51
010036,000048:
Page 238 |
010038,000050: # RESTART TABLES
010039,000051: # ------------------
010040,000052:
010041,000053: # THERE ARE TWO FORMS OF RESTART TABLES FOR EACH GROUP. THEY ARE KNOWN AS THE EVEN RESTART TABLES AND THE ODD
010042,000054: # RESTART TABLES. THE ODD TABLES HAVE ONLY ONE ENTRY OF THREE LOCATIONS WHILE THE EVEN TABLES HAVE TWO ENTRIES
010043,000055: # EACH USING THREE LOCATIONS. THE INFORMATION AS TO WHETHER IT IS A JOB, WAITLIST, OR A LONGCALL IS GIVEN BY THE
010044,000056: # WAY THINGS ARE PUT IN TO THE TABLES.
010045,000057:
010046,000058: # A JOB HAS ITS PRIORITY STORED IN PRDTTAB OF THE CORRECT PHASE SPOT - A POSITIVE PRIORITY INDICATES A
010047,000059: # FINDVAC JOB, A NEGATIVE PRIORITY A NOVAC. THE 2CADR OF THE JOB IS STORED IN THE CADRTAB.
010048,000060: # FOR EXAMPLE,
010049,000061:
010050,000062: # 5.7SPOT OCT 23000
010051,000063: # 2CADR SOMEJOB
010052,000064:
010053,000065: # A RESTART OF GROUP 5 WITH PHASE SEVEN WOULD THEN CAUSE SOMEJOB TO BE RESTARTED AS A FINDVAC WITH PRIORITY 23.
010054,000066:
010055,000067: # 5.5SPOT OCT -23000
010056,000068: # 2CADR ANYJOB
010057,000069:
010058,000070: # HERE A RESTART OF GROUP 5 WITH PHASE 7 WOULD CAUSE ANYJOB TO BE RESTARTED AS A NOVAC WITH PRIORITY 23.
010059,000071: # A LONGCALL HAS ITS GENADR OF ITS 2CADR STORED NEGATIVELY AND ITS BBCON STORED POSITIVELY. IN ITS PRDTTAB IS
010060,000072: # PLACED THE LOCATION OF A DP REGISTER THAT CONTAINS THE DELTA TIME THAT LONGCALL HAD BEEN ORIGINALLY STARTED
010061,000073: # WITH. EXAMPLE,
010062,000074:
010063,000075: # 3.6SPOT GENADR DELTAT
010064,000076: # -GENADR LONGTASK
010065,000077: # BBCON LONGTASK
010066,000078: # OCT 31000
010067,000079: # 2CADR JOBAGAIN
010068,000080:
010069,000081: # THIS WOULD START UP LONGTASK AT THE APPROPRIATE TIME, OR IMMEDIATELY IF THE TIME HAD ALREADY PASSED. IT SHOULD
010070,000082: # BE NOTED THAT IF DELTAT IS IN A SWITCHED E BANK, THIS INFORMATOIN SHOULD BE IN THE BBCON OF THE 2CADR OF THE
010071,000083: # TASK. FROM ABOVE, WE SEE THAT THE SECOND PART OF THIS PHASE WOULD BE STARTED AS A JOB WITH A PRIORITY OF 31.
010072,000084:
010073,000085: # WAITLIST CALLS ARE IDENTIFIED BY THE FACT THAT THEIR 2CADR IS STORED NEGATIVELY. IF PRDTTAB OF THE PHASE SPOT
010074,000086: # IS POSITIVE, THEN IT CONTAINS THE DELTA TIME, IF PRDTTAB IS NEGATIVE THEN IT IS THE -GENADR OF AN ERASABLE
010075,000087: # LOCATION CONTAINING THE DELTA TIME, THAT IS, THE TIME IS STORED INDIRECTLY. IT SHOULD BE NOTED AS ABOVE, THAT
010076,000088: # IF THE TIME IS STORED INDIRECTLY, THE BBCON MUST CONTAIN THE NECESSARY E BANK INFORMATION IF APPLICABLE. WITH
010077,000089: # WAITLIST WE HAVE ONE FURTHER OPTION, IF -0 IS STORED IN PRDTTAB, IT WILL CAUSE AN IMMEDIATE RESTART OF THE
010078,000090: # TASK. EXAMPLES,
010079,000091:
010080,000092: # OCT 77777 THIS WILL CAUSE AN IMMEDIATE RESTART
010081,000093: # -2CADR ATASK OF THE TASK :ATASK:
010082,000094: #
010083,000095: # DEC 200 IF THE TIME OF THE 2 SECONDS SINCE DUMMY
010084,000096: # -2CADR DUMMY WAS PUT ON WAITLIST IS UP, IT WILL BEGIN
010085,000097: # IN 10 MS, OTHERWISE IT WILL BEGIN WHEN
010086,000098: # IT NORMALLY WOULD HAVE BEGUN.
Page 239 |
010088,000100: # -GENADR DTIME WHERE DTIME CONTAINS THE DELTA TIME
010089,000101: # -2CADR TASKTASK OTHERWISE THIS IS AS ABOVE
010090,000102:
010091,000103: # ***** NOW THE TABLES THEMSELVES *****
010092,000104:
010093,000105: 01,2002 BANK 01
010094,000106: 01,2000 SETLOC RESTART
010095,000107: 01,2000 BANK
010096,000108:
010097,000109: 01,2002 PRDTTAB EQUALS 12000 # USED TO FIND THE PRIORITY OR DELTATIME
010098,000110: 01,2002 CADRTAB EQUALS 12001 # THIS AND THE NEXT RELATIVE LOC CONTAIN
010099,000111: # RESTART 2CADR
010100,000112:
010101,000113: 01,2002 COUNT* $$/RSTAB # TABLES IN BANK 1.
010102,000114: 01,2002 00010 SIZETAB TC 1.2SPOT -12006
010103,000115: 01,2003 00020 TC 1.3SPOT -12004
010104,000116: 01,2004 00010 TC 2.2SPOT -12006
010105,000117: 01,2005 00023 TC 2.3SPOT -12004
010106,000118: 01,2006 00010 TC 3.2SPOT -12006
010107,000119: 01,2007 00053 TC 3.3SPOT -12004
010108,000120: 01,2010 00057 TC 4.2SPOT -12006
010109,000121: 01,2011 00067 TC 4.3SPOT -12004
010110,000122: 01,2012 00142 TC 5.2SPOT -12006
010111,000123: 01,2013 00160 TC 5.3SPOT -12004
010112,000124: 01,2014 00010 TC 6.2SPOT -12006
010113,000125: 01,2015 00171 TC 6.3SPOT -12004
010114,000126: 01,2016 21000 1.2SPOT OCT 21000 # A DUMMY EXAMPLE TO BE REPLACED AS SOON
010115,000127: 01,2017 0074 EBANK= STATE
010116,000128: 01,2017 05155 04060 2CADR ENDOFJOB # AS THERE IS A LEGITIMATE 1.2SPOT
010117,000129:
010118,000130: 01,2021 00144 DEC 100 B-14
010119,000131: 01,2022 0074 EBANK= STATE
010120,000132: 01,2022 05261 04060 2CADR TASKOVER
010121,000133:
010122,000134: # ANY MORE GROUP 1.EVEN RESTART VALUES SHOULD GO HERE
010123,000135:
010124,000136: 01,2024 76300 1.3SPOT -GENADR SAVET-30
010125,000137: 01,2025 E7,1515 EBANK= DVCNTR
010126,000138: 01,2025 75431 03710 -2CADR ULLGTASK
010127,000139:
010128,000140: # ANY MORE GROUP 1.ODD RESTART VALUES SHOULD GO HERE
010129,000141:
010130,000142: 01,2027 01,2016 2.2SPOT EQUALS 1.2SPOT
010131,000143:
010132,000144: # ANY MORE GROUP 2.EVEN RESTART VALUES SHOULD GO HERE
010133,000145:
010134,000146: 01,2027 02630 2.3SPOT GENADR 600SECS
010135,000147:
010136,000148: 01,2030 75173 -GENADR STATEINT
010137,000149: 01,2031 E3,1554 EBANK= RRECTCSM
010138,000150: 01,2031 26063 BBCON STATEINT
010139,000151:
Page 240 |
010141,000153: 01,2032 05000 2.5SPOT OCT 05000
010142,000154: 01,2033 E3,1554 EBANK= RRECTCSM
010143,000155: 01,2033 02613 26063 2CADR STATINT1
010144,000156:
010145,000157: 01,2035 02734 2.7SPOT DEC 1500 B-14
010146,000158: 01,2036 E7,1456 EBANK= LOSCOUNT
010147,000159: 01,2036 75533 27710 -2CADR P20LEMC1
010148,000160:
010149,000161: 01,2040 14000 2.11SPOT OCT 14000
010150,000162: 01,2041 E7,1762 EBANK= P21TIME
010151,000163: 01,2041 02416 50067 2CADR P25LEM1
010152,000164:
010153,000165: 01,2043 10000 2.13SPOT OCT 10000
010154,000166: 01,2044 E7,1456 EBANK= LOSCOUNT
010155,000167: 01,2044 02217 54067 2CADR RELINUS
010156,000168:
010157,000169: 01,2046 26000 2.15SPOT OCT 26000
010158,000170: 01,2047 E7,1456 EBANK= LOSCOUNT
010159,000171: 01,2047 02653 50067 2CADR R22RSTRT
010160,000172:
010161,000173: 01,2051 77777 2.17SPOT OCT 77777
010162,000174: 01,2052 E7,1700 EBANK= VGPREV
010163,000175: 01,2052 75440 03710 -2CADR REDO2.17
010164,000176:
010165,000177: 01,2054 00031 2.21SPOT DEC 25 B-14
010166,000178: 01,2055 E7,1515 EBANK= DVCNTR
010167,000179: 01,2055 75771 35710 -2CADR R10,R11
010168,000180:
010169,000181: # ANY MORE GROUP 2.ODD RESTART VALUES SHOULD GO HERE.
010170,000182:
010171,000183: 01,2057 01,2016 3.2SPOT EQUALS 1.2SPOT
010172,000184:
010173,000185: # ANY MORE GROUP 3.EVEN RESTART VALUES SHOULD GO HERE
010174,000186:
010175,000187: 01,2057 76355 3.3SPOT -GENADR ZOOMTIME
010176,000188: 01,2060 E7,1515 EBANK= DVCNTR
010177,000189: 01,2060 75755 41710 -2CADR ZOOM
010178,000190:
010179,000191: 01,2062 20000 3.5SPOT OCT 20000
010180,000192: 01,2063 E7,1453 EBANK= TTOGO
010181,000193: 01,2063 02540 56067 2CADR S40.13
010182,000194:
010183,000195: # ANY MORE GROUP 3.ODD RESTART VALUES SHOULD GO HERE
010184,000196:
010185,000197: 01,2065 04704 4.2SPOT DEC 2500 B-14
010186,000198: 01,2066 E7,1453 EBANK= TTOGO
010187,000199:
010188,000200: 01,2066 75425 03710 -2CADR TIG-5
010189,000201:
010190,000202: 01,2070 77777 OCT 77777
010191,000203: 01,2071 E7,1453 EBANK= TTOGO
Page 241 |
010193,000205: 01,2071 75435 03710 -2CADR REDO4.2
010194,000206:
010195,000207: # ANY MORE GROUP 4.EVEN RESTART VALUES SHOULD GO HERE
010196,000208:
010197,000209: 01,2073 25000 4.3SPOT OCT 25000
010198,000210: 01,2074 E7,1515 EBANK= DVCNTR
010199,000211: 01,2074 03540 64067 2CADR GOABORT
010200,000212:
010201,000213: 01,2076 00062 4.5SPOT DEC 50 B-14
010202,000214: 01,2077 E7,1453 EBANK= TTOGO
010203,000215: 01,2077 75215 03710 -2CADR ULLAGOFF
010204,000216:
010205,000217: 01,2101 00764 4.7SPOT DEC 500 B-14
010206,000218: 01,2102 E7,1515 EBANK= DVCNTR
010207,000219: 01,2102 75374 03710 -2CADR TIG-0
010208,000220:
010209,000221: 01,2104 76260 4.11SPOT -GENADR TGO +1
010210,000222: 01,2105 E7,1515 EBANK= DVCNTR
010211,000223: 01,2105 74235 03710 -2CADR ENGOFTSK
010212,000224:
010213,000225: 01,2107 12000 4.13SPOT OCT 12000
010214,000226: 01,2110 E7,1462 EBANK= TRKMKCNT
010215,000227: 01,2110 03223 74067 2CADR POSTBURN
010216,000228:
010217,000229: 01,2112 00764 4.15SPOT DEC 500 B-14
010218,000230: 01,2113 E7,1453 EBANK= TTOGO
010219,000231: 01,2113 75501 03710 -2CADR TIG-30
010220,000232:
010221,000233: 01,2115 77777 4.17SPOT OCT 77777
010222,000234: 01,2116 E7,1515 EBANK= DVCNTR
010223,000235: 01,2116 75425 03710 -2CADR TIG-5
010224,000236:
010225,000237: 01,2120 13000 4.21SPOT OCT 13000
010226,000238: 01,2121 E5,1730 EBANK= STAR
010227,000239: 01,2121 03020 30065 2CADR R51.1 +1
010228,000240:
010229,000241: 01,2123 77777 4.23SPOT OCT 77777
010230,000242: 01,2124 E7,1515 EBANK= DVCNTR
010231,000243: 01,2124 75351 03710 -2CADR IGNITION
010232,000244:
010233,000245: 01,2126 01477 4.25SPOT GENADR SAVET-30
010234,000246: 01,2127 75537 -GENADR TIG-35
010235,000247: 01,2130 E7,1477 EBANK= SAVET-30
010236,000248: 01,2130 74067 BBCON TIG-35
010237,000249:
010238,000250:
010239,000251: 01,2131 52777 4.27SPOT OCT 52777
010240,000252: 01,2132 E7,1515 EBANK= DVCNTR
010241,000253: 01,2132 02073 42067 2CADR P70A
Page 242 |
010243,000255: 01,2134 52777 4.31SPOT OCT 52777
010244,000256: 01,2135 E7,1515 EBANK= DVCNTR
010245,000257: 01,2135 02076 42067 2CADR P71A
010246,000258:
010247,000259: 01,2137 46777 4.33SPOT OCT 46777
010248,000260: 01,2140 E7,1515 EBANK= DVCNTR
010249,000261: 01,2140 02024 10067 2CADR GOPOOFIX
010250,000262:
010251,000263: 01,2142 46777 4.35SPOT OCT 46777
010252,000264: 01,2143 E7,1515 EBANK= DVCNTR
010253,000265: 01,2143 05665 04067 2CADR GOPOODOO
010254,000266:
010255,000267: 01,2145 52777 4.37SPOT OCT 52777
010256,000268: 01,2146 E7,1455 EBANK= WHICH
010257,000269: 01,2146 02571 74067 2CADR COMFAIL
010258,000270:
010259,000271: # ANY MORE 4.ODD RESTART VALUES SHOULD GO HERE.
010260,000272: 01,2150 22000 5.2SPOT OCT 22000
010261,000273: 01,2151 E7,1515 EBANK= DVCNTR
010262,000274: 01,2151 02461 46067 2CADR NORMLIZE
010263,000275:
010264,000276: 01,2153 00310 DEC 200 B-14
010265,000277: 01,2154 E7,1515 EBANK= DVCNTR
010266,000278: 01,2154 74163 01710 -2CADR REREADAC
010267,000279:
010268,000280: 01,2156 00310 5.4SPOT DEC 200 B-14
010269,000281: 01,2157 E7,1515 EBANK= DVCNTR
010270,000282: 01,2157 74163 01710 -2CADR REREADAC
010271,000283:
010272,000284: 01,2161 20000 OCT 20000
010273,000285: 01,2162 E7,1515 EBANK= DVCNTR
010274,000286: 01,2162 02206 66067 2CADR SERVICER
010275,000287:
010276,000288: # ANY MORE GROUP 5.EVEN RESTART VALUES SHOULD GO HERE
010277,000289:
010278,000290: 01,2164 00310 5.3SPOT DEC 200 B-14
010279,000291: 01,2165 E7,1515 EBANK= DVCNTR
010280,000292: 01,2165 74163 01710 -2CADR REREADAC
010281,000293:
010282,000294: 01,2167 77777 5.5SPOT OCT 77777
010283,000295: 01,2170 E7,1515 EBANK= DVCNTR
010284,000296: 01,2170 74324 01710 -2CADR REDO5.5
010285,000297:
010286,000298: 01,2172 77777 5.7SPOT OCT 77777
010287,000299: 01,2173 E7,1515 EBANK= DVCNTR
Page 243 |
010289,000301: 01,2173 74361 01710 -2CADR BIBIBIAS
010290,000302:
010291,000303: # ANY MORE GROUP 5.ODD RESTART VALUES SHOULD GO HERE
010292,000304:
010293,000305: 01,2175 01,2016 6.2SPOT EQUALS 1.2SPOT
010294,000306: 01,2175 00144 6.3SPOT DEC 100 B-14
010295,000307: 01,2176 E7,1441 EBANK= TIG
010296,000308: 01,2176 75060 03710 -2CADR CLOKTASK
010297,000309:
010298,000310: 01,2200 30000 6.5SPOT OCT 30000 # PROTECT INCREMENTING OF TIME2,TIME1 BY
010299,000311: 01,2201 E3,1706 EBANK= TEPHEM # P27(UPDATE PROGRAM) VIA V70 OR V73.
010300,000312: 01,2201 03601 10063 2CADR TIMEDIDR
010301,000313:
010302,000314: 01,2203 17000 6.7SPOT OCT 17000
010303,000315: 01,2204 E7,1700 EBANK= VGPREV
010304,000316: 01,2204 03350 74067 2CADR REDO6.7
010305,000317:
010306,000318:
End of include-file RESTART_TABLES.agc. Parent file is MAIN.agc