Source Code
These source-code files were transcribed from scans made from Don Eyles's personal
copy of Luminary 069. They were scanned at archive.org's Boston
facility, and the scanning was sponsored by Onno Hommes. The code was transcribed
from these scans by a team of volunteers who are referenced in the program
comments. Comments from the original source code are prefixed with a single '#' symbol,
whereas comments added later are prefixed by "##" or "###". In some cases, where
similar code blocks exist in previously-transcribed AGC programs (primarily
Luminary 99, from Apollo 11) those code blocks were used as a starting point and
then corrected to agree with the Luminary 69 scans. The full scans are available
at the Virtual AGC
project's collection at archive.org, while more-convenient reduced-size (but reduced-quality)
images are available at
the main Virtual AGC website. Report any errors noted by creating an
issue report at the Virtual AGC
project's GitHub repository. Notations on the program listing read, in part:GAP: ASSEMBLE REVISION 069 OF AGC PROGRAM LUMINARY BY NASA 2021112-011 19:02 NOV. 25,1968Note that the date is the date of the printout, not the date of the program revision. |
034699,000002: ## Copyright: Public domain.
034700,000003: ## Filename: THE_LUNAR_LANDING.agc
034701,000004: ## Purpose: The main source file for Luminary revision 069.
034702,000005: ## It is part of the source code for the original release
034703,000006: ## of the flight software for the Lunar Module's (LM) Apollo
034704,000007: ## Guidance Computer (AGC) for Apollo 10. The actual flown
034705,000008: ## version was Luminary 69 revision 2, which included a
034706,000009: ## newer lunar gravity model and only affected module 2.
034707,000010: ## This file is intended to be a faithful transcription, except
034708,000011: ## that the code format has been changed to conform to the
034709,000012: ## requirements of the yaYUL assembler rather than the
034710,000013: ## original YUL assembler.
034711,000014: ## Reference: pp. 789-796
034712,000015: ## Assembler: yaYUL
034713,000016: ## Contact: Ron Burkey <info@sandroid.org>.
034714,000017: ## Website: www.ibiblio.org/apollo/index.html
034715,000018: ## Mod history: 2016-12-13 MAS Created from Luminary 99.
034716,000019: ## 2016-12-18 MAS Updated from comment-proofed Luminary 99 version.
034717,000020: ## 2017-01-09 RRB Updated for Luminary 69.
034718,000021: ## 2017-01-23 HG Fix interpretive sequence SET VLOAD -> SET CLEAR
034719,000022: ## APSFLAG APSFLAG
034720,000023: ## RN SWANDISP
034721,000024: ## Add missing interpretive sequence SET VLOAD
034722,000025: ## LRBYPASS
034723,000026: ## RN
034724,000027: ## Fix operator TS -> DXCH
034725,000028: ## Fix value for GUIDDURN +66440 -> +65164
034726,000029: ## 2017-01-28 RSB Proofed comment text using octopus/prooferComments
034727,000030: ## and fixed errors found.
034728,000031: ## 2017-03-16 RSB Comment-text fixes identified in 5-way
034729,000032: ## side-by-side diff of Luminary 69/99/116/131/210.
034730,000033:
Page 789 |
034732,000035: 32,2772 BANK 32
034733,000036: 32,2000 SETLOC F2DPS*32
034734,000037: 32,2000 BANK
034735,000038:
034736,000039: 32,2772 E7,1617 EBANK= E2DPS
034737,000040:
034738,000041: # ****************************************
034739,000042: # P63: THE LUNAR LANDING, BRAKING PHASE
034740,000043: # ****************************************
034741,000044:
034742,000045: 32,2772 COUNT* $$/P63
034743,000046:
034744,000047: 32,2772 05353 P63LM TC PHASCHNG
034745,000048: 32,2773 04024 OCT 04024
034746,000049:
034747,000050: 32,2774 04616 TC BANKCALL # DO IMU STATUS CHECK ROUTINE R02
034748,000051: 32,2775 11175 CADR R02BOTH
034749,000052:
034750,000053: 32,2776 33246 CAF P63ADRES # INITIALIZE WHICH FOR BURNBABY
034751,000054: 32,2777 55453 TS WHICH
034752,000055:
034753,000056: 32,3000 32010 CAF DPSTHRSH # INITIALIZE DVMON
034754,000057: 32,3001 55251 TS DVTHRUSH
034755,000058: 32,3002 34751 CAF FOUR
034756,000059: 32,3003 55513 TS DVCNTR
034757,000060:
034758,000061: 32,3004 44753 CS ONE # INITIALIZE WCHPHASE AND FLPASSO
034759,000062: 32,3005 22007 ZL # FOR IGNITION ALGORITHM
034760,000063: 32,3006 53621 DXCH WCHPHASE
034761,000064:
034762,000065:
034763,000066: 32,3007 44736 CS BIT14
034764,000067: 32,3010 00006 EXTEND
034765,000068: 32,3011 03012 WAND CHAN12 # REMOVE TRACK-ENABLE DISCRETE.
034766,000069:
034767,000070: 32,3012 06036 FLAGORGY TC INTPRET # DIONYSIAN FLAG WAVING
034768,000071: 32,3013 43014 CLEAR CLEAR
034769,000072: 32,3014 02663 NOTHROTL
034770,000073: 32,3015 03271 REDFLAG
034771,000074: 32,3016 43014 CLEAR SET
034772,000075: 32,3017 05660 LRBYPASS
034773,000076: 32,3020 03067 MUNFLAG
034774,000077: 32,3021 43014 CLEAR CLEAR
034775,000078: 32,3022 00266 P25FLAG # TERMINATE P25 IF IT IS RUNNING.
034776,000079: 32,3023 00270 RNDVZFLG # TERMINATE P20 IF IT IS RUNNING
034777,000080:
034778,000081: # ****************************************
034779,000082:
034780,000083: 32,3024 77201 IGNALG SETPD VLOAD # FIRST SET UP INPUTS FOR RP-TO-R:-
034781,000084: 32,3025 00001 0 # AT 0D LANDING SITE IN MOON FIXED FRAME
034782,000085: 32,3026 02023 RLS # AT 6D ESTIMATED TIME OF LANDING
Page 790 |
034784,000087: 32,3027 41525 PDDL PUSH # MPAC NON-ZERO TO INDICATE LUNAR CASE
034785,000088: 32,3030 02401 TLAND
034786,000089: 32,3031 37623 STCALL TPIP # ALSO SET TPIP FOR FIRST GUIDANCE PASS
034787,000090: 32,3032 51504 RP-TO-R
034788,000091: 32,3033 64312 VSL4 MXV
034789,000092: 32,3034 01734 REFSMMAT
034790,000093: 32,3035 37633 STCALL LAND
034791,000094: 32,3036 60264 GUIDINIT # GUIDINIT INITIALIZES WM AND /LAND/
034792,000095: 32,3037 45345 DLOAD DSU
034793,000096: 32,3040 02401 TLAND
034794,000097: 32,3041 25254 GUIDDURN
034795,000098: 32,3042 34041 STCALL TDEC1 # INTEGRATE STATE FORWARD TO THAT TIME
034796,000099: 32,3043 27057 LEMPREC
034797,000100: 32,3044 77331 SSP VLOAD
034798,000101: 32,3045 03645 NIGNLOOP
034799,000102: 32,3046 00050 40D
034800,000103: 32,3047 06422 UNITX
034801,000104: 32,3050 26510 STOVL CG
034802,000105: 32,3051 06420 UNITY
034803,000106: 32,3052 26516 STOVL CG +6
034804,000107: 32,3053 06416 UNITZ
034805,000108: 32,3054 16524 STODL CG +14
034806,000109: 32,3055 25252 99999CON
034807,000110: 32,3056 27663 STOVL DELTAH # INITIALIZE DELTAH FOR V16N68 DISPLAY
034808,000111: 32,3057 06424 ZEROVECS
034809,000112: 32,3060 17252 STODL UNFC/2 # INITIALIZE TRIM VELOCITY CORRECTION TERM
034810,000113: 32,3061 06424 HI6ZEROS
034811,000114: 32,3062 03641 STORE TTF/8
034812,000115:
034813,000116: 32,3063 77745 IGNALOOP DLOAD
034814,000117: 32,3064 00015 TAT
034815,000118: 32,3065 27557 STOVL PIPTIME1
034816,000119: 32,3066 00017 RATT1
034817,000120: 32,3067 64312 VSL4 MXV
034818,000121: 32,3070 01734 REFSMMAT
034819,000122: 32,3071 37517 STCALL R
034820,000123: 32,3072 67162 MUNGRAV
034821,000124: 32,3073 35237 STCALL GDT/2
034822,000125: 32,3074 62514 ?GUIDSUB # WHICH DELIVERS N PASSES OF GUIDANCE
034823,000126:
034824,000127: # DDUMCALC IS PROGRAMMED AS FOLLOWS:-
034825,000128: # 2 -
034826,000129: # (RIGNZ - RGU )/16 + 16(RGU )KIGNY/B8 + (RGU - RIGNX)KIGNX/B4 + (ABVAL(VGU) - VIGN)KIGNV/B4
034827,000130: # 2 1 0
034828,000131: # DDUM = -------------------------------------------------------------------------------------------
034829,000132: # 10
034830,000133: # 2 (VGU - 16 VGU KIGNX/B4)
034831,000134: # 2 0
Page 791 |
034833,000136: # THE NUMERATOR IS SCALED IN METERS AT 2(28). THE DENOMINATOR IS A VELOCITY IN UNITS OF 2(10) M/CS.
034834,000137: # THE QUOTIENT IS THUS A TIME IN UNITS OF 2(18) CENTISECONDS. THE FINAL SHIFT RESCALES TO UNITS OF 2(28) CS.
034835,000138: # THERE IS NO DAMPING FACTOR. THE CONSTANTS KIGNX/B4, KIGNY/B8 AND KIGNV/B4 ARE ALL NEGATIVE IN SIGN.
034836,000139:
034837,000140: 32,3075 55644 DDUMCALC TS NIGNLOOP
034838,000141: 32,3076 06036 TC INTPRET
034839,000142: 32,3077 57345 DLOAD DMPR # FORM DENOMINATOR FIRST
034840,000143: 32,3100 03625 VGU
034841,000144: 32,3101 02471 KIGNX/B4
034842,000145: 32,3102 44232 SL4R BDSU
034843,000146: 32,3103 03631 VGU +4
034844,000147: 32,3104 45325 PDDL DSU
034845,000148: 32,3105 02467 RIGNZ
034846,000149: 32,3106 02550 RGU +4
034847,000150: 32,3107 65222 SR4R PDDL
034848,000151: 32,3110 02546 RGU +2
034849,000152: 32,3111 57316 DSQ DMPR
034850,000153: 32,3112 02473 KIGNY/B8
034851,000154: 32,3113 65232 SL4R PDDL
034852,000155: 32,3114 02544 RGU
034853,000156: 32,3115 57225 DSU DMPR
034854,000157: 32,3116 02465 RIGNX
034855,000158: 32,3117 02471 KIGNX/B4
034856,000159: 32,3120 51515 PDVL ABVAL
034857,000160: 32,3121 03625 VGU
034858,000161: 32,3122 57225 DSU DMPR
034859,000162: 32,3123 02463 VIGN
034860,000163: 32,3124 02475 KIGNV/B4
034861,000164: 32,3125 43215 DAD DAD
034862,000165: 32,3126 56215 DAD DDV
034863,000166: 32,3127 77661 SRR
034864,000167: 32,3130 21613 10D
034865,000168:
034866,000169: 32,3131 43206 PUSH DAD
034867,000170: 32,3132 03557 PIPTIME1
034868,000171: 32,3133 14041 STODL TDEC1 # STORE NEW GUESS FOR NEXT INTEGRATION
034869,000172: 32,3134 45246 ABS DSU
034870,000173: 32,3135 25256 DDUMCRIT
034871,000174: 32,3136 45040 BMN CALL
034872,000175: 32,3137 65156 DDUMGOOD
034873,000176: 32,3140 27412 INTSTALL
034874,000177: 32,3141 43014 SET SET
034875,000178: 32,3142 01473 INTYPFLG
034876,000179: 32,3143 00063 MOONFLAG
034877,000180: 32,3144 77745 DLOAD
034878,000181: 32,3145 03557 PIPTIME1
034879,000182: 32,3146 25517 STOVL TET # HOPEFULLY ?GUIDSUB DID NOT
034880,000183: 32,3147 00017 RATT1 # CLOBBER RATT1 AND VATT1
034881,000184: 32,3150 25535 STOVL RCV
034882,000185: 32,3151 00025 VATT1
Page 792 |
034884,000187: 32,3152 35543 STCALL VCV
034885,000188: 32,3153 27107 INTEGRVS
034886,000189: 32,3154 77650 GOTO
034887,000190: 32,3155 65063 IGNALOOP
034888,000191:
034889,000192: 32,3156 54335 DDUMGOOD SLOAD SR
034890,000193: 32,3157 03425 ZOOMTIME
034891,000194: 32,3160 20617 14D
034892,000195: 32,3161 77621 BDSU
034893,000196: 32,3162 00041 TDEC1
034894,000197: 32,3163 27440 STOVL TIG # COMPUTE DISTANCE LANDING SITE WILL BE
034895,000198: 32,3164 03525 V # OUT OF LM'S ORBITAL PLANE AT IGNITION:
034896,000199: 32,3165 53435 VXV UNIT # SIGN IS + IF LANDING SITE IS TO THE
034897,000200: 32,3166 03517 R # RIGHT, NORTH; - IF TO THE LEFT, SOUTH.
034898,000201: 32,3167 72441 DOT SL1
034899,000202: 32,3170 03633 LAND
034900,000203: 32,3171 26534 R60INIT STOVL OUTOFPLN # INITIALIZATION FOR CALCMANU
034901,000204: 32,3172 03252 UNFC/2
034902,000205: 32,3173 02536 STORE R60VSAVE # STORE UNFC/2 TEMPORARILY IN R60SAVE
034903,000206: 32,3174 77776 EXIT
034904,000207: # ****************************************
034905,000208:
034906,000209: 32,3175 05353 IGNALGRT TC PHASCHNG # PREVENT REPEATING IGNALG
034907,000210: 32,3176 04024 OCT 04024
034908,000211:
034909,000212: 32,3177 43247 ASTNCLOK CS ASTNDEX
034910,000213: 32,3200 04616 TC BANKCALL
034911,000214: 32,3201 74667 CADR STCLOK2
034912,000215: 32,3202 15155 TCF ENDOFJOB # RETURN IN NEW JOB AND IN EBANK FIVE
034913,000216:
034914,000217: 32,3203 06036 ASTNRET TC INTPRET
034915,000218: 32,3204 47131 SSP RTB # GO PICK UP DISPLAY AT END OF R51:
034916,000219: 32,3205 02747 QMAJ # "PROCEED" WILL DO A FINE ALIGNMENT
034917,000220: 32,3206 65210 FCADR P63SPOT2 # "ENTER" WILL RETURN TO P63SPOT2
034918,000221: 32,3207 30776 R51P63
034919,000222: 32,3210 53575 P63SPOT2 VLOAD UNIT # INITIALIZE KALCMANU FOR BURN ATTITUDE
034920,000223: 32,3211 02536 R60VSAVE
034921,000224: 32,3212 27767 STOVL POINTVSM
034922,000225: 32,3213 06422 UNITX
034923,000226: 32,3214 03761 STORE SCAXIS
034924,000227: 32,3215 77776 EXIT
034925,000228:
034926,000229: 32,3216 35016 CAF EBANK7
034927,000230: 32,3217 54003 TS EBANK
034928,000231:
034929,000232: 32,3220 00004 INHINT
034930,000233: 32,3221 04674 TC IBNKCALL
034931,000234: 32,3222 40142 CADR PFLITEDB
034932,000235: 32,3223 00003 RELINT
034933,000236:
Page 793 |
034935,000238: 32,3224 04616 TC BANKCALL
034936,000239: 32,3225 54101 CADR R60LEM
034937,000240:
034938,000241: 32,3226 05353 TC PHASCHNG # PREVENT RECALLING R60
034939,000242: 32,3227 04024 OCT 04024
034940,000243:
034941,000244: 32,3230 34746 P63SPOT3 CA BIT6 # IS THE LR ANTENNA IN POSITION 1 YET
034942,000245: 32,3231 00006 EXTEND
034943,000246: 32,3232 02033 RAND CHAN33
034944,000247: 32,3233 00006 EXTEND
034945,000248: 32,3234 13242 BZF P63SPOT4 # BRANCH IF ANTENNA ALREADY IN POSITION 1
034946,000249:
034947,000250: 32,3235 33250 CAF CODE500 # ASTRONAUT: PLEASE CRANK THE
034948,000251: 32,3236 04616 TC BANKCALL # SILLY THING AROUND
034949,000252: 32,3237 20476 CADR GOPERF1
034950,000253: 32,3240 16001 TCF GOTOPOOH # TERMINATE
034951,000254: 32,3241 13230 TCF P63SPOT3 # PROCEED SEE IF HE'S LYING
034952,000255:
034953,000256: 32,3242 04616 P63SPOT4 TC BANKCALL # ENTER INITIALIZE LANDING RADAR
034954,000257: 32,3243 67704 CADR SETPOS1
034955,000258:
034956,000259: 32,3244 04635 TC POSTJUMP # OFF TO SEE THE WIZARD ...
034957,000260: 32,3245 74124 CADR BURNBABY
034958,000261:
034959,000262: # ----------------------------------------
034960,000263:
034961,000264: # CONSTANTS FOR P63LM AND IGNALG
034962,000265:
034963,000266: 32,3246 02074 P63ADRES GENADR P63TABLE
034964,000267:
034965,000268: 32,3247 00027 ASTNDEX OCT 00027 # INDEX FOR CLOKTASK
034966,000269:
034967,000270: 32,3250 00500 CODE500 OCT 00500
034968,000271:
034969,000272: 32,3251 00035 30373 99999CON 2DEC 30479.7 B-24
034970,000273:
034971,000274: 32,3253 00003 37214 GUIDDURN 2DEC +65164 B-28
034972,000275: 32,3255 00000 00010 DDUMCRIT 2DEC +8 B-28 # CRITERION FOR IGNALG CONVERGENCE
034973,000276:
Page 794 |
034975,000278: # ----------------------------------------
034976,000279:
Page 795 |
034978,000281: # ****************************************
034979,000282: # P68: LANDING CONFIRMATION
034980,000283: # ****************************************
034981,000284:
034982,000285: 31,2172 BANK 31
034983,000286: 31,2000 SETLOC F2DPS*31
034984,000287: 31,2000 BANK
034985,000288:
034986,000289: 31,2172 COUNT* $$/P6567
034987,000290:
034988,000291: 31,2172 05353 LANDJUNK TC PHASCHNG
034989,000292: 31,2173 04024 OCT 04024
034990,000293:
034991,000294: 31,2174 00004 INHINT
034992,000295: 31,2175 04616 TC BANKCALL # ZERO ATTITUDE ERROR
034993,000296: 31,2176 40153 CADR ZATTEROR
034994,000297:
034995,000298: 31,2177 04616 TC BANKCALL # SET 5 DEGREE DEADBAND
034996,000299: 31,2200 40127 CADR SETMAXDB
034997,000300:
034998,000301: 31,2201 06036 TC INTPRET # TO INTERPRETIVE AS TIME IS NOT CRITICAL
034999,000302: 31,2202 43014 SET CLEAR
035000,000303: 31,2203 04067 SURFFLAG
035001,000304: 31,2204 04666 LETABORT
035002,000305: 31,2205 43014 SET CLEAR
035003,000306: 31,2206 05062 APSFLAG
035004,000307: 31,2207 03664 SWANDISP
035005,000308: 31,2210 77214 SET VLOAD
035006,000309: 31,2211 05460 LRBYPASS
035007,000310: 31,2212 01221 RN
035008,000311: 31,2213 16032 STODL ALPHAV
035009,000312: 31,2214 01235 PIPTIME
035010,000313: 31,2215 45014 SET CALL
035011,000314: 31,2216 01463 LUNAFLAG
035012,000315: 31,2217 26351 LAT-LONG
035013,000316: 31,2220 77201 SETPD VLOAD # COMPUTE RLS AND STORE IT AWAY
035014,000317: 31,2221 00001 0
035015,000318: 31,2222 01221 RN
035016,000319: 31,2223 65352 VSL2 PDDL
035017,000320: 31,2224 01235 PIPTIME
035018,000321: 31,2225 45006 PUSH CALL
035019,000322: 31,2226 51531 R-TO-RP
035020,000323: 31,2227 02023 STORE RLS
035021,000324: 31,2230 77776 EXIT
035022,000325: 31,2231 32246 CAF V06N43* # ASTRONAUT: NOW LOOK WHERE YOU ENDED UP
035023,000326: 31,2232 04616 TC BANKCALL
035024,000327: 31,2233 20351 CADR GOFLASH
035025,000328: 31,2234 16001 TCF GOTOPOOH # TERMINATE
035026,000329: 31,2235 12237 TCF +2 # PROCEED
035027,000330: 31,2236 12231 TCF -5 # RECYCLE
035028,000331:
Page 796 |
035030,000333: 31,2237 06036 TC INTPRET
035031,000334: 31,2240 77775 VLOAD # INITIALIZE GSAV AND (USING REFMF)
035032,000335: 31,2241 06422 UNITX # YNBSAV, ZNBSAV AND ATTFLAG FOR P57
035033,000336: 31,2242 36235 STCALL GSAV
035034,000337: 31,2243 33470 REFMF
035035,000338: 31,2244 77776 EXIT
035036,000339:
035037,000340: 31,2245 16001 TCF GOTOPOOH # ASTRONAUT: PLEASE SELECT P57
035038,000341:
035039,000342: 31,2246 01453 V06N43* VN 0643
035040,000343:
End of include-file THE_LUNAR_LANDING.agc. Parent file is MAIN.agc