Source Code
These source-code files are part of a reconstructed copy of Comanche 45, the
second release, though not the final mission release, of the Apollo 10
Command Module (CM) Apollo Guidance Computer (AGC) software. Comanche 45 was
preceded by Comanche 44 and followed by Comanche 45/2 (the flown release). The reconstruction
is believed to be exactly accurate, but in the absence of an actual Apollo-era
listing of Comanche 45, some explanation of the reconstruction process is needed
to insure confidence in that accuracy.
The starting point was the source code of Comanche 44 (itself previously accurately reconstructed). Comanche 44 source code was then modified by incorporating changes known from contemporary documentation to have been made between revisions 44 and 45. The now-reconstructed Comanche 45 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 tend to match those in the Comanche 55, the most-similar revision of Comanche for which we have access to an actual non-reconstructed hardcopy; the source code would likely have different page numbers in a contemporary Comanche 45 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 44. 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. |
051096,000002: ## Copyright: Public domain.
051097,000003: ## Filename: FIXED-FIXED_CONSTANT_POOL.agc
051098,000004: ## Purpose: A section of Comanche revision 045.
051099,000005: ## It is part of the reconstructed source code for the
051100,000006: ## second release of the flight software for the Command
051101,000007: ## Module's (CM) Apollo Guidance Computer (AGC) for Apollo 10.
051102,000008: ## The code has been recreated from a copy of Comanche 055. It
051103,000009: ## has been adapted such that the resulting bugger words
051104,000010: ## exactly match those specified for Comanche 45 in NASA drawing
051105,000011: ## 2021153D, which gives relatively high confidence that the
051106,000012: ## reconstruction is correct.
051107,000013: ## Assembler: yaYUL
051108,000014: ## Contact: Ron Burkey <info@sandroid.org>.
051109,000015: ## Website: www.ibiblio.org/apollo/index.html
051110,000016: ## Mod history: 2020-12-06 MAS Created from Comanche 44.
051111,000017:
Page 1200 |
051113,000019: 4776 BLOCK 02
051114,000020: 4776 COUNT 02/FCONS
051115,000021:
051116,000022: # THE FOLLOWING TABLE OF 18 VALUES IS INDEXED. DO NOT INSERT OR REMOVE ANY QUANTITIES.
051117,000023:
051118,000024: 4776 37777 DPOSMAX OCT 37777 # MUST PRECEDE POSMAX
051119,000025: 4777 37777 POSMAX OCT 37777
051120,000026:
051121,000027: 5000 5000 LIMITS = NEG1/2
051122,000028:
051123,000029: 5000 57777 NEG1/2 OCT -20000 # USED BY SIN ROUTINE (MUST BE TWO
051124,000030: # LOCATIONS IN FRONT OF BIT14)
051125,000031:
051126,000032: # BIT TABLE
051127,000033:
051128,000034: 5001 40000 BIT15 OCT 40000
051129,000035: 5002 20000 BIT14 OCT 20000
051130,000036: 5003 10000 BIT13 OCT 10000
051131,000037: 5004 04000 BIT12 OCT 04000
051132,000038: 5005 02000 BIT11 OCT 02000
051133,000039: 5006 01000 BIT10 OCT 01000
051134,000040: 5007 00400 BIT9 OCT 00400
051135,000041: 5010 00200 BIT8 OCT 00200
051136,000042: 5011 00100 BIT7 OCT 00100
051137,000043: 5012 00040 BIT6 OCT 00040
051138,000044: 5013 00020 BIT5 OCT 00020
051139,000045: 5014 00010 BIT4 OCT 00010
051140,000046: 5015 00004 BIT3 OCT 00004
051141,000047: 5016 00002 BIT2 OCT 00002
051142,000048: 5017 00001 BIT1 OCT 00001
051143,000049:
051144,000050: # DO NOT DESTROY THIS COMBINATION, SINCE IT IS USED IN DOUBLE PRECISION INSTRUCTIONS.
051145,000051: 5020 77777 NEG0 OCT -0 # MUST PRECEDE ZERO
051146,000052: 5021 00000 ZERO OCT 0 # MUST FOLLOW NEG0
051147,000053: # BIT1 OCT 00001
051148,000054: # NO.WDS OCT 2 INTERPRETER
051149,000055: # OCTAL3 OCT 3 INTERPRETER
051150,000056: # R3D1 OCT 4 PINBALL
051151,000057: 5022 00005 FIVE OCT 5
051152,000058: # REVCNT OCT 6 INTERPRETER
051153,000059: 5023 00007 SEVEN OCT 7
051154,000060: # BIT4 OCT 00010
051155,000061: # R2D1 OCT 11 PINBALL
051156,000062: 5024 4334 OCT11 = R2D1 # P20S
051157,000063: # BINCON DEC 10 PINBALL (OCTAL 12)
051158,000064: 5024 00013 ELEVEN DEC 11 B-14
051159,000065: # OCT14 OCT 14 ALARM AND ABORT (FILLER)
051160,000066: 5025 00015 OCT15 OCT 15
051161,000067: # R1D1 OCT 16 PINBALL
Page 1201 |
051163,000069: 5026 00017 LOW4 OCT 17
051164,000070: # BIT5 OCT 00020
051165,000071: # ND1 OCT 21 PINBALL
051166,000072: # VD1 OCT 23 PINBALL
051167,000073: # OCT24 OCT 24 SERVICE ROUTINES
051168,000074: # MD1 OCT 25 PINBALL
051169,000075: 5027 00030 BITS4&5 OCT 30
051170,000076: # OCT31 OCT 31 SERVICE ROUTINES
051171,000077: 5030 00032 CALLCODE OCT 00032
051172,000078: # LOW5 OCT 37 PINBALL
051173,000079: # 33DEC DEC 33 PINBALL (OCTAL 41)
051174,000080: # 34DEC DEC 34 PINBALL (OCTAL 42)
051175,000081: 5031 00045 TBUILDFX DEC 37 B-14 # BUILDUP FOR CONVIENCE IN DAPTESTING
051176,000082: 5032 00046 TDECAYFX DEC 38 B-14 # CONVENIENCE FOR DAPTESTING
051177,000083: # BIT6 OCT 00040
051178,000084: 5033 00050 OCT50 OCT 50
051179,000085: 5034 00055 DEC45 DEC 45 B-14
051180,000086: 5035 00060 SUPER011 OCT 60 # BITS FOR SUPERBNK SETTING 011.
051181,000087: 5036 00062 .5SEC DEC 50 B-14
051182,000088: # BIT7 OCT 00100
051183,000089:
051184,000090: 5037 5011 SUPER100 = BIT7 # BITS FOR SUPERBNK SETTING 100
051185,000091: # (LAST 4K OF ROPE)
051186,000092: 5037 00120 SUPER101 OCT 120 # BITS FOR SUPERBNK SETTING 101
051187,000093: # OCT121 OCT 121 SERVICE ROUTINES
051188,000094: # (FIRST 8K OF ACM)
051189,000095: 5040 00140 SUPER110 OCT 140 # BITS FOR SUPERBNK SETTING 110.
051190,000096: # (LAST 8K OF ACM)
051191,000097: 5041 00144 1SEC DEC 100 B-14
051192,000098: # LOW7 OCT 177 INTERPRETER
051193,000099: # BIT8 OCT 00200
051194,000100: # OT215 OCT 215 ALARM AND ABORT
051195,000101: # 8,5 OCT 00220 P20-P25 SUNDANCE
051196,000102: 5042 00310 2SECS DEC 200 B-14
051197,000103: # LOW8 OCT 377 PINBALL
051198,000104: # BIT9 OCT 00400
051199,000105: 5043 00401 GN/CCODE OCT 00401 # SET S/C CONTROL SWITCH TO G/N
051200,000106: 5044 00454 3SECS DEC 300 B-14
051201,000107: 5045 00620 4SECS DEC 400 B-14
051202,000108: 5046 00777 LOW9 OCT 777
051203,000109: # BIT10 OCT 01000
051204,000110: # 5.5DEGS DEC .03056 P20-P25 SUNDANCE (OCTAL 00765)
051205,000111: # OCT1103 OCT 1103 ALARM AND ABORT
051206,000112: 5047 01124 C5/2 DEC .0363551 # (OCTAL 01124)
051207,000113: 5050 01211 V05N09 VN 0509 # (SAME AS OCTAL 1211)
051208,000114: 5051 01400 OCT1400 OCT 01400
051209,000115: 5052 01426 V06N22 VN 0622
051210,000116: # MID5 OCT 1740 PINBALL
051211,000117: 5053 01776 BITS2-10 OCT 1776
051212,000118: 5054 01777 LOW10 OCT 1777
Page 1202 |
051214,000120: # BIT11 OCT 02000
051215,000121: # 2K+3 OCT 2003 PINBALL
051216,000122: 5055 02177 LOW7+2K OCT 2177 # OP CODE MASK + BANK 1 FBANK SETTING.
051217,000123: 5056 02400 EBANK5 OCT 02400
051218,000124: 5057 03000 PRIO3 OCT 03000
051219,000125: 5060 03400 EBANK7 OCT 03400
051220,000126: # LOW11 OCT 3777 PINBALL
051221,000127: # BIT12 OCT 04000
051222,000128: # RELTAB OCT 04025 T4RUPT
051223,000129: 5061 05000 PRIO5 OCT 05000
051224,000130: 5062 06000 PRIO6 OCT 06000
051225,000131: 5063 07000 PRIO7 OCT 07000
051226,000132:
051227,000133: # BIT13 OCT 10000
051228,000134: # OCT 10003 T4RUPT RELTAB +1D
051229,000135: # 13,7,2 OCT 10102 P20-P25 SUNDANCE
051230,000136: 5064 11000 PRIO11 OCT 11000
051231,000137: # PRIO12 OCT 12000 BANKCALL
051232,000138: 5065 13000 PRIO13 OCT 13000
051233,000139: 5066 14000 PRIO14 OCT 14000
051234,000140: # OCT 14031 T4RUPT RELTAB +2D
051235,000141: 5067 15000 PRIO15 OCT 15000
051236,000142: 5070 16000 PRIO16 OCT 16000
051237,000143: # 85DEGS DEC .45556 P20-P25 SUNDANCE (OCTAL 16450)
051238,000144: 5071 17000 PRIO17 OCT 17000
051239,000145: 5072 17770 OCT17770 OCT 17770
051240,000146: # BIT14 OCT 20000
051241,000147: # OCT 20033 T4RUPT RELTAB +3D
051242,000148: 5073 21000 PRIO21 OCT 21000
051243,000149: 7657 BLOCK 03
051244,000150: 7657 COUNT 03/FCONS
051245,000151:
051246,000152: 7657 22000 PRIO22 OCT 22000 # SERVICE ROUTINES
051247,000153: 7660 23000 PRIO23 OCT 23000
051248,000154: 7661 24000 PRIO24 OCT 24000
051249,000155: # 5/8+1 OCT 24001 SINGLE PRECISION SUBROUTINES
051250,000156: # OCT 24017 T4RUPT RELTAB +4D
051251,000157: 7662 25000 PRIO25 OCT 25000
051252,000158: 7663 26000 PRIO26 OCT 26000
051253,000159: 7664 27000 PRIO27 OCT 27000
051254,000160: # CHRPRIO OCT 30000 PINBALL
051255,000161: # OCT 30036 T4RUPT RELTAB +5D
051256,000162: 7665 31000 PRIO31 OCT 31000
051257,000163: 7666 31103 C1/2 DEC .7853134 # (OCTAL 31103)
051258,000164: 7667 32000 PRIO32 OCT 32000
051259,000165: 7670 33000 PRIO33 OCT 33000
051260,000166: 7671 34000 PRIO34 OCT 34000
051261,000167: # OCT 34034 T4RUPT RELTAB +6D
051262,000168: 7672 35000 PRIO35 OCT 35000
051263,000169: 7673 36000 PRIO36 OCT 36000
Page 1203 |
051265,000171: 7674 37000 PRIO37 OCT 37000
051266,000172: 7675 37401 63/64+1 OCT 37401
051267,000173: # MID7 OCT 37600 PINBALL
051268,000174: 7676 37766 OCT37766 OCT 37766
051269,000175: 7677 37774 OCT37774 OCT 37774
051270,000176: 7700 37776 OCT37776 OCT 37776
051271,000177: # DPOSMAX OCT 37777
051272,000178: # BIT15 OCT 40000
051273,000179: # OCT40001 OCT 40001 INTERPRETER (CS 1 INSTRUCTION)
051274,000180: 7701 40014 DLOADCOD OCT 40014
051275,000181: 7702 40015 DLOAD* OCT 40015
051276,000182: # OCT 40023 T4RUPT RELTAB +7D
051277,000183: 7703 40040 BIT15+6 OCT 40040
051278,000184: 7704 40200 OCT40200 OCT 40200
051279,000185: # OCT 44035 T4RUPT RELTAB +8D
051280,000186: # OCT 50037 T4RUPT RELTAB +9D
051281,000187: # OCT 54000 T4RUPT RELTAB +10D
051282,000188: 7705 57777 -BIT14 OCT 57777
051283,000189: # RELTAB11 OCT 60000 T4RUPT
051284,000190: 7706 65552 C3/2 DEC -.3216147 # (OCTAL 65552)
051285,000191: 7707 70000 13,14,15 OCT 70000
051286,000192: 7710 73777 -1/8 OCT 73777
051287,000193: 7711 74000 HIGH4 OCT 74000
051288,000194: 7712 74056 -ENDERAS DEC -2001 B-14 # (OCTAL 74056)
051289,000195: # HI5 OCT 76000 PINBALL
051290,000196: 7713 77700 HIGH9 OCT 77700
051291,000197: # -ENDVAC DEC -45 INTERPRETER (OCTAL 77722)
051292,000198: # -OCT10 OCT -10 (OCT 77767)
051293,000199: # NEG4 DEC -4 (OCTAL 77773)
051294,000200: 7714 77774 NEG3 DEC -3 B-14
051295,000201: 7715 77775 NEG2 OCT 77775
051296,000202: 7716 77776 NEGONE DEC -1 B-14
051297,000203:
Page 1204 |
051299,000205:
051300,000206: # DEFINED BY EQUALS
051301,000207:
051302,000208: # IT WOULD BE TO THE USERS ADVANTAGE TO OCCASIONALLY CHECK ANY OF THESE SYMBOLS IN ORDER TO PREVENT ANY
051303,000209: # ACCIDENTAL DEFINITION CHANGES.
051304,000210:
051305,000211: 7717 7716 MINUS1 = NEG1
051306,000212: 7717 7716 NEG1 = NEGONE
051307,000213: 7717 5017 ONE = BIT1
051308,000214: 7717 5016 TWO = BIT2
051309,000215: 7717 6214 THREE = OCTAL3
051310,000216: 7717 6214 LOW2 = THREE
051311,000217: 7717 5015 FOUR = BIT3
051312,000218: 7717 6211 SIX = REVCNT
051313,000219: 7717 5023 LOW3 = SEVEN
051314,000220: 7717 5014 EIGHT = BIT4
051315,000221: 7717 4334 NINE = R2D1
051316,000222: 7717 4377 TEN = BINCON
051317,000223: 7717 5024 NOUTCON = ELEVEN
051318,000224: 7717 4374 OCT23 = VD1
051319,000225: 7717 4376 OCT25 = MD1
051320,000226: 7717 5006 PRIO1 = BIT10
051321,000227: 7717 5051 EBANK3 = OCT1400
051322,000228: 7717 5005 PRIO2 = BIT11
051323,000229: 7717 5037 OCT120 = SUPER101
051324,000230: 7717 5040 OCT140 = SUPER110
051325,000231: 7717 5005 2K = BIT11
051326,000232: 7717 5005 EBANK4 = BIT11
051327,000233: 7717 5004 PRIO4 = BIT12
051328,000234: 7717 5057 EBANK6 = PRIO3
051329,000235: 7717 5003 QUARTER = BIT13
051330,000236: 7717 5003 PRIO10 = BIT13
051331,000237: 7717 7632 OCT10001 = CCSL
051332,000238: 7717 5002 POS1/2 = HALF
051333,000239: 7717 5002 PRIO20 = BIT14
051334,000240: 7717 5002 HALF = BIT14
051335,000241: 7717 4371 PRIO30 = CHRPRIO
051336,000242: 7717 4371 BIT13-14 = PRIO30 # INTERPRETER USES IN PROCESSING STORECODE
051337,000243: 7717 6440 OCT30002 = TLOAD +1
051338,000244: 7717 7671 B12T14 = PRIO34
051339,000245: 7717 5001 NEGMAX = BIT15
051340,000246: 7717 5001 VLOADCOD = BIT15
051341,000247: 7717 6056 VLOAD* = OCT40001
051342,000248: 7717 4105 OCT60000 = RELTAB11
051343,000249: 7717 4364 BANKMASK = HI5
051344,000250:
End of include-file FIXED-FIXED_CONSTANT_POOL.agc. Parent file is MAIN.agc