Source Code
These source-code files are part of a reconstructed copy of LM131 revision 1,
the final release of the Apollo 13 Lunar Module (LM) Apollo Guidance Computer
(AGC) software.
The source reconstruction began with source code of Luminary 131 previously transcribed from a digitized copy of that program. A dump of the flight spare core rope memory module B5, part number 2010802-171, serial number RAY 411, was obtained. This module is the only module different between Luminary 131 and LM131 revision 1. The dump was disassembled and all changes were incorporated into these source files. Note that page numbers in the reconstructed code match those on the Luminary 131 printout, although the changed code would likely have changed page numbers for a real LM131 revision 1 listing. Comments from 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. |
029822,000002: ## Copyright: Public domain.
029823,000003: ## Filename: P76.agc
029824,000004: ## Purpose: A section of LM131 revision 1.
029825,000005: ## It is part of the reconstructed source code for the final
029826,000006: ## release of the flight software for the Lunar Module's (LM)
029827,000007: ## Apollo Guidance Computer (AGC) for Apollo 13. The code has
029828,000008: ## been reconstructed from a listing of Luminary 131 and a dump
029829,000009: ## of a core rope memory module B5, part number 2010802-171,
029830,000010: ## which is the only module different between LM131 revision 1
029831,000011: ## and Luminary 131. The executable generated from this source
029832,000012: ## has been verified against the module dump, so while the names,
029833,000013: ## comments, and ordering may not be exactly correct, the
029834,000014: ## resulting binary is.
029835,000015: ## Reference: pp. 711-713
029836,000016: ## Assembler: yaYUL
029837,000017: ## Contact: Ron Burkey <info@sandroid.org>.
029838,000018: ## Website: www.ibiblio.org/apollo/index.html
029839,000019: ## Mod history: 2022-10-28 MAS Created from Luminary 131.
029840,000020:
Page 711 |
029842,000022: # 1) PROGRAM NAME - TARGET DELTA V PROGRAM (P76).
029843,000023: # 2) FUNCTIONAL DESCRIPTION - UPON ENTRY BY ASTRONAUT ACTION, P76 FLASHES DSKY REQUESTS TO THE ASTRONAUT
029844,000024: # TO PROVIDE VIA DSKY (1) THE DELTA V TO BE APPLIED TO THE OTHER VEHICLE STATE VECTOR AND (2) THE
029845,000025: # TIME (TIG) AT WHICH THE OTHER VEHICLE VELOCITY WAS CHANGED BY EXECUTION OF A THRUSTING MANEUVER. THE
029846,000026: # OTHER VEHICLE STATE VECTOR IS INTEGRATED TO TIG AND UPDATED BY THE ADDITION OF DELTA V (DELTA V HAVING
029847,000027: # BEEN TRANSFORMED FROM LV TO REF COSYS). USING INTEGRVS, THE PROGRAM THEN INTEGRATES THE OTHER
029848,000028: # VEHICLE STATE VECTOR TO THE STATE VECTOR OF THIS VEHICLE, THUS INSURING THAT THE W-MATRIX AND BOTH VEHICLE
029849,000029: # STATES CORRESPOND TO THE SAME TIME.
029850,000030: # 3) ERASABLE INITIALIZATION REQUIRED - NONE.
029851,000031: # 4) CALLING SEQUENCES AND EXIT MODES - CALLED BY ASTRONAUT REQUEST THRU DSKY V 37 E 76E.
029852,000032: # EXITS BY TCF ENDOFJOB.
029853,000033: # 5) OUTPUT - OTHER VEHICLE STATE VECTOR INTEGRATED TO TIG AND INCREMENTED BY DELTA V IN REF COSYS.
029854,000034: # THE PUSHLIST CONTAINS THE MATRIX BY WHICH THE INPUT DELTA V MUST BE POST-MULTIPLIED TO CONVERT FROM LV
029855,000035: # TO REF COSYS.
029856,000036: # 6) DEBRIS - OTHER VEHICLE STATE VECTOR.
029857,000037: # 7) SUBROUTINES CALLED - BANKCALL, GOXDSPF, CSMPREC (OR LEMPREC), ATOPCSM (OR ATOPLEM), INTSTALL, INTWAKE, PHASCHNG
029858,000038: # INTPRET, INTEGRVS, AND MINIRECT.
029859,000039: # 8) FLAG USE - MOONFLAG, CMOONFLAG, INTYPFLG, RASFLAG, AND MARKCTR.
029860,000040:
029861,000041: 30,2061 BANK 30
029862,000042: 13,2000 SETLOC P76LOC
029863,000043: 13,2000 BANK
029864,000044:
029865,000045: 13,2207 COUNT* $$/P76
029866,000046:
029867,000047: 13,2207 E7,1441 EBANK= TIG
029868,000048:
029869,000049: 13,2207 05504 P76 TC UPFLAG
029870,000050: 13,2210 00031 ADRES TRACKFLG
029871,000051:
029872,000052: 13,2211 06042 TC INTPRET
029873,000053: 13,2212 77775 VLOAD
029874,000054: 13,2213 03434 DELVLVC
029875,000055: 13,2214 02223 STORE DELVOV
029876,000056: 13,2215 77776 EXIT
029877,000057:
029878,000058: 13,2216 32335 CAF V06N84 +1 # FLASH VERB 06 NOUN 33, DISPLAY LAST TIG,
029879,000059: 13,2217 04616 TC BANKCALL # AND WAIT FOR KEYBOARD ACTION.
029880,000060: 13,2220 20477 CADR GOFLASH
029881,000061: 13,2221 12331 TCF ENDP76
029882,000062: 13,2222 02224 TC +2 # PROCEED
029883,000063: 13,2223 02216 TC -5 # STORE DATA AND REPEAT FLASHING
029884,000064: 13,2224 32334 CAF V06N84 # FLASH LAST DELTA V,
029885,000065: 13,2225 04616 TC BANKCALL # AND WAIT FOR KEYBOARD ACTION.
029886,000066: 13,2226 20477 CADR GOFLASH
029887,000067: 13,2227 12331 TCF ENDP76
029888,000068: 13,2230 02232 TC +2
029889,000069: 13,2231 02224 TC -5
029890,000070: 13,2232 06042 TC INTPRET # RETURN TO INTERPRETIVE CODE
Page 712 |
029892,000072: 13,2233 43145 DLOAD SET
029893,000073: 13,2234 03442 TIG
029894,000074: 13,2235 01076 NODOFLAG
029895,000075: 13,2236 34041 STCALL TDEC1 # SET TDEC1=TIG FOR ORBITAL INTEGRATION
029896,000076: 13,2237 27042 OTHPREC
029897,000077: 13,2240 53575 COMPMAT VLOAD UNIT
029898,000078: 13,2241 00001 RATT
029899,000079: 13,2242 77676 VCOMP # U(-R)
029900,000080: 13,2243 00031 STORE 24D # U(-R) TO 24D
029901,000081: 13,2244 53435 VXV UNIT # U(-R) X V = U(V X R)
029902,000082: 13,2245 00007 VATT
029903,000083: 13,2246 00023 STORE 18D
029904,000084: 13,2247 53435 VXV UNIT # U(V X R) X U(-R) = U((R X V) X R)
029905,000085: 13,2250 00031 24D
029906,000086: 13,2251 24015 STOVL 12D
029907,000087: 13,2252 02223 DELVOV
029908,000088: 13,2253 76505 VXM VSL1 # V(MPAC)=DELTA V IN REFCOSYS
029909,000089: 13,2254 00015 12D
029910,000090: 13,2255 77655 VAD
029911,000091: 13,2256 00007 VATT
029912,000092: 13,2257 00007 STORE 6 # V(PD6)=VATT + DELTA V
029913,000093: 13,2260 77624 CALL # PREVENT WOULD-BE USER OF ORBITAL
029914,000094: 13,2261 27410 INTSTALL # INTEG FROM INTERFERING WITH UPDATING
029915,000095: 13,2262 77624 CALL
029916,000096: 13,2263 26336 P76SUB1
029917,000097: 13,2264 53775 VLOAD VSR*
029918,000098: 13,2265 00007 6
029919,000099: 13,2266 57176 0,2
029920,000100: 13,2267 25543 STOVL VCV
029921,000101: 13,2270 00001 RATT
029922,000102: 13,2271 77657 VSR*
029923,000103: 13,2272 57176 0,2
029924,000104: 13,2273 15535 STODL RCV
029925,000105: 13,2274 03442 TIG
029926,000106: 13,2275 01517 STORE TET
029927,000107: 13,2276 71214 CLEAR DLOAD
029928,000108: 13,2277 01673 INTYPFLG
029929,000109: 13,2300 01643 TETTHIS
029930,000110: 13,2301 34041 INTOTHIS STCALL TDEC1
029931,000111: 13,2302 27106 INTEGRVS
029932,000112: 13,2303 77624 CALL
029933,000113: 13,2304 27410 INTSTALL
029934,000114: 13,2305 77775 VLOAD
029935,000115: 13,2306 00017 RATT1
029936,000116: 13,2307 01503 STORE RRECT
029937,000117: 13,2310 15535 STODL RCV
029938,000118: 13,2311 00015 TAT
029939,000119: 13,2312 25517 STOVL TET
029940,000120: 13,2313 00025 VATT1
029941,000121: 13,2314 77624 CALL
Page 713 |
029943,000123: 13,2315 27705 MINIRECT
029944,000124: 13,2316 77776 EXIT
029945,000125: 13,2317 05353 TC PHASCHNG
029946,000126: 13,2320 04024 OCT 04024
029947,000127:
029948,000128: 13,2321 06042 TC INTPRET
029949,000129: 13,2322 45014 SET CALL
029950,000130: 13,2323 05070 REINTFLG
029951,000131: 13,2324 26660 ATOPOTH
029952,000132: 13,2325 77624 CALL
029953,000133: 13,2326 27417 INTWAKE0
029954,000134: 13,2327 77414 OUT CLEAR EXIT # ALLOW V37. NO NEED TO CLEAR NODOFLAG AT
029955,000135: 13,2330 01276 NODOFLAG # ENDP76 SINCE FLAG NOT SET WHEN DISPLAY
029956,000136: # RESPONSES TRANSFER THERE FROM P76+.
029957,000137: 13,2331 34755 ENDP76 CAF ZERO
029958,000138: 13,2332 55462 TS MARKCTR # CLEAR RR TRACKING MARK COUNTER
029959,000139: 13,2333 16001 TCF GOTOPOOH
029960,000140:
029961,000141: 13,2334 01524 V06N84 NV 0684
029962,000142: 13,2335 01441 NV 0633
029963,000143: 13,2336 43174 P76SUB1 AXT,2 SET
029964,000144: 13,2337 00002 2
029965,000145: 13,2340 00063 MOONFLAG # SET MEANS MOON IS SPHERE OF INFLUENCE.
029966,000146: 13,2341 77014 BON AXT,2
029967,000147: 13,2342 04303 CMOONFLG # SET MEANS PERM CM STATE IN LUNAR SPHERE.
029968,000148: 13,2343 00052 QPRET
029969,000149: 13,2344 00000 0
029970,000150: 13,2345 43414 CLEAR RVQ
029971,000151: 13,2346 00263 MOONFLAG
029972,000152:
029973,000153:
029974,000154:
End of include-file P76.agc. Parent file is MAIN.agc