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. |
001175,000002: ## Copyright: Public domain.
001176,000003: ## Filename: TAGS_FOR_RELATIVE_SETLOC_AND_BLANK_BANK_CARDS.agc
001177,000004: ## Purpose: Part of the reconstructed source code for LMY99 Rev 0,
001178,000005: ## otherwise known as Luminary Rev 99, the third release
001179,000006: ## of the Apollo Guidance Computer (AGC) software for Apollo 11.
001180,000007: ## It differs from LMY99 Rev 1 (the flown version) only in the
001181,000008: ## placement of a single label. The corrections shown here have
001182,000009: ## been verified to have the same bank checksums as AGC developer
001183,000010: ## Allan Klumpp's copy of Luminary Rev 99, and so are believed
001184,000011: ## to be accurate. This file is intended to be a faithful
001185,000012: ## recreation, except that the code format has been changed to
001186,000013: ## conform to the requirements of the yaYUL assembler rather than
001187,000014: ## the original YUL assembler.
001188,000015: ##
001189,000016: ## Assembler: yaYUL
001190,000017: ## Contact: Jim Lawton <jim.lawton@gmail.com>
001191,000018: ## Website: www.ibiblio.org/apollo.
001192,000019: ## Pages: 028-037
001193,000020: ## Mod history: 2009-05-16 JVL Transcribed from page images.
001194,000021: ## 2016-12-13 RSB Proofed text comments with octopus/ProoferComments
001195,000022: ## and corrected the errors found.
001196,000023: ## 2017-08-01 MAS Created from LMY99 Rev 1.
001197,000024:
001198,000025: ## This source code has been transcribed or otherwise adapted from
001199,000026: ## digitized images of a hardcopy from the MIT Museum. The digitization
001200,000027: ## was performed by Paul Fjeld, and arranged for by Deborah Douglas of
001201,000028: ## the Museum. Many thanks to both. The images (with suitable reduction
001202,000029: ## in storage size and consequent reduction in image quality as well) are
001203,000030: ## available online at www.ibiblio.org/apollo. If for some reason you
001204,000031: ## find that the images are illegible, contact me at info@sandroid.org
001205,000032: ## about getting access to the (much) higher-quality images which Paul
001206,000033: ## actually created.
001207,000034: ##
001208,000035: ## The code has been modified to match LMY99 Revision 0, otherwise
001209,000036: ## known as Luminary Revision 99, the Apollo 11 software release preceeding
001210,000037: ## the listing from which it was transcribed. It has been verified to
001211,000038: ## contain the same bank checksums as AGC developer Allan Klumpp's listing
001212,000039: ## of Luminary Revision 99 (for which we do not have scans).
001213,000040: ##
001214,000041: ## Notations on Allan Klumpp's listing read, in part:
001215,000042: ##
001216,000043: ## ASSEMBLE REVISION 099 OF AGC PROGRAM LUMINARY BY NASA 2021112-51
001217,000044:
Page 28 |
001219,000046: ??????? COUNT BANKSUM
001220,000047:
001221,000048: # MODULE 1 CONTAINS BANKS 0 THROUGH 5
001222,000049:
001223,000050: 4000 BLOCK 02
001224,000051: 4000 RADARFF EQUALS
001225,000052: 4000 FFTAG1 EQUALS
001226,000053: 4000 FFTAG2 EQUALS
001227,000054: 4000 FFTAG3 EQUALS
001228,000055: 4000 FFTAG4 EQUALS
001229,000056: 4000 FFTAG7 EQUALS
001230,000057: 4000 FFTAG8 EQUALS
001231,000058: 4000 FFTAG9 EQUALS
001232,000059: 4000 FFTAG10 EQUALS
001233,000060: 4000 FFTAG11 EQUALS
001234,000061: 4000 FFTAG12 EQUALS
001235,000062: 4000 FFTAG13 EQUALS
001236,000063: 4000 BNKSUM 02
001237,000064:
001238,000065: 6000 BLOCK 03
001239,000066: 6000 FFTAG5 EQUALS
001240,000067: 6000 FFTAG6 EQUALS
001241,000068: 6000 BNKSUM 03
001242,000069:
001243,000070: 00,2000 BANK 00
001244,000071: 00,2000 DLAYJOB EQUALS
001245,000072: 00,2000 BNKSUM 00
001246,000073:
001247,000074: 01,2000 BANK 01
001248,000075: 01,2000 RESTART EQUALS
001249,000076: 01,2000 LOADDAP1 EQUALS
001250,000077: 01,2000 BNKSUM 01
001251,000078:
001252,000079: 04,2000 BANK 04
001253,000080: 04,2000 R02 EQUALS
001254,000081: 04,2000 VERB37 EQUALS
001255,000082: 04,2000 PINBALL4 EQUALS
001256,000083: 04,2000 CONICS1 EQUALS
001257,000084: 04,2000 KEYRUPT EQUALS
001258,000085: 04,2000 R36LM EQUALS
001259,000086: 04,2000 UPDATE2 EQUALS
001260,000087: 04,2000 E/PROG EQUALS
001261,000088: 04,2000 AOTMARK2 EQUALS
001262,000089: 04,2000 BNKSUM 04
001263,000090:
Page 29 |
001265,000092: 05,2000 BANK 05
001266,000093: 05,2000 FRANDRES EQUALS
001267,000094: 05,2000 DOWNTELM EQUALS
001268,000095: 05,2000 ABORTS1 EQUALS
001269,000096: 05,2000 EPHEM1 EQUALS
001270,000097: 05,2000 ASENT3 EQUALS
001271,000098: 05,2000 BNKSUM 05
001272,000099:
001273,000100: # MODULE 2 CONTAINS BANKS 6 THROUGH 13
001274,000101:
001275,000102: 06,2000 BANK 06
001276,000103: 06,2000 IMUCOMP EQUALS
001277,000104: 06,2000 T4RUP EQUALS
001278,000105: 06,2000 RCSMONT EQUALS
001279,000106: 06,2000 MIDDGIM EQUALS
001280,000107: 06,2000 EARTHLOC EQUALS
001281,000108: 06,2000 BNKSUM 06
001282,000109:
001283,000110: 07,2000 BANK 07
001284,000111: 07,2000 AOTMARK1 EQUALS
001285,000112: 07,2000 MODESW EQUALS
001286,000113: 07,2000 ASENT2 EQUALS
001287,000114: 07,2000 BNKSUM 07
001288,000115:
001289,000116: 10,2000 BANK 10
001290,000117: 10,2000 RTBCODES EQUALS
001291,000118: 10,2000 DISPLAYS EQUALS
001292,000119: 10,2000 PHASETAB EQUALS
001293,000120: 10,2000 FLESHLOC EQUALS
001294,000121: 10,2000 SLCTMU EQUALS
001295,000122: 10,2000 BNKSUM 10
001296,000123:
001297,000124: 11,2000 BANK 11
001298,000125: 11,2000 ORBITAL EQUALS
001299,000126: 11,2000 F2DPS*11 EQUALS
001300,000127: 11,2000 INTVEL EQUALS
001301,000128: 11,2000 BNKSUM 11
001302,000129:
001303,000130: 12,2000 BANK 12
001304,000131: 12,2000 CONICS EQUALS
001305,000132: 12,2000 ORBITAL1 EQUALS
Page 30 |
001307,000134: 12,2000 INTPRET2 EQUALS
001308,000135: 12,2000 BNKSUM 12
001309,000136:
001310,000137: 13,2000 BANK 13
001311,000138: 13,2000 LATLONG EQUALS
001312,000139: 13,2000 INTINIT EQUALS
001313,000140: 13,2000 LEMGEOM EQUALS
001314,000141: 13,2000 P76LOC EQUALS
001315,000142: 13,2000 ORBITAL2 EQUALS
001316,000143: 13,2000 ABTFLGS EQUALS
001317,000144: 13,2000 BNKSUM 13
001318,000145:
Page 31 |
001320,000147: # MODULE 3 CONTAINS BANKS 14 THROUGH 21
001321,000148:
001322,000149: 14,2000 BANK 14
001323,000150: 14,2000 P50S1 EQUALS
001324,000151: 14,2000 STARTAB EQUALS
001325,000152: 14,2000 ASENT4 EQUALS
001326,000153: 14,2000 BNKSUM 14
001327,000154:
001328,000155: 15,2000 BANK 15
001329,000156: 15,2000 P50S EQUALS
001330,000157: 15,2000 EPHEM EQUALS
001331,000158: 15,2000 BNKSUM 15
001332,000159:
001333,000160: 16,2000 BANK 16
001334,000161: 16,2000 DAPS1 EQUALS
001335,000162: 16,2000 BNKSUM 16
001336,000163:
001337,000164: 17,2000 BANK 17
001338,000165: 17,2000 DAPS2 EQUALS
001339,000166: 17,2000 P40S3 EQUALS
001340,000167: 17,2000 BNKSUM 17
001341,000168:
001342,000169: 20,2000 BANK 20
001343,000170: 20,2000 DAPS3 EQUALS
001344,000171: 20,2000 LOADDAP EQUALS
001345,000172: 20,2000 RODTRAP EQUALS
001346,000173: 20,2000 BNKSUM 20
001347,000174:
001348,000175: 21,2000 BANK 21
001349,000176: 21,2000 DAPS4 EQUALS
001350,000177: 21,2000 R10 EQUALS
001351,000178: 21,2000 R11 EQUALS
001352,000179: 21,2000 BNKSUM 21
Page 32 |
001354,000181:
001355,000182: # MODULE 4 CONTAINS BANKS 22 THROUGH 27
001356,000183:
001357,000184: 22,2000 BANK 22
001358,000185: 22,2000 KALCMON1 EQUALS
001359,000186: 22,2000 KALCMON2 EQUALS
001360,000187: 22,2000 R30LOC EQUALS
001361,000188: 22,2000 RENDEZ EQUALS
001362,000189: 22,2000 SERV2 EQUALS
001363,000190: 22,2000 LANDCNST EQUALS
001364,000191: 22,2000 BNKSUM 22
001365,000192:
001366,000193: 23,2000 BANK 23
001367,000194: 23,2000 POWFLITE EQUALS
001368,000195: 23,2000 POWFLIT1 EQUALS
001369,000196: 23,2000 INFLIGHT EQUALS
001370,000197: 23,2000 APOPERI EQUALS
001371,000198: 23,2000 R61 EQUALS
001372,000199: 23,2000 R62 EQUALS
001373,000200: 23,2000 INTPRET1 EQUALS
001374,000201: 23,2000 MEASINC EQUALS
001375,000202: 23,2000 MEASINC1 EQUALS
001376,000203: 23,2000 EXTVB1 EQUALS
001377,000204: 23,2000 P12A EQUALS
001378,000205: 23,2000 NORMLIZ EQUALS
001379,000206: 23,2000 ASENT7 EQUALS
001380,000207: 23,2000 BNKSUM 23
001381,000208:
001382,000209: 24,2000 BANK 24
001383,000210: 24,2000 PLANTIN EQUALS
001384,000211: 24,2000 P20S EQUALS
001385,000212: 24,2000 BNKSUM 24
001386,000213:
001387,000214: 25,2000 BANK 25
001388,000215: 25,2000 P20S1 EQUALS
001389,000216: 25,2000 P20S2 EQUALS
001390,000217: 25,2000 RADARUPT EQUALS
001391,000218: 25,2000 RRLEADIN EQUALS
001392,000219: 25,2000 R29S1 EQUALS
001393,000220: 25,2000 PLANTIN3 EQUALS
001394,000221: 25,2000 BNKSUM 25
001395,000222:
001396,000223: 26,2000 BANK 26
Page 33 |
001398,000225: 26,2000 P20S3 EQUALS
001399,000226: 26,2000 BAWLANGS EQUALS
001400,000227: 26,2000 MANUVER EQUALS
001401,000228: 26,2000 MANUVER1 EQUALS
001402,000229: 26,2000 PLANTIN1 EQUALS
001403,000230: 26,2000 PLANTIN2 EQUALS
001404,000231: 26,2000 BNKSUM 26
001405,000232:
001406,000233: 27,2000 BANK 27
001407,000234: 27,2000 TOF-FF EQUALS
001408,000235: 27,2000 TOF-FF1 EQUALS
001409,000236: 27,2000 P40S1 EQUALS
001410,000237: 27,2000 VECPT EQUALS
001411,000238: 27,2000 ASENT1 EQUALS
001412,000239: 27,2000 SERV3 EQUALS
001413,000240: 27,2000 BNKSUM 27
001414,000241:
Page 34 |
001416,000243: # MODULE 5 CONTAINS BANKS 30 THROUGH 35
001417,000244:
001418,000245: 30,2000 BANK 30
001419,000246: 30,2000 LOWSUPER EQUALS
001420,000247: 30,2000 P12 EQUALS
001421,000248: 30,2000 ASENT EQUALS
001422,000249: 30,2000 FCDUW EQUALS
001423,000250: 30,2000 FLOGSUB EQUALS
001424,000251: 30,2000 VB67A EQUALS
001425,000252: 30,2000 ASENT5 EQUALS
001426,000253: 30,2000 BNKSUM 30
001427,000254:
001428,000255: 31,2000 BANK 31
001429,000256: 31,2000 FTHROT EQUALS
001430,000257: 31,2000 F2DPS*31 EQUALS
001431,000258: 31,2000 VB67 EQUALS
001432,000259: 31,2000 BNKSUM 31
001433,000260:
001434,000261: 32,2000 BANK 32
001435,000262: 32,2000 P20S4 EQUALS
001436,000263: 32,2000 F2DPS*32 EQUALS
001437,000264: 32,2000 ABORTS EQUALS
001438,000265: 32,2000 LRS22 EQUALS
001439,000266: 32,2000 P66LOC EQUALS
001440,000267: 32,2000 R47 EQUALS
001441,000268: 32,2000 SERV EQUALS
001442,000269: 32,2000 BNKSUM 32
001443,000270:
001444,000271: 33,2000 BANK 33
001445,000272: 33,2000 SERVICES EQUALS
001446,000273: 33,2000 R29/SERV EQUALS
001447,000274: 33,2000 ASENT6 EQUALS
001448,000275: 33,2000 BNKSUM 33
001449,000276:
001450,000277: 34,2000 BANK 34
001451,000278: 34,2000 STBLEORB EQUALS
001452,000279: 34,2000 P30S1 EQUALS
001453,000280: 34,2000 CSI/CDH1 EQUALS
001454,000281: 34,2000 ASCFILT EQUALS
001455,000282: 34,2000 R12STUFF EQUALS
001456,000283: 34,2000 SERV4 EQUALS
001457,000284: 34,2000 BNKSUM 34
001458,000285:
Page 35 |
001460,000287: 35,2000 BANK 35
001461,000288: 35,2000 CSI/CDH EQUALS
001462,000289: 35,2000 P30S EQUALS
001463,000290: 35,2000 GLM EQUALS
001464,000291: 35,2000 P40S2 EQUALS
001465,000292: 35,2000 BNKSUM 35
001466,000293:
Page 36 |
001468,000295: # MODULE 6 CONTAINS BANKS 36 THROUGH 43
001469,000296:
001470,000297: 36,2000 BANK 36
001471,000298: 36,2000 P40S EQUALS
001472,000299: 36,2000 BNKSUM 36
001473,000300:
001474,000301: 37,2000 BANK 37
001475,000302: 37,2000 P05P06 EQUALS
001476,000303: 37,2000 IMU2 EQUALS
001477,000304: 37,2000 IMU4 EQUALS
001478,000305: 37,2000 R31 EQUALS
001479,000306: 37,2000 IMUSUPER EQUALS
001480,000307: 37,2000 SERV1 EQUALS
001481,000308: 37,2000 BNKSUM 37
001482,000309:
001483,000310: 40,2000 BANK 40
001484,000311: 40,2000 PINBALL1 EQUALS
001485,000312: 40,2000 SELFSUPR EQUALS
001486,000313: 40,2000 PINSUPER EQUALS
001487,000314: 40,2000 R31LOC EQUALS
001488,000315: 40,2000 BNKSUM 40
001489,000316:
001490,000317: 41,2000 BANK 41
001491,000318: 41,2000 PINBALL2 EQUALS
001492,000319: 41,2000 BNKSUM 41
001493,000320:
001494,000321: 42,2000 BANK 42
001495,000322: 42,2000 SBAND EQUALS
001496,000323: 42,2000 PINBALL3 EQUALS
001497,000324: 42,2000 BNKSUM 42
001498,000325:
001499,000326: 43,2000 BANK 43
001500,000327: 43,2000 EXTVERBS EQUALS
001501,000328: 43,2000 SELFCHEC EQUALS
001502,000329: 43,2000 BNKSUM 43
001503,000330:
Page 37 |
001505,000332:
001506,000333: 43,2000 23,2521 HI6ZEROS EQUALS ZEROVECS # ZERO VECTOR ALWAYS IN HIGH MEMORY
001507,000334: 43,2000 12,2006 LO6ZEROS EQUALS ZEROVEC # ZERO VECTOR ALWAYS IN LOW MEMORY
001508,000335: 43,2000 23,2517 HIDPHALF EQUALS UNITX
001509,000336: 43,2000 12,2004 LODPHALF EQUALS XUNIT
001510,000337: 43,2000 23,2511 HIDP1/4 EQUALS DP1/4TH
001511,000338: 43,2000 04,3036 LODP1/4 EQUALS D1/4 # 2DEC .25
001512,000339: 43,2000 23,2517 HIUNITX EQUALS UNITX
001513,000340: 43,2000 23,2515 HIUNITY EQUALS UNITY
001514,000341: 43,2000 23,2513 HIUNITZ EQUALS UNITZ
001515,000342: 43,2000 12,2004 LOUNITX EQUALS XUNIT # 2DEC .5
001516,000343: 43,2000 12,2002 LOUNITY EQUALS YUNIT # 2DEC 0
001517,000344: 43,2000 12,2000 LOUNITZ EQUALS ZUNIT # 2DEC 0
001518,000345:
001519,000346: 43,2000 22,3541 DELRSPL EQUALS SPLRET # COL PGM, ALSO CALLED BY R30 IN LUMINARY
001520,000347:
001521,000348: # ROPE-SPECIFIC ASSIGNS OBVIATING NEED TO CHECK COMPUTER FLAG IN DETERMINING INTEGRATION AREA ENTRIES.
001522,000349:
001523,000350: 43,2000 13,2734 ATOPTHIS EQUALS ATOPLEM
001524,000351: 43,2000 13,2661 ATOPOTH EQUALS ATOPCSM
001525,000352: 43,2000 13,3043 OTHPREC EQUALS CSMPREC
001526,000353: 43,2000 0000174 MOONTHIS EQUALS LMOONFLG
001527,000354: 43,2000 0000173 MOONOTH EQUALS CMOONFLG
001528,000355: 43,2000 13,2747 MOVATHIS EQUALS MOVEALEM
001529,000356: 43,2000 12,2017 RMM = LODPMAX
001530,000357: 43,2000 12,2021 RME = LODPMAX1
001531,000358: 43,2000 13,3057 THISPREC EQUALS LEMPREC
001532,000359: 43,2000 23,2513 THISAXIS = UNITZ
001533,000360: 43,2000 23,2513 NB1NB2 EQUALS THISAXIS # FOR R31
001534,000361: 43,2000 5011 ERASID EQUALS BITS2-10 # DOWNLINK ERASABLE DUMP ID
001535,000362: 43,2000 4752 DELAYNUM EQUALS TWO
001536,000363:
End of include-file TAGS_FOR_RELATIVE_SETLOC_AND_BLANK_BANK_CARDS.agc. Parent file is MAIN.agc