Source Code
![]() |
This source code is very close to the Apollo Guidance Computer software for the
Apollo 13 Lunar module. This revision of the Luminary 131 program is from December
of 1969, whereas there was a later revision in January of 1970, and still another
revision in February, which is the code that flew on the mission.
As far as this transcription is concerned, it was originally from a copy made in 1991 of
a printout from the collection of AGC developer Don Eyles for collector David Craig.
It was subsequently scanned by Gary Neff, reprocessed for online
presentation at the now-discontinued History of Recent Science and Technology (HRST) website
of MIT's Dibner Institute (the full-quality scans being discarded in the process),
and finally transcribed by Ron Burkey for the Virtual AGC Project. Although a
high-quality replacement scan for a completely illegible page was later provided by Gary
Neff, the reduced legibility of the reprocessed HRST posting nevertheless caused many
errors to be introduced into the transcription. Accordingly, a second scan of the same physical
printout was made in 2017 for the Virtual AGC Project's collection at the Internet Archive,
and used to correct the transcription errors. All of the scanned materials mentioned,
as well as other Luminary 131 related material, are available online.
Don Eyles apprently made additional hand-written notes in printout between 1991 and 2017,
so the two scans are not identical in that respect. The page-headings in the printout read, in part:GAP: ASSEMBLE REVISION 131 OF AGC PROGRAM LUMINARY BY NASA 2021112-091 17:53 DEC. 19, 1969Note that the date is the date the printout was made, not the date on which the program revision was released, although these happen to be very close together. |
045730,000002: ## Copyright: Public domain.
045731,000003: ## Filename: FIXED_FIXED_CONSTANT_POOL.agc
045732,000004: ## Purpose: The main source file for Luminary 1C, revision 131.
045733,000005: ## It is part of the source code for the Lunar Module's (LM)
045734,000006: ## Apollo Guidance Computer (AGC) for Apollo 13.
045735,000007: ## Assembler: yaYUL
045736,000008: ## Reference: pp. 1089-1093
045737,000009: ## Contact: Ron Burkey <info@sandroid.org>.
045738,000010: ## Website: www.ibiblio.org/apollo/index.html
045739,000011: ## Mod history: 04/23/03 RSB. Began.
045740,000012: ## 05/14/05 RSB Corrected website reference above.
045741,000013: ## 2010-10-25 JL Indentation fixes.
045742,000014: ## 2017-01-06 RSB Page numbers now agree with those on the
045743,000015: ## original harcopy, as opposed to the PDF page
045744,000016: ## numbers in 1701.pdf.
045745,000017: ## 2017-02-27 RSB Proofed comment text using octopus/ProoferComments.
045746,000018: ## 2017-03-13 RSB Comment-text fixes noted in proofing Luminary 116.
045747,000019:
![]() |
Page 1089 |
045749,000021: 4732 BLOCK 02
045750,000022: 4732 COUNT* $$/FCONS
045751,000023:
045752,000024: # THE FOLLOWING TABLE OF 18 VALUES IS INDEXED. DO NOT INSERT OR REMOVE ANY QUANTITIES.
045753,000025:
045754,000026: 4732 37777 DPOSMAX OCT 37777 # MUST PRECEDE POSMAX
045755,000027: 4733 37777 POSMAX OCT 37777
045756,000028:
045757,000029: 4734 4734 LIMITS = NEG1/2
045758,000030:
045759,000031: 4734 57777 NEG1/2 OCT -20000 # USED BY SIN ROUTINE (MUST BE TWO
045760,000032: # LOCATIONS IN FRONT OF BIT14)
045761,000033:
045762,000034: # BIT TABLE
045763,000035:
045764,000036: 4735 40000 BIT15 OCT 40000
045765,000037: 4736 20000 BIT14 OCT 20000
045766,000038: 4737 10000 BIT13 OCT 10000
045767,000039: 4740 04000 BIT12 OCT 04000
045768,000040: 4741 02000 BIT11 OCT 02000
045769,000041: 4742 01000 BIT10 OCT 01000
045770,000042: 4743 00400 BIT9 OCT 00400
045771,000043: 4744 00200 BIT8 OCT 00200
045772,000044: 4745 00100 BIT7 OCT 00100
045773,000045: 4746 00040 BIT6 OCT 00040
045774,000046: 4747 00020 BIT5 OCT 00020
045775,000047: 4750 00010 BIT4 OCT 00010
045776,000048: 4751 00004 BIT3 OCT 00004
045777,000049: 4752 00002 BIT2 OCT 00002
045778,000050: 4753 00001 BIT1 OCT 00001
045779,000051:
045780,000052: # DO NOT DESTROY THIS COMBINATION, SINCE IT IS USED IN DOUBLE PRECISION INSTRUCTIONS.
045781,000053: 4754 77777 NEG0 OCT -0 # MUST PRECEDE ZERO
045782,000054: 4755 00000 ZERO OCT 0 # MUST FOLLOW NEG0
045783,000055: # BIT1 OCT 00001
045784,000056: # NO.WDS OCT 2 INTERPRETER
045785,000057: # OCTAL3 OCT 3 INTERPRETER
045786,000058: # R3D1 OCT 4 PINBALL
045787,000059: 4756 00005 FIVE OCT 5
045788,000060: # REVCNT OCT 6 INTERPRETER
045789,000061: 4757 00007 SEVEN OCT 7
045790,000062: # BIT4 OCT 00010
045791,000063: # R2D1 OCT 11 PINBALL
045792,000064: 4760 4320 OCT11 = R2D1 # P20S
045793,000065: # BINCON DEC 10 PINBALL (OCTAL 12)
045794,000066: 4760 00013 ELEVEN DEC 11 B-14
045795,000067: # OCT14 OCT 14 ALARM AND ABORT (FILLER)
045796,000068: 4761 00015 OCT15 OCT 15
045797,000069: # R1D1 OCT 16 PINBALL
045798,000070: 4762 00017 LOW4 OCT 17
![]() |
Page 1090 |
045800,000072: # BIT5 OCT 00020
045801,000073: # ND1 OCT 21 PINBALL
045802,000074: # VD1 OCT 23 PINBALL
045803,000075: # OCT24 OCT 24 SERVICE ROUTINES
045804,000076: # MD1 OCT 25 PINBALL
045805,000077: 4763 00030 BITS4&5 OCT 30
045806,000078: # OCT31 OCT 31 SERVICE ROUTINES
045807,000079: 4764 00033 OCT33 OCT 33
045808,000080: 4765 4764 DEC27 = OCT33
045809,000081: 4765 00035 OCT35 OCT 35
045810,000082: 4766 4765 DEC29 = OCT35
045811,000083: 4766 00032 CALLCODE OCT 00032
045812,000084: # LOW5 OCT 37 PINBALL
045813,000085: # 33DEC DEC 33 PINBALL (OCTAL 41)
045814,000086: # 34DEC DEC 34 PINBALL (OCTAL 42)
045815,000087: 4767 00045 TBUILDFX DEC 37 B-14 # BUILDUP FOR CONVIENCE IN DAPTESTING
045816,000088: 4770 00046 TDECAYFX DEC 38 B-14 # CONVENIENCE FOR DAPTESTING
045817,000089: # BIT6 OCT 00040
045818,000090: 4771 00050 OCT50 OCT 50
045819,000091: 4772 00055 DEC45 DEC 45 B-14
045820,000092: 4773 00060 SUPER011 OCT 60 # BITS FOR SUPERBNK SETTING 011.
045821,000093: 4774 00062 .5SEC DEC 50 B-14
045822,000094: # BIT7 OCT 00100
045823,000095:
045824,000096: 4775 4745 SUPER100 = BIT7 # BITS FOR SUPERBNK SETTING 100
045825,000097: # (LAST 4K OF ROPE)
045826,000098: 4775 00120 SUPER101 OCT 120 # BITS FOR SUPERBNK SETTING 101
045827,000099: # OCT121 OCT 121 SERVICE ROUTINES
045828,000100: # (FIRST 8K OF ACM)
045829,000101: 4776 00140 SUPER110 OCT 140 # BITS FOR SUPERBNK SETTING 110.
045830,000102: # (LAST 8K OF ACM)
045831,000103: 4777 00144 1SEC DEC 100 B-14
045832,000104: # LOW7 OCT 177 INTERPRETER
045833,000105: # BIT8 OCT 00200
045834,000106: # OT215 OCT 215 ALARM AND ABORT
045835,000107: # 8,5 OCT 00220 P20-P25 SUNDANCE
045836,000108: 5000 00310 2SECS DEC 200 B-14
045837,000109: # LOW8 OCT 377 PINBALL
045838,000110: # BIT9 OCT 00400
045839,000111: 5001 00401 GN/CCODE OCT 00401 # SET S/C CONTROL SWITCH TO G/N
045840,000112: 5002 00454 3SECS DEC 300 B-14
045841,000113: 5003 00620 4SECS DEC 400 B-14
045842,000114: 5004 00777 LOW9 OCT 777
045843,000115: # BIT10 OCT 01000
045844,000116: # 5.5DEGS DEC .03056 P20-P25 SUNDANCE (OCTAL 00765)
045845,000117: # OCT1103 OCT 1103 ALARM AND ABORT
045846,000118: 5005 01124 C5/2 DEC .0363551 # (OCTAL 01124)
045847,000119: 5006 01211 V05N09 VN 0509 # (SAME AS OCTAL 1211)
045848,000120: 5007 01400 OCT1400 OCT 01400
045849,000121: 5010 01426 V06N22 VN 0622
![]() |
Page 1091 |
045851,000123: # MID5 OCT 1740 PINBALL
045852,000124: 5011 01776 BITS2-10 OCT 1776
045853,000125: 5012 01777 LOW10 OCT 1777
045854,000126: # BIT11 OCT 02000
045855,000127: # 2K+3 OCT 2003 PINBALL
045856,000128: 5013 02177 LOW7+2K OCT 2177 # OP CODE MASK + BANK 1 FBANK SETTING.
045857,000129: 5014 02400 EBANK5 OCT 02400
045858,000130: 5015 03000 PRIO3 OCT 03000
045859,000131: 5016 03400 EBANK7 OCT 03400
045860,000132: # LOW11 OCT 3777 PINBALL
045861,000133: # BIT12 OCT 04000
045862,000134: # RELTAB OCT 04025 T4RUPT
045863,000135: 5017 05000 PRIO5 OCT 05000
045864,000136: 5020 06000 PRIO6 OCT 06000
045865,000137: 5021 07000 PRIO7 OCT 07000
045866,000138:
045867,000139: # BIT13 OCT 10000
045868,000140: # OCT 10003 T4RUPT RELTAB +1D
045869,000141: # 13,7,2 OCT 10102 P20-P25 SUNDANCE
045870,000142: 5022 11000 PRIO11 OCT 11000
045871,000143: # PRIO12 OCT 12000 BANKCALL
045872,000144: 5023 13000 PRIO13 OCT 13000
045873,000145: 5024 14000 PRIO14 OCT 14000
045874,000146: # OCT 14031 T4RUPT RELTAB +2D
045875,000147: 5025 15000 PRIO15 OCT 15000
045876,000148: 5026 16000 PRIO16 OCT 16000
045877,000149: # 85DEGS DEC .45556 P20-P25 SUNDANCE (OCTAL 16450)
045878,000150: 5027 17000 PRIO17 OCT 17000
045879,000151: 5030 17770 OCT17770 OCT 17770
045880,000152: # BIT14 OCT 20000
045881,000153: # OCT 20033 T4RUPT RELTAB +3D
045882,000154: 5031 21000 PRIO21 OCT 21000
045883,000155:
045884,000156: 7713 BLOCK 03
045885,000157: 7713 COUNT* $$/FCONS
045886,000158:
045887,000159: 7713 22000 PRIO22 OCT 22000 # SERVICE ROUTINES
045888,000160: 7714 23000 PRIO23 OCT 23000
045889,000161: 7715 24000 PRIO24 OCT 24000
045890,000162: # 5/8+1 OCT 24001 SINGLE PRECISION SUBROUTINES
045891,000163: # OCT 24017 T4RUPT RELTAB +4D
045892,000164: 7716 25000 PRIO25 OCT 25000
045893,000165: 7717 26000 PRIO26 OCT 26000
045894,000166: 7720 27000 PRIO27 OCT 27000
045895,000167: # CHRPRIO OCT 30000 PINBALL
045896,000168: # OCT 30036 T4RUPT RELTAB +5D
045897,000169: 7721 31000 PRIO31 OCT 31000
045898,000170: 7722 31103 C1/2 DEC .7853134 # (OCTAL 31103)
045899,000171: 7723 32000 PRIO32 OCT 32000
045900,000172: 7724 33000 PRIO33 OCT 33000
045901,000173: 7725 34000 PRIO34 OCT 34000
045902,000174: # OCT 34034 T4RUPT RELTAB +6D
![]() |
Page 1092 |
045904,000176: 7726 35000 PRIO35 OCT 35000
045905,000177: 7727 36000 PRIO36 OCT 36000
045906,000178: 7730 37000 PRIO37 OCT 37000
045907,000179: 7731 37401 63/64+1 OCT 37401
045908,000180: # MID7 OCT 37600 PINBALL
045909,000181: 7732 37766 OCT37766 OCT 37766
045910,000182: 7733 37774 OCT37774 OCT 37774
045911,000183: 7734 37776 OCT37776 OCT 37776
045912,000184: # DPOSMAX OCT 37777
045913,000185: # BIT15 OCT 40000
045914,000186: # OCT40001 OCT 40001 INTERPRETER (CS 1 INSTRUCTION)
045915,000187: 7735 40014 DLOADCOD OCT 40014
045916,000188: 7736 40015 DLOAD* OCT 40015
045917,000189: # OCT 40023 T4RUPT RELTAB +7D
045918,000190: 7737 40040 BIT15+6 OCT 40040
045919,000191: 7740 40200 OCT40200 OCT 40200
045920,000192: # OCT 44035 T4RUPT RELTAB +8D
045921,000193: # OCT 50037 T4RUPT RELTAB +9D
045922,000194: # OCT 54000 T4RUPT RELTAB +10D
045923,000195: 7741 57777 -BIT14 OCT 57777
045924,000196: # RELTAB11 OCT 60000 T4RUPT
045925,000197: 7742 65552 C3/2 DEC -.3216147 # (OCTAL 65552)
045926,000198: 7743 70000 13,14,15 OCT 70000
045927,000199: 7744 73777 -1/8 OCT 73777
045928,000200: 7745 74000 HIGH4 OCT 74000
045929,000201: 7746 74056 -ENDERAS DEC -2001 B-14 # (OCTAL 74056)
045930,000202: # HI5 OCT 76000 PINBALL
045931,000203: 7747 77700 HIGH9 OCT 77700
045932,000204: # -ENDVAC DEC -45 INTERPRETER (OCTAL 77722)
045933,000205: # -OCT10 OCT -10 (OCT 77767)
045934,000206: # NEG4 DEC -4 (OCTAL 77773)
045935,000207: 7750 77774 NEG3 DEC -3 B-14
045936,000208: 7751 77775 NEG2 OCT 77775
045937,000209: 7752 77776 NEGONE DEC -1 B-14
045938,000210:
![]() |
Page 1093 |
045940,000212:
045941,000213: # DEFINED BY EQUALS
045942,000214:
045943,000215: # IT WOULD BE TO THE USERS ADVANTAGE TO OCCASIONALLY CHECK ANY OF THESE SYMBOLS IN ORDER TO PREVENT ANY
045944,000216: # ACCIDENTAL DEFINITION CHANGES.
045945,000217:
045946,000218: 7753 7752 MINUS1 = NEG1
045947,000219: 7753 7752 NEG1 = NEGONE
045948,000220: 7753 4753 ONE = BIT1
045949,000221: 7753 4752 TWO = BIT2
045950,000222: 7753 6250 THREE = OCTAL3
045951,000223: 7753 6250 LOW2 = THREE
045952,000224: 7753 4751 FOUR = BIT3
045953,000225: 7753 6245 SIX = REVCNT
045954,000226: 7753 4757 LOW3 = SEVEN
045955,000227: 7753 4750 EIGHT = BIT4
045956,000228: 7753 4320 NINE = R2D1
045957,000229: 7753 4363 TEN = BINCON
045958,000230: 7753 4760 NOUTCON = ELEVEN
045959,000231: 7753 4360 OCT23 = VD1
045960,000232: 7753 4362 OCT25 = MD1
045961,000233: 7753 4742 PRIO1 = BIT10
045962,000234: 7753 5007 EBANK3 = OCT1400
045963,000235: 7753 4741 PRIO2 = BIT11
045964,000236: 7753 4775 OCT120 = SUPER101
045965,000237: 7753 4776 OCT140 = SUPER110
045966,000238: 7753 4741 2K = BIT11
045967,000239: 7753 4741 EBANK4 = BIT11
045968,000240: 7753 4740 PRIO4 = BIT12
045969,000241: 7753 5015 EBANK6 = PRIO3
045970,000242: 7753 4737 QUARTER = BIT13
045971,000243: 7753 4737 PRIO10 = BIT13
045972,000244: 7753 7666 OCT10001 = CCSL
045973,000245: 7753 4736 POS1/2 = HALF
045974,000246: 7753 4736 PRIO20 = BIT14
045975,000247: 7753 4736 HALF = BIT14
045976,000248: 7753 4355 PRIO30 = CHRPRIO
045977,000249: 7753 4355 BIT13-14 = PRIO30 # INTERPRETER USES IN PROCESSING STORECODE
045978,000250: 7753 6474 OCT30002 = TLOAD +1
045979,000251: 7753 7725 B12T14 = PRIO34
045980,000252: 7753 4735 NEGMAX = BIT15
045981,000253: 7753 4735 VLOADCOD = BIT15
045982,000254: 7753 6112 VLOAD* = OCT40001
045983,000255: 7753 4101 OCT60000 = RELTAB11
045984,000256: 7753 4350 BANKMASK = HI5
045985,000257:
End of include-file FIXED-FIXED_CONSTANT_POOL.agc. Parent file is MAIN.agc