Source Code
These source-code files are part of a reconstructed copy of Comanche 44, the
initial release (though not the final mission release) of the Apollo 10
Command Module (CM) Apollo Guidance Computer (AGC) software. Subsequent releases
were Comanche 45 and Comanche 45/2 (the flown release on Apollo 10). The reconstruction
is believed to be exactly accurate, but in the absence of an actual Apollo-era
listing of Comanche 44, some explanation of the reconstruction process is needed
to insure confidence in that accuracy.
The starting point was the source code of Comanche 51 (separately previously reconstructed from an Apollo-era listing of Comanche 55, flown on Apollo 11). Comanche 51 source code was then modified by undoing changes known to have been made between revisions 44 and 51. The now-reconstructed Comanche 44 source code was verified by assembling it and checking that the assembled code had the expected known-correct memory-bank checksums. Note that page numbers in the reconstructed code match those on the Comanche 55 printout, although the source code would likely have different page numbers in a contemporary Comanche 44 listing. Annotations that were not present in the contemporary source code have been added to the reconstructed code to justify each change relative to Comanche 51. Here's a guide to the Apollo documentation referenced in those annotations:
Comments expected to have been present in the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC Project's GitHub repository. |
051597,000002: ## Copyright: Public domain.
051598,000003: ## Filename: FIXED-FIXED_CONSTANT_POOL.agc
051599,000004: ## Purpose: A section of Comanche revision 044.
051600,000005: ## It is part of the reconstructed source code for the
051601,000006: ## original release of the flight software for the Command
051602,000007: ## Module's (CM) Apollo Guidance Computer (AGC) for Apollo 10.
051603,000008: ## The code has been recreated from a copy of Comanche 055. It
051604,000009: ## has been adapted such that the resulting bugger words
051605,000010: ## exactly match those specified for Comanche 44 in NASA drawing
051606,000011: ## 2021153D, which gives relatively high confidence that the
051607,000012: ## reconstruction is correct.
051608,000013: ## Assembler: yaYUL
051609,000014: ## Contact: Ron Burkey <info@sandroid.org>.
051610,000015: ## Website: www.ibiblio.org/apollo/index.html
051611,000016: ## Mod history: 2020-12-03 MAS Created from Comanche 51.
051612,000017:
Page 1200 |
051614,000019: 4776 BLOCK 02
051615,000020: 4776 COUNT 02/FCONS
051616,000021:
051617,000022: # THE FOLLOWING TABLE OF 18 VALUES IS INDEXED. DO NOT INSERT OR REMOVE ANY QUANTITIES.
051618,000023:
051619,000024: 4776 37777 DPOSMAX OCT 37777 # MUST PRECEDE POSMAX
051620,000025: 4777 37777 POSMAX OCT 37777
051621,000026:
051622,000027: 5000 5000 LIMITS = NEG1/2
051623,000028:
051624,000029: 5000 57777 NEG1/2 OCT -20000 # USED BY SIN ROUTINE (MUST BE TWO
051625,000030: # LOCATIONS IN FRONT OF BIT14)
051626,000031:
051627,000032: # BIT TABLE
051628,000033:
051629,000034: 5001 40000 BIT15 OCT 40000
051630,000035: 5002 20000 BIT14 OCT 20000
051631,000036: 5003 10000 BIT13 OCT 10000
051632,000037: 5004 04000 BIT12 OCT 04000
051633,000038: 5005 02000 BIT11 OCT 02000
051634,000039: 5006 01000 BIT10 OCT 01000
051635,000040: 5007 00400 BIT9 OCT 00400
051636,000041: 5010 00200 BIT8 OCT 00200
051637,000042: 5011 00100 BIT7 OCT 00100
051638,000043: 5012 00040 BIT6 OCT 00040
051639,000044: 5013 00020 BIT5 OCT 00020
051640,000045: 5014 00010 BIT4 OCT 00010
051641,000046: 5015 00004 BIT3 OCT 00004
051642,000047: 5016 00002 BIT2 OCT 00002
051643,000048: 5017 00001 BIT1 OCT 00001
051644,000049:
051645,000050: # DO NOT DESTROY THIS COMBINATION, SINCE IT IS USED IN DOUBLE PRECISION INSTRUCTIONS.
051646,000051: 5020 77777 NEG0 OCT -0 # MUST PRECEDE ZERO
051647,000052: 5021 00000 ZERO OCT 0 # MUST FOLLOW NEG0
051648,000053: # BIT1 OCT 00001
051649,000054: # NO.WDS OCT 2 INTERPRETER
051650,000055: # OCTAL3 OCT 3 INTERPRETER
051651,000056: # R3D1 OCT 4 PINBALL
051652,000057: 5022 00005 FIVE OCT 5
051653,000058: # REVCNT OCT 6 INTERPRETER
051654,000059: 5023 00007 SEVEN OCT 7
051655,000060: # BIT4 OCT 00010
051656,000061: # R2D1 OCT 11 PINBALL
051657,000062: 5024 4334 OCT11 = R2D1 # P20S
051658,000063: # BINCON DEC 10 PINBALL (OCTAL 12)
051659,000064: 5024 00013 ELEVEN DEC 11 B-14
051660,000065: # OCT14 OCT 14 ALARM AND ABORT (FILLER)
051661,000066: 5025 00015 OCT15 OCT 15
051662,000067: # R1D1 OCT 16 PINBALL
Page 1201 |
051664,000069: 5026 00017 LOW4 OCT 17
051665,000070: # BIT5 OCT 00020
051666,000071: # ND1 OCT 21 PINBALL
051667,000072: # VD1 OCT 23 PINBALL
051668,000073: # OCT24 OCT 24 SERVICE ROUTINES
051669,000074: # MD1 OCT 25 PINBALL
051670,000075: 5027 00030 BITS4&5 OCT 30
051671,000076: # OCT31 OCT 31 SERVICE ROUTINES
051672,000077: 5030 00032 CALLCODE OCT 00032
051673,000078: # LOW5 OCT 37 PINBALL
051674,000079: # 33DEC DEC 33 PINBALL (OCTAL 41)
051675,000080: # 34DEC DEC 34 PINBALL (OCTAL 42)
051676,000081: 5031 00045 TBUILDFX DEC 37 B-14 # BUILDUP FOR CONVIENCE IN DAPTESTING
051677,000082: 5032 00046 TDECAYFX DEC 38 B-14 # CONVENIENCE FOR DAPTESTING
051678,000083: # BIT6 OCT 00040
051679,000084: 5033 00050 OCT50 OCT 50
051680,000085: 5034 00055 DEC45 DEC 45 B-14
051681,000086: 5035 00060 SUPER011 OCT 60 # BITS FOR SUPERBNK SETTING 011.
051682,000087: 5036 00062 .5SEC DEC 50 B-14
051683,000088: # BIT7 OCT 00100
051684,000089:
051685,000090: 5037 5011 SUPER100 = BIT7 # BITS FOR SUPERBNK SETTING 100
051686,000091: # (LAST 4K OF ROPE)
051687,000092: 5037 00120 SUPER101 OCT 120 # BITS FOR SUPERBNK SETTING 101
051688,000093: # OCT121 OCT 121 SERVICE ROUTINES
051689,000094: # (FIRST 8K OF ACM)
051690,000095: 5040 00140 SUPER110 OCT 140 # BITS FOR SUPERBNK SETTING 110.
051691,000096: # (LAST 8K OF ACM)
051692,000097: 5041 00144 1SEC DEC 100 B-14
051693,000098: # LOW7 OCT 177 INTERPRETER
051694,000099: # BIT8 OCT 00200
051695,000100: # OT215 OCT 215 ALARM AND ABORT
051696,000101: # 8,5 OCT 00220 P20-P25 SUNDANCE
051697,000102: 5042 00310 2SECS DEC 200 B-14
051698,000103: # LOW8 OCT 377 PINBALL
051699,000104: # BIT9 OCT 00400
051700,000105: 5043 00401 GN/CCODE OCT 00401 # SET S/C CONTROL SWITCH TO G/N
051701,000106: 5044 00454 3SECS DEC 300 B-14
051702,000107: 5045 00620 4SECS DEC 400 B-14
051703,000108: 5046 00777 LOW9 OCT 777
051704,000109: # BIT10 OCT 01000
051705,000110: # 5.5DEGS DEC .03056 P20-P25 SUNDANCE (OCTAL 00765)
051706,000111: # OCT1103 OCT 1103 ALARM AND ABORT
051707,000112: 5047 01124 C5/2 DEC .0363551 # (OCTAL 01124)
051708,000113: 5050 01211 V05N09 VN 0509 # (SAME AS OCTAL 1211)
051709,000114: 5051 01400 OCT1400 OCT 01400
051710,000115: 5052 01426 V06N22 VN 0622
051711,000116: # MID5 OCT 1740 PINBALL
051712,000117: 5053 01776 BITS2-10 OCT 1776
051713,000118: 5054 01777 LOW10 OCT 1777
Page 1202 |
051715,000120: # BIT11 OCT 02000
051716,000121: # 2K+3 OCT 2003 PINBALL
051717,000122: 5055 02177 LOW7+2K OCT 2177 # OP CODE MASK + BANK 1 FBANK SETTING.
051718,000123: 5056 02400 EBANK5 OCT 02400
051719,000124: 5057 03000 PRIO3 OCT 03000
051720,000125: 5060 03400 EBANK7 OCT 03400
051721,000126: # LOW11 OCT 3777 PINBALL
051722,000127: # BIT12 OCT 04000
051723,000128: # RELTAB OCT 04025 T4RUPT
051724,000129: 5061 05000 PRIO5 OCT 05000
051725,000130: 5062 06000 PRIO6 OCT 06000
051726,000131: 5063 07000 PRIO7 OCT 07000
051727,000132:
051728,000133: # BIT13 OCT 10000
051729,000134: # OCT 10003 T4RUPT RELTAB +1D
051730,000135: # 13,7,2 OCT 10102 P20-P25 SUNDANCE
051731,000136: 5064 11000 PRIO11 OCT 11000
051732,000137: # PRIO12 OCT 12000 BANKCALL
051733,000138: 5065 13000 PRIO13 OCT 13000
051734,000139: 5066 14000 PRIO14 OCT 14000
051735,000140: # OCT 14031 T4RUPT RELTAB +2D
051736,000141: 5067 15000 PRIO15 OCT 15000
051737,000142: 5070 16000 PRIO16 OCT 16000
051738,000143: # 85DEGS DEC .45556 P20-P25 SUNDANCE (OCTAL 16450)
051739,000144: 5071 17000 PRIO17 OCT 17000
051740,000145: 5072 17770 OCT17770 OCT 17770
051741,000146: # BIT14 OCT 20000
051742,000147: # OCT 20033 T4RUPT RELTAB +3D
051743,000148: 5073 21000 PRIO21 OCT 21000
051744,000149: 7657 BLOCK 03
051745,000150: 7657 COUNT 03/FCONS
051746,000151:
051747,000152: 7657 22000 PRIO22 OCT 22000 # SERVICE ROUTINES
051748,000153: 7660 23000 PRIO23 OCT 23000
051749,000154: 7661 24000 PRIO24 OCT 24000
051750,000155: # 5/8+1 OCT 24001 SINGLE PRECISION SUBROUTINES
051751,000156: # OCT 24017 T4RUPT RELTAB +4D
051752,000157: 7662 25000 PRIO25 OCT 25000
051753,000158: 7663 26000 PRIO26 OCT 26000
051754,000159: 7664 27000 PRIO27 OCT 27000
051755,000160: # CHRPRIO OCT 30000 PINBALL
051756,000161: # OCT 30036 T4RUPT RELTAB +5D
051757,000162: 7665 31000 PRIO31 OCT 31000
051758,000163: 7666 31103 C1/2 DEC .7853134 # (OCTAL 31103)
051759,000164: 7667 32000 PRIO32 OCT 32000
051760,000165: 7670 33000 PRIO33 OCT 33000
051761,000166: 7671 34000 PRIO34 OCT 34000
051762,000167: # OCT 34034 T4RUPT RELTAB +6D
051763,000168: 7672 35000 PRIO35 OCT 35000
051764,000169: 7673 36000 PRIO36 OCT 36000
Page 1203 |
051766,000171: 7674 37000 PRIO37 OCT 37000
051767,000172: 7675 37401 63/64+1 OCT 37401
051768,000173: # MID7 OCT 37600 PINBALL
051769,000174: 7676 37766 OCT37766 OCT 37766
051770,000175: 7677 37774 OCT37774 OCT 37774
051771,000176: 7700 37776 OCT37776 OCT 37776
051772,000177: # DPOSMAX OCT 37777
051773,000178: # BIT15 OCT 40000
051774,000179: # OCT40001 OCT 40001 INTERPRETER (CS 1 INSTRUCTION)
051775,000180: 7701 40014 DLOADCOD OCT 40014
051776,000181: 7702 40015 DLOAD* OCT 40015
051777,000182: # OCT 40023 T4RUPT RELTAB +7D
051778,000183: 7703 40040 BIT15+6 OCT 40040
051779,000184: 7704 40200 OCT40200 OCT 40200
051780,000185: # OCT 44035 T4RUPT RELTAB +8D
051781,000186: # OCT 50037 T4RUPT RELTAB +9D
051782,000187: # OCT 54000 T4RUPT RELTAB +10D
051783,000188: 7705 57777 -BIT14 OCT 57777
051784,000189: # RELTAB11 OCT 60000 T4RUPT
051785,000190: 7706 65552 C3/2 DEC -.3216147 # (OCTAL 65552)
051786,000191: 7707 70000 13,14,15 OCT 70000
051787,000192: 7710 73777 -1/8 OCT 73777
051788,000193: 7711 74000 HIGH4 OCT 74000
051789,000194: 7712 74056 -ENDERAS DEC -2001 B-14 # (OCTAL 74056)
051790,000195: # HI5 OCT 76000 PINBALL
051791,000196: 7713 77700 HIGH9 OCT 77700
051792,000197: # -ENDVAC DEC -45 INTERPRETER (OCTAL 77722)
051793,000198: # -OCT10 OCT -10 (OCT 77767)
051794,000199: # NEG4 DEC -4 (OCTAL 77773)
051795,000200: 7714 77774 NEG3 DEC -3 B-14
051796,000201: 7715 77775 NEG2 OCT 77775
051797,000202: 7716 77776 NEGONE DEC -1 B-14
051798,000203:
Page 1204 |
051800,000205:
051801,000206: # DEFINED BY EQUALS
051802,000207:
051803,000208: # IT WOULD BE TO THE USERS ADVANTAGE TO OCCASIONALLY CHECK ANY OF THESE SYMBOLS IN ORDER TO PREVENT ANY
051804,000209: # ACCIDENTAL DEFINITION CHANGES.
051805,000210:
051806,000211: 7717 7716 MINUS1 = NEG1
051807,000212: 7717 7716 NEG1 = NEGONE
051808,000213: 7717 5017 ONE = BIT1
051809,000214: 7717 5016 TWO = BIT2
051810,000215: 7717 6214 THREE = OCTAL3
051811,000216: 7717 6214 LOW2 = THREE
051812,000217: 7717 5015 FOUR = BIT3
051813,000218: 7717 6211 SIX = REVCNT
051814,000219: 7717 5023 LOW3 = SEVEN
051815,000220: 7717 5014 EIGHT = BIT4
051816,000221: 7717 4334 NINE = R2D1
051817,000222: 7717 4377 TEN = BINCON
051818,000223: 7717 5024 NOUTCON = ELEVEN
051819,000224: 7717 4374 OCT23 = VD1
051820,000225: 7717 4376 OCT25 = MD1
051821,000226: 7717 5006 PRIO1 = BIT10
051822,000227: 7717 5051 EBANK3 = OCT1400
051823,000228: 7717 5005 PRIO2 = BIT11
051824,000229: 7717 5037 OCT120 = SUPER101
051825,000230: 7717 5040 OCT140 = SUPER110
051826,000231: 7717 5005 2K = BIT11
051827,000232: 7717 5005 EBANK4 = BIT11
051828,000233: 7717 5004 PRIO4 = BIT12
051829,000234: 7717 5057 EBANK6 = PRIO3
051830,000235: 7717 5003 QUARTER = BIT13
051831,000236: 7717 5003 PRIO10 = BIT13
051832,000237: 7717 7632 OCT10001 = CCSL
051833,000238: 7717 5002 POS1/2 = HALF
051834,000239: 7717 5002 PRIO20 = BIT14
051835,000240: 7717 5002 HALF = BIT14
051836,000241: 7717 4371 PRIO30 = CHRPRIO
051837,000242: 7717 4371 BIT13-14 = PRIO30 # INTERPRETER USES IN PROCESSING STORECODE
051838,000243: 7717 6440 OCT30002 = TLOAD +1
051839,000244: 7717 7671 B12T14 = PRIO34
051840,000245: 7717 5001 NEGMAX = BIT15
051841,000246: 7717 5001 VLOADCOD = BIT15
051842,000247: 7717 6056 VLOAD* = OCT40001
051843,000248: 7717 4105 OCT60000 = RELTAB11
051844,000249: 7717 4364 BANKMASK = HI5
051845,000250:
End of include-file FIXED-FIXED_CONSTANT_POOL.agc. Parent file is MAIN.agc