Source Code
|
These source-code files are part of a reconstructed copy of Luminary 97, the
original release of the Apollo 11 Lunar Module (LM) Apollo Guidance Computer
(AGC) software.
The reconstruction began with source code of Luminary 99 revision 1 previously transcribed from a digitized copy of that program. The code was then updated by undoing changes described in original Luminary memos 83 and 85, using asterisks indicating changed lines in the listing as a guide. The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152D. Note that page numbers in the reconstructed code match those on the Luminary 099 revision 001 printout, although the added code would likely have changed page numbers for a real Luminary 97 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. |
035887,000002: ## Copyright: Public domain.
035888,000003: ## Filename: P12.agc
035889,000004: ## Purpose: A section of Luminary revision 97.
035890,000005: ## It is part of the reconstructed source code for the
035891,000006: ## original release of the flight software for the Lunar
035892,000007: ## Module's (LM) Apollo Guidance Computer (AGC) for Apollo 11.
035893,000008: ## The code has been recreated from a copy of Luminary 99
035894,000009: ## revision 001, using asterisks indicating changed lines in
035895,000010: ## the listing and Luminary Memos #83 and #85, which list
035896,000011: ## changes between Luminary 97 and 98, and 98 and 99. The
035897,000012: ## code has been adapted such that the resulting bugger words
035898,000013: ## exactly match those specified for Luminary 97 in NASA drawing
035899,000014: ## 2021152D, which gives relatively high confidence that the
035900,000015: ## reconstruction is correct.
035901,000016: ## Reference: pp. 838-842
035902,000017: ## Assembler: yaYUL
035903,000018: ## Contact: Ron Burkey <info@sandroid.org>.
035904,000019: ## Website: www.ibiblio.org/apollo/index.html
035905,000020: ## Mod history: 2019-07-28 MAS Created from Luminary 99.
035906,000021:
|
Page 838 |
035908,000023: 24,3670 BANK 24
035909,000024: 30,2000 SETLOC P12
035910,000025: 30,2000 BANK
035911,000026:
035912,000027: 30,2061 E7,1515 EBANK= DVCNTR
035913,000028: 30,2061 COUNT* $$/P12
035914,000029:
035915,000030: 30,2061 05353 P12LM TC PHASCHNG
035916,000031: 30,2062 04024 OCT 04024
035917,000032:
035918,000033: 30,2063 04616 TC BANKCALL
035919,000034: 30,2064 11254 CADR R02BOTH # CHECK THE STATUS OF THE IMU.
035920,000035:
035921,000036: 30,2065 05504 TC UPFLAG
035922,000037: 30,2066 00141 ADRES MUNFLAG
035923,000038:
035924,000039: 30,2067 05504 TC UPFLAG # INSURE 4-JET TRANSLATION CAPABILITY.
035925,000040: 30,2070 00307 ADRES ACC4-2FL
035926,000041:
035927,000042: 30,2071 05504 TC UPFLAG # PREVENT R10 FROM ISSUING CROSS-POINTER
035928,000043: 30,2072 00015 ADRES R10FLAG # OUTPUTS.
035929,000044:
035930,000045: 30,2073 06011 TC CLRADMOD # INITIALIZE RADMODES FOR R29.
035931,000046:
035932,000047: 30,2074 05516 TC DOWNFLAG # CLEAR RENDEZVOUS FLAG FOR P22
035933,000048: 30,2075 00010 ADRES RNDVZFLG
035934,000049:
035935,000050: 30,2076 36000 CAF THRESH2 # INITIALIZE DVMON
035936,000051: 30,2077 55251 TS DVTHRUSH
035937,000052: 30,2100 34751 CAF FOUR
035938,000053: 30,2101 55515 TS DVCNTR
035939,000054:
035940,000055: 30,2102 34755 CA ZERO
035941,000056: 30,2103 55462 TS TRKMKCNT # SHOW THAT R29 DOWNLINK DATA ISN'T READY.
035942,000057: 30,2104 33035 CAF V06N33A
035943,000058: 30,2105 04616 TC BANKCALL # FLASH TIG
035944,000059: 30,2106 20476 CADR GOFLASH
035945,000060: 30,2107 16001 TCF GOTOPOOH
035946,000061: 30,2110 12112 TCF +2 # PROCEED
035947,000062: 30,2111 12104 TCF -5 # ENTER
035948,000063:
035949,000064: 30,2112 05353 TC PHASCHNG
035950,000065: 30,2113 04024 OCT 04024
035951,000066:
035952,000067: 30,2114 06037 TC INTPRET
035953,000068: 30,2115 77624 CALL # INITIALIZE WM AND /LAND/
035954,000069: 30,2116 46432 GUIDINIT
035955,000070: 30,2117 45014 SET CALL
035956,000071: 30,2120 04464 FLPI
035957,000072: 30,2121 60254 P12INIT
|
Page 839 |
035959,000074: 30,2122 77745 P12LMB DLOAD
035960,000075: 30,2123 25761 (TGO)A # SET TGO TO AN INITIAL NOMINAL VALUE.
035961,000076: 30,2124 17517 STODL TGO
035962,000077: 30,2125 03442 TIG
035963,000078: 30,2126 34041 STCALL TDEC1
035964,000079: 30,2127 27057 LEMPREC # ROTATE THE STATE VECTORS TO THE
035965,000080: 30,2130 64375 VLOAD MXV # IGNITION TIME.
035966,000081: 30,2131 00007 VATT
035967,000082: 30,2132 01734 REFSMMAT
035968,000083: 30,2133 77772 VSL1
035969,000084: 30,2134 27601 STOVL V1S # COMPUTE V1S = VEL(TIG)*2(-7) M/CS.
035970,000085: 30,2135 00001 RATT
035971,000086: 30,2136 52521 MXV VSL6
035972,000087: 30,2137 01734 REFSMMAT
035973,000088: 30,2140 37521 STCALL R # COMPUTE R = POS(TIG)*2(-24) M.
035974,000089: 30,2141 67130 MUNGRAV # COMPUTE GDT1/2(TIG)*2(-7)M/CS.
035975,000090: 30,2142 53575 VLOAD UNIT
035976,000091: 30,2143 03521 R
035977,000092: 30,2144 37537 STCALL UNIT/R/ # COMPUTE UNIT/R/ FOR YCOMP.
035978,000093: 30,2145 57312 YCOMP
035979,000094: 30,2146 57461 SR DCOMP
035980,000095: 30,2147 20606 5D
035981,000096: 30,2150 17643 STODL XRANGE # INITIALIZE XRANGE FOR NOUN 76.
035982,000097: 30,2151 06456 VINJNOM
035983,000098: 30,2152 16277 STODL ZDOTD
035984,000099: 30,2153 06460 RDOTDNOM
035985,000100: 30,2154 02273 STORE RDOTD
035986,000101: 30,2155 77776 EXIT
035987,000102:
035988,000103: 30,2156 05353 TC PHASCHNG
035989,000104: 30,2157 04024 OCT 04024
035990,000105:
035991,000106: 30,2160 33034 NEWLOAD CAF V06N76 # FLASH CROSS-RANGE AND APOLUNE VALUES.
035992,000107: 30,2161 04616 TC BANKCALL
035993,000108: 30,2162 20476 CADR GOFLASH
035994,000109: 30,2163 16001 TCF GOTOPOOH
035995,000110: 30,2164 12166 TCF +2 # PROCEED
035996,000111: 30,2165 12160 TCF NEWLOAD # ENTER NEW DATA.
035997,000112:
035998,000113: 30,2166 32320 CAF P12ADRES
035999,000114: 30,2167 55455 TS WHICH
036000,000115:
036001,000116: 30,2170 05353 TC PHASCHNG
036002,000117: 30,2171 04024 OCT 04024
036003,000118:
036004,000119: 30,2172 06037 TC INTPRET
036005,000120: 30,2173 54345 DLOAD SL
036006,000121: 30,2174 03643 XRANGE
036007,000122: 30,2175 20206 5D
036008,000123: 30,2176 77615 DAD
|
Page 840 |
036010,000125: 30,2177 02335 Y
036011,000126: 30,2200 27633 STOVL YCO
036012,000127: 30,2201 03537 UNIT/R/
036013,000128: 30,2202 53361 VXSC VAD
036014,000129: 30,2203 06454 49FPS
036015,000130: 30,2204 03601 V1S
036016,000131: 30,2205 03527 STORE V # V(TIPOVER) = V(IGN) + 57FPS (UNIT/R/)
036017,000132: 30,2206 72441 DOT SL1
036018,000133: 30,2207 03537 UNIT/R/
036019,000134: 30,2210 27474 STOVL RDOT # RDOT * 2(-7)
036020,000135: 30,2211 03537 UNIT/R/
036021,000136: 30,2212 53435 VXV UNIT
036022,000137: 30,2213 03720 QAXIS
036023,000138: 30,2214 03726 STORE ZAXIS1
036024,000139: 30,2215 77614 SETGO
036025,000140: 30,2216 04421 FLVR
036026,000141: 30,2217 60321 ASCENT
036027,000142: 30,2220 77745 P12RET DLOAD
036028,000143: 30,2221 02361 ATP # ATP(2)*2(18)
036029,000144: 30,2222 65316 DSQ PDDL
036030,000145: 30,2223 02355 ATY # ATY(2)*2(18)
036031,000146: 30,2224 43316 DSQ DAD
036032,000147: 30,2225 75454 BZE SQRT
036033,000148: 30,2226 60232 YAWDUN
036034,000149: 30,2227 55352 SL1 BDDV
036035,000150: 30,2230 02355 ATY
036036,000151: 30,2231 77736 ARCSIN
036037,000152: 30,2232 26363 YAWDUN STOVL YAW
036038,000153: 30,2233 03254 UNFC/2
036039,000154: 30,2234 50256 UNIT DOT
036040,000155: 30,2235 03537 UNIT/R/
036041,000156: 30,2236 65552 SL1 ARCCOS
036042,000157: 30,2237 77676 DCOMP
036043,000158: 30,2240 02365 STORE PITCH
036044,000159: 30,2241 77776 EXIT
036045,000160: 30,2242 05353 TC PHASCHNG
036046,000161: 30,2243 04024 OCT 04024
036047,000162:
036048,000163: 30,2244 05516 TC DOWNFLAG
036049,000164: 30,2245 00213 ADRES FLPI
036050,000165:
036051,000166: 30,2246 00004 INHINT
036052,000167: 30,2247 04674 TC IBNKCALL
036053,000168: 30,2250 40142 CADR PFLITEDB
036054,000169: 30,2251 00003 RELINT
036055,000170:
036056,000171: 30,2252 04635 TC POSTJUMP
036057,000172: 30,2253 74126 CADR BURNBABY
036058,000173:
036059,000174: 30,2254 77745 P12INIT DLOAD # INITIALIZE ENGINE DATA. USED FOR P12 AND
|
Page 841 |
036061,000176: 30,2255 16013 (1/DV)A # P71.
036062,000177: 30,2256 03641 STORE 1/DV3
036063,000178: 30,2257 03637 STORE 1/DV2
036064,000179: 30,2260 17635 STODL 1/DV1
036065,000180: 30,2261 16017 (AT)A
036066,000181: 30,2262 16263 STODL AT
036067,000182: 30,2263 16021 (TBUP)A
036068,000183: 30,2264 16271 STODL TBUP
036069,000184: 30,2265 34013 ATDECAY
036070,000185: 30,2266 54276 DCOMP SL
036071,000186: 30,2267 20214 11D
036072,000187: 30,2270 02267 STORE TTO
036073,000188: 30,2271 57535 SLOAD DCOMP
036074,000189: 30,2272 26001 APSVEX
036075,000190: 30,2273 77702 SR2
036076,000191: 30,2274 02265 STORE VE
036077,000192: 30,2275 43414 BOFF RVQ
036078,000193: 30,2276 04747 FLAP
036079,000194: 30,2277 60300 COMMINIT
036080,000195: 30,2300 43345 COMMINIT DLOAD DAD # INITIALIZE TARGET DATA. USED BY P12, P70
036081,000196: 30,2301 25757 HINJECT # AND P71 IF IT DOES NOT FOLLOW P70.
036082,000197: 30,2302 02333 /LAND/
036083,000198: 30,2303 17631 STODL RCO
036084,000199: 30,2304 06522 HI6ZEROS
036085,000200: 30,2305 03654 STORE TXO
036086,000201: 30,2306 03633 STORE YCO
036087,000202: 30,2307 02273 STORE RDOTD
036088,000203: 30,2310 26275 STOVL YDOTD
036089,000204: 30,2311 01563 VRECTCSM
036090,000205: 30,2312 64235 VXV MXV
036091,000206: 30,2313 01555 RRECTCSM
036092,000207: 30,2314 01734 REFSMMAT
036093,000208: 30,2315 77656 UNIT
036094,000209: 30,2316 03720 STORE QAXIS
036095,000210: 30,2317 77616 RVQ
036096,000211: 30,2320 02022 P12ADRES REMADR P12TABLE
036097,000212:
036098,000213: 23,2000 SETLOC P12A
036099,000214: 23,2000 BANK
036100,000215: 23,2432 COUNT* $$/P12
036101,000216:
036102,000217: 23,2432 40220 GUIDINIT STQ SETPD
036103,000218: 23,2433 01164 TEMPR60
036104,000219: 23,2434 00001 0D
036105,000220: 23,2435 41575 VLOAD PUSH
036106,000221: 23,2436 06514 UNITZ
036107,000222: 23,2437 41434 RTB PUSH
036108,000223: 23,2440 21573 LOADTIME
036109,000224: 23,2441 77624 CALL
036110,000225: 23,2442 55716 RP-TO-R
|
Page 842 |
036112,000227: 23,2443 74321 MXV VXSC
036113,000228: 23,2444 01734 REFSMMAT
036114,000229: 23,2445 16027 MOONRATE
036115,000230: 23,2446 26325 STOVL WM
036116,000231: 23,2447 02023 RLS
036117,000232: 23,2450 52446 ABVAL SL3
036118,000233: 23,2451 36333 STCALL /LAND/
036119,000234: 23,2452 01164 TEMPR60
036120,000235:
036121,000236: 23,2453 00046 07374 49FPS 2DEC .149352 B-6 # EXPECTED RDOT AT TIPOVER
036122,000237: 23,2455 04145 15527 VINJNOM 2DEC 16.7924 B-7 # 5509.5 FPS(APO=30NM WITH RDOT=19.5FPS)
036123,000238: 23,2457 00007 23346 RDOTDNOM 2DEC .059436 B-7 # 19.5 FPS
036124,000239:
036125,000240:
End of include-file P12.agc. Parent file is MAIN.agc