Source Code
These source-code files are part of a reconstructed copy of LM131 revision 1,
the final release of the Apollo 13 Lunar Module (LM) Apollo Guidance Computer
(AGC) software.
The source reconstruction began with source code of Luminary 131 previously transcribed from a digitized copy of that program. A dump of the flight spare core rope memory module B5, part number 2010802-171, serial number RAY 411, was obtained. This module is the only module different between Luminary 131 and LM131 revision 1. The dump was disassembled and all changes were incorporated into these source files. Note that page numbers in the reconstructed code match those on the Luminary 131 printout, although the changed code would likely have changed page numbers for a real LM131 revision 1 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. |
015454,000002: ## Copyright: Public domain.
015455,000003: ## Filename: IMU_PERFORMANCE_TESTS_2.agc
015456,000004: ## Purpose: A section of LM131 revision 1.
015457,000005: ## It is part of the reconstructed source code for the final
015458,000006: ## release of the flight software for the Lunar Module's (LM)
015459,000007: ## Apollo Guidance Computer (AGC) for Apollo 13. The code has
015460,000008: ## been reconstructed from a listing of Luminary 131 and a dump
015461,000009: ## of a core rope memory module B5, part number 2010802-171,
015462,000010: ## which is the only module different between LM131 revision 1
015463,000011: ## and Luminary 131. The executable generated from this source
015464,000012: ## has been verified against the module dump, so while the names,
015465,000013: ## comments, and ordering may not be exactly correct, the
015466,000014: ## resulting binary is.
015467,000015: ## Reference: pp. 375-383
015468,000016: ## Assembler: yaYUL
015469,000017: ## Contact: Ron Burkey <info@sandroid.org>.
015470,000018: ## Website: www.ibiblio.org/apollo/index.html
015471,000019: ## Mod history: 2022-10-28 MAS Created from Luminary 131.
015472,000020:
Page 375 |
015474,000022: # NAME - IMU PERFORMANCE TESTS 2
015475,000023:
015476,000024: # DATE - MARCH 20, 1967
015477,000025:
015478,000026: # BY - SYSTEM TEST GROUP 864-6900 EXT. 1274
015479,000027:
015480,000028: # MODNO. - ZERO
015481,000029:
015482,000030: # FUNCTIONAL DESCRIPTION
015483,000031:
015484,000032: # POSITIONING ROUTINES FOR THE IMU PERFORMANCE TESTS AS WELL AS SOME OF
015485,000033: # THE TESTS THEMSELVES. FOR A DESCRIPTION OF THESE SUBROUTINES AND THE
015486,000034: # OPERATING PROCEDURES (TYPICALLY) SEE STG MEMO 685. THEORETICAL REF. E-1973
015487,000035:
015488,000036: 33,2045 BANK 33
015489,000037: 37,2000 SETLOC IMU2
015490,000038: 37,2000 BANK
015491,000039: 37,2002 E5,1416 EBANK= POSITON
015492,000040: 37,2002 COUNT* $$/P07
015493,000041:
015494,000042: 37,2002 05311 REDO TC NEWMODEX
015495,000043: 37,2003 00007 MM 07 B-14
015496,000044:
015497,000045: 37,2004 02325 GEOIMUTT TC IMUZERR
015498,000046: 37,2005 34755 IMUBACK CA ZERO
015499,000047: 37,2006 55414 TS NDXCTR
015500,000048: 37,2007 55440 TS TORQNDX
015501,000049: 37,2010 55441 TS TORQNDX +1
015502,000050: 37,2011 55576 TS OVFLOWCK
015503,000051: 37,2012 34361 NBPOSPL CA DEC17
015504,000052: 37,2013 55571 TS ZERONDX
015505,000053: 37,2014 32476 CA XNBADR
015506,000054: 37,2015 02367 TC ZEROING
015507,000055: 37,2016 34736 CA HALF
015508,000056: 37,2017 55664 TS XNB
015509,000057: 37,2020 06042 GUESS TC INTPRET
015510,000058: 37,2021 62545 LATAZCHK DLOAD SL2
015511,000059: 37,2022 02403 LATITUDE
015512,000060: 37,2023 15046 STODL DSPTEM1 +1
015513,000061: 37,2024 02401 AZIMUTH
015514,000062: 37,2025 77434 RTB EXIT
015515,000063: 37,2026 21615 1STO2S
015516,000064: 37,2027 56154 XCH MPAC
015517,000065: 37,2030 55044 TS DSPTEM1
015518,000066: 37,2031 32473 CAF VN0641
015519,000067: 37,2032 04616 TC BANKCALL
015520,000068: 37,2033 20477 CADR GOFLASH
015521,000069: 37,2034 02270 TC ENDTEST1
015522,000070: 37,2035 02037 TC +2
015523,000071: 37,2036 02031 TC -5
Page 376 |
015525,000073: 37,2037 06042 TC INTPRET
015526,000074: 37,2040 47135 SLOAD RTB
015527,000075: 37,2041 01045 DSPTEM1
015528,000076: 37,2042 21577 CDULOGIC
015529,000077: 37,2043 02401 STORE AZIMUTH
015530,000078: 37,2044 60535 SLOAD SR2
015531,000079: 37,2045 01046 DSPTEM1 +1
015532,000080: 37,2046 02403 STORE LATITUDE
015533,000081: 37,2047 57546 COS DCOMP
015534,000082: 37,2050 77752 SL1
015535,000083: 37,2051 16437 STODL WANGI
015536,000084: 37,2052 02403 LATITUDE
015537,000085: 37,2053 72556 SIN SL1
015538,000086: 37,2054 16435 STODL WANGO
015539,000087: 37,2055 02401 AZIMUTH
015540,000088: 37,2056 73406 PUSH SIN
015541,000089: 37,2057 02675 STORE YNB +2
015542,000090: 37,2060 16705 STODL ZNB +4
015543,000091: 37,2061 77746 COS
015544,000092: 37,2062 02677 STORE YNB +4
015545,000093: 37,2063 77676 DCOMP
015546,000094: 37,2064 36703 POSGMBL STCALL ZNB +2
015547,000095: 37,2065 47355 CALCGA
015548,000096: 37,2066 77776 EXIT
015549,000097: 37,2067 04616 TC BANKCALL
015550,000098: 37,2070 16771 CADR IMUCOARS
015551,000099: 37,2071 34736 CAF BIT14 # IF BIT14 SET, GIMBAL LOCK
015552,000100: 37,2072 70077 MASK FLAGWRD3
015553,000101: 37,2073 00006 EXTEND
015554,000102: 37,2074 12076 BZF +2
015555,000103: 37,2075 25414 INCR NDXCTR # +1 IF IN GIMBAL LOCK, OTHERWISE 0
015556,000104: 37,2076 05516 TC DOWNFLAG
015557,000105: 37,2077 00056 ADRES GLOKFAIL # RESET GIMBAL LOCK FLAG
015558,000106: 37,2100 02315 TC IMUSLLLG
015559,000107: 37,2101 11414 CCS NDXCTR # IF ONE GO AND DO A PIPA TEST ONLY
015560,000108: 37,2102 02126 TC PIPACHK # ALIGN AND MEASURE VERTICAL PIPA RATE
015561,000109: 37,2103 02320 TC FINIMUDD
015562,000110: 37,2104 00006 EXTEND
015563,000111: 37,2105 31575 DCA PERFDLAY
015564,000112: 37,2106 05277 TC LONGCALL # DELAY WHILE SUSPENSION STABILIZES
015565,000113: 37,2107 E5,1416 EBANK= POSITON
015566,000114: 37,2107 02113 76065 2CADR GOESTIMS
015567,000115:
015568,000116: 37,2111 32116 CA ESTICADR
015569,000117: 37,2112 05133 TC JOBSLEEP
015570,000118: 37,2113 32116 GOESTIMS CA ESTICADR
015571,000119: 37,2114 05137 TC JOBWAKE
015572,000120: 37,2115 05261 TC TASKOVER
015573,000121: 37,2116 76500 ESTICADR CADR ESTIMS
015574,000122: 37,2117 34755 TORQUE CA ZERO
Page 377 |
015576,000124: 37,2120 55047 TS DSPTEM2
015577,000125: 37,2121 31504 CA DRIFTI
015578,000126: 37,2122 55050 TS DSPTEM2 +1
015579,000127: 37,2123 51416 INDEX POSITON
015580,000128: 37,2124 55420 TS SOUTHDR -1
015581,000129: 37,2125 02457 TC SHOW
015582,000130:
015583,000131: 37,2126 51414 PIPACHK INDEX NDXCTR # PIPA TEST
015584,000132: 37,2127 02130 TC +1
015585,000133: 37,2130 02447 TC EARTHR*
015586,000134: 37,2131 34361 CA DEC17 # ALLOW PIP COUNTER TO OVERFLOW 17 TIMES
015587,000135: 37,2132 55476 TS DATAPL +4 # IN THE ALLOTED TIME INTERVAL
015588,000136: 37,2133 32474 CA DEC58
015589,000137: 37,2134 55412 TS LENGTHOT
015590,000138: 37,2135 34753 CA ONE
015591,000139: 37,2136 55537 TS RESULTCT
015592,000140: 37,2137 34755 CA ZERO
015593,000141: 37,2140 51415 INDEX PIPINDEX
015594,000142: 37,2141 54037 TS PIPAX
015595,000143: 37,2142 55472 TS DATAPL
015596,000144: 37,2143 02332 TC CHECKG
015597,000145: 37,2144 00004 INHINT
015598,000146: 37,2145 34752 CAF TWO
015599,000147: 37,2146 05173 TC TWIDDLE
015600,000148: 37,2147 E5,1642 EBANK= XSM
015601,000149: 37,2147 02151 ADRES PIPATASK
015602,000150: 37,2150 05155 TC ENDOFJOB
015603,000151:
015604,000152: 37,2151 00006 PIPATASK EXTEND
015605,000153: 37,2152 27412 DIM LENGTHOT
015606,000154: 37,2153 31412 CA LENGTHOT
015607,000155: 37,2154 00006 EXTEND
015608,000156: 37,2155 62161 BZMF STARTPIP
015609,000157: 37,2156 34742 CAF BIT10
015610,000158: 37,2157 05173 TC TWIDDLE
015611,000159: 37,2160 E5,1642 EBANK= XSM
015612,000160: 37,2160 02151 ADRES PIPATASK
015613,000161: 37,2161 34736 STARTPIP CAF PRIO20
015614,000162: 37,2162 05105 TC FINDVAC
015615,000163: 37,2163 E5,1642 EBANK= XSM
015616,000164: 37,2163 02166 76065 2CADR PIPJOBB
015617,000165:
015618,000166: 37,2165 05261 TC TASKOVER
015619,000167:
015620,000168: 37,2166 51414 PIPJOBB INDEX NDXCTR
015621,000169: 37,2167 02170 TC +1
015622,000170: 37,2170 02447 TC EARTHR*
015623,000171: 37,2171 31412 CA LENGTHOT
Page 378 |
015625,000173: 37,2172 00006 EXTEND
015626,000174: 37,2173 62175 BZMF +2
015627,000175: 37,2174 05155 TC ENDOFJOB
015628,000176:
015629,000177: 37,2175 34756 CA FIVE
015630,000178: 37,2176 55537 TS RESULTCT
015631,000179: 37,2177 02332 TC CHECKG
015632,000180: 37,2200 11473 CCS DATAPL +1
015633,000181: 37,2201 02205 TC +4
015634,000182: 37,2202 05675 TC CCSHOLE
015635,000183: 37,2203 41476 CS DATAPL +4
015636,000184: 37,2204 55476 TS DATAPL +4
015637,000185: 37,2205 00006 EXTEND
015638,000186: 37,2206 41473 DCS DATAPL
015639,000187: 37,2207 21477 DAS DATAPL +4
015640,000188:
015641,000189: 37,2210 06042 TC INTPRET
015642,000190: 37,2211 45345 DLOAD DSU
015643,000191: 37,2212 02501 DATAPL +6
015644,000192: 37,2213 02475 DATAPL +2
015645,000193: 37,2214 45044 BPL CALL
015646,000194: 37,2215 76217 AINGOTN
015647,000195: 37,2216 76275 OVERFFIX
015648,000196: 37,2217 56325 AINGOTN PDDL DDV
015649,000197: 37,2220 02477 DATAPL +4
015650,000198: 37,2221 47075 DMPR RTB
015651,000199: 37,2222 37056 DEC585 # DEC585 HAS BEEN REDEFINED FOR LEM
015652,000200: 37,2223 21613 SGNAGREE
015653,000201: 37,2224 01050 STORE DSPTEM2
015654,000202: 37,2225 77776 EXIT
015655,000203: 37,2226 11414 CCS NDXCTR
015656,000204: 37,2227 02301 TC COAALIGN # TAKE PLATFORM OUT OF GIMBAL LOCK
015657,000205: 37,2230 02457 TC SHOW
015658,000206: 37,2231 32471 VERTDRFT CA 3990DEC # ABOUT 1 HOUR VERTICAL DRIFT TEST
015659,000207: 37,2232 55412 TS LENGTHOT
015660,000208: 37,2233 51416 INDEX POSITON
015661,000209: 37,2234 41417 CS SOUTHDR -2
015662,000210: 37,2235 55442 TS DRIFTT
015663,000211: 37,2236 11415 CCS PIPINDEX # OFFSET PLATFORM TO MISS PIP DEAD-ZONES
015664,000212: 37,2237 12245 TCF PON4 # Z UP IN POS 4
015665,000213: 37,2240 44747 PON2 CS BIT5 # X UP
015666,000214: 37,2241 27565 ADS ERCOMP +2
015667,000215: 37,2242 34747 CA BIT5
015668,000216: 37,2243 27567 ADS ERCOMP +4
015669,000217: 37,2244 12251 TCF PON
015670,000218: 37,2245 44747 PON4 CS BIT5
015671,000219: 37,2246 27565 ADS ERCOMP +2
015672,000220: 37,2247 34747 CA BIT5
015673,000221: 37,2250 27563 ADS ERCOMP
015674,000222: 37,2251 02447 PON TC EARTHR*
Page 379 |
015676,000224: 37,2252 34755 CA ZERO # ALLOW ONLY SOUTH GYRO EARTH RATE COMPENS
015677,000225: 37,2253 55404 TS ERVECTOR
015678,000226: 37,2254 55405 TS ERVECTOR +1
015679,000227: 37,2255 34733 GUESS1 CAF POSMAX
015680,000228: 37,2256 55440 TS TORQNDX
015681,000229: 37,2257 55441 TS TORQNDX +1
015682,000230: 37,2260 30032 CA CDUX
015683,000231: 37,2261 55413 TS LOSVEC
015684,000232: 37,2262 02500 TC ESTIMS
015685,000233: 37,2263 31502 VALMIS CA DRIFTO
015686,000234: 37,2264 55050 TS DSPTEM2 +1
015687,000235: 37,2265 34755 CA ZERO
015688,000236: 37,2266 55047 TS DSPTEM2
015689,000237: 37,2267 02457 TC SHOW
015690,000238:
015691,000239: 37,2270 05516 ENDTEST1 TC DOWNFLAG
015692,000240: 37,2271 00007 ADRES IMUSE
015693,000241: 37,2272 44755 CS ZERO
015694,000242: 37,2273 05314 TC NEWMODEA
015695,000243: 37,2274 05472 TC ENDEXT
015696,000244:
Page 380 |
015698,000246: 37,2275 43215 OVERFFIX DAD DAD
015699,000247: 37,2276 06532 DPPOSMAX
015700,000248: 37,2277 37064 ONEDPP
015701,000249: 37,2300 77616 RVQ
015702,000250:
015703,000251: 37,2301 00006 COAALIGN EXTEND # COARSE ALIGN SUBROUTINE
015704,000252: 37,2302 23571 QXCH ZERONDX
015705,000253: 37,2303 34755 CA ZERO
015706,000254: 37,2304 54321 TS THETAD
015707,000255: 37,2305 54322 TS THETAD +1
015708,000256: 37,2306 54323 TS THETAD +2
015709,000257: 37,2307 04616 TC BANKCALL
015710,000258: 37,2310 16771 CADR IMUCOARS
015711,000259: 37,2311 04616 ALIGNCOA TC BANKCALL
015712,000260: 37,2312 17707 CADR IMUSTALL
015713,000261: 37,2313 03047 TC SOMERR2
015714,000262: 37,2314 01571 TC ZERONDX
015715,000263:
015716,000264: 37,2315 00006 IMUSLLLG EXTEND
015717,000265: 37,2316 23571 QXCH ZERONDX
015718,000266: 37,2317 02311 TC ALIGNCOA
015719,000267:
015720,000268: 37,2320 00006 FINIMUDD EXTEND
015721,000269: 37,2321 23571 QXCH ZERONDX
015722,000270: 37,2322 04616 TC BANKCALL
015723,000271: 37,2323 17201 CADR IMUFINE
015724,000272: 37,2324 02311 TC ALIGNCOA
015725,000273:
015726,000274: 37,2325 00006 IMUZERR EXTEND
015727,000275: 37,2326 23571 QXCH ZERONDX
015728,000276: 37,2327 04616 TC BANKCALL
015729,000277: 37,2330 16705 CADR IMUZERO
015730,000278: 37,2331 02311 TC ALIGNCOA
015731,000279:
015732,000280: 37,2332 00006 CHECKG EXTEND # PIP PULSE CATCHING ROUTINE
015733,000281: 37,2333 23417 QXCH QPLACE
015734,000282: 37,2334 02342 TC +6
015735,000283: 37,2335 00003 CHECKG1 RELINT
015736,000284: 37,2336 30067 CA NEWJOB
015737,000285: 37,2337 00006 EXTEND
015738,000286: 37,2340 62346 BZMF +6
015739,000287: 37,2341 05122 TC CHANG1
015740,000288: 37,2342 00004 INHINT
015741,000289: 37,2343 51415 INDEX PIPINDEX
015742,000290: 37,2344 40037 CS PIPAX
015743,000291: 37,2345 55571 TS ZERONDX
015744,000292: 37,2346 00004 INHINT
Page 381 |
015746,000294: 37,2347 51415 INDEX PIPINDEX
015747,000295: 37,2350 30037 CA PIPAX
015748,000296: 37,2351 61571 AD ZERONDX
015749,000297: 37,2352 00006 EXTEND
015750,000298: 37,2353 12335 BZF CHECKG1
015751,000299: 37,2354 51415 INDEX PIPINDEX
015752,000300: 37,2355 30037 CA PIPAX
015753,000301: 37,2356 51537 INDEX RESULTCT
015754,000302: 37,2357 55472 TS DATAPL
015755,000303: 37,2360 04102 TC FINETIME
015756,000304: 37,2361 51537 INDEX RESULTCT
015757,000305: 37,2362 55473 TS DATAPL +1
015758,000306: 37,2363 51537 INDEX RESULTCT
015759,000307: 37,2364 23474 LXCH DATAPL +2
015760,000308: 37,2365 00003 RELINT
015761,000309: 37,2366 01417 ENDCHKG TC QPLACE
015762,000310:
015763,000311: 37,2367 54001 ZEROING TS L
015764,000312: 37,2370 12372 TCF +2
015765,000313: 37,2371 55571 ZEROING1 TS ZERONDX
015766,000314: 37,2372 34755 CAF ZERO
015767,000315: 37,2373 50001 INDEX L
015768,000316: 37,2374 54000 TS 0
015769,000317: 37,2375 24001 INCR L
015770,000318: 37,2376 11571 CCS ZERONDX
015771,000319: 37,2377 12371 TCF ZEROING1
015772,000320: 37,2400 00002 TC Q
015773,000321:
Page 382 |
015775,000323: 37,2401 65345 ERTHRVSE DLOAD PDDL
015776,000324: 37,2402 37057 SCHZEROS # PD24 = (SIN -COS 0)(OMEG/MS)
015777,000325: 37,2403 02403 LATITUDE
015778,000326: 37,2404 57546 COS DCOMP
015779,000327: 37,2405 73525 PDDL SIN
015780,000328: 37,2406 02403 LATITUDE
015781,000329: 37,2407 74266 VDEF VXSC
015782,000330: 37,2410 36001 OMEG/MS
015783,000331: 37,2411 02405 STORE ERVECTOR
015784,000332: 37,2412 77634 RTB
015785,000333: 37,2413 21574 LOADTIME
015786,000334: 37,2414 26433 STOVL TMARK
015787,000335: 37,2415 37057 SCHZEROS
015788,000336: 37,2416 02564 STORE ERCOMP
015789,000337: 37,2417 77616 RVQ
015790,000338:
015791,000339: 37,2420 47020 EARTHR ITA RTB
015792,000340: 37,2421 00051 S2
015793,000341: 37,2422 21574 LOADTIME
015794,000342: 37,2423 02431 STORE TEMPTIME
015795,000343: 37,2424 51025 DSU BPL
015796,000344: 37,2425 02433 TMARK
015797,000345: 37,2426 76431 ERTHR
015798,000346: 37,2427 77624 CALL
015799,000347: 37,2430 76275 OVERFFIX
015800,000348: 37,2431 74261 ERTHR SL VXSC
015801,000349: 37,2432 20212 9D
015802,000350: 37,2433 02405 ERVECTOR
015803,000351: 37,2434 53321 MXV VAD
015804,000352: 37,2435 02643 XSM
015805,000353: 37,2436 02564 ERCOMP
015806,000354: 37,2437 16564 STODL ERCOMP
015807,000355: 37,2440 02431 TEMPTIME
015808,000356: 37,2441 02433 STORE TMARK
015809,000357: 37,2442 47170 AXT,1 RTB
015810,000358: 37,2443 02563 ECADR ERCOMP
015811,000359: 37,2444 21706 PULSEIMU
015812,000360: 37,2445 77650 GOTO
015813,000361: 37,2446 00051 S2
015814,000362:
015815,000363: 37,2447 00006 EARTHR* EXTEND
015816,000364: 37,2450 23420 QXCH QPLACES
015817,000365: 37,2451 06042 TC INTPRET
015818,000366: 37,2452 77624 CALL
015819,000367: 37,2453 76420 EARTHR
015820,000368: 37,2454 77776 EXIT
015821,000369: 37,2455 02315 TC IMUSLLLG
015822,000370: 37,2456 01420 TC QPLACES
015823,000371:
015824,000372: 37,2457 00006 SHOW EXTEND
Page 383 |
015826,000374: 37,2460 23417 QXCH QPLACE
015827,000375: 37,2461 31416 SHOW1 CA POSITON
015828,000376: 37,2462 55051 TS DSPTEM2 +2
015829,000377: 37,2463 32472 CA VB06N98
015830,000378: 37,2464 04616 TC BANKCALL
015831,000379: 37,2465 20477 CADR GOFLASH
015832,000380: 37,2466 02270 TC ENDTEST1 # V34
015833,000381: 37,2467 01417 TC QPLACE # V33
015834,000382: 37,2470 12461 TCF SHOW1
015835,000383:
015836,000384: 37,2471 07626 3990DEC DEC 3990 B-14
015837,000385: 37,2472 01542 VB06N98 VN 0698
015838,000386: 37,2473 01451 VN0641 VN 0641
015839,000387: 37,2474 4361 DEC17 = ND1
015840,000388: 37,2474 00072 DEC58 DEC 58 B-14
015841,000389: 37,2475 02737 OGCPL ECADR OGC
015842,000390: 37,2476 4777 1SECX = 1SEC
015843,000391: 37,2476 01664 XNBADR GENADR XNB
015844,000392: 37,2477 01642 XSMADR GENADR XSM
015845,000393:
015846,000394: 4102 BLOCK 2
015847,000395: 4102 COUNT* $$/P07
015848,000396: 4102 00004 FINETIME INHINT # RETURNS WITH INTERRUPT INHIBITED
015849,000397: 4103 00006 EXTEND
015850,000398: 4104 00004 READ LOSCALAR
015851,000399: 4105 54001 TS L
015852,000400: 4106 00006 EXTEND
015853,000401: 4107 06004 RXOR LOSCALAR
015854,000402: 4110 00006 EXTEND
015855,000403: 4111 14115 BZF +4
015856,000404: 4112 00006 EXTEND
015857,000405: 4113 00004 READ LOSCALAR
015858,000406: 4114 54001 TS L
015859,000407: 4115 44733 CS POSMAX
015860,000408: 4116 60001 AD L
015861,000409: 4117 00006 EXTEND
015862,000410: 4120 14103 BZF FINETIME +1
015863,000411: 4121 00006 EXTEND
015864,000412: 4122 00003 READ HISCALAR
015865,000413: 4123 00002 TC Q
015866,000414:
End of include-file IMU_PERFORMANCE_TESTS_2.agc. Parent file is MAIN.agc