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