Source Code
These source-code files were from the printout at the MIT Museum, with many thanks
to Deborah Douglas, the Museum's Curator of Science and Technology, for releasing
it to us. The printout was digitally photographed by Paul Fjeld. A team of
volunteers transcribed the source code manually from these images or, where
appropriate, modified already-transcribed but similar source Luminary 131 (Apollo 13)
source code to agree with the images from the printout. Note that the page images
presented online are of reduced quality, and that higher-quality images
are available. Report any conversion errors or legibility
problems in page images to info@sandroid.org.
Notations on the program listing read, in part:GAP: ASSEMBLE REVISION 001 OF AGC PROGRAM LMY99 BY NASA 2021112-061 16:27 JULY 14,1969Note that the date is the date of the printout, not the date of the program revision. |
034100,000002: ## Copyright: Public domain.
034101,000003: ## Filename: THE_LUNAR_LANDING.agc
034102,000004: ## Purpose: Part of the source code for Luminary 1A build 099.
034103,000005: ## It is part of the source code for the Lunar Module's (LM)
034104,000006: ## Apollo Guidance Computer (AGC), for Apollo 11.
034105,000007: ## Assembler: yaYUL
034106,000008: ## Contact: Hartmuth Gutsche<hgutsche@xplornet.com>.
034107,000009: ## Website: www.ibiblio.org/apollo.
034108,000010: ## Pages: 785-792
034109,000011: ## Mod history: 2009-05-20 HG Transcribed from page images.
034110,000012: ## 2016-12-13 RSB GOTOP00H -> GOTOPOOH
034111,000013: ## 2016-12-16 RSB Proofed text comments with octopus/ProoferComments
034112,000014: ## and corrected the errors found.
034113,000015: ## 2017-03-13 RSB Comment-text fixes noted in proofing Luminary 116.
034114,000016: ## 2017-03-16 RSB Comment-text fixes identified in 5-way
034115,000017: ## side-by-side diff of Luminary 69/99/116/131/210.
034116,000018:
034117,000019: ## This source code has been transcribed or otherwise adapted from
034118,000020: ## digitized images of a hardcopy from the MIT Museum. The digitization
034119,000021: ## was performed by Paul Fjeld, and arranged for by Deborah Douglas of
034120,000022: ## the Museum. Many thanks to both. The images (with suitable reduction
034121,000023: ## in storage size and consequent reduction in image quality as well) are
034122,000024: ## available online at www.ibiblio.org/apollo. If for some reason you
034123,000025: ## find that the images are illegible, contact me at info@sandroid.org
034124,000026: ## about getting access to the (much) higher-quality images which Paul
034125,000027: ## actually created.
034126,000028: ##
034127,000029: ## Notations on the hardcopy document read, in part:
034128,000030: ##
034129,000031: ## Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
034130,000032: ## 16:27 JULY 14, 1969
034131,000033:
Page 785 |
034133,000035: 32,2776 BANK 32
034134,000036: 32,2000 SETLOC F2DPS*32
034135,000037: 32,2000 BANK
034136,000038:
034137,000039: 32,2776 E7,1621 EBANK= E2DPS
034138,000040:
034139,000041: # ****************************************
034140,000042: # P63: THE LUNAR LANDING, BRAKING PHASE
034141,000043: # ****************************************
034142,000044:
034143,000045: 32,2776 COUNT* $$/P63
034144,000046:
034145,000047: 32,2776 05353 P63LM TC PHASCHNG
034146,000048: 32,2777 04024 OCT 04024
034147,000049:
034148,000050: 32,3000 04616 TC BANKCALL # DO IMU STATUS CHECK ROUTINE R02
034149,000051: 32,3001 11254 CADR R02BOTH
034150,000052:
034151,000053: 32,3002 33253 CAF P63ADRES # INITIALIZE WHICH FOR BURNBABY
034152,000054: 32,3003 55455 TS WHICH
034153,000055:
034154,000056: 32,3004 32000 CAF DPSTHRSH # INITIALIZE DVMON
034155,000057: 32,3005 55251 TS DVTHRUSH
034156,000058: 32,3006 34751 CAF FOUR
034157,000059: 32,3007 55515 TS DVCNTR
034158,000060:
034159,000061: 32,3010 44753 CS ONE # INITIALIZE WCHPHASE AND FLPASSO
034160,000062: 32,3011 55351 TS WCHPHASE
034161,000063:
034162,000064: 32,3012 34755 CA ZERO
034163,000065: 32,3013 55623 TS FLPASS0
034164,000066:
034165,000067: 32,3014 44736 CS BIT14
034166,000068: 32,3015 00006 EXTEND
034167,000069: 32,3016 03012 WAND CHAN12 # REMOVE TRACK-ENABLE DISCRETE.
034168,000070:
034169,000071: 32,3017 06037 FLAGORGY TC INTPRET # DIONYSIAN FLAG WAVING
034170,000072: 32,3020 43014 CLEAR CLEAR
034171,000073: 32,3021 02663 NOTHROTL
034172,000074: 32,3022 03271 REDFLAG
034173,000075: 32,3023 43014 CLEAR SET
034174,000076: 32,3024 05660 LRBYPASS
034175,000077: 32,3025 03067 MUNFLAG
034176,000078: 32,3026 43014 CLEAR CLEAR
034177,000079: 32,3027 00266 P25FLAG # TERMINATE P25 IF IT IS RUNNING.
034178,000080: 32,3030 00270 RNDVZFLG # TERMINATE P20 IF IT IS RUNNING
034179,000081:
034180,000082: # ****************************************
034181,000083:
034182,000084: 32,3031 77201 IGNALG SETPD VLOAD # FIRST SET UP INPUTS FOR RP-TO-R:-
Page 786 |
034184,000086: 32,3032 00001 0 # AT 0D LANDING SITE IN MOON FIXED FRAME
034185,000087: 32,3033 02023 RLS # AT 6D ESTIMATED TIME OF LANDING
034186,000088: 32,3034 41525 PDDL PUSH # MPAC NON-ZERO TO INDICATE LUNAR CASE
034187,000089: 32,3035 02401 TLAND
034188,000090: 32,3036 37625 STCALL TPIP # ALSO SET TPIP FOR FIRST GUIDANCE PASS
034189,000091: 32,3037 55716 RP-TO-R
034190,000092: 32,3040 64312 VSL4 MXV
034191,000093: 32,3041 01734 REFSMMAT
034192,000094: 32,3042 37635 STCALL LAND
034193,000095: 32,3043 46432 GUIDINIT # GUIDINIT INITIALIZES WM AND /LAND/
034194,000096: 32,3044 45345 DLOAD DSU
034195,000097: 32,3045 02401 TLAND
034196,000098: 32,3046 25260 GUIDDURN
034197,000099: 32,3047 34041 STCALL TDEC1 # INTEGRATE STATE FORWARD TO THAT TIME
034198,000100: 32,3050 27057 LEMPREC
034199,000101: 32,3051 77331 SSP VLOAD
034200,000102: 32,3052 03647 NIGNLOOP
034201,000103: 32,3053 00050 40D
034202,000104: 32,3054 06520 UNITX
034203,000105: 32,3055 26603 STOVL CG
034204,000106: 32,3056 06516 UNITY
034205,000107: 32,3057 26611 STOVL CG +6
034206,000108: 32,3060 06514 UNITZ
034207,000109: 32,3061 16617 STODL CG +14
034208,000110: 32,3062 25256 99999CON
034209,000111: 32,3063 27665 STOVL DELTAH # INITIALIZE DELTAH FOR V16N68 DISPLAY
034210,000112: 32,3064 06522 ZEROVECS
034211,000113: 32,3065 17254 STODL UNFC/2 # INITIALIZE TRIM VELOCITY CORRECTION TERM
034212,000114: 32,3066 06522 HI6ZEROS
034213,000115: 32,3067 03643 STORE TTF/8
034214,000116:
034215,000117: 32,3070 77745 IGNALOOP DLOAD
034216,000118: 32,3071 00015 TAT
034217,000119: 32,3072 27561 STOVL PIPTIME1
034218,000120: 32,3073 00017 RATT1
034219,000121: 32,3074 64312 VSL4 MXV
034220,000122: 32,3075 01734 REFSMMAT
034221,000123: 32,3076 37521 STCALL R
034222,000124: 32,3077 67130 MUNGRAV
034223,000125: 32,3100 35237 STCALL GDT/2
034224,000126: 32,3101 62454 ?GUIDSUB # WHICH DELIVERS N PASSES OF GUIDANCE
034225,000127:
034226,000128: # DDUMCALC IS PROGRAMMED AS FOLLOWS:-
034227,000129: # 2 -
034228,000130: # (RIGNZ - RGU )/16 + 16(RGU )KIGNY/B8 + (RGU - RIGNX)KIGNX/B4 + (ABVAL(VGU) - VIGN)KIGNV/B4
034229,000131: # 2 1 0
034230,000132: # DDUM = -------------------------------------------------------------------------------------------
034231,000133: # 10
034232,000134: # 2 (VGU - 16 VGU KIGNX/B4)
Page 787 |
034234,000136: # 2 0
034235,000137: # THE NUMERATOR IS SCALED IN METERS AT 2(28). THE DENOMINATOR IS A VELOCITY IN UNITS OF 2(10) M/CS.
034236,000138: # THE QUOTIENT IS THUS A TIME IN UNITS OF 2(18) CENTISECONDS. THE FINAL SHIFT RESCALES TO UNITS OF 2(28) CS.
034237,000139: # THERE IS NO DAMPING FACTOR. THE CONSTANTS KIGNX/B4, KIGNY/B8 AND KIGNV/B4 ARE ALL NEGATIVE IN SIGN.
034238,000140:
034239,000141: 32,3102 55646 DDUMCALC TS NIGNLOOP
034240,000142: 32,3103 06037 TC INTPRET
034241,000143: 32,3104 57345 DLOAD DMPR # FORM DENOMINATOR FIRST
034242,000144: 32,3105 03627 VGU
034243,000145: 32,3106 02501 KIGNX/B4
034244,000146: 32,3107 44232 SL4R BDSU
034245,000147: 32,3110 03633 VGU +4
034246,000148: 32,3111 45325 PDDL DSU
034247,000149: 32,3112 02477 RIGNZ
034248,000150: 32,3113 02643 RGU +4
034249,000151: 32,3114 65222 SR4R PDDL
034250,000152: 32,3115 02641 RGU +2
034251,000153: 32,3116 57316 DSQ DMPR
034252,000154: 32,3117 02503 KIGNY/B8
034253,000155: 32,3120 65232 SL4R PDDL
034254,000156: 32,3121 02637 RGU
034255,000157: 32,3122 57225 DSU DMPR
034256,000158: 32,3123 02475 RIGNX
034257,000159: 32,3124 02501 KIGNX/B4
034258,000160: 32,3125 51515 PDVL ABVAL
034259,000161: 32,3126 03627 VGU
034260,000162: 32,3127 57225 DSU DMPR
034261,000163: 32,3130 02473 VIGN
034262,000164: 32,3131 02505 KIGNV/B4
034263,000165: 32,3132 43215 DAD DAD
034264,000166: 32,3133 56215 DAD DDV
034265,000167: 32,3134 77661 SRR
034266,000168: 32,3135 21613 10D
034267,000169:
034268,000170: 32,3136 43206 PUSH DAD
034269,000171: 32,3137 03561 PIPTIME1
034270,000172: 32,3140 14041 STODL TDEC1 # STORE NEW GUESS FOR NEXT INTEGRATION
034271,000173: 32,3141 45246 ABS DSU
034272,000174: 32,3142 25262 DDUMCRIT
034273,000175: 32,3143 45040 BMN CALL
034274,000176: 32,3144 65163 DDUMGOOD
034275,000177: 32,3145 27414 INTSTALL
034276,000178: 32,3146 43014 SET SET
034277,000179: 32,3147 01473 INTYPFLG
034278,000180: 32,3150 00063 MOONFLAG
034279,000181: 32,3151 77745 DLOAD
034280,000182: 32,3152 03561 PIPTIME1
034281,000183: 32,3153 25517 STOVL TET # HOPEFULLY ?GUIDSUB DID NOT
034282,000184: 32,3154 00017 RATT1 # CLOBBER RATT1 AND VATT1
Page 788 |
034284,000186: 32,3155 25535 STOVL RCV
034285,000187: 32,3156 00025 VATT1
034286,000188: 32,3157 35543 STCALL VCV
034287,000189: 32,3160 27107 INTEGRVS
034288,000190: 32,3161 77650 GOTO
034289,000191: 32,3162 65070 IGNALOOP
034290,000192:
034291,000193: 32,3163 54335 DDUMGOOD SLOAD SR
034292,000194: 32,3164 03423 ZOOMTIME
034293,000195: 32,3165 20617 14D
034294,000196: 32,3166 77621 BDSU
034295,000197: 32,3167 00041 TDEC1
034296,000198: 32,3170 27442 STOVL TIG # COMPUTE DISTANCE LANDING SITE WILL BE
034297,000199: 32,3171 03527 V # OUT OF LM'S ORBITAL PLANE AT IGNITION:
034298,000200: 32,3172 53435 VXV UNIT # SIGN IS + IF LANDING SITE IS TO THE
034299,000201: 32,3173 03521 R # RIGHT, NORTH; - IF TO THE LEFT, SOUTH.
034300,000202: 32,3174 72441 DOT SL1
034301,000203: 32,3175 03635 LAND
034302,000204: 32,3176 26627 R60INIT STOVL OUTOFPLN # INITIALIZATION FOR CALCMANU
034303,000205: 32,3177 03254 UNFC/2
034304,000206: 32,3200 02631 STORE R60VSAVE # STORE UNFC/2 TEMPORARILY IN R60SAVE
034305,000207: 32,3201 77776 EXIT
034306,000208: # ****************************************
034307,000209:
034308,000210: 32,3202 05353 IGNALGRT TC PHASCHNG # PREVENT REPEATING IGNALG
034309,000211: 32,3203 04024 OCT 04024
034310,000212:
034311,000213: 32,3204 44362 ASTNCLOK CS ASTNDEX
034312,000214: 32,3205 04616 TC BANKCALL
034313,000215: 32,3206 74664 CADR STCLOK2
034314,000216: 32,3207 15155 TCF ENDOFJOB # RETURN IN NEW JOB AND IN EBANK FIVE
034315,000217:
034316,000218: 32,3210 06037 ASTNRET TC INTPRET
034317,000219: 32,3211 47131 SSP RTB # GO PICK UP DISPLAY AT END OF R51:
034318,000220: 32,3212 02747 QMAJ # "PROCEED" WILL DO A FINE ALIGNMENT
034319,000221: 32,3213 65215 FCADR P63SPOT2 # "ENTER" WILL RETURN TO P63SPOT2
034320,000222: 32,3214 31135 R51P63
034321,000223: 32,3215 53575 P63SPOT2 VLOAD UNIT # INITIALIZE KALCMANU FOR BURN ATTITUDE
034322,000224: 32,3216 02631 R60VSAVE
034323,000225: 32,3217 27773 STOVL POINTVSM
034324,000226: 32,3220 06520 UNITX
034325,000227: 32,3221 03765 STORE SCAXIS
034326,000228: 32,3222 77776 EXIT
034327,000229:
034328,000230: 32,3223 35016 CAF EBANK7
034329,000231: 32,3224 54003 TS EBANK
034330,000232:
034331,000233: 32,3225 00004 INHINT
034332,000234: 32,3226 04674 TC IBNKCALL
034333,000235: 32,3227 40142 CADR PFLITEDB
Page 789 |
034335,000237: 32,3230 00003 RELINT
034336,000238:
034337,000239: 32,3231 04616 TC BANKCALL
034338,000240: 32,3232 54123 CADR R60LEM
034339,000241:
034340,000242: 32,3233 05353 TC PHASCHNG # PREVENT RECALLING R60
034341,000243: 32,3234 04024 OCT 04024
034342,000244:
034343,000245: 32,3235 34746 P63SPOT3 CA BIT6 # IS THE LR ANTENNA IN POSITION 1 YET
034344,000246: 32,3236 00006 EXTEND
034345,000247: 32,3237 02033 RAND CHAN33
034346,000248: 32,3240 00006 EXTEND
034347,000249: 32,3241 13247 BZF P63SPOT4 # BRANCH IF ANTENNA ALREADY IN POSITION 1
034348,000250:
034349,000251: 32,3242 33254 CAF CODE500 # ASTRONAUT: PLEASE CRANK THE
034350,000252: 32,3243 04616 TC BANKCALL # SILLY THING AROUND
034351,000253: 32,3244 20623 CADR GOPERF1
034352,000254: 32,3245 16001 TCF GOTOPOOH # TERMINATE
034353,000255: 32,3246 13235 TCF P63SPOT3 # PROCEED SEE IF HE'S LYING
034354,000256:
034355,000257: 32,3247 04616 P63SPOT4 TC BANKCALL # ENTER INITIALIZE LANDING RADAR
034356,000258: 32,3250 67721 CADR SETPOS1
034357,000259:
034358,000260: 32,3251 04635 TC POSTJUMP # OFF TO SEE THE WIZARD ...
034359,000261: 32,3252 74126 CADR BURNBABY
034360,000262:
034361,000263: # ----------------------------------------
034362,000264:
034363,000265: # CONSTANTS FOR P63LM AND IGNALG
034364,000266:
034365,000267: 32,3253 02076 P63ADRES GENADR P63TABLE
034366,000268:
034367,000269: 32,3254 4362 ASTNDEX = MD1 # OCT 25; INDEX FOR CLOKTASK
034368,000270:
034369,000271: 32,3254 00500 CODE500 OCT 00500
034370,000272:
034371,000273: 32,3255 00035 30373 99999CON 2DEC 30479.7 B-24
034372,000274:
034373,000275: 32,3257 00004 01610 GUIDDURN 2DEC +66440 B-28 # GUIDDURN +6.64400314 E+2
034374,000276: 32,3261 00000 00010 DDUMCRIT 2DEC +8 B-28 # CRITERION FOR IGNALG CONVERGENCE
034375,000277:
Page 790 |
034377,000279: # ----------------------------------------
034378,000280:
Page 791 |
034380,000282: # ****************************************
034381,000283: # P68: LANDING CONFIRMATION
034382,000284: # ****************************************
034383,000285:
034384,000286: 31,2144 BANK 31
034385,000287: 31,2000 SETLOC F2DPS*31
034386,000288: 31,2000 BANK
034387,000289:
034388,000290: 31,2144 COUNT* $$/P6567
034389,000291:
034390,000292: 31,2144 05353 LANDJUNK TC PHASCHNG
034391,000293: 31,2145 04024 OCT 04024
034392,000294:
034393,000295: 31,2146 00004 INHINT
034394,000296: 31,2147 04616 TC BANKCALL # ZERO ATTITUDE ERROR
034395,000297: 31,2150 40153 CADR ZATTEROR
034396,000298:
034397,000299: 31,2151 04616 TC BANKCALL # SET 5 DEGREE DEADBAND
034398,000300: 31,2152 40127 CADR SETMAXDB
034399,000301:
034400,000302: 31,2153 06037 TC INTPRET # TO INTERPRETIVE AS TIME IS NOT CRITICAL
034401,000303: 31,2154 43014 SET CLEAR
034402,000304: 31,2155 04067 SURFFLAG
034403,000305: 31,2156 04666 LETABORT
034404,000306: 31,2157 77214 SET VLOAD
034405,000307: 31,2160 05062 APSFLAG
034406,000308: 31,2161 01221 RN
034407,000309: 31,2162 16032 STODL ALPHAV
034408,000310: 31,2163 01235 PIPTIME
034409,000311: 31,2164 45014 SET CALL
034410,000312: 31,2165 01463 LUNAFLAG
034411,000313: 31,2166 26351 LAT-LONG
034412,000314: 31,2167 77201 SETPD VLOAD # COMPUTE RLS AND STORE IT AWAY
034413,000315: 31,2170 00001 0
034414,000316: 31,2171 01221 RN
034415,000317: 31,2172 65352 VSL2 PDDL
034416,000318: 31,2173 01235 PIPTIME
034417,000319: 31,2174 45006 PUSH CALL
034418,000320: 31,2175 51670 R-TO-RP
034419,000321: 31,2176 02023 STORE RLS
034420,000322: 31,2177 77776 EXIT
034421,000323: 31,2200 32215 CAF V06N43* # ASTRONAUT: NOW LOOK WHERE YOU ENDED UP
034422,000324: 31,2201 04616 TC BANKCALL
034423,000325: 31,2202 20476 CADR GOFLASH
034424,000326: 31,2203 16001 TCF GOTOPOOH # TERMINATE
034425,000327: 31,2204 12206 TCF +2 # PROCEED
034426,000328: 31,2205 12200 TCF -5 # RECYCLE
034427,000329:
034428,000330: 31,2206 06037 TC INTPRET
Page 792 |
034430,000332: 31,2207 77775 VLOAD # INITIALIZE GSAV AND (USING REFMF)
034431,000333: 31,2210 06520 UNITX # YNBSAV, ZNBSAV AND ATTFLAG FOR P57
034432,000334: 31,2211 36231 STCALL GSAV
034433,000335: 31,2212 33506 REFMF
034434,000336: 31,2213 77776 EXIT
034435,000337:
034436,000338: 31,2214 16001 TCF GOTOPOOH # ASTRONAUT: PLEASE SELECT P57
034437,000339:
034438,000340: 31,2215 01453 V06N43* VN 0643
034439,000341:
End of include-file THE_LUNAR_LANDING.agc. Parent file is MAIN.agc