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