Source Code
These source-code files are part of a reconstructed copy of Luminary 163, the
first (unflown) release of the Apollo 14 Lunar Module (LM) Apollo Guidance
Computer (AGC) software.
The reconstruction began with reconstructed source code for Luminary 173. Changes between revision 163 and 173 were backed out, as described by Luminary memos 157 and 158. The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152N. Note that page numbers in the reconstructed code match those for the baseline log section mentioned in each file's changelog; the page numbers for a real Luminary 163 listing would be different. 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. |
030247,000002: ## Copyright: Public domain.
030248,000003: ## Filename: P76.agc
030249,000004: ## Purpose: A section of Luminary revision 163.
030250,000005: ## It is part of the reconstructed source code for the first
030251,000006: ## (unflown) release of the flight software for the Lunar
030252,000007: ## Module's (LM) Apollo Guidance Computer (AGC) for Apollo 14.
030253,000008: ## The code has been recreated from a reconstructed copy of
030254,000009: ## Luminary 173, as well as Luminary memos 157 amd 158.
030255,000010: ## It has been adapted such that the resulting bugger words
030256,000011: ## exactly match those specified for Luminary 163 in NASA
030257,000012: ## drawing 2021152N, which gives relatively high confidence
030258,000013: ## that the reconstruction is correct.
030259,000014: ## Reference: pp. 703-705
030260,000015: ## Assembler: yaYUL
030261,000016: ## Contact: Ron Burkey <info@sandroid.org>.
030262,000017: ## Website: www.ibiblio.org/apollo/index.html
030263,000018: ## Mod history: 2019-08-21 MAS Created from Luminary 173.
030264,000019:
Page 703 |
030266,000021: # 1) PROGRAM NAME - TARGET DELTA V PROGRAM (P76).
030267,000022: # 2) FUNCTIONAL DESCRIPTION - UPON ENTRY BY ASTRONAUT ACTION, P76 FLASHES DSKY REQUESTS TO THE ASTRONAUT
030268,000023: # TO PROVIDE VIA DSKY (1) THE DELTA V TO BE APPLIED TO THE OTHER VEHICLE STATE VECTOR AND (2) THE
030269,000024: # TIME (TIG) AT WHICH THE OTHER VEHICLE VELOCITY WAS CHANGED BY EXECUTION OF A THRUSTING MANEUVER. THE
030270,000025: # OTHER VEHICLE STATE VECTOR IS INTEGRATED TO TIG AND UPDATED BY THE ADDITION OF DELTA V (DELTA V HAVING
030271,000026: # BEEN TRANSFORMED FROM LV TO REF COSYS). USING INTEGRVS, THE PROGRAM THEN INTEGRATES THE OTHER
030272,000027: # VEHICLE STATE VECTOR TO THE STATE VECTOR OF THIS VEHICLE, THUS INSURING THAT THE W-MATRIX AND BOTH VEHICLE
030273,000028: # STATES CORRESPOND TO THE SAME TIME.
030274,000029: # 3) ERASABLE INITIALIZATION REQUIRED - NONE.
030275,000030: # 4) CALLING SEQUENCES AND EXIT MODES - CALLED BY ASTRONAUT REQUEST THRU DSKY V 37 E 76 E.
030276,000031: # EXITS BY TCF ENDOFJOB.
030277,000032: # 5) OUTPUT - OTHER VEHICLE STATE VECTOR INTEGRATED TO TIG AND INCREMENTED BY DELTA V IN REF COSYS.
030278,000033: # THE PUSHLIST CONTAINS THE MATRIX BY WHICH THE INPUT DELTA V MUST BE POST-MULTIPLIED TO CONVERT FROM LV
030279,000034: # TO REF COSYS.
030280,000035: # 6) DEBRIS - OTHER VEHICLE STATE VECTOR.
030281,000036: # 7) SUBROUTINES CALLED - BANKCALL,GOXDSPF,CSMPREC (OR LEMPREC),ATOPCSM (OR ATOPLEM),INTSTALL,INTWAKE, PHASCHNG
030282,000037: # INTPRET, INTEGRVS, AND MINIRECT.
030283,000038:
030284,000039: # 8) FLAG USE - MOONFLAG,CMOONFLAG,INTYPFLG,RASFLAG, AND MARKCTR.
030285,000040:
030286,000041: 30,2061 BANK 30
030287,000042: 13,2000 SETLOC P76LOC
030288,000043: 13,2000 BANK
030289,000044:
030290,000045: 13,2207 COUNT* $$/P76
030291,000046:
030292,000047: 13,2207 E7,1441 EBANK= TIG
030293,000048:
030294,000049: 13,2207 05515 P76 TC UPFLAG
030295,000050: 13,2210 00031 ADRES TRACKFLG
030296,000051:
030297,000052: 13,2211 06042 TC INTPRET
030298,000053: 13,2212 77775 VLOAD
030299,000054: 13,2213 03434 DELVLVC
030300,000055: 13,2214 02223 STORE DELVOV
030301,000056: 13,2215 77776 EXIT
030302,000057:
030303,000058: 13,2216 32335 CAF V06N84 +1 # FLASH VERB 06 NOUN 33, DISPLAY LAST TIG,
030304,000059: 13,2217 04616 TC BANKCALL # AND WAIT FOR KEYBOARD ACTION.
030305,000060: 13,2220 20477 CADR GOFLASH
030306,000061: 13,2221 12331 TCF ENDP76
030307,000062: 13,2222 02224 TC +2 # PROCEED
030308,000063: 13,2223 02216 TC -5 # STORE DATA AND REPEAT FLASHING
030309,000064: 13,2224 32334 CAF V06N84 # FLASH LAST DELTA V,
030310,000065: 13,2225 04616 TC BANKCALL # AND WAIT FOR KEYBOARD ACTION.
030311,000066: 13,2226 20477 CADR GOFLASH
030312,000067: 13,2227 12331 TCF ENDP76
030313,000068: 13,2230 02232 TC +2
030314,000069: 13,2231 02224 TC -5
030315,000070: 13,2232 06042 TC INTPRET # RETURN TO INTERPRETIVE CODE
Page 704 |
030317,000072: 13,2233 43145 DLOAD SET
030318,000073: 13,2234 03442 TIG
030319,000074: 13,2235 01076 NODOFLAG
030320,000075: 13,2236 34041 STCALL TDEC1 # SET TDEC1=TIG FOR ORBITAL INTEGRATION
030321,000076: 13,2237 27042 OTHPREC
030322,000077: 13,2240 53575 COMPMAT VLOAD UNIT
030323,000078: 13,2241 00001 RATT
030324,000079: 13,2242 77676 VCOMP # U(-R)
030325,000080: 13,2243 00031 STORE 24D # U(-R) TO 24D
030326,000081: 13,2244 53435 VXV UNIT # U(-R)XV = U(VXR)
030327,000082: 13,2245 00007 VATT
030328,000083: 13,2246 00023 STORE 18D
030329,000084: 13,2247 53435 VXV UNIT # U(VXR)XU(-R) = U((RXV)XR)
030330,000085: 13,2250 00031 24D
030331,000086: 13,2251 24015 STOVL 12D
030332,000087: 13,2252 02223 DELVOV
030333,000088: 13,2253 76505 VXM VSL1 # V(MPAC)=DELTA V IN REFCOSYS
030334,000089: 13,2254 00015 12D
030335,000090: 13,2255 77655 VAD
030336,000091: 13,2256 00007 VATT
030337,000092: 13,2257 00007 STORE 6 # V(PD6)=VATT + DELTA V
030338,000093: 13,2260 77624 CALL # PREVENT WOULD-BE USER OF ORBITAL
030339,000094: 13,2261 27410 INTSTALL # INTEG FROM INTERFERING WITH UPDATING
030340,000095: 13,2262 77624 CALL
030341,000096: 13,2263 26336 P76SUB1
030342,000097: 13,2264 53775 VLOAD VSR*
030343,000098: 13,2265 00007 6
030344,000099: 13,2266 57176 0,2
030345,000100: 13,2267 25543 STOVL VCV
030346,000101: 13,2270 00001 RATT
030347,000102: 13,2271 77657 VSR*
030348,000103: 13,2272 57176 0,2
030349,000104: 13,2273 15535 STODL RCV
030350,000105: 13,2274 03442 TIG
030351,000106: 13,2275 01517 STORE TET
030352,000107: 13,2276 71214 CLEAR DLOAD
030353,000108: 13,2277 01673 INTYPFLG
030354,000109: 13,2300 01643 TETTHIS
030355,000110: 13,2301 34041 INTOTHIS STCALL TDEC1
030356,000111: 13,2302 27106 INTEGRVS
030357,000112: 13,2303 77624 CALL
030358,000113: 13,2304 27410 INTSTALL
030359,000114: 13,2305 77775 VLOAD
030360,000115: 13,2306 00017 RATT1
030361,000116: 13,2307 01503 STORE RRECT
030362,000117: 13,2310 15535 STODL RCV
030363,000118: 13,2311 00015 TAT
030364,000119: 13,2312 25517 STOVL TET
030365,000120: 13,2313 00025 VATT1
030366,000121: 13,2314 77624 CALL
Page 705 |
030368,000123: 13,2315 27705 MINIRECT
030369,000124: 13,2316 77776 EXIT
030370,000125: 13,2317 05364 TC PHASCHNG
030371,000126: 13,2320 04024 OCT 04024
030372,000127:
030373,000128: 13,2321 06042 TC INTPRET
030374,000129: 13,2322 45014 SET CALL
030375,000130: 13,2323 05070 REINTFLG
030376,000131: 13,2324 26660 ATOPOTH
030377,000132: 13,2325 77624 CALL
030378,000133: 13,2326 27417 INTWAKE0
030379,000134: 13,2327 77414 OUT CLEAR EXIT # ALLOW V37. NO NEED TO CLEAR NODOFLAG AT
030380,000135: 13,2330 01276 NODOFLAG # ENDP76 SINCE FLAG NOT SET WHEN DISPLAY
030381,000136: # RESPONSES TRANSFER THERE FROM P76+.
030382,000137: 13,2331 34755 ENDP76 CAF ZERO
030383,000138: 13,2332 55462 TS MARKCTR # CLEAR RR TRACKING MARK COUNTER
030384,000139: 13,2333 16001 TCF GOTOPOOH
030385,000140:
030386,000141: 13,2334 01524 V06N84 NV 0684
030387,000142: 13,2335 01441 NV 0633
030388,000143: 13,2336 43174 P76SUB1 AXT,2 SET
030389,000144: 13,2337 00002 2
030390,000145: 13,2340 00063 MOONFLAG # SET MEANS MOON IS SPHERE OF INFLUENCE.
030391,000146: 13,2341 77014 BON AXT,2
030392,000147: 13,2342 04303 CMOONFLG # SET MEANS PERM CM STATE IN LUNAR SPHERE.
030393,000148: 13,2343 00052 QPRET
030394,000149: 13,2344 00000 0
030395,000150: 13,2345 43414 CLEAR RVQ
030396,000151: 13,2346 00263 MOONFLAG
End of include-file P76.agc. Parent file is MAIN.agc