Source Code
These source-code files are part of a reconstructed copy of Luminary 178, the
final release of the Apollo 14 Lunar Module (LM) Apollo Guidance Computer
(AGC) software.
The reconstruction began with source code of Zerlina 56, Luminary 210, and Luminary 131, previously transcribed from digitized copies of those programs. The code was created by combining the three, using Zerlina 56 as a base, since it was based off of Luminary 183. The differences between the three were carefully merged using the Luminary memos as a guide, with all changes made after Luminary 178 being backed out. 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 178 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. |
030318,000002: ## Copyright: Public domain.
030319,000003: ## Filename: P76.agc
030320,000004: ## Purpose: A section of Luminary revision 178.
030321,000005: ## It is part of the reconstructed source code for the final
030322,000006: ## release of the flight software for the Lunar Module's
030323,000007: ## (LM) Apollo Guidance Computer (AGC) for Apollo 14. The
030324,000008: ## code has been recreated from copies of Zerlina 56, Luminary
030325,000009: ## 210, and Luminary 131, as well as many Luminary memos.
030326,000010: ## It has been adapted such that the resulting bugger words
030327,000011: ## exactly match those specified for Luminary 178 in NASA
030328,000012: ## drawing 2021152N, which gives relatively high confidence
030329,000013: ## that the reconstruction is correct.
030330,000014: ## Reference: pp. 703-705
030331,000015: ## Assembler: yaYUL
030332,000016: ## Contact: Ron Burkey <info@sandroid.org>.
030333,000017: ## Website: www.ibiblio.org/apollo/index.html
030334,000018: ## Mod history: 2019-08-14 MAS Created from Zerlina 56.
030335,000019:
Page 703 |
030337,000021: # 1) PROGRAM NAME - TARGET DELTA V PROGRAM (P76).
030338,000022: # 2) FUNCTIONAL DESCRIPTION - UPON ENTRY BY ASTRONAUT ACTION, P76 FLASHES DSKY REQUESTS TO THE ASTRONAUT
030339,000023: # TO PROVIDE VIA DSKY (1) THE DELTA V TO BE APPLIED TO THE OTHER VEHICLE STATE VECTOR AND (2) THE
030340,000024: # TIME (TIG) AT WHICH THE OTHER VEHICLE VELOCITY WAS CHANGED BY EXECUTION OF A THRUSTING MANEUVER. THE
030341,000025: # OTHER VEHICLE STATE VECTOR IS INTEGRATED TO TIG AND UPDATED BY THE ADDITION OF DELTA V (DELTA V HAVING
030342,000026: # BEEN TRANSFORMED FROM LV TO REF COSYS). USING INTEGRVS, THE PROGRAM THEN INTEGRATES THE OTHER
030343,000027: # VEHICLE STATE VECTOR TO THE STATE VECTOR OF THIS VEHICLE, THUS INSURING THAT THE W-MATRIX AND BOTH VEHICLE
030344,000028: # STATES CORRESPOND TO THE SAME TIME.
030345,000029: # 3) ERASABLE INITIALIZATION REQUIRED - NONE.
030346,000030: # 4) CALLING SEQUENCES AND EXIT MODES - CALLED BY ASTRONAUT REQUEST THRU DSKY V 37 E 76 E.
030347,000031: # EXITS BY TCF ENDOFJOB.
030348,000032: # 5) OUTPUT - OTHER VEHICLE STATE VECTOR INTEGRATED TO TIG AND INCREMENTED BY DELTA V IN REF COSYS.
030349,000033: # THE PUSHLIST CONTAINS THE MATRIX BY WHICH THE INPUT DELTA V MUST BE POST-MULTIPLIED TO CONVERT FROM LV
030350,000034: # TO REF COSYS.
030351,000035: # 6) DEBRIS - OTHER VEHICLE STATE VECTOR.
030352,000036: # 7) SUBROUTINES CALLED - BANKCALL,GOXDSPF,CSMPREC (OR LEMPREC),ATOPCSM (OR ATOPLEM),INTSTALL,INTWAKE, PHASCHNG
030353,000037: # INTPRET, INTEGRVS, AND MINIRECT.
030354,000038:
030355,000039: # 8) FLAG USE - MOONFLAG,CMOONFLAG,INTYPFLG,RASFLAG, AND MARKCTR.
030356,000040:
030357,000041: 30,2061 BANK 30
030358,000042: 13,2000 SETLOC P76LOC
030359,000043: 13,2000 BANK
030360,000044:
030361,000045: 13,2207 COUNT* $$/P76
030362,000046:
030363,000047: 13,2207 E7,1441 EBANK= TIG
030364,000048:
030365,000049: 13,2207 05515 P76 TC UPFLAG
030366,000050: 13,2210 00031 ADRES TRACKFLG
030367,000051:
030368,000052: 13,2211 06042 TC INTPRET
030369,000053: 13,2212 77775 VLOAD
030370,000054: 13,2213 03434 DELVLVC
030371,000055: 13,2214 02223 STORE DELVOV
030372,000056: 13,2215 77776 EXIT
030373,000057:
030374,000058: 13,2216 32335 CAF V06N84 +1 # FLASH VERB 06 NOUN 33, DISPLAY LAST TIG,
030375,000059: 13,2217 04616 TC BANKCALL # AND WAIT FOR KEYBOARD ACTION.
030376,000060: 13,2220 20477 CADR GOFLASH
030377,000061: 13,2221 12331 TCF ENDP76
030378,000062: 13,2222 02224 TC +2 # PROCEED
030379,000063: 13,2223 02216 TC -5 # STORE DATA AND REPEAT FLASHING
030380,000064: 13,2224 32334 CAF V06N84 # FLASH LAST DELTA V,
030381,000065: 13,2225 04616 TC BANKCALL # AND WAIT FOR KEYBOARD ACTION.
030382,000066: 13,2226 20477 CADR GOFLASH
030383,000067: 13,2227 12331 TCF ENDP76
030384,000068: 13,2230 02232 TC +2
030385,000069: 13,2231 02224 TC -5
030386,000070: 13,2232 06042 TC INTPRET # RETURN TO INTERPRETIVE CODE
Page 704 |
030388,000072: 13,2233 43145 DLOAD SET
030389,000073: 13,2234 03442 TIG
030390,000074: 13,2235 01076 NODOFLAG
030391,000075: 13,2236 34041 STCALL TDEC1 # SET TDEC1=TIG FOR ORBITAL INTEGRATION
030392,000076: 13,2237 27042 OTHPREC
030393,000077: 13,2240 53575 COMPMAT VLOAD UNIT
030394,000078: 13,2241 00001 RATT
030395,000079: 13,2242 77676 VCOMP # U(-R)
030396,000080: 13,2243 00031 STORE 24D # U(-R) TO 24D
030397,000081: 13,2244 53435 VXV UNIT # U(-R)XV = U(VXR)
030398,000082: 13,2245 00007 VATT
030399,000083: 13,2246 00023 STORE 18D
030400,000084: 13,2247 53435 VXV UNIT # U(VXR)XU(-R) = U((RXV)XR)
030401,000085: 13,2250 00031 24D
030402,000086: 13,2251 24015 STOVL 12D
030403,000087: 13,2252 02223 DELVOV
030404,000088: 13,2253 76505 VXM VSL1 # V(MPAC)=DELTA V IN REFCOSYS
030405,000089: 13,2254 00015 12D
030406,000090: 13,2255 77655 VAD
030407,000091: 13,2256 00007 VATT
030408,000092: 13,2257 00007 STORE 6 # V(PD6)=VATT + DELTA V
030409,000093: 13,2260 77624 CALL # PREVENT WOULD-BE USER OF ORBITAL
030410,000094: 13,2261 27410 INTSTALL # INTEG FROM INTERFERING WITH UPDATING
030411,000095: 13,2262 77624 CALL
030412,000096: 13,2263 26336 P76SUB1
030413,000097: 13,2264 53775 VLOAD VSR*
030414,000098: 13,2265 00007 6
030415,000099: 13,2266 57176 0,2
030416,000100: 13,2267 25543 STOVL VCV
030417,000101: 13,2270 00001 RATT
030418,000102: 13,2271 77657 VSR*
030419,000103: 13,2272 57176 0,2
030420,000104: 13,2273 15535 STODL RCV
030421,000105: 13,2274 03442 TIG
030422,000106: 13,2275 01517 STORE TET
030423,000107: 13,2276 71214 CLEAR DLOAD
030424,000108: 13,2277 01673 INTYPFLG
030425,000109: 13,2300 01643 TETTHIS
030426,000110: 13,2301 34041 INTOTHIS STCALL TDEC1
030427,000111: 13,2302 27106 INTEGRVS
030428,000112: 13,2303 77624 CALL
030429,000113: 13,2304 27410 INTSTALL
030430,000114: 13,2305 77775 VLOAD
030431,000115: 13,2306 00017 RATT1
030432,000116: 13,2307 01503 STORE RRECT
030433,000117: 13,2310 15535 STODL RCV
030434,000118: 13,2311 00015 TAT
030435,000119: 13,2312 25517 STOVL TET
030436,000120: 13,2313 00025 VATT1
030437,000121: 13,2314 77624 CALL
Page 705 |
030439,000123: 13,2315 27705 MINIRECT
030440,000124: 13,2316 77776 EXIT
030441,000125: 13,2317 05364 TC PHASCHNG
030442,000126: 13,2320 04024 OCT 04024
030443,000127:
030444,000128: 13,2321 06042 TC INTPRET
030445,000129: 13,2322 45014 SET CALL
030446,000130: 13,2323 05070 REINTFLG
030447,000131: 13,2324 26660 ATOPOTH
030448,000132: 13,2325 77624 CALL
030449,000133: 13,2326 27417 INTWAKE0
030450,000134: 13,2327 77414 OUT CLEAR EXIT # ALLOW V37. NO NEED TO CLEAR NODOFLAG AT
030451,000135: 13,2330 01276 NODOFLAG # ENDP76 SINCE FLAG NOT SET WHEN DISPLAY
030452,000136: # RESPONSES TRANSFER THERE FROM P76+.
030453,000137: 13,2331 34755 ENDP76 CAF ZERO
030454,000138: 13,2332 55462 TS MARKCTR # CLEAR RR TRACKING MARK COUNTER
030455,000139: 13,2333 16001 TCF GOTOPOOH
030456,000140:
030457,000141: 13,2334 01524 V06N84 NV 0684
030458,000142: 13,2335 01441 NV 0633
030459,000143: 13,2336 43174 P76SUB1 AXT,2 SET
030460,000144: 13,2337 00002 2
030461,000145: 13,2340 00063 MOONFLAG # SET MEANS MOON IS SPHERE OF INFLUENCE.
030462,000146: 13,2341 77014 BON AXT,2
030463,000147: 13,2342 04303 CMOONFLG # SET MEANS PERM CM STATE IN LUNAR SPHERE.
030464,000148: 13,2343 00052 QPRET
030465,000149: 13,2344 00000 0
030466,000150: 13,2345 43414 CLEAR RVQ
030467,000151: 13,2346 00263 MOONFLAG
End of include-file P76.agc. Parent file is MAIN.agc