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. |
036274,000002: ## Copyright: Public domain.
036275,000003: ## Filename: P12.agc
036276,000004: ## Purpose: A section of Luminary revision 178.
036277,000005: ## It is part of the reconstructed source code for the final
036278,000006: ## release of the flight software for the Lunar Module's
036279,000007: ## (LM) Apollo Guidance Computer (AGC) for Apollo 14. The
036280,000008: ## code has been recreated from copies of Zerlina 56, Luminary
036281,000009: ## 210, and Luminary 131, as well as many Luminary memos.
036282,000010: ## It has been adapted such that the resulting bugger words
036283,000011: ## exactly match those specified for Luminary 178 in NASA
036284,000012: ## drawing 2021152N, which gives relatively high confidence
036285,000013: ## that the reconstruction is correct.
036286,000014: ## Reference: pp. 829-833
036287,000015: ## Assembler: yaYUL
036288,000016: ## Contact: Ron Burkey <info@sandroid.org>.
036289,000017: ## Website: www.ibiblio.org/apollo/index.html
036290,000018: ## Mod history: 2019-08-14 MAS Created from Zerlina 56.
036291,000019: ## 2019-09-12 MAS Removed clearing of ALW66FLG from P12LM.
036292,000020:
Page 829 |
036294,000022: 24,3642 BANK 24
036295,000023: 30,2000 SETLOC P12
036296,000024: 30,2000 BANK
036297,000025:
036298,000026: 30,2061 E7,1515 EBANK= DVCNTR
036299,000027: 30,2061 COUNT* $$/P12
036300,000028:
036301,000029: 30,2061 05364 P12LM TC PHASCHNG
036302,000030: 30,2062 04024 OCT 04024
036303,000031:
036304,000032: 30,2063 04616 TC BANKCALL
036305,000033: 30,2064 11241 CADR R02BOTH # CHECK THE STATUS OF THE IMU.
036306,000034:
036307,000035: 30,2065 36000 CAF THRESH2 # INITIALIZE DVMON
036308,000036: 30,2066 55250 TS DVTHRUSH
036309,000037: 30,2067 34751 CAF FOUR
036310,000038: 30,2070 55515 TS DVCNTR
036311,000039:
036312,000040: 30,2071 33013 CAF V06N33A
036313,000041: 30,2072 04616 TC BANKCALL # FLASH TIG
036314,000042: 30,2073 20477 CADR GOFLASH
036315,000043: 30,2074 16001 TCF GOTOPOOH
036316,000044: 30,2075 12077 TCF +2 # PROCEED
036317,000045: 30,2076 12071 TCF -5 # ENTER
036318,000046:
036319,000047: 30,2077 05364 TC PHASCHNG
036320,000048: 30,2100 04024 OCT 04024
036321,000049:
036322,000050: 30,2101 06042 TC INTPRET
036323,000051: 30,2102 43014 SET SET
036324,000052: 30,2103 03067 MUNFLAG
036325,000053: 30,2104 06464 ACC4-2FL
036326,000054: 30,2105 43014 SET CLEAR
036327,000055: 30,2106 00075 R10FLAG
036328,000056: 30,2107 00270 RNDVZFLG
036329,000057: 30,2110 43014 SET SET
036330,000058: 30,2111 04464 FLPI
036331,000059: 30,2112 04461 FLVR
036332,000060: 30,2113 77624 CALL
036333,000061: 30,2114 71346 GUIDINIT
036334,000062: 30,2115 77624 CALL
036335,000063: 30,2116 60242 P12INIT
036336,000064: 30,2117 77745 P12LMB DLOAD
036337,000065: 30,2120 25637 (TGO)A # SET TGO TO AN INITIAL NOMINAL VALUE.
036338,000066: 30,2121 17517 STODL TGO
036339,000067: 30,2122 03442 TIG
036340,000068: 30,2123 34041 STCALL TDEC1
036341,000069: 30,2124 27056 LEMPREC # ROTATE THE STATE VECTORS TO THE
036342,000070: 30,2125 64375 VLOAD MXV # IGNITION TIME.
Page 830 |
036344,000072: 30,2126 00007 VATT
036345,000073: 30,2127 01732 REFSMMAT
036346,000074: 30,2130 77772 VSL1
036347,000075: 30,2131 27601 STOVL V1S # COMPUTE V1S = VEL(TIG)*2(-7)M/CS.
036348,000076: 30,2132 00001 RATT
036349,000077: 30,2133 52521 MXV VSL6
036350,000078: 30,2134 01732 REFSMMAT
036351,000079: 30,2135 37521 STCALL R # COMPUTE R = POS(TIG)*2(-24) M.
036352,000080: 30,2136 67030 MUNGRAV # COMPUTE GDT1/2(TIG)*2(-7)M/CS.
036353,000081: 30,2137 53575 VLOAD UNIT
036354,000082: 30,2140 03521 R
036355,000083: 30,2141 37537 STCALL UNIT/R/ # COMPUTE UNIT/R/ FOR YCOMP.
036356,000084: 30,2142 57313 YCOMP
036357,000085: 30,2143 57461 SR DCOMP
036358,000086: 30,2144 20606 5D
036359,000087: 30,2145 17643 STODL XRANGE # INITIALIZE XRANGE FOR NOUN 76.
036360,000088: 30,2146 31372 VINJNOM
036361,000089: 30,2147 16277 STODL ZDOTD
036362,000090: 30,2150 31374 RDOTDNOM
036363,000091: 30,2151 02273 STORE RDOTD
036364,000092: 30,2152 77776 EXIT
036365,000093:
036366,000094: 30,2153 05364 TC PHASCHNG
036367,000095: 30,2154 04024 OCT 04024
036368,000096:
036369,000097: 30,2155 33012 NEWLOAD CAF V06N76 # FLASH CROSS-RANGE AND APOLUNE VALUES.
036370,000098: 30,2156 04616 TC BANKCALL
036371,000099: 30,2157 20477 CADR GOFLASH
036372,000100: 30,2160 16001 TCF GOTOPOOH
036373,000101: 30,2161 12163 TCF +2 # PROCEED
036374,000102: 30,2162 12155 TCF NEWLOAD # ENTER NEW DATA.
036375,000103:
036376,000104: 30,2163 32305 CAF P12ADRES
036377,000105: 30,2164 55455 TS WHICH
036378,000106:
036379,000107: 30,2165 05364 TC PHASCHNG
036380,000108: 30,2166 04024 OCT 04024
036381,000109:
036382,000110: 30,2167 06042 TC INTPRET
036383,000111: 30,2170 54345 DLOAD SL
036384,000112: 30,2171 03643 XRANGE
036385,000113: 30,2172 20206 5D
036386,000114: 30,2173 77615 DAD
036387,000115: 30,2174 02335 Y
036388,000116: 30,2175 27633 STOVL YCO
036389,000117: 30,2176 03537 UNIT/R/
036390,000118: 30,2177 53361 VXSC VAD
036391,000119: 30,2200 31370 49FPS
036392,000120: 30,2201 03601 V1S
036393,000121: 30,2202 03527 STORE V # V(TIPOVER) = V(IGN) + 57FPS (UNIT/R/)
Page 831 |
036395,000123: 30,2203 72441 DOT SL1
036396,000124: 30,2204 03537 UNIT/R/
036397,000125: 30,2205 37474 STCALL RDOT # RDOT * 2(-7)
036398,000126: 30,2206 60306 ASCENT
036399,000127: 30,2207 77745 P12RET DLOAD
036400,000128: 30,2210 02361 ATP # ATP(2)*2(18)
036401,000129: 30,2211 65316 DSQ PDDL
036402,000130: 30,2212 02355 ATY # ATY(2)*2(18)
036403,000131: 30,2213 43316 DSQ DAD
036404,000132: 30,2214 75454 BZE SQRT
036405,000133: 30,2215 60221 YAWDUN
036406,000134: 30,2216 55352 SL1 BDDV
036407,000135: 30,2217 02355 ATY
036408,000136: 30,2220 77736 ARCSIN
036409,000137: 30,2221 26363 YAWDUN STOVL YAW
036410,000138: 30,2222 03253 UNFC/2
036411,000139: 30,2223 50256 UNIT DOT
036412,000140: 30,2224 03537 UNIT/R/
036413,000141: 30,2225 65552 SL1 ARCCOS
036414,000142: 30,2226 77676 DCOMP
036415,000143: 30,2227 02365 STORE PITCH
036416,000144: 30,2230 77776 EXIT
036417,000145: 30,2231 05364 TC PHASCHNG
036418,000146: 30,2232 04024 OCT 04024
036419,000147:
036420,000148: 30,2233 00004 INHINT
036421,000149: 30,2234 04674 TC IBNKCALL
036422,000150: 30,2235 40143 CADR PFLITEDB
036423,000151: 30,2236 05527 TC DOWNFLAG
036424,000152: 30,2237 00213 ADRES FLPI
036425,000153:
036426,000154: 30,2240 04635 TC POSTJUMP
036427,000155: 30,2241 74130 CADR BURNBABY
036428,000156:
036429,000157: 30,2242 77745 P12INIT DLOAD # INITIALIZE ENGINE DATA. USED FOR P12 AND
036430,000158: 30,2243 16013 (1/DV)A # P71.
036431,000159: 30,2244 03641 STORE 1/DV3
036432,000160: 30,2245 03637 STORE 1/DV2
036433,000161: 30,2246 17635 STODL 1/DV1
036434,000162: 30,2247 16017 (AT)A
036435,000163: 30,2250 16263 STODL AT
036436,000164: 30,2251 16021 (TBUP)A
036437,000165: 30,2252 16271 STODL TBUP
036438,000166: 30,2253 34013 ATDECAY
036439,000167: 30,2254 54276 DCOMP SL
036440,000168: 30,2255 20214 11D
036441,000169: 30,2256 02267 STORE TTO
036442,000170: 30,2257 57535 SLOAD DCOMP
036443,000171: 30,2260 26001 APSVEX
036444,000172: 30,2261 77702 SR2
Page 832 |
036446,000174: 30,2262 02265 STORE VE
036447,000175: 30,2263 43414 BOFF RVQ
036448,000176: 30,2264 04747 FLAP
036449,000177: 30,2265 60266 COMMINIT
036450,000178: 30,2266 43345 COMMINIT DLOAD DAD # INITIALIZE TARGET DATA. USED BY P12, P70
036451,000179: 30,2267 25635 HINJECT # AND P71 IF IT DOES NOT FOLLOW P70.
036452,000180: 30,2270 02333 /LAND/
036453,000181: 30,2271 17631 STODL RCO
036454,000182: 30,2272 06470 HI6ZEROS
036455,000183: 30,2273 03654 STORE TXO
036456,000184: 30,2274 03633 STORE YCO
036457,000185: 30,2275 26275 STOVL YDOTD
036458,000186: 30,2276 01563 VRECTCSM
036459,000187: 30,2277 64235 VXV MXV
036460,000188: 30,2300 01555 RRECTCSM
036461,000189: 30,2301 01732 REFSMMAT
036462,000190: 30,2302 77656 UNIT
036463,000191: 30,2303 02600 STORE QAXIS
036464,000192: 30,2304 77616 RVQ
036465,000193:
036466,000194: 30,2305 02024 P12ADRES REMADR P12TABLE
036467,000195:
036468,000196: 34,2000 SETLOC ASENT8
036469,000197: 34,2000 BANK
036470,000198: 34,3346 COUNT* $$/P12
036471,000199:
036472,000200: 34,3346 40220 GUIDINIT STQ SETPD
036473,000201: 34,3347 01163 TEMPR60
036474,000202: 34,3350 00001 0D
036475,000203: 34,3351 41575 VLOAD PUSH
036476,000204: 34,3352 06462 UNITZ
036477,000205: 34,3353 41434 RTB PUSH
036478,000206: 34,3354 21574 LOADTIME
036479,000207: 34,3355 77624 CALL
036480,000208: 34,3356 55720 RP-TO-R
036481,000209: 34,3357 74321 MXV VXSC
036482,000210: 34,3360 01732 REFSMMAT
036483,000211: 34,3361 16027 MOONRATE
036484,000212: 34,3362 26325 STOVL WM
036485,000213: 34,3363 02021 RLS
036486,000214: 34,3364 52446 ABVAL SL3
036487,000215: 34,3365 36333 STCALL /LAND/
036488,000216: 34,3366 01163 TEMPR60
036489,000217:
036490,000218: 34,3367 00046 07374 49FPS 2DEC .149352 B-6 # EXPECTED RDOT AT TIPOVER
036491,000219:
036492,000220: 34,3371 04145 15527 VINJNOM 2DEC 16.7924 B-7 # 5509.5 FPS(APO=30NM WITH RDOT=19.5FPS)
036493,000221:
036494,000222: 34,3373 00007 23346 RDOTDNOM 2DEC .059436 B-7 # 19.5 FPS
036495,000223:
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