Source Code
These source-code files are part of a reconstructed copy of Comanche 45/2 (AKA Manche45 revision 2),
the final, flown mission release of the Apollo 10 Command Module (CM) Apollo Guidance
Computer (AGC) software. Comanche 45/2 was preceded by Comanche 44 and Comanche 45. The
reconstruction is believed to be exactly accurate, but in the absence of an actual Apollo-era
listing of Comanche 45/2, some explanation of the reconstruction process is needed
to insure confidence in that accuracy.
The starting point was the source code of Comanche 45 (itself previously accurately reconstructed). Comanche 45 source code was then modified by incorporating changes known from contemporary documentation to have been made between revisions 45 and 45/2. The now-reconstructed Comanche 45/2 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:
|
021741,000002: ## Copyright: Public domain.
021742,000003: ## Filename: P76.agc
021743,000004: ## Purpose: A section of Manche45 revision 2.
021744,000005: ## It is part of the reconstructed source code for the
021745,000006: ## final, flown release of the flight software for the Command
021746,000007: ## Module's (CM) Apollo Guidance Computer (AGC) for Apollo 10.
021747,000008: ## The code has been recreated from a copy of Comanche 055. It
021748,000009: ## has been adapted such that the resulting bugger words
021749,000010: ## exactly match those specified for Manche 45/2 in NASA drawing
021750,000011: ## 2021153D, which gives relatively high confidence that the
021751,000012: ## reconstruction is correct.
021752,000013: ## Assembler: yaYUL
021753,000014: ## Contact: Ron Burkey <info@sandroid.org>.
021754,000015: ## Website: www.ibiblio.org/apollo/index.html
021755,000016: ## Mod history: 2020-12-24 MAS Created from Comanche 45.
021756,000017:
Page 511 |
021758,000019: # 1) PROGRAM NAME - TARGET DELTA V PROGRAM (P76).
021759,000020: # 2) FUNCTIONAL DESCRIPTION - UPON ENTRY BY ASTRONAUT ACTION, P76 FLASHES DSKY REQUESTS TO THE ASTRONAUT
021760,000021: # TO PROVIDE VIA DSKY (1) THE DELTA V TO BE APPLIED TO THE OTHER VEHICLE STATE VECTOR AND (2) THE
021761,000022: # TIME (TIG) AT WHICH THE OTHER VEHICLE VELOCITY WAS CHANGED BY EXECUTION OF A THRUSTING MANEUVER. THE
021762,000023: # OTHER VEHICLE STATE VECTOR IS INTEGRATED TO TIG AND UPDATED BY THE ADDITION OF DELTA V (DELTA V HAVING
021763,000024: # BEEN TRANSFORMED FROM LV TO REF COSYS). USING INTEGRVS, THE PROGRAM THEN INTEGRATES THE OTHER
021764,000025: # VEHICLE STATE VECTOR TO THE STATE VECTOR OF THIS VEHICLE, THUS INSURING THAT THE W-MATRIX AND BOTH VEHICLE
021765,000026: # STATES CORRESPOND TO THE SAME TIME.
021766,000027: # 3) ERASABLE INITIALIZATION REQUIRED - NONE.
021767,000028: # 4) CALLING SEQUENCES AND EXIT MODES - CALLED BY ASTRONAUT REQUEST THRU DSKY V 37 E 76E.
021768,000029: # EXITS BY TCF ENDOFJOB.
021769,000030: # 5) OUTPUT - OTHER VEHICLE STATE VECTOR INTEGRATED TO TIG AND INCREMENTED BY DELTA V IN REF COSYS.
021770,000031: # THE PUSHLIST CONTAINS THE MATRIX BY WHICH THE INPUT DELTA V MUST BE POST-MULTIPLIED TO CONVERT FROM LV
021771,000032: # TO REF COSYS.
021772,000033: # 6) DEBRIS - OTHER VEHICLE STATE VECTOR.
021773,000034: # 7) SUBROUTINES CALLED - BANKCALL, GOXDSPF, CSMPREC (OR LEMPREC), ATOPCSM (OR ATOPLEM), INTSTALL, INTWAKE, PHASCHNG
021774,000035: # INTPRET, INTEGRVS, AND MINIRECT.
021775,000036: # 8) FLAG USE - MOONFLAG, CMOONFLAG, INTYPFLG, RASFLAG, AND MARKCTR.
021776,000037:
021777,000038: 30,2000 BANK 30
021778,000039: 13,2000 SETLOC P76LOC
021779,000040: 13,2000 BANK
021780,000041:
021781,000042: 13,2071 COUNT* $$/P76
021782,000043:
021783,000044: 13,2071 E7,1412 EBANK= TIG
021784,000045:
021785,000046: 13,2071 05546 P76 TC UPFLAG
021786,000047: 13,2072 00031 ADRES TRACKFLG
021787,000048:
021788,000049: 13,2073 32220 CAF V06N84 # FLASH LAST DELTA V,
021789,000050: 13,2074 04662 TC BANKCALL # AND WAIT FOR KEYBOARD ACTION.
021790,000051: 13,2075 20720 CADR GOFLASH
021791,000052: 13,2076 12212 TCF ENDP76
021792,000053: 13,2077 02101 TC +2 # PROCEED
021793,000054: 13,2100 02073 TC -5 # STORE DATA AND REPEAT FLASHING
021794,000055: 13,2101 32221 CAF V06N84 +1 # FLASH VERB 06 NOUN 33, DISPLAY LAST TIG,
021795,000056: 13,2102 04662 TC BANKCALL # AND WAIT FOR KEYBOARD ACTION.
021796,000057: 13,2103 20720 CADR GOFLASH
021797,000058: 13,2104 12212 TCF ENDP76
021798,000059: 13,2105 02107 TC +2
021799,000060: 13,2106 02101 TC -5
021800,000061: 13,2107 06006 TC INTPRET # RETURN TO INTERPRETIVE CODE
021801,000062: 13,2110 77745 DLOAD # SET D(MPAC)=TIG IN CSEC B28
021802,000063: 13,2111 03413 TIG
021803,000064: 13,2112 34041 STCALL TDEC1 # SET TDEC1=TIG FOR ORBITAL INTEGRATION
021804,000065: 13,2113 27105 OTHPREC
021805,000066: 13,2114 53575 COMPMAT VLOAD UNIT
021806,000067: 13,2115 00001 RATT
Page 512 |
021808,000069: 13,2116 77676 VCOMP # U(-R)
021809,000070: 13,2117 00031 STORE 24D # U(-R) TO 24D
021810,000071: 13,2120 53435 VXV UNIT # U(-R) X V = U(V X R)
021811,000072: 13,2121 00007 VATT
021812,000073: 13,2122 00023 STORE 18D
021813,000074: 13,2123 53435 VXV UNIT # U(V X R) X U(-R) = U((R X V) X R)
021814,000075: 13,2124 00031 24D
021815,000076: 13,2125 24015 STOVL 12D
021816,000077: 13,2126 03540 DELVOV
021817,000078: 13,2127 76505 VXM VSL1 # V(MPAC)=DELTA V IN REFCOSYS
021818,000079: 13,2130 00015 12D
021819,000080: 13,2131 77655 VAD
021820,000081: 13,2132 00007 VATT
021821,000082: 13,2133 00007 STORE 6 # V(PD6)=VATT + DELTA V
021822,000083: 13,2134 77624 CALL # PREVENT WOULD-BE USER OF ORBITAL
021823,000084: 13,2135 27442 INTSTALL # INTEG FROM INTERFERING WITH UPDATING
021824,000085: 13,2136 77624 CALL
021825,000086: 13,2137 26222 P76SUB1
021826,000087: 13,2140 53775 VLOAD VSR*
021827,000088: 13,2141 00007 6
021828,000089: 13,2142 57176 0,2
021829,000090: 13,2143 25543 STOVL VCV
021830,000091: 13,2144 00001 RATT
021831,000092: 13,2145 77657 VSR*
021832,000093: 13,2146 57176 0,2
021833,000094: 13,2147 15535 STODL RCV
021834,000095: 13,2150 03413 TIG
021835,000096: 13,2151 01517 STORE TET
021836,000097: 13,2152 71214 CLEAR DLOAD
021837,000098: 13,2153 01673 INTYPFLG
021838,000099: 13,2154 01571 TETTHIS
021839,000100: 13,2155 34041 INTOTHIS STCALL TDEC1
021840,000101: 13,2156 27135 INTEGRVS
021841,000102: 13,2157 77624 CALL
021842,000103: 13,2160 27442 INTSTALL
021843,000104: 13,2161 77624 CALL
021844,000105: 13,2162 26222 P76SUB1 # SET/CLEAR MOONFLAG
021845,000106: 13,2163 77775 VLOAD
021846,000107: 13,2164 00017 RATT1
021847,000108: 13,2165 01503 STORE RRECT
021848,000109: 13,2166 15535 STODL RCV
021849,000110: 13,2167 00015 TAT
021850,000111: 13,2170 25517 STOVL TET
021851,000112: 13,2171 00025 VATT1
021852,000113: 13,2172 77624 CALL
021853,000114: 13,2173 23435 MINIRECT
021854,000115: 13,2174 77776 EXIT
021855,000116: 13,2175 05412 TC PHASCHNG
021856,000117: 13,2176 04024 OCT 04024
Page 513 |
021858,000119: 13,2177 05546 TC UPFLAG
021859,000120: 13,2200 00236 ADRES REINTFLG
021860,000121:
021861,000122: 13,2201 06006 TC INTPRET
021862,000123: 13,2202 77624 CALL
021863,000124: 13,2203 26760 ATOPOTH
021864,000125: 13,2204 77531 SSP EXIT
021865,000126: 13,2205 00053 QPRET
021866,000127: 13,2206 26211 OUT
021867,000128: 13,2207 04662 TC BANKCALL # PERMIT USE OF ORBITAL INTEGRATION
021868,000129: 13,2210 27477 CADR INTWAKE1
021869,000130: 13,2211 77776 OUT EXIT
021870,000131: 13,2212 35021 ENDP76 CAF ZERO
021871,000132: 13,2213 55126 TS MARKCTR # CLEAR RR TRACKING MARK COUNTER
021872,000133: 13,2214 55125 TS VHFCNT
021873,000134:
021874,000135: 13,2215 37716 CAF NEGONE
021875,000136: 13,2216 55734 TS MRKBUF2 # INVALIDATE MARK BUFFER
021876,000137:
021877,000138: 13,2217 14106 TCF GOTOPOOH
021878,000139:
021879,000140: 13,2220 01524 V06N84 NV 0684
021880,000141: 13,2221 01441 NV 0633
021881,000142: 13,2222 67214 P76SUB1 CLEAR SLOAD
021882,000143: 13,2223 00263 MOONFLAG
021883,000144: 13,2224 00050 X2
021884,000145: 13,2225 43030 BHIZ SET # X2=0...CLEAR MOONFLAG
021885,000146: 13,2226 26230 +2 # =2.....SET MOONFLAG
021886,000147: 13,2227 00063 MOONFLAG
021887,000148: 13,2230 77616 RVQ
021888,000149:
End of include-file P76.agc. Parent file is MAIN.agc