Source Code
These source-code files are part of a reconstructed copy of Comanche 72, the
first release of the Apollo Guidance Computer (AGC) Command Module (CM) software
for Apollo 13.
They have been adapted from sources files created from a listing of Comanche 55. These source files were updated to match binary dumps of a set of Comanche 67 rope modules. They were then further modified by applying known changes between Comanche 67 and Comanche 72. A binary dump of module B2 of Comanche 72, part number 2010802-021, was also used to validate changes made to banks 05-13. The resulting code assembles to have identical memory-bank checksums as those specified in NASA drawing 2021153G; this gives reasonably high confidence that the changes that have been made are correct. In places where ambiguity exists, this ambiguity is discussed in "## Reconstruction:" comments. Since no contemporary listings of Comanche 72 are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing. |
050218,000002: ## Copyright: Public domain.
050219,000003: ## Filename: FIXED-FIXED_CONSTANT_POOL.agc
050220,000004: ## Purpose: A section of Comanche revision 072.
050221,000005: ## It is part of the reconstructed source code for the first
050222,000006: ## release of the software for the Command Module's (CM) Apollo
050223,000007: ## Guidance Computer (AGC) for Apollo 13. No original listings
050224,000008: ## of this program are available; instead, this file was recreated
050225,000009: ## from a printout of Comanche 055, binary dumps of a set of
050226,000010: ## Comanche 067 rope modules, and changelogs between Comanche 067
050227,000011: ## and 072. It has been adapted such that the resulting bugger words
050228,000012: ## exactly match those specified for Comanche 072 in NASA drawing
050229,000013: ## 2021153G, which gives relatively high confidence that the
050230,000014: ## reconstruction is correct.
050231,000015: ## Assembler: yaYUL
050232,000016: ## Contact: Ron Burkey <info@sandroid.org>.
050233,000017: ## Website: www.ibiblio.org/apollo/index.html
050234,000018: ## Mod history: 2024-05-13 MAS Created from Comanche 067.
050235,000019:
050236,000020: 5012 BLOCK 02
050237,000021: 5012 COUNT 02/FCONS
050238,000022:
050239,000023: # THE FOLLOWING TABLE OF 18 VALUES IS INDEXED. DO NOT INSERT OR REMOVE ANY QUANTITIES.
050240,000024:
050241,000025: 5012 37777 DPOSMAX OCT 37777 # MUST PRECEDE POSMAX
050242,000026: 5013 37777 POSMAX OCT 37777
050243,000027:
050244,000028: 5014 5014 LIMITS = NEG1/2
050245,000029:
050246,000030: 5014 57777 NEG1/2 OCT -20000 # USED BY SIN ROUTINE (MUST BE TWO
050247,000031: # LOCATIONS IN FRONT OF BIT14)
050248,000032:
050249,000033: # BIT TABLE
050250,000034:
050251,000035: 5015 40000 BIT15 OCT 40000
050252,000036: 5016 20000 BIT14 OCT 20000
050253,000037: 5017 10000 BIT13 OCT 10000
050254,000038: 5020 04000 BIT12 OCT 04000
050255,000039: 5021 02000 BIT11 OCT 02000
050256,000040: 5022 01000 BIT10 OCT 01000
050257,000041: 5023 00400 BIT9 OCT 00400
050258,000042: 5024 00200 BIT8 OCT 00200
050259,000043: 5025 00100 BIT7 OCT 00100
050260,000044: 5026 00040 BIT6 OCT 00040
050261,000045: 5027 00020 BIT5 OCT 00020
050262,000046: 5030 00010 BIT4 OCT 00010
050263,000047: 5031 00004 BIT3 OCT 00004
050264,000048: 5032 00002 BIT2 OCT 00002
050265,000049: 5033 00001 BIT1 OCT 00001
050266,000050:
050267,000051: # DO NOT DESTROY THIS COMBINATION, SINCE IT IS USED IN DOUBLE PRECISION INSTRUCTIONS.
050268,000052: 5034 77777 NEG0 OCT -0 # MUST PRECEDE ZERO
050269,000053: 5035 00000 ZERO OCT 0 # MUST FOLLOW NEG0
050270,000054: # BIT1 OCT 00001
050271,000055: # NO.WDS OCT 2 INTERPRETER
050272,000056: # OCTAL3 OCT 3 INTERPRETER
050273,000057: # R3D1 OCT 4 PINBALL
050274,000058: 5036 00005 FIVE OCT 5
050275,000059: # REVCNT OCT 6 INTERPRETER
050276,000060: 5037 00007 SEVEN OCT 7
050277,000061: # BIT4 OCT 00010
050278,000062: # R2D1 OCT 11 PINBALL
050279,000063: 5040 4334 OCT11 = R2D1 # P20S
050280,000064: # BINCON DEC 10 PINBALL (OCTAL 12)
050281,000065: 5040 00013 ELEVEN DEC 11 B-14
050282,000066: # OCT14 OCT 14 ALARM AND ABORT (FILLER)
050283,000067: 5041 00015 OCT15 OCT 15
050284,000068: # R1D1 OCT 16 PINBALL
050285,000069: 5042 00017 LOW4 OCT 17
050286,000070: # BIT5 OCT 00020
050287,000071: # ND1 OCT 21 PINBALL
050288,000072: # VD1 OCT 23 PINBALL
050289,000073: # OCT24 OCT 24 SERVICE ROUTINES
050290,000074: # MD1 OCT 25 PINBALL
050291,000075: 5043 00030 BITS4&5 OCT 30
050292,000076: # OCT31 OCT 31 SERVICE ROUTINES
050293,000077: 5044 00032 CALLCODE OCT 00032
050294,000078: # LOW5 OCT 37 PINBALL
050295,000079: # 33DEC DEC 33 PINBALL (OCTAL 41)
050296,000080: # 34DEC DEC 34 PINBALL (OCTAL 42)
050297,000081: 5045 00045 TBUILDFX DEC 37 B-14 # BUILDUP FOR CONVIENCE IN DAPTESTING
050298,000082: 5046 00046 TDECAYFX DEC 38 B-14 # CONVENIENCE FOR DAPTESTING
050299,000083: # BIT6 OCT 00040
050300,000084: 5047 00050 OCT50 OCT 50
050301,000085: 5050 00055 DEC45 DEC 45 B-14
050302,000086: 5051 00060 SUPER011 OCT 60 # BITS FOR SUPERBNK SETTING 011.
050303,000087: 5052 00062 .5SEC DEC 50 B-14
050304,000088: # BIT7 OCT 00100
050305,000089:
050306,000090: 5053 5025 SUPER100 = BIT7 # BITS FOR SUPERBNK SETTING 100
050307,000091: # (LAST 4K OF ROPE)
050308,000092: 5053 00120 SUPER101 OCT 120 # BITS FOR SUPERBNK SETTING 101
050309,000093: # OCT121 OCT 121 SERVICE ROUTINES
050310,000094: # (FIRST 8K OF ACM)
050311,000095: 5054 00140 SUPER110 OCT 140 # BITS FOR SUPERBNK SETTING 110.
050312,000096: # (LAST 8K OF ACM)
050313,000097: 5055 00144 1SEC DEC 100 B-14
050314,000098: # LOW7 OCT 177 INTERPRETER
050315,000099: # BIT8 OCT 00200
050316,000100: # OT215 OCT 215 ALARM AND ABORT
050317,000101: # 8,5 OCT 00220 P20-P25 SUNDANCE
050318,000102: 5056 00310 2SECS DEC 200 B-14
050319,000103: # LOW8 OCT 377 PINBALL
050320,000104: # BIT9 OCT 00400
050321,000105: 5057 00401 GN/CCODE OCT 00401 # SET S/C CONTROL SWITCH TO G/N
050322,000106: 5060 00454 3SECS DEC 300 B-14
050323,000107: 5061 00620 4SECS DEC 400 B-14
050324,000108: 5062 00777 LOW9 OCT 777
050325,000109: # BIT10 OCT 01000
050326,000110: # 5.5DEGS DEC .03056 P20-P25 SUNDANCE (OCTAL 00765)
050327,000111: # OCT1103 OCT 1103 ALARM AND ABORT
050328,000112: 5063 01124 C5/2 DEC .0363551 # (OCTAL 01124)
050329,000113: 5064 01211 V05N09 VN 0509 # (SAME AS OCTAL 1211)
050330,000114: 5065 01400 OCT1400 OCT 01400
050331,000115: 5066 01426 V06N22 VN 0622
050332,000116: # MID5 OCT 1740 PINBALL
050333,000117: 5067 01776 BITS2-10 OCT 1776
050334,000118: 5070 01777 LOW10 OCT 1777
050335,000119: # BIT11 OCT 02000
050336,000120: # 2K+3 OCT 2003 PINBALL
050337,000121: 5071 02177 LOW7+2K OCT 2177 # OP CODE MASK + BANK 1 FBANK SETTING.
050338,000122: 5072 02400 EBANK5 OCT 02400
050339,000123: 5073 03000 PRIO3 OCT 03000
050340,000124: 5074 03400 EBANK7 OCT 03400
050341,000125: # LOW11 OCT 3777 PINBALL
050342,000126: # BIT12 OCT 04000
050343,000127: # RELTAB OCT 04025 T4RUPT
050344,000128: 5075 05000 PRIO5 OCT 05000
050345,000129: 5076 06000 PRIO6 OCT 06000
050346,000130: 5077 07000 PRIO7 OCT 07000
050347,000131:
050348,000132: # BIT13 OCT 10000
050349,000133: # OCT 10003 T4RUPT RELTAB +1D
050350,000134: # 13,7,2 OCT 10102 P20-P25 SUNDANCE
050351,000135: 5100 11000 PRIO11 OCT 11000
050352,000136: # PRIO12 OCT 12000 BANKCALL
050353,000137: 5101 13000 PRIO13 OCT 13000
050354,000138: 5102 14000 PRIO14 OCT 14000
050355,000139: # OCT 14031 T4RUPT RELTAB +2D
050356,000140: 5103 15000 PRIO15 OCT 15000
050357,000141: 5104 16000 PRIO16 OCT 16000
050358,000142: # 85DEGS DEC .45556 P20-P25 SUNDANCE (OCTAL 16450)
050359,000143: 5105 17000 PRIO17 OCT 17000
050360,000144: 5106 17770 OCT17770 OCT 17770
050361,000145: # BIT14 OCT 20000
050362,000146: # OCT 20033 T4RUPT RELTAB +3D
050363,000147: 5107 21000 PRIO21 OCT 21000
050364,000148: 7657 BLOCK 03
050365,000149: 7657 COUNT 03/FCONS
050366,000150:
050367,000151: 7657 22000 PRIO22 OCT 22000 # SERVICE ROUTINES
050368,000152: 7660 23000 PRIO23 OCT 23000
050369,000153: 7661 24000 PRIO24 OCT 24000
050370,000154: # 5/8+1 OCT 24001 SINGLE PRECISION SUBROUTINES
050371,000155: # OCT 24017 T4RUPT RELTAB +4D
050372,000156: 7662 25000 PRIO25 OCT 25000
050373,000157: 7663 26000 PRIO26 OCT 26000
050374,000158: 7664 27000 PRIO27 OCT 27000
050375,000159: # CHRPRIO OCT 30000 PINBALL
050376,000160: # OCT 30036 T4RUPT RELTAB +5D
050377,000161: 7665 31000 PRIO31 OCT 31000
050378,000162: 7666 31103 C1/2 DEC .7853134 # (OCTAL 31103)
050379,000163: 7667 32000 PRIO32 OCT 32000
050380,000164: 7670 33000 PRIO33 OCT 33000
050381,000165: 7671 34000 PRIO34 OCT 34000
050382,000166: # OCT 34034 T4RUPT RELTAB +6D
050383,000167: 7672 35000 PRIO35 OCT 35000
050384,000168: 7673 36000 PRIO36 OCT 36000
050385,000169: 7674 37000 PRIO37 OCT 37000
050386,000170: 7675 37401 63/64+1 OCT 37401
050387,000171: # MID7 OCT 37600 PINBALL
050388,000172: 7676 37766 OCT37766 OCT 37766
050389,000173: 7677 37774 OCT37774 OCT 37774
050390,000174: 7700 37776 OCT37776 OCT 37776
050391,000175: # DPOSMAX OCT 37777
050392,000176: # BIT15 OCT 40000
050393,000177: # OCT40001 OCT 40001 INTERPRETER (CS 1 INSTRUCTION)
050394,000178: 7701 40014 DLOADCOD OCT 40014
050395,000179: 7702 40015 DLOAD* OCT 40015
050396,000180: # OCT 40023 T4RUPT RELTAB +7D
050397,000181: 7703 40040 BIT15+6 OCT 40040
050398,000182: 7704 40200 OCT40200 OCT 40200
050399,000183: # OCT 44035 T4RUPT RELTAB +8D
050400,000184: # OCT 50037 T4RUPT RELTAB +9D
050401,000185: # OCT 54000 T4RUPT RELTAB +10D
050402,000186: 7705 57777 -BIT14 OCT 57777
050403,000187: # RELTAB11 OCT 60000 T4RUPT
050404,000188: 7706 65552 C3/2 DEC -.3216147 # (OCTAL 65552)
050405,000189: 7707 70000 13,14,15 OCT 70000
050406,000190: 7710 73777 -1/8 OCT 73777
050407,000191: 7711 74000 HIGH4 OCT 74000
050408,000192: 7712 74056 -ENDERAS DEC -2001 B-14 # (OCTAL 74056)
050409,000193: # HI5 OCT 76000 PINBALL
050410,000194: 7713 77700 HIGH9 OCT 77700
050411,000195: # -ENDVAC DEC -45 INTERPRETER (OCTAL 77722)
050412,000196: # -OCT10 OCT -10 (OCT 77767)
050413,000197: # NEG4 DEC -4 (OCTAL 77773)
050414,000198: 7714 77774 NEG3 DEC -3 B-14
050415,000199: 7715 77775 NEG2 OCT 77775
050416,000200: 7716 77776 NEGONE DEC -1 B-14
050417,000201:
050418,000202:
050419,000203: # DEFINED BY EQUALS
050420,000204:
050421,000205: # IT WOULD BE TO THE USERS ADVANTAGE TO OCCASIONALLY CHECK ANY OF THESE SYMBOLS IN ORDER TO PREVENT ANY
050422,000206: # ACCIDENTAL DEFINITION CHANGES.
050423,000207:
050424,000208: 7717 7716 MINUS1 = NEG1
050425,000209: 7717 7716 NEG1 = NEGONE
050426,000210: 7717 5033 ONE = BIT1
050427,000211: 7717 5032 TWO = BIT2
050428,000212: 7717 6214 THREE = OCTAL3
050429,000213: 7717 6214 LOW2 = THREE
050430,000214: 7717 5031 FOUR = BIT3
050431,000215: 7717 6211 SIX = REVCNT
050432,000216: 7717 5037 LOW3 = SEVEN
050433,000217: 7717 5030 EIGHT = BIT4
050434,000218: 7717 4334 NINE = R2D1
050435,000219: 7717 4377 TEN = BINCON
050436,000220: 7717 5040 NOUTCON = ELEVEN
050437,000221: 7717 4374 OCT23 = VD1
050438,000222: 7717 4376 OCT25 = MD1
050439,000223: 7717 5022 PRIO1 = BIT10
050440,000224: 7717 5065 EBANK3 = OCT1400
050441,000225: 7717 5021 PRIO2 = BIT11
050442,000226: 7717 5053 OCT120 = SUPER101
050443,000227: 7717 5054 OCT140 = SUPER110
050444,000228: 7717 5021 2K = BIT11
050445,000229: 7717 5021 EBANK4 = BIT11
050446,000230: 7717 5020 PRIO4 = BIT12
050447,000231: 7717 5073 EBANK6 = PRIO3
050448,000232: 7717 5017 QUARTER = BIT13
050449,000233: 7717 5017 PRIO10 = BIT13
050450,000234: 7717 7632 OCT10001 = CCSL
050451,000235: 7717 5016 POS1/2 = HALF
050452,000236: 7717 5016 PRIO20 = BIT14
050453,000237: 7717 5016 HALF = BIT14
050454,000238: 7717 4371 PRIO30 = CHRPRIO
050455,000239: 7717 4371 BIT13-14 = PRIO30 # INTERPRETER USES IN PROCESSING STORECODE
050456,000240: 7717 6440 OCT30002 = TLOAD +1
050457,000241: 7717 7671 B12T14 = PRIO34
050458,000242: 7717 5015 NEGMAX = BIT15
050459,000243: 7717 5015 VLOADCOD = BIT15
050460,000244: 7717 6056 VLOAD* = OCT40001
050461,000245: 7717 4105 OCT60000 = RELTAB11
050462,000246: 7717 4364 BANKMASK = HI5
050463,000247:
End of include-file FIXED-FIXED_CONSTANT_POOL.agc. Parent file is MAIN.agc