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. |
036168,000002: ## Copyright: Public domain.
036169,000003: ## Filename: P12.agc
036170,000004: ## Purpose: A section of Luminary revision 163.
036171,000005: ## It is part of the reconstructed source code for the first
036172,000006: ## (unflown) release of the flight software for the Lunar
036173,000007: ## Module's (LM) Apollo Guidance Computer (AGC) for Apollo 14.
036174,000008: ## The code has been recreated from a reconstructed copy of
036175,000009: ## Luminary 173, as well as Luminary memos 157 amd 158.
036176,000010: ## It has been adapted such that the resulting bugger words
036177,000011: ## exactly match those specified for Luminary 163 in NASA
036178,000012: ## drawing 2021152N, which gives relatively high confidence
036179,000013: ## that the reconstruction is correct.
036180,000014: ## Reference: pp. 829-833
036181,000015: ## Assembler: yaYUL
036182,000016: ## Contact: Ron Burkey <info@sandroid.org>.
036183,000017: ## Website: www.ibiblio.org/apollo/index.html
036184,000018: ## Mod history: 2019-08-21 MAS Created from Luminary 173.
036185,000019:
Page 829 |
036187,000021: 24,3632 BANK 24
036188,000022: 30,2000 SETLOC P12
036189,000023: 30,2000 BANK
036190,000024:
036191,000025: 30,2061 E7,1515 EBANK= DVCNTR
036192,000026: 30,2061 COUNT* $$/P12
036193,000027:
036194,000028: 30,2061 05364 P12LM TC PHASCHNG
036195,000029: 30,2062 04024 OCT 04024
036196,000030:
036197,000031: 30,2063 04616 TC BANKCALL
036198,000032: 30,2064 11241 CADR R02BOTH # CHECK THE STATUS OF THE IMU.
036199,000033:
036200,000034: 30,2065 36000 CAF THRESH2 # INITIALIZE DVMON
036201,000035: 30,2066 55250 TS DVTHRUSH
036202,000036: 30,2067 34751 CAF FOUR
036203,000037: 30,2070 55515 TS DVCNTR
036204,000038:
036205,000039: 30,2071 33014 CAF V06N33A
036206,000040: 30,2072 04616 TC BANKCALL # FLASH TIG
036207,000041: 30,2073 20477 CADR GOFLASH
036208,000042: 30,2074 16001 TCF GOTOPOOH
036209,000043: 30,2075 12077 TCF +2 # PROCEED
036210,000044: 30,2076 12071 TCF -5 # ENTER
036211,000045:
036212,000046: 30,2077 05364 TC PHASCHNG
036213,000047: 30,2100 04024 OCT 04024
036214,000048:
036215,000049: 30,2101 06042 TC INTPRET
036216,000050: 30,2102 43014 SET SET
036217,000051: 30,2103 03067 MUNFLAG
036218,000052: 30,2104 06464 ACC4-2FL
036219,000053: 30,2105 43014 SET CLEAR
036220,000054: 30,2106 00075 R10FLAG
036221,000055: 30,2107 00270 RNDVZFLG
036222,000056: 30,2110 43014 SET SET
036223,000057: 30,2111 04464 FLPI
036224,000058: 30,2112 04461 FLVR
036225,000059: 30,2113 77624 CALL
036226,000060: 30,2114 71346 GUIDINIT
036227,000061: 30,2115 77624 CALL
036228,000062: 30,2116 60246 P12INIT
036229,000063: 30,2117 77745 P12LMB DLOAD
036230,000064: 30,2120 25630 (TGO)A # SET TGO TO AN INITIAL NOMINAL VALUE.
036231,000065: 30,2121 17517 STODL TGO
036232,000066: 30,2122 03442 TIG
036233,000067: 30,2123 34041 STCALL TDEC1
036234,000068: 30,2124 27056 LEMPREC # ROTATE THE STATE VECTORS TO THE
036235,000069: 30,2125 64375 VLOAD MXV # IGNITION TIME.
Page 830 |
036237,000071: 30,2126 00007 VATT
036238,000072: 30,2127 01732 REFSMMAT
036239,000073: 30,2130 77772 VSL1
036240,000074: 30,2131 27601 STOVL V1S # COMPUTE V1S = VEL(TIG)*2(-7)M/CS.
036241,000075: 30,2132 00001 RATT
036242,000076: 30,2133 52521 MXV VSL6
036243,000077: 30,2134 01732 REFSMMAT
036244,000078: 30,2135 37521 STCALL R # COMPUTE R = POS(TIG)*2(-24) M.
036245,000079: 30,2136 67000 MUNGRAV # COMPUTE GDT1/2(TIG)*2(-7)M/CS.
036246,000080: 30,2137 53575 VLOAD UNIT
036247,000081: 30,2140 03521 R
036248,000082: 30,2141 37537 STCALL UNIT/R/ # COMPUTE UNIT/R/ FOR YCOMP.
036249,000083: 30,2142 57317 YCOMP
036250,000084: 30,2143 57461 SR DCOMP
036251,000085: 30,2144 20606 5D
036252,000086: 30,2145 17643 STODL XRANGE # INITIALIZE XRANGE FOR NOUN 76.
036253,000087: 30,2146 31372 VINJNOM
036254,000088: 30,2147 16245 STODL ZDOTD
036255,000089: 30,2150 31374 RDOTDNOM
036256,000090: 30,2151 02241 STORE RDOTD
036257,000091: 30,2152 77776 EXIT
036258,000092:
036259,000093: 30,2153 05364 TC PHASCHNG
036260,000094: 30,2154 04024 OCT 04024
036261,000095:
036262,000096: 30,2155 33013 NEWLOAD CAF V06N76 # FLASH CROSS-RANGE AND APOLUNE VALUES.
036263,000097: 30,2156 04616 TC BANKCALL
036264,000098: 30,2157 20477 CADR GOFLASH
036265,000099: 30,2160 16001 TCF GOTOPOOH
036266,000100: 30,2161 12163 TCF +2 # PROCEED
036267,000101: 30,2162 12155 TCF NEWLOAD # ENTER NEW DATA.
036268,000102:
036269,000103: 30,2163 32311 CAF P12ADRES
036270,000104: 30,2164 55455 TS WHICH
036271,000105:
036272,000106: 30,2165 05364 TC PHASCHNG
036273,000107: 30,2166 04024 OCT 04024
036274,000108:
036275,000109: 30,2167 06042 TC INTPRET
036276,000110: 30,2170 54345 DLOAD SL
036277,000111: 30,2171 03643 XRANGE
036278,000112: 30,2172 20206 5D
036279,000113: 30,2173 77615 DAD
036280,000114: 30,2174 02303 Y
036281,000115: 30,2175 27633 STOVL YCO
036282,000116: 30,2176 03537 UNIT/R/
036283,000117: 30,2177 53361 VXSC VAD
036284,000118: 30,2200 31370 49FPS
036285,000119: 30,2201 03601 V1S
036286,000120: 30,2202 03527 STORE V # V(TIPOVER) = V(IGN) + 57FPS (UNIT/R/)
Page 831 |
036288,000122: 30,2203 72441 DOT SL1
036289,000123: 30,2204 03537 UNIT/R/
036290,000124: 30,2205 27474 STOVL RDOT # RDOT * 2(-7)
036291,000125: 30,2206 03537 UNIT/R/
036292,000126: 30,2207 53435 VXV UNIT
036293,000127: 30,2210 03720 QAXIS
036294,000128: 30,2211 37726 STCALL ZAXIS1
036295,000129: 30,2212 60312 ASCENT
036296,000130: 30,2213 77745 P12RET DLOAD
036297,000131: 30,2214 02327 ATP # ATP(2)*2(18)
036298,000132: 30,2215 65316 DSQ PDDL
036299,000133: 30,2216 02323 ATY # ATY(2)*2(18)
036300,000134: 30,2217 43316 DSQ DAD
036301,000135: 30,2220 75454 BZE SQRT
036302,000136: 30,2221 60225 YAWDUN
036303,000137: 30,2222 55352 SL1 BDDV
036304,000138: 30,2223 02323 ATY
036305,000139: 30,2224 77736 ARCSIN
036306,000140: 30,2225 26331 YAWDUN STOVL YAW
036307,000141: 30,2226 03253 UNFC/2
036308,000142: 30,2227 50256 UNIT DOT
036309,000143: 30,2230 03537 UNIT/R/
036310,000144: 30,2231 65552 SL1 ARCCOS
036311,000145: 30,2232 77676 DCOMP
036312,000146: 30,2233 02333 STORE PITCH
036313,000147: 30,2234 77776 EXIT
036314,000148: 30,2235 05364 TC PHASCHNG
036315,000149: 30,2236 04024 OCT 04024
036316,000150:
036317,000151: 30,2237 00004 INHINT
036318,000152: 30,2240 04674 TC IBNKCALL
036319,000153: 30,2241 40143 CADR PFLITEDB
036320,000154: 30,2242 05527 TC DOWNFLAG
036321,000155: 30,2243 00213 ADRES FLPI
036322,000156:
036323,000157: 30,2244 04635 TC POSTJUMP
036324,000158: 30,2245 74130 CADR BURNBABY
036325,000159:
036326,000160: 30,2246 77745 P12INIT DLOAD # INITIALIZE ENGINE DATA. USED FOR P12 AND
036327,000161: 30,2247 16013 (1/DV)A # P71.
036328,000162: 30,2250 03641 STORE 1/DV3
036329,000163: 30,2251 03637 STORE 1/DV2
036330,000164: 30,2252 17635 STODL 1/DV1
036331,000165: 30,2253 16017 (AT)A
036332,000166: 30,2254 16231 STODL AT
036333,000167: 30,2255 16021 (TBUP)A
036334,000168: 30,2256 16237 STODL TBUP
036335,000169: 30,2257 34013 ATDECAY
036336,000170: 30,2260 54276 DCOMP SL
036337,000171: 30,2261 20214 11D
036338,000172: 30,2262 02235 STORE TTO
036339,000173: 30,2263 57535 SLOAD DCOMP
036340,000174: 30,2264 26001 APSVEX
036341,000175: 30,2265 77702 SR2
Page 832 |
036343,000177: 30,2266 02233 STORE VE
036344,000178: 30,2267 43414 BOFF RVQ
036345,000179: 30,2270 04747 FLAP
036346,000180: 30,2271 60272 COMMINIT
036347,000181: 30,2272 43345 COMMINIT DLOAD DAD # INITIALIZE TARGET DATA. USED BY P12, P70
036348,000182: 30,2273 25626 HINJECT # AND P71 IF IT DOES NOT FOLLOW P70.
036349,000183: 30,2274 02301 /LAND/
036350,000184: 30,2275 17631 STODL RCO
036351,000185: 30,2276 06520 HI6ZEROS
036352,000186: 30,2277 03654 STORE TXO
036353,000187: 30,2300 03633 STORE YCO
036354,000188: 30,2301 26243 STOVL YDOTD
036355,000189: 30,2302 01563 VRECTCSM
036356,000190: 30,2303 64235 VXV MXV
036357,000191: 30,2304 01555 RRECTCSM
036358,000192: 30,2305 01732 REFSMMAT
036359,000193: 30,2306 77656 UNIT
036360,000194: 30,2307 03720 STORE QAXIS
036361,000195: 30,2310 77616 RVQ
036362,000196:
036363,000197: 30,2311 02024 P12ADRES REMADR P12TABLE
036364,000198:
036365,000199: 34,2000 SETLOC ASENT8
036366,000200: 34,2000 BANK
036367,000201: 34,3346 COUNT* $$/P12
036368,000202:
036369,000203: 34,3346 40220 GUIDINIT STQ SETPD
036370,000204: 34,3347 01163 TEMPR60
036371,000205: 34,3350 00001 0D
036372,000206: 34,3351 41575 VLOAD PUSH
036373,000207: 34,3352 06512 UNITZ
036374,000208: 34,3353 41434 RTB PUSH
036375,000209: 34,3354 21574 LOADTIME
036376,000210: 34,3355 77624 CALL
036377,000211: 34,3356 55720 RP-TO-R
036378,000212: 34,3357 74321 MXV VXSC
036379,000213: 34,3360 01732 REFSMMAT
036380,000214: 34,3361 16027 MOONRATE
036381,000215: 34,3362 26273 STOVL WM
036382,000216: 34,3363 02021 RLS
036383,000217: 34,3364 52446 ABVAL SL3
036384,000218: 34,3365 36301 STCALL /LAND/
036385,000219: 34,3366 01163 TEMPR60
036386,000220:
036387,000221: 34,3367 00046 07374 49FPS 2DEC .149352 B-6 # EXPECTED RDOT AT TIPOVER
036388,000222:
036389,000223: 34,3371 04145 15527 VINJNOM 2DEC 16.7924 B-7 # 5509.5 FPS(APO=30NM WITH RDOT=19.5FPS)
036390,000224:
036391,000225: 34,3373 00007 23346 RDOTDNOM 2DEC .059436 B-7 # 19.5 FPS
036392,000226:
Page 833 This page is empty in the hardcopy of the original assembly listing. |
End of include-file P12.agc. Parent file is MAIN.agc