Source Code
![]() |
This is a reconstruction of the AGC program Luminary 99 Rev 0. It was the
second release of the Lunar Module flight software targeted for use in Apollo 11, after Luminary 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. |
047621,000002: ## Copyright: Public domain.
047622,000003: ## Filename: FIXED-FIXED_CONSTANT_POOL.agc
047623,000004: ## Purpose: Part of the reconstructed source code for LMY99 Rev 0,
047624,000005: ## otherwise known as Luminary Rev 99, the second release
047625,000006: ## of the Apollo Guidance Computer (AGC) software for Apollo 11.
047626,000007: ## It differs from LMY99 Rev 1 (the flown version) only in the
047627,000008: ## placement of a single label. The corrections shown here have
047628,000009: ## been verified to have the same bank checksums as AGC developer
047629,000010: ## Allan Klumpp's copy of Luminary Rev 99, and so are believed
047630,000011: ## to be accurate. This file is intended to be a faithful
047631,000012: ## recreation, except that the code format has been changed to
047632,000013: ## conform to the requirements of the yaYUL assembler rather than
047633,000014: ## the original YUL assembler.
047634,000015: ##
047635,000016: ## Assembler: yaYUL
047636,000017: ## Contact: Ron Burkey <info@sandroid.org>.
047637,000018: ## Website: www.ibiblio.org/apollo.
047638,000019: ## Pages: 1095-1099
047639,000020: ## Mod history: 2009-05-25 RSB Adapted from the corresponding
047640,000021: ## Luminary131 file, using page
047641,000022: ## images from Luminary 1A.
047642,000023: ## 2016-12-17 RSB Proofed text comments with octopus/ProoferComments
047643,000024: ## and corrected the errors found.
047644,000025: ## 2017-03-13 RSB Comment-text fixes noted in proofing Luminary 116.
047645,000026: ## 2017-08-01 MAS Created from LMY99 Rev 1.
047646,000027:
047647,000028: ## This source code has been transcribed or otherwise adapted from
047648,000029: ## digitized images of a hardcopy from the MIT Museum. The digitization
047649,000030: ## was performed by Paul Fjeld, and arranged for by Deborah Douglas of
047650,000031: ## the Museum. Many thanks to both. The images (with suitable reduction
047651,000032: ## in storage size and consequent reduction in image quality as well) are
047652,000033: ## available online at www.ibiblio.org/apollo. If for some reason you
047653,000034: ## find that the images are illegible, contact me at info@sandroid.org
047654,000035: ## about getting access to the (much) higher-quality images which Paul
047655,000036: ## actually created.
047656,000037: ##
047657,000038: ## The code has been modified to match LMY99 Revision 0, otherwise
047658,000039: ## known as Luminary Revision 99, the Apollo 11 software release preceeding
047659,000040: ## the listing from which it was transcribed. It has been verified to
047660,000041: ## contain the same bank checksums as AGC developer Allan Klumpp's listing
047661,000042: ## of Luminary Revision 99 (for which we do not have scans).
047662,000043: ##
047663,000044: ## Notations on Allan Klumpp's listing read, in part:
047664,000045: ##
047665,000046: ## ASSEMBLE REVISION 099 OF AGC PROGRAM LUMINARY BY NASA 2021112-51
047666,000047:
![]() |
Page 1095 |
047668,000049: 4732 BLOCK 02
047669,000050: 4732 COUNT* $$/FCONS
047670,000051:
047671,000052: # THE FOLLOWING TABLE OF 18 VALUES IS INDEXED. DO NOT INSERT OR REMOVE ANY QUANTITIES.
047672,000053:
047673,000054: 4732 37777 DPOSMAX OCT 37777 # MUST PRECEDE POSMAX
047674,000055: 4733 37777 POSMAX OCT 37777
047675,000056:
047676,000057: 4734 4734 LIMITS = NEG1/2
047677,000058:
047678,000059: 4734 57777 NEG1/2 OCT -20000 # USED BY SIN ROUTINE (MUST BE TWO
047679,000060: # LOCATIONS IN FRONT OF BIT14)
047680,000061:
047681,000062: # BIT TABLE
047682,000063:
047683,000064: 4735 40000 BIT15 OCT 40000
047684,000065: 4736 20000 BIT14 OCT 20000
047685,000066: 4737 10000 BIT13 OCT 10000
047686,000067: 4740 04000 BIT12 OCT 04000
047687,000068: 4741 02000 BIT11 OCT 02000
047688,000069: 4742 01000 BIT10 OCT 01000
047689,000070: 4743 00400 BIT9 OCT 00400
047690,000071: 4744 00200 BIT8 OCT 00200
047691,000072: 4745 00100 BIT7 OCT 00100
047692,000073: 4746 00040 BIT6 OCT 00040
047693,000074: 4747 00020 BIT5 OCT 00020
047694,000075: 4750 00010 BIT4 OCT 00010
047695,000076: 4751 00004 BIT3 OCT 00004
047696,000077: 4752 00002 BIT2 OCT 00002
047697,000078: 4753 00001 BIT1 OCT 00001
047698,000079:
047699,000080: # DO NOT DESTROY THIS COMBINATION, SINCE IT IS USED IN DOUBLE PRECISION INSTRUCTIONS.
047700,000081: 4754 77777 NEG0 OCT -0 # MUST PRECEDE ZERO
047701,000082: 4755 00000 ZERO OCT 0 # MUST FOLLOW NEG0
047702,000083: # BIT1 OCT 00001
047703,000084: # NO.WDS OCT 2 INTERPRETER
047704,000085: # OCTAL3 OCT 3 INTERPRETER
047705,000086: # R3D1 OCT 4 PINBALL
047706,000087: 4756 00005 FIVE OCT 5
047707,000088: # REVCNT OCT 6 INTERPRETER
047708,000089: 4757 00007 SEVEN OCT 7
047709,000090: # BIT4 OCT 00010
047710,000091: # R2D1 OCT 11 PINBALL
047711,000092: 4760 4320 OCT11 = R2D1 # P20S
047712,000093: # BINCON DEC 10 PINBALL (OCTAL 12)
047713,000094: 4760 00013 ELEVEN DEC 11 B-14
047714,000095: # OCT14 OCT 14 ALARM AND ABORT (FILLER)
047715,000096: 4761 00015 OCT15 OCT 15
047716,000097: # R1D1 OCT 16 PINBALL
047717,000098: 4762 00017 LOW4 OCT 17
![]() |
Page 1096 |
047719,000100: # BIT5 OCT 00020
047720,000101: # ND1 OCT 21 PINBALL
047721,000102: # VD1 OCT 23 PINBALL
047722,000103: # OCT24 OCT 24 SERVICE ROUTINES
047723,000104: # MD1 OCT 25 PINBALL
047724,000105: 4763 00030 BITS4&5 OCT 30
047725,000106: # OCT31 OCT 31 SERVICE ROUTINES
047726,000107: 4764 00033 OCT33 OCT 33
047727,000108: 4765 4764 DEC27 = OCT33
047728,000109: 4765 00035 OCT35 OCT 35
047729,000110: 4766 4765 DEC29 = OCT35
047730,000111: 4766 00032 CALLCODE OCT 00032
047731,000112: # LOW5 OCT 37 PINBALL
047732,000113: # 33DEC DEC 33 PINBALL (OCTAL 41)
047733,000114: # 34DEC DEC 34 PINBALL (OCTAL 42)
047734,000115: 4767 00045 TBUILDFX DEC 37 B-14 # BUILDUP FOR CONVIENCE IN DAPTESTING
047735,000116: 4770 00046 TDECAYFX DEC 38 B-14 # CONVENIENCE FOR DAPTESTING
047736,000117: # BIT6 OCT 00040
047737,000118: 4771 00050 OCT50 OCT 50
047738,000119: 4772 00055 DEC45 DEC 45 B-14
047739,000120: 4773 00060 SUPER011 OCT 60 # BITS FOR SUPERBNK SETTING 011.
047740,000121: 4774 00062 .5SEC DEC 50 B-14
047741,000122: # BIT7 OCT 00100
047742,000123:
047743,000124: 4775 4745 SUPER100 = BIT7 # BITS FOR SUPERBNK SETTING 100
047744,000125: # (LAST 4K OF ROPE)
047745,000126: 4775 00120 SUPER101 OCT 120 # BITS FOR SUPERBNK SETTING 101
047746,000127: # OCT121 OCT 121 SERVICE ROUTINES
047747,000128: # (FIRST 8K OF ACM)
047748,000129: 4776 00140 SUPER110 OCT 140 # BITS FOR SUPERBNK SETTING 110.
047749,000130: # (LAST 8K OF ACM)
047750,000131: 4777 00144 1SEC DEC 100 B-14
047751,000132: # LOW7 OCT 177 INTERPRETER
047752,000133: # BIT8 OCT 00200
047753,000134: # OT215 OCT 215 ALARM AND ABORT
047754,000135: # 8,5 OCT 00220 P20-P25 SUNDANCE
047755,000136: 5000 00310 2SECS DEC 200 B-14
047756,000137: # LOW8 OCT 377 PINBALL
047757,000138: # BIT9 OCT 00400
047758,000139: 5001 00401 GN/CCODE OCT 00401 # SET S/C CONTROL SWITCH TO G/N
047759,000140: 5002 00454 3SECS DEC 300 B-14
047760,000141: 5003 00620 4SECS DEC 400 B-14
047761,000142: 5004 00777 LOW9 OCT 777
047762,000143: # BIT10 OCT 01000
047763,000144: # 5.5DEGS DEC .03056 P20-P25 SUNDANCE (OCTAL 00765)
047764,000145: # OCT1103 OCT 1103 ALARM AND ABORT
047765,000146: 5005 01124 C5/2 DEC .0363551 # (OCTAL 01124)
047766,000147: 5006 01211 V05N09 VN 0509 # (SAME AS OCTAL 1211)
047767,000148: 5007 01400 OCT1400 OCT 01400
047768,000149: 5010 01426 V06N22 VN 0622
![]() |
Page 1097 |
047770,000151: # MID5 OCT 1740 PINBALL
047771,000152: 5011 01776 BITS2-10 OCT 1776
047772,000153: 5012 01777 LOW10 OCT 1777
047773,000154: # BIT11 OCT 02000
047774,000155: # 2K+3 OCT 2003 PINBALL
047775,000156: 5013 02177 LOW7+2K OCT 2177 # OP CODE MASK + BANK 1 FBANK SETTING.
047776,000157: 5014 02400 EBANK5 OCT 02400
047777,000158: 5015 03000 PRIO3 OCT 03000
047778,000159: 5016 03400 EBANK7 OCT 03400
047779,000160: # LOW11 OCT 3777 PINBALL
047780,000161: # BIT12 OCT 04000
047781,000162: # RELTAB OCT 04025 T4RUPT
047782,000163: 5017 05000 PRIO5 OCT 05000
047783,000164: 5020 06000 PRIO6 OCT 06000
047784,000165: 5021 07000 PRIO7 OCT 07000
047785,000166:
047786,000167: # BIT13 OCT 10000
047787,000168: # OCT 10003 T4RUPT RELTAB +1D
047788,000169: # 13,7,2 OCT 10102 P20-P25 SUNDANCE
047789,000170: 5022 11000 PRIO11 OCT 11000
047790,000171: # PRIO12 OCT 12000 BANKCALL
047791,000172: 5023 13000 PRIO13 OCT 13000
047792,000173: 5024 14000 PRIO14 OCT 14000
047793,000174: # OCT 14031 T4RUPT RELTAB +2D
047794,000175: 5025 15000 PRIO15 OCT 15000
047795,000176: 5026 16000 PRIO16 OCT 16000
047796,000177: # 85DEGS DEC .45556 P20-P25 SUNDANCE (OCTAL 16450)
047797,000178: 5027 17000 PRIO17 OCT 17000
047798,000179: 5030 17770 OCT17770 OCT 17770
047799,000180: # BIT14 OCT 20000
047800,000181: # OCT 20033 T4RUPT RELTAB +3D
047801,000182: 5031 21000 PRIO21 OCT 21000
047802,000183: 7710 BLOCK 03
047803,000184: 7710 COUNT* $$/FCONS
047804,000185: 7710 22000 PRIO22 OCT 22000 # SERVICE ROUTINES
047805,000186: 7711 23000 PRIO23 OCT 23000
047806,000187: 7712 24000 PRIO24 OCT 24000
047807,000188: # 5/8+1 OCT 24001 SINGLE PRECISION SUBROUTINES
047808,000189: # OCT 24017 T4RUPT RELTAB +4D
047809,000190: 7713 25000 PRIO25 OCT 25000
047810,000191: 7714 26000 PRIO26 OCT 26000
047811,000192: 7715 27000 PRIO27 OCT 27000
047812,000193: # CHRPRIO OCT 30000 PINBALL
047813,000194: # OCT 30036 T4RUPT RELTAB +5D
047814,000195: 7716 31000 PRIO31 OCT 31000
047815,000196: 7717 31103 C1/2 DEC .7853134 # (OCTAL 31103)
047816,000197: 7720 32000 PRIO32 OCT 32000
047817,000198: 7721 33000 PRIO33 OCT 33000
047818,000199: 7722 34000 PRIO34 OCT 34000
047819,000200: # OCT 34034 T4RUPT RELTAB +6D
![]() |
Page 1098 |
047821,000202: 7723 35000 PRIO35 OCT 35000
047822,000203: 7724 36000 PRIO36 OCT 36000
047823,000204: 7725 37000 PRIO37 OCT 37000
047824,000205: 7726 37401 63/64+1 OCT 37401
047825,000206: # MID7 OCT 37600 PINBALL
047826,000207: 7727 37766 OCT37766 OCT 37766
047827,000208: 7730 37774 OCT37774 OCT 37774
047828,000209: 7731 37776 OCT37776 OCT 37776
047829,000210: # DPOSMAX OCT 37777
047830,000211: # BIT15 OCT 40000
047831,000212: # OCT40001 OCT 40001 INTERPRETER (CS 1 INSTRUCTION)
047832,000213: 7732 40014 DLOADCOD OCT 40014
047833,000214: 7733 40015 DLOAD* OCT 40015
047834,000215: # OCT 40023 T4RUPT RELTAB +7D
047835,000216: 7734 40040 BIT15+6 OCT 40040
047836,000217: 7735 40200 OCT40200 OCT 40200
047837,000218: # OCT 44035 T4RUPT RELTAB +8D
047838,000219: # OCT 50037 T4RUPT RELTAB +9D
047839,000220: # OCT 54000 T4RUPT RELTAB +10D
047840,000221: 7736 57777 -BIT14 OCT 57777
047841,000222: # RELTAB11 OCT 60000 T4RUPT
047842,000223: 7737 65552 C3/2 DEC -.3216147 # (OCTAL 65552)
047843,000224: 7740 70000 13,14,15 OCT 70000
047844,000225: 7741 73777 -1/8 OCT 73777
047845,000226: 7742 74000 HIGH4 OCT 74000
047846,000227: 7743 74056 -ENDERAS DEC -2001 B-14 # (OCTAL 74056)
047847,000228: # HI5 OCT 76000 PINBALL
047848,000229: 7744 77700 HIGH9 OCT 77700
047849,000230: # -ENDVAC DEC -45 INTERPRETER (OCTAL 77722)
047850,000231: # -OCT10 OCT -10 (OCT 77767)
047851,000232: # NEG4 DEC -4 (OCTAL 77773)
047852,000233: 7745 77774 NEG3 DEC -3 B-14
047853,000234: 7746 77775 NEG2 OCT 77775
047854,000235: 7747 77776 NEGONE DEC -1 B-14
047855,000236:
![]() |
Page 1099 |
047857,000238:
047858,000239: # DEFINED BY EQUALS
047859,000240:
047860,000241: # IT WOULD BE TO THE USERS ADVANTAGE TO OCCASIONALLY CHECK ANY OF THESE SYMBOLS IN ORDER TO PREVENT ANY
047861,000242: # ACCIDENTAL DEFINITION CHANGES.
047862,000243:
047863,000244: 7750 7747 MINUS1 = NEG1
047864,000245: 7750 7747 NEG1 = NEGONE
047865,000246: 7750 4753 ONE = BIT1
047866,000247: 7750 4752 TWO = BIT2
047867,000248: 7750 6245 THREE = OCTAL3
047868,000249: 7750 6245 LOW2 = THREE
047869,000250: 7750 4751 FOUR = BIT3
047870,000251: 7750 6242 SIX = REVCNT
047871,000252: 7750 4757 LOW3 = SEVEN
047872,000253: 7750 4750 EIGHT = BIT4
047873,000254: 7750 4320 NINE = R2D1
047874,000255: 7750 4363 TEN = BINCON
047875,000256: 7750 4760 NOUTCON = ELEVEN
047876,000257: 7750 4360 OCT23 = VD1
047877,000258: 7750 4362 OCT25 = MD1
047878,000259: 7750 4742 PRIO1 = BIT10
047879,000260: 7750 5007 EBANK3 = OCT1400
047880,000261: 7750 4741 PRIO2 = BIT11
047881,000262: 7750 4775 OCT120 = SUPER101
047882,000263: 7750 4776 OCT140 = SUPER110
047883,000264: 7750 4741 2K = BIT11
047884,000265: 7750 4741 EBANK4 = BIT11
047885,000266: 7750 4740 PRIO4 = BIT12
047886,000267: 7750 5015 EBANK6 = PRIO3
047887,000268: 7750 4737 QUARTER = BIT13
047888,000269: 7750 4737 PRIO10 = BIT13
047889,000270: 7750 7663 OCT10001 = CCSL
047890,000271: 7750 4736 POS1/2 = HALF
047891,000272: 7750 4736 PRIO20 = BIT14
047892,000273: 7750 4736 HALF = BIT14
047893,000274: 7750 4355 PRIO30 = CHRPRIO
047894,000275: 7750 4355 BIT13-14 = PRIO30 # INTERPRETER USES IN PROCESSING STORECODE
047895,000276: 7750 6471 OCT30002 = TLOAD +1
047896,000277: 7750 7722 B12T14 = PRIO34
047897,000278: 7750 4735 NEGMAX = BIT15
047898,000279: 7750 4735 VLOADCOD = BIT15
047899,000280: 7750 6107 VLOAD* = OCT40001
047900,000281: 7750 4101 OCT60000 = RELTAB11
047901,000282: 7750 4350 BANKMASK = HI5
047902,000283:
End of include-file FIXED-FIXED_CONSTANT_POOL.agc. Parent file is MAIN.agc