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. |
035758,000002: ## Copyright: Public domain.
035759,000003: ## Filename: P70-P71.agc
035760,000004: ## Purpose: A section of Luminary revision 163.
035761,000005: ## It is part of the reconstructed source code for the first
035762,000006: ## (unflown) release of the flight software for the Lunar
035763,000007: ## Module's (LM) Apollo Guidance Computer (AGC) for Apollo 14.
035764,000008: ## The code has been recreated from a reconstructed copy of
035765,000009: ## Luminary 173, as well as Luminary memos 157 amd 158.
035766,000010: ## It has been adapted such that the resulting bugger words
035767,000011: ## exactly match those specified for Luminary 163 in NASA
035768,000012: ## drawing 2021152N, which gives relatively high confidence
035769,000013: ## that the reconstruction is correct.
035770,000014: ## Reference: pp. 822-828
035771,000015: ## Assembler: yaYUL
035772,000016: ## Contact: Ron Burkey <info@sandroid.org>.
035773,000017: ## Website: www.ibiblio.org/apollo/index.html
035774,000018: ## Mod history: 2019-08-21 MAS Created from Luminary 173.
035775,000019:
Page 831 |
035777,000021: 21,2006 BANK 21
035778,000022: 21,2000 SETLOC R11
035779,000023: 21,2000 BANK
035780,000024:
035781,000025: 21,2006 E7,1515 EBANK= DVCNTR
035782,000026: 21,2006 COUNT* $$/R11
035783,000027:
035784,000028: 21,2006 40103 R10,R11 CS FLAGWRD7 # IS SERVICER STILL RUNNING?
035785,000029: 21,2007 74747 MASK AVEGFBIT
035786,000030: 21,2010 10000 CCS A
035787,000031: 21,2011 15272 TCF TASKOVER # LET AVGEND TAKE CARE OF GROUP 2.
035788,000032: 21,2012 11055 CCS PIPCTR
035789,000033: 21,2013 12020 TCF STORPCTR
035790,000034: 21,2014 00006 EXTEND
035791,000035: 21,2015 34755 DCA NEG0
035792,000036: 21,2016 52754 DXCH -PHASE2
035793,000037: 21,2017 12024 TCF R10,R11A
035794,000038:
035795,000039: 21,2020 55714 STORPCTR TS PIPCTR1
035796,000040:
035797,000041: 21,2021 E7,1714 PIPCTR1 = LADQSAVE
035798,000042: 21,2021 1055 PIPCTR = PHSPRDT2
035799,000043: 21,2021 36010 CAF OCT31
035800,000044: 21,2022 05204 TC TWIDDLE
035801,000045: 21,2023 02006 ADRES R10,R11
035802,000046: 21,2024 34753 R10,R11A CAF HFLSHBIT
035803,000047: 21,2025 70107 FLASHH? MASK FLGWRD11
035804,000048: 21,2026 00006 EXTEND
035805,000049: 21,2027 12033 BZF FLASHV? # H FLASH OFF, SO LEAVE ALONE
035806,000050:
035807,000051: 21,2030 34747 CA HLITE
035808,000052: 21,2031 54001 TS L
035809,000053: 21,2032 04606 TC FLIP # FLIP H LITE
035810,000054:
035811,000055: 21,2033 34752 FLASHV? CA VFLSHBIT # VFLASHBIT MUST BE BIT 2.
035812,000056: 21,2034 70107 MASK FLGWRD11
035813,000057: 21,2035 00006 EXTEND
035814,000058: 21,2036 12042 BZF 10,11 # VFLASH OFF
035815,000059:
035816,000060: 21,2037 34751 CA VLITE
035817,000061: 21,2040 54001 TS L
035818,000062: 21,2041 04606 TC FLIP # FLIP V LITE
035819,000063:
035820,000064:
035821,000065: 21,2042 30105 10,11 CA FLAGWRD9 # IS THE LETABORT FLAG SET ?
035822,000066: 21,2043 74743 MASK LETABBIT
035823,000067: 21,2044 00006 EXTEND
035824,000068: 21,2045 12130 BZF LANDISP # NO. PROCEED TO R10.
035825,000069:
035826,000070: 21,2046 41010 P71NOW? CS MODREG # YES. ARE WE IN P71 NOW?
035827,000071: 21,2047 62107 AD 1DEC71
035828,000072: 21,2050 00006 EXTEND
Page 832 |
035830,000074: 21,2051 12130 BZF LANDISP # YES. PROCEED TO R10.
035831,000075:
035832,000076: 21,2052 00006 EXTEND # NO. IS AN ABORT STAGE COMMANDED?
035833,000077: 21,2053 00030 READ CHAN30
035834,000078: 21,2054 40000 COM
035835,000079: 21,2055 54001 TS L
035836,000080: 21,2056 74750 MASK BIT4
035837,000081: 21,2057 10000 CCS A
035838,000082: 21,2060 12076 TCF P71A # YES.
035839,000083:
035840,000084: 21,2061 41010 P70NOW? CS MODREG # NO. ARE WE IN P70 NOW?
035841,000085: 21,2062 62106 AD 1DEC70
035842,000086: 21,2063 00006 EXTEND
035843,000087: 21,2064 12130 BZF LANDISP # YES. PROCEED TO R10.
035844,000088:
035845,000089: 21,2065 30001 CA L # NO. IS AN ABORT COMMANDED?
035846,000090: 21,2066 74753 MASK BIT1
035847,000091: 21,2067 10000 CCS A
035848,000092: 21,2070 12073 TCF P70A # YES.
035849,000093: 21,2071 12130 TCF LANDISP # NO. PROCEED TO R10.
035850,000094:
035851,000095: 21,2072 COUNT* $$/P70
035852,000096:
035853,000097: 21,2072 02110 P70 TC LEGAL?
035854,000098: 21,2073 44755 P70A CS ZERO
035855,000099: 21,2074 12077 TCF +3
035856,000100: 21,2075 02110 P71 TC LEGAL?
035857,000101: 21,2076 34752 P71A CAF TWO
035858,000102: 21,2077 54002 +3 TS Q
035859,000103: 21,2100 00004 INHINT
035860,000104: 21,2101 00006 EXTEND
035861,000105: 21,2102 32105 DCA CNTABTAD
035862,000106: 21,2103 52006 DTCB
035863,000107:
035864,000108: 21,2104 E7,1515 EBANK= DVCNTR
035865,000109: 21,2104 03416 12067 CNTABTAD 2CADR CONTABRT
035866,000110:
035867,000111: 21,2106 00106 1DEC70 DEC 70 B-14
035868,000112: 21,2107 00107 1DEC71 DEC 71 B-14
035869,000113:
035870,000114: 05,3416 BANK 05
035871,000115: 05,2000 SETLOC ABORTS1
035872,000116: 05,2000 BANK
035873,000117: 05,3416 COUNT* $$/P70
035874,000118:
Page 833 |
035876,000120: 05,3416 33421 CONTABRT CAF ABRTJADR
035877,000121: 05,3417 54017 TS BRUPT
035878,000122: 05,3420 50017 RESUME
035879,000123:
035880,000124: 05,3421 13422 ABRTJADR TCF ABRTJASK
035881,000125:
035882,000126: 05,3422 33502 ABRTJASK CAF OCTAL27
035883,000127: 05,3423 60002 AD Q
035884,000128: 05,3424 54001 TS L
035885,000129: 05,3425 40000 COM
035886,000130: 05,3426 52760 DXCH -PHASE4
035887,000131: 05,3427 50002 INDEX Q
035888,000132: 05,3430 33501 CAF MODE70
035889,000133: 05,3431 55010 TS MODREG
035890,000134:
035891,000135: 05,3432 55162 TS DISPDEX # INSURE DISPDEX IS POSITIVE.
035892,000136:
035893,000137: 05,3433 10002 CCS Q # SET APSFLAG IF P71.
035894,000138: 05,3434 40106 CS FLGWRD10 # SET APSFLAG PRIOR TO THE ENEMA.
035895,000139: 05,3435 74737 MASK APSFLBIT
035896,000140: 05,3436 26106 ADS FLGWRD10
035897,000141: 05,3437 43504 CS DAPBITS # DAPBITS = OCT 40640 = BITS 6,8,9,15
035898,000142: 05,3440 70111 MASK DAPBOOLS # RESET ULLAGE,DRIFT,XOVRIINH,AND PULSES
035899,000143: 05,3441 54111 TS DAPBOOLS
035900,000144:
035901,000145: 05,3442 33505 CAF 1DEGDB # INSURE DAP DEADBAND IS SET TO 1 DEGREE
035902,000146: 05,3443 55343 TS DB
035903,000147:
035904,000148: 05,3444 40101 CS FLAGWRD5 # SET ENGONFLG.
035905,000149: 05,3445 74745 MASK ENGONBIT
035906,000150: 05,3446 26101 ADS FLAGWRD5
035907,000151:
035908,000152: 05,3447 44355 CS PRIO30 # INSURE THAT THE ENGINE IS ON, IF ARMED.
035909,000153: 05,3450 00006 EXTEND
035910,000154: 05,3451 02011 RAND DSALMOUT
035911,000155: 05,3452 64737 AD BIT13
035912,000156: 05,3453 00006 EXTEND
035913,000157: 05,3454 01011 WRITE DSALMOUT
035914,000158:
035915,000159: 05,3455 34735 CAF LRBYBIT # TERMINATE R12.
035916,000160: 05,3456 54107 TS FLGWRD11
035917,000161:
035918,000162: 05,3457 40074 CS FLAGWRD0 # SET R10FLAG TO SUPPRESS OUTPUTS TO THE
035919,000163: 05,3460 74752 MASK R10FLBIT # CROSS-POINTER DISPLAY.
035920,000164: 05,3461 26074 ADS FLAGWRD0 # THE FOLLOWING ENEMA WILL REMOVE THE
035921,000165: # DISPLAY INERTIAL DATA OUTBIT.
035922,000166:
035923,000167: 05,3462 00006 EXTEND # LOAD TEVENT FOR THE DOWNLINK.
035924,000168: 05,3463 30025 DCA TIME2
035925,000169: 05,3464 53342 DXCH TEVENT
035926,000170:
Page 834 |
035928,000172: 05,3465 00006 EXTEND
035929,000173: 05,3466 33500 DCA SVEXITAD
035930,000174: 05,3467 53252 DXCH AVGEXIT
035931,000175:
035932,000176: 05,3470 02667 TC ABTKLEAN # KILL GROUPS 1,3, AND 6.
035933,000177:
035934,000178: 05,3471 36250 CAF THREE # SET UP 4.3SPOT FOR GOABORT
035935,000179: 05,3472 54001 TS L
035936,000180: 05,3473 40000 COM
035937,000181: 05,3474 52760 DXCH -PHASE4
035938,000182:
035939,000183: 05,3475 04635 TC POSTJUMP
035940,000184: 05,3476 12777 CADR ENEMA
035941,000185:
035942,000186: 05,3477 E7,1515 EBANK= DVCNTR
035943,000187: 05,3477 03636 64067 SVEXITAD 2CADR SERVEXIT
035944,000188:
035945,000189: 05,3501 00106 MODE70 DEC 70 B-14
035946,000190: 05,3502 00027 OCTAL27 OCT 27
035947,000191: 05,3503 00107 MODE71 DEC 71 B-14
035948,000192:
035949,000193: 05,3504 40640 DAPBITS OCT 40640
035950,000194:
035951,000195: 05,3505 00554 1DEGDB OCT 00554
035952,000196: 32,3423 BANK 32
035953,000197: 32,2000 SETLOC ABORTS
035954,000198: 32,2000 BANK
035955,000199:
035956,000200: 32,3423 COUNT* $$/P70
035957,000201:
035958,000202: 32,3423 34751 GOABORT CAF FOUR
035959,000203: 32,3424 55515 TS DVCNTR
035960,000204:
035961,000205: 32,3425 33633 CAF WHICHADR
035962,000206: 32,3426 55455 TS WHICH
035963,000207:
035964,000208: 32,3427 06042 TC INTPRET
035965,000209: 32,3430 43014 CLEAR CLEAR
035966,000210: 32,3431 04665 FLRCS
035967,000211: 32,3432 04265 FLUNDISP
035968,000212: 32,3433 43014 CLEAR SET
035969,000213: 32,3434 03670 IDLEFLAG
035970,000214: 32,3435 06464 ACC4-2FL
035971,000215: 32,3436 45014 SET CALL
035972,000216: 32,3437 04462 P7071FLG
035973,000217: 32,3440 61063 INITCDUW
035974,000218: 32,3441 77776 EXIT
035975,000219:
035976,000220: 32,3442 05332 TC CHECKMM
035977,000221: 32,3443 00106 70DEC DEC 70 B-14
Page 835 |
035979,000223: 32,3444 13557 TCF P71RET
035980,000224:
035981,000225: 32,3445 06042 P70INIT TC INTPRET
035982,000226: 32,3446 77624 CALL
035983,000227: 32,3447 65606 TGOCOMP
035984,000228: 32,3450 54345 DLOAD SL
035985,000229: 32,3451 34003 MDOTDPS
035986,000230: 32,3452 20205 4D
035987,000231: 32,3453 77665 BDDV
035988,000232: 32,3454 01244 MASS
035989,000233: 32,3455 16237 STODL TBUP
035990,000234: 32,3456 01244 MASS
035991,000235: 32,3457 70471 DDV SR1
035992,000236: 32,3460 16015 K(1/DV)
035993,000237: 32,3461 03635 STORE 1/DV1
035994,000238: 32,3462 03637 STORE 1/DV2
035995,000239: 32,3463 03641 STORE 1/DV3
035996,000240: 32,3464 77665 BDDV
035997,000241: 32,3465 25632 K(AT)
035998,000242: 32,3466 16231 STODL AT
035999,000243: 32,3467 34015 100PCTTO
036000,000244: 32,3470 02235 STORE TTO
036001,000245: 32,3471 57535 SLOAD DCOMP
036002,000246: 32,3472 26002 DPSVEX
036003,000247: 32,3473 77702 SR2
036004,000248: 32,3474 36233 STCALL VE
036005,000249: 32,3475 60272 COMMINIT
036006,000250: 32,3476 77745 INJTARG DLOAD
036007,000251: 32,3477 02564 ABTRDOT
036008,000252: 32,3500 36241 STCALL RDOTD # INITIALIZE RDOTD.
036009,000253: 32,3501 57317 YCOMP # COMPUTE Y
036010,000254: 32,3502 45246 ABS DSU
036011,000255: 32,3503 02562 YLIM # /Y/-DYMAX
036012,000256: 32,3504 75240 BMN SIGN # IF <0, XR<.5DEG, LEAVE YCO AT 0
036013,000257: 32,3505 65510 YOK # IF >0, FIX SIGN OF DEFICIT, THIS IS YCO.
036014,000258: 32,3506 02303 Y
036015,000259: 32,3507 03633 STORE YCO
036016,000260: 32,3510 45345 YOK DLOAD DSU
036017,000261: 32,3511 03633 YCO
036018,000262: 32,3512 02303 Y
036019,000263: 32,3513 77661 SR
036020,000264: 32,3514 20606 5D
036021,000265: 32,3515 03643 STORE XRANGE
036022,000266: 32,3516 45014 SET CALL
036023,000267: 32,3517 04461 FLVR
036024,000268: 32,3520 71557 THETCOMP
036025,000269: 32,3521 51025 DSU BPL
036026,000270: 32,3522 02556 THETCRIT
036027,000271: 32,3523 65527 +4
036028,000272: 32,3524 52175 VLOAD GOTO
Page 836 |
036030,000274: 32,3525 02546 J1PARM
036031,000275: 32,3526 65532 STORPARM
036032,000276: 32,3527 43175 +4 VLOAD SET # IF J2 IS USED, SET THE
036033,000277: 32,3530 02552 J2PARM # ABORT TARGETING FLAG
036034,000278: 32,3531 04470 ABTTGFLG
036035,000279: 32,3532 16616 STORPARM STODL JPARM
036036,000280: 32,3533 03631 RCO
036037,000281: 32,3534 02622 STORE RP
036038,000282: 32,3535 77414 SET EXIT
036039,000283: 32,3536 04471 ROTFLAG
036040,000284:
036041,000285: 32,3537 03615 UPTHROT TC THROTUP
036042,000286:
036043,000287: 32,3540 05364 TC PHASCHNG
036044,000288: 32,3541 04024 OCT 04024
036045,000289:
036046,000290: 32,3542 05515 TC UPFLAG
036047,000291: 32,3543 00216 ADRES FLAP
036048,000292:
036049,000293: 32,3544 04616 UPTHROT1 TC BANKCALL # VERIFY THAT THE PANEL SWITCHES
036050,000294: 32,3545 73707 CADR P40AUTO # ARE PROPERLY SET.
036051,000295:
036052,000296: 32,3546 03615 TC THROTUP
036053,000297:
036054,000298: 32,3547 35027 CAF PRIO17 # LET SERVICER FINISH BEFORE CONNECTING
036055,000299: 32,3550 05146 TC PRIOCHNG # ASCENT GUIDANCE EQUATIONS.
036056,000300:
036057,000301: 32,3551 00006 EXTEND
036058,000302: 32,3552 33635 DCA ATMAGAD
036059,000303: 32,3553 53252 DXCH AVGEXIT
036060,000304:
036061,000305: 32,3554 05364 GRP4OFF TC PHASCHNG # TERMINATE USE OF GROUP 4.
036062,000306: 32,3555 00004 OCT 00004
036063,000307:
036064,000308: 32,3556 15155 TCF ENDOFJOB
036065,000309:
036066,000310: 32,3557 05527 P71RET TC DOWNFLAG
036067,000311: 32,3560 00215 ADRES LETABORT
036068,000312:
036069,000313: 32,3561 36000 CAF THRESH2 # SET DVMON THRESHOLD TO THE ASCENT VALUE.
036070,000314: 32,3562 55250 TS DVTHRUSH
036071,000315:
036072,000316: 32,3563 06042 TC INTPRET
036073,000317: 32,3564 77624 CALL
036074,000318: 32,3565 60246 P12INIT
036075,000319: 32,3566 45014 BON CALL
036076,000320: 32,3567 04707 FLAP
036077,000321: 32,3570 65574 OLDTIME
036078,000322: 32,3571 65606 TGOCOMP # IF FLAP=0, TGO=T-TIG
036079,000323: 32,3572 77650 GOTO
Page 837 |
036081,000325: 32,3573 65476 INJTARG
036082,000326: 32,3574 72545 OLDTIME DLOAD SL1 # IF FLAP=1,TGO=2 TGO
036083,000327: 32,3575 03517 TGO
036084,000328: 32,3576 03502 STORE TGO1
036085,000329: 32,3577 77776 EXIT
036086,000330:
036087,000331: 32,3600 05364 TC PHASCHNG
036088,000332: 32,3601 04024 OCT 04024
036089,000333:
036090,000334: 32,3602 00006 EXTEND
036091,000335: 32,3603 31502 DCA TGO1
036092,000336: 32,3604 53517 DXCH TGO
036093,000337: 32,3605 13544 TCF UPTHROT1
036094,000338:
036095,000339: 32,3606 E7,1501 TGO1 = VGBODY
036096,000340:
036097,000341: # ************************************************************************
036098,000342:
036099,000343: 21,2110 BANK 21
036100,000344: 21,2000 SETLOC R11
036101,000345: 21,2000 BANK
036102,000346:
036103,000347: 21,2110 COUNT* $$/P70
036104,000348:
036105,000349: 21,2110 40774 LEGAL? CS MMNUMBER # IS THE DESIRED PGM ALREADY IN PROGRESS?
036106,000350: 21,2111 61010 AD MODREG
036107,000351: 21,2112 00006 EXTEND
036108,000352: 21,2113 12124 BZF ABORTALM
036109,000353:
036110,000354: 21,2114 40105 CS FLAGWRD9 # ARE THE ABORTS ENABLED?
036111,000355: 21,2115 74743 MASK LETABBIT
036112,000356: 21,2116 10000 CCS A
036113,000357: 21,2117 12124 TCF ABORTALM
036114,000358:
036115,000359: 21,2120 30103 CA FLAGWRD7 # IS SERVICER ON THE AIR?
036116,000360: 21,2121 74747 MASK AVEGFBIT
036117,000361: 21,2122 10000 CCS A
036118,000362: 21,2123 00002 TC Q # YES. ALL IS WELL.
036119,000363: 21,2124 04364 ABORTALM TC FALTON
036120,000364: 21,2125 04457 TC RELDSP
036121,000365: 21,2126 04635 TC POSTJUMP
036122,000366: 21,2127 21051 CADR PINBRNCH
036123,000367:
036124,000368: 32,3606 BANK 32
036125,000369: 32,2000 SETLOC ABORTS
036126,000370: 32,2000 BANK
036127,000371:
036128,000372: 32,3606 COUNT* $$/P70
036129,000373:
036130,000374: # ************************************************************************
036131,000375:
036132,000376: 32,3606 45234 TGOCOMP RTB DSU
Page 838 |
036134,000378: 32,3607 21574 LOADTIME
036135,000379: 32,3610 03442 TIG
036136,000380: 32,3611 77661 SL
036137,000381: 32,3612 20214 11D
036138,000382: 32,3613 03517 STORE TGO
036139,000383: 32,3614 77616 RVQ
036140,000384:
036141,000385: # ************************************************************************
036142,000386:
036143,000387: 32,3615 34737 THROTUP CAF BIT13
036144,000388: 32,3616 54055 TS THRUST
036145,000389: 32,3617 34750 CAF BIT4
036146,000390: 32,3620 00006 EXTEND
036147,000391: 32,3621 05014 WOR CHAN14
036148,000392: 32,3622 00002 TC Q
036149,000393:
036150,000394: # ************************************************************************
036151,000395:
036152,000396: 32,3623 00000 01750 10SECS 2DEC 1000 B-28
036153,000397:
036154,000398: 32,3625 00021 33400 HINJECT 2DEC 18288 B-24 # 60,000 FEET EXPRESSED IN METERS.
036155,000399:
036156,000400: 32,3627 11021 00000 (TGO)A 2DEC 37000 B-17
036157,000401:
036158,000402: 32,3631 00507 25605 K(AT) 2DEC .02 # SCALING CONSTANT
036159,000403:
036160,000404: 32,3633 02114 WHICHADR REMADR ABRTABLE
036161,000405:
036162,000406: # ************************************************************************
036163,000407:
036164,000408: 32,3634 E7,1515 EBANK= DVCNTR
036165,000409: 32,3634 03375 70067 ATMAGAD 2CADR ATMAG
End of include-file P70-P71.agc. Parent file is MAIN.agc