Source Code

This is an attempt to recreate Luminary 99 Rev 2, otherwise known as LUM99R2, from Luminary 99 Rev 1 and ephemeris data from Luminary 116. The differences are confined to the last 10-12 lines of the CONTROLLED CONSTANTS. Luminary 99 Rev 1 source-code was transcribed from a printout in the MIT Museum, while Luminary 116 source code was transcribed from a printout belonging to Don Eyles. AGC developer James Kernan, the "rope mother" for the Apollo 11 Lunar Module's AGC, explains as follows: "At the last minute, Dan Lickly, our chief engineer, appeared with ephemerides updates and it took two tries to get it right. The result was that we created Lum99 Revision 1 and Lum99 Revision 2." It is suspected that the former is what's in the MIT Museum, and the latter is what we are trying to recreate here. As for which revision actually flew in Apollo 11, all of the other available surviving evidence points to Rev 1 rather than to Rev 2, so we're just not sure!

033468,000002:                                                                                                  ## Copyright:   Public domain.
033469,000003:                                                                                                  ## Filename:    THE_LUNAR_LANDING.agc
033470,000004:                                                                                                  ## Purpose:     Part of the source code for Luminary 1A build 099.
033471,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
033472,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 11.
033473,000007:                                                                                                  ## Assembler:   yaYUL
033474,000008:                                                                                                  ## Contact:     Hartmuth Gutsche<hgutsche@xplornet.com>.
033475,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo.
033476,000010:                                                                                                  ## Pages:       785-792
033477,000011:                                                                                                  ## Mod history: 2009-05-20 HG   Transcribed from page images.
033478,000012:                                                                                                  ##              2016-12-13 RSB  GOTOP00H -> GOTOPOOH
033479,000013:                                                                                                  ##              2016-12-16 RSB  Proofed text comments with octopus/ProoferComments
033480,000014:                                                                                                  ##                              and corrected the errors found.
033481,000015:                                                                                                  ##              2017-03-03 RSB  Snapshot of Luminary 99 Rev 1. 
033482,000016:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 5-way
033483,000017:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
033484,000018: 

Page 785

033486,000020: 32,2776                                           BANK     32                                    
033487,000021: 32,2000                                           SETLOC   F2DPS*32                              
033488,000022: 32,2000                                           BANK                                           
033489,000023: 
033490,000024: 32,2776  E7,1621                                  EBANK=   E2DPS                                 
033491,000025: 
033492,000026:                                                                                                  #        ****************************************
033493,000027:                                                                                                  #        P63: THE LUNAR LANDING, BRAKING PHASE
033494,000028:                                                                                                  #        ****************************************
033495,000029: 
033496,000030: 32,2776                                           COUNT*   $$/P63                                
033497,000031: 
033498,000032: 32,2776           05353        P63LM              TC       PHASCHNG                              
033499,000033: 32,2777           04024                           OCT      04024                                 
033500,000034: 
033501,000035: 32,3000           04616                           TC       BANKCALL                              #  DO IMU STATUS CHECK ROUTINE R02
033502,000036: 32,3001           11254                           CADR     R02BOTH                               
033503,000037: 
033504,000038: 32,3002           33253                           CAF      P63ADRES                              #  INITIALIZE WHICH FOR BURNBABY
033505,000039: 32,3003           55455                           TS       WHICH                                 
033506,000040: 
033507,000041: 32,3004           32000                           CAF      DPSTHRSH                              #  INITIALIZE DVMON
033508,000042: 32,3005           55251                           TS       DVTHRUSH                              
033509,000043: 32,3006           34751                           CAF      FOUR                                  
033510,000044: 32,3007           55515                           TS       DVCNTR                                
033511,000045: 
033512,000046: 32,3010           44753                           CS       ONE                                   #  INITIALIZE WCHPHASE AND FLPASSO
033513,000047: 32,3011           55351                           TS       WCHPHASE                              
033514,000048: 
033515,000049: 32,3012           34755                           CA       ZERO                                  
033516,000050: 32,3013           55623                           TS       FLPASS0                               
033517,000051: 
033518,000052: 32,3014           44736                           CS       BIT14                                 
033519,000053: 32,3015           00006                           EXTEND                                         
033520,000054: 32,3016           03012                           WAND     CHAN12                                #  REMOVE TRACK-ENABLE DISCRETE.
033521,000055: 
033522,000056: 32,3017           06037        FLAGORGY           TC       INTPRET                               #  DIONYSIAN FLAG WAVING
033523,000057: 32,3020           43014                           CLEAR    CLEAR                                 
033524,000058: 32,3021           02663                                    NOTHROTL                              
033525,000059: 32,3022           03271                                    REDFLAG                               
033526,000060: 32,3023           43014                           CLEAR    SET                                   
033527,000061: 32,3024           05660                                    LRBYPASS                              
033528,000062: 32,3025           03067                                    MUNFLAG                               
033529,000063: 32,3026           43014                           CLEAR    CLEAR                                 
033530,000064: 32,3027           00266                                    P25FLAG                               #  TERMINATE P25 IF IT IS RUNNING.
033531,000065: 32,3030           00270                                    RNDVZFLG                              #  TERMINATE P20 IF IT IS RUNNING
033532,000066: 
033533,000067:                                                                                                  #  ****************************************
033534,000068: 
033535,000069: 32,3031           77201        IGNALG             SETPD    VLOAD                                 #  FIRST SET UP INPUTS FOR RP-TO-R:-

Page 786

033537,000071: 32,3032           00001                                    0                                     #        AT 0D LANDING SITE IN MOON FIXED FRAME
033538,000072: 32,3033           02023                                    RLS                                   #        AT 6D ESTIMATED TIME OF LANDING
033539,000073: 32,3034           41525                           PDDL     PUSH                                  #        MPAC NON-ZERO TO INDICATE LUNAR CASE
033540,000074: 32,3035           02401                                    TLAND                                 
033541,000075: 32,3036           37625                           STCALL   TPIP                                  #  ALSO SET TPIP FOR FIRST GUIDANCE PASS
033542,000076: 32,3037           55716                                    RP-TO-R                               
033543,000077: 32,3040           64312                           VSL4     MXV                                   
033544,000078: 32,3041           01734                                    REFSMMAT                              
033545,000079: 32,3042           37635                           STCALL   LAND                                  
033546,000080: 32,3043           46432                                    GUIDINIT                              #  GUIDINIT INITIALIZES WM AND /LAND/
033547,000081: 32,3044           45345                           DLOAD    DSU                                   
033548,000082: 32,3045           02401                                    TLAND                                 
033549,000083: 32,3046           25260                                    GUIDDURN                              
033550,000084: 32,3047           34041                           STCALL   TDEC1                                 #  INTEGRATE STATE FORWARD TO THAT TIME
033551,000085: 32,3050           27057                                    LEMPREC                               
033552,000086: 32,3051           77331                           SSP      VLOAD                                 
033553,000087: 32,3052           03647                                    NIGNLOOP                              
033554,000088: 32,3053           00050                                    40D                                   
033555,000089: 32,3054           06520                                    UNITX                                 
033556,000090: 32,3055           26603                           STOVL    CG                                    
033557,000091: 32,3056           06516                                    UNITY                                 
033558,000092: 32,3057           26611                           STOVL    CG         +6                         
033559,000093: 32,3060           06514                                    UNITZ                                 
033560,000094: 32,3061           16617                           STODL    CG         +14                        
033561,000095: 32,3062           25256                                    99999CON                              
033562,000096: 32,3063           27665                           STOVL    DELTAH                                #  INITIALIZE DELTAH FOR V16N68 DISPLAY
033563,000097: 32,3064           06522                                    ZEROVECS                              
033564,000098: 32,3065           17254                           STODL    UNFC/2                                #  INITIALIZE TRIM VELOCITY CORRECTION TERM
033565,000099: 32,3066           06522                                    HI6ZEROS                              
033566,000100: 32,3067           03643                           STORE    TTF/8                                 
033567,000101: 
033568,000102: 32,3070           77745        IGNALOOP           DLOAD                                          
033569,000103: 32,3071           00015                                    TAT                                   
033570,000104: 32,3072           27561                           STOVL    PIPTIME1                              
033571,000105: 32,3073           00017                                    RATT1                                 
033572,000106: 32,3074           64312                           VSL4     MXV                                   
033573,000107: 32,3075           01734                                    REFSMMAT                              
033574,000108: 32,3076           37521                           STCALL   R                                     
033575,000109: 32,3077           67130                                    MUNGRAV                               
033576,000110: 32,3100           35237                           STCALL   GDT/2                                 
033577,000111: 32,3101           62454                                    ?GUIDSUB                              #  WHICH DELIVERS N PASSES OF GUIDANCE
033578,000112: 
033579,000113:                                                                                                  #  DDUMCALC IS PROGRAMMED AS FOLLOWS:-
033580,000114:                                                                                                  #                                          2                                           -
033581,000115:                                                                                                  #               (RIGNZ - RGU )/16 + 16(RGU  )KIGNY/B8 + (RGU - RIGNX)KIGNX/B4 + (ABVAL(VGU) - VIGN)KIGNV/B4
033582,000116:                                                                                                  #                           2             1                 0
033583,000117:                                                                                                  #        DDUM = -------------------------------------------------------------------------------------------
033584,000118:                                                                                                  #                                                 10
033585,000119:                                                                                                  #                                                2   (VGU - 16 VGU KIGNX/B4)

Page 787

033587,000121:                                                                                                  #                                                        2        0
033588,000122:                                                                                                  #  THE NUMERATOR IS SCALED IN METERS AT 2(28).  THE DENOMINATOR IS A VELOCITY IN UNITS OF 2(10) M/CS.
033589,000123:                                                                                                  #  THE QUOTIENT IS THUS A TIME IN UNITS OF 2(18) CENTISECONDS.  THE FINAL SHIFT RESCALES TO UNITS OF 2(28) CS.
033590,000124:                                                                                                  #  THERE IS NO DAMPING FACTOR.  THE CONSTANTS KIGNX/B4, KIGNY/B8 AND KIGNV/B4 ARE ALL NEGATIVE IN SIGN.
033591,000125: 
033592,000126: 32,3102           55646        DDUMCALC           TS       NIGNLOOP                              
033593,000127: 32,3103           06037                           TC       INTPRET                               
033594,000128: 32,3104           57345                           DLOAD    DMPR                                  #  FORM DENOMINATOR FIRST
033595,000129: 32,3105           03627                                    VGU                                   
033596,000130: 32,3106           02501                                    KIGNX/B4                              
033597,000131: 32,3107           44232                           SL4R     BDSU                                  
033598,000132: 32,3110           03633                                    VGU        +4                         
033599,000133: 32,3111           45325                           PDDL     DSU                                   
033600,000134: 32,3112           02477                                    RIGNZ                                 
033601,000135: 32,3113           02643                                    RGU        +4                         
033602,000136: 32,3114           65222                           SR4R     PDDL                                  
033603,000137: 32,3115           02641                                    RGU        +2                         
033604,000138: 32,3116           57316                           DSQ      DMPR                                  
033605,000139: 32,3117           02503                                    KIGNY/B8                              
033606,000140: 32,3120           65232                           SL4R     PDDL                                  
033607,000141: 32,3121           02637                                    RGU                                   
033608,000142: 32,3122           57225                           DSU      DMPR                                  
033609,000143: 32,3123           02475                                    RIGNX                                 
033610,000144: 32,3124           02501                                    KIGNX/B4                              
033611,000145: 32,3125           51515                           PDVL     ABVAL                                 
033612,000146: 32,3126           03627                                    VGU                                   
033613,000147: 32,3127           57225                           DSU      DMPR                                  
033614,000148: 32,3130           02473                                    VIGN                                  
033615,000149: 32,3131           02505                                    KIGNV/B4                              
033616,000150: 32,3132           43215                           DAD      DAD                                   
033617,000151: 32,3133           56215                           DAD      DDV                                   
033618,000152: 32,3134           77661                           SRR                                            
033619,000153: 32,3135           21613                                    10D                                   
033620,000154: 
033621,000155: 32,3136           43206                           PUSH     DAD                                   
033622,000156: 32,3137           03561                                    PIPTIME1                              
033623,000157: 32,3140           14041                           STODL    TDEC1                                 #  STORE NEW GUESS FOR NEXT INTEGRATION
033624,000158: 32,3141           45246                           ABS      DSU                                   
033625,000159: 32,3142           25262                                    DDUMCRIT                              
033626,000160: 32,3143           45040                           BMN      CALL                                  
033627,000161: 32,3144           65163                                    DDUMGOOD                              
033628,000162: 32,3145           27414                                    INTSTALL                              
033629,000163: 32,3146           43014                           SET      SET                                   
033630,000164: 32,3147           01473                                    INTYPFLG                              
033631,000165: 32,3150           00063                                    MOONFLAG                              
033632,000166: 32,3151           77745                           DLOAD                                          
033633,000167: 32,3152           03561                                    PIPTIME1                              
033634,000168: 32,3153           25517                           STOVL    TET                                   #  HOPEFULLY ?GUIDSUB DID NOT
033635,000169: 32,3154           00017                                    RATT1                                 #        CLOBBER RATT1 AND VATT1

Page 788

033637,000171: 32,3155           25535                           STOVL    RCV                                   
033638,000172: 32,3156           00025                                    VATT1                                 
033639,000173: 32,3157           35543                           STCALL   VCV                                   
033640,000174: 32,3160           27107                                    INTEGRVS                              
033641,000175: 32,3161           77650                           GOTO                                           
033642,000176: 32,3162           65070                                    IGNALOOP                              
033643,000177: 
033644,000178: 32,3163           54335        DDUMGOOD           SLOAD    SR                                    
033645,000179: 32,3164           03423                                    ZOOMTIME                              
033646,000180: 32,3165           20617                                    14D                                   
033647,000181: 32,3166           77621                           BDSU                                           
033648,000182: 32,3167           00041                                    TDEC1                                 
033649,000183: 32,3170           27442                           STOVL    TIG                                   #  COMPUTE DISTANCE LANDING SITE WILL BE
033650,000184: 32,3171           03527                                    V                                     #        OUT OF LM'S ORBITAL PLANE AT IGNITION:
033651,000185: 32,3172           53435                           VXV      UNIT                                  #        SIGN IS + IF LANDING SITE IS TO THE
033652,000186: 32,3173           03521                                    R                                     #        RIGHT, NORTH; - IF TO THE LEFT, SOUTH.
033653,000187: 32,3174           72441                           DOT      SL1                                   
033654,000188: 32,3175           03635                                    LAND                                  
033655,000189: 32,3176           26627        R60INIT            STOVL    OUTOFPLN                              #  INITIALIZATION FOR CALCMANU
033656,000190: 32,3177           03254                                    UNFC/2                                
033657,000191: 32,3200           02631                           STORE    R60VSAVE                              #  STORE UNFC/2 TEMPORARILY IN R60SAVE
033658,000192: 32,3201           77776                           EXIT                                           
033659,000193:                                                                                                  #  ****************************************
033660,000194: 
033661,000195: 32,3202           05353        IGNALGRT           TC       PHASCHNG                              #  PREVENT REPEATING IGNALG
033662,000196: 32,3203           04024                           OCT      04024                                 
033663,000197: 
033664,000198: 32,3204           44362        ASTNCLOK           CS       ASTNDEX                               
033665,000199: 32,3205           04616                           TC       BANKCALL                              
033666,000200: 32,3206           74664                           CADR     STCLOK2                               
033667,000201: 32,3207           15155                           TCF      ENDOFJOB                              #  RETURN IN NEW JOB AND IN EBANK FIVE
033668,000202: 
033669,000203: 32,3210           06037        ASTNRET            TC       INTPRET                               
033670,000204: 32,3211           47131                           SSP      RTB                                   #  GO PICK UP DISPLAY AT END OF R51:
033671,000205: 32,3212           02747                                    QMAJ                                  #        "PROCEED" WILL DO A FINE ALIGNMENT
033672,000206: 32,3213           65215                           FCADR    P63SPOT2                              #        "ENTER" WILL RETURN TO P63SPOT2
033673,000207: 32,3214           31135                                    R51P63                                
033674,000208: 32,3215           53575        P63SPOT2           VLOAD    UNIT                                  #  INITIALIZE KALCMANU FOR BURN ATTITUDE
033675,000209: 32,3216           02631                                    R60VSAVE                              
033676,000210: 32,3217           27773                           STOVL    POINTVSM                              
033677,000211: 32,3220           06520                                    UNITX                                 
033678,000212: 32,3221           03765                           STORE    SCAXIS                                
033679,000213: 32,3222           77776                           EXIT                                           
033680,000214: 
033681,000215: 32,3223           35016                           CAF      EBANK7                                
033682,000216: 32,3224           54003                           TS       EBANK                                 
033683,000217: 
033684,000218: 32,3225           00004                           INHINT                                         
033685,000219: 32,3226           04674                           TC       IBNKCALL                              
033686,000220: 32,3227           40142                           CADR     PFLITEDB                              

Page 789

033688,000222: 32,3230           00003                           RELINT                                         
033689,000223: 
033690,000224: 32,3231           04616                           TC       BANKCALL                              
033691,000225: 32,3232           54123                           CADR     R60LEM                                
033692,000226: 
033693,000227: 32,3233           05353                           TC       PHASCHNG                              #  PREVENT RECALLING R60
033694,000228: 32,3234           04024                           OCT      04024                                 
033695,000229: 
033696,000230: 32,3235           34746        P63SPOT3           CA       BIT6                                  #  IS THE LR ANTENNA IN POSITION 1 YET
033697,000231: 32,3236           00006                           EXTEND                                         
033698,000232: 32,3237           02033                           RAND     CHAN33                                
033699,000233: 32,3240           00006                           EXTEND                                         
033700,000234: 32,3241           13247                           BZF      P63SPOT4                              #  BRANCH IF ANTENNA ALREADY IN POSITION 1
033701,000235: 
033702,000236: 32,3242           33254                           CAF      CODE500                               #  ASTRONAUT:    PLEASE CRANK THE
033703,000237: 32,3243           04616                           TC       BANKCALL                              #                SILLY THING AROUND
033704,000238: 32,3244           20623                           CADR     GOPERF1                               
033705,000239: 32,3245           16001                           TCF      GOTOPOOH                              #  TERMINATE
033706,000240: 32,3246           13235                           TCF      P63SPOT3                              #  PROCEED       SEE IF HE'S LYING
033707,000241: 
033708,000242: 32,3247           04616        P63SPOT4           TC       BANKCALL                              #  ENTER         INITIALIZE LANDING RADAR
033709,000243: 32,3250           67721                           CADR     SETPOS1                               
033710,000244: 
033711,000245: 32,3251           04635                           TC       POSTJUMP                              #  OFF TO SEE THE WIZARD ...
033712,000246: 32,3252           74126                           CADR     BURNBABY                              
033713,000247: 
033714,000248:                                                                                                  #        ----------------------------------------
033715,000249: 
033716,000250:                                                                                                  #  CONSTANTS FOR P63LM AND IGNALG
033717,000251: 
033718,000252: 32,3253           02076        P63ADRES           GENADR   P63TABLE                              
033719,000253: 
033720,000254: 32,3254     4362               ASTNDEX            =        MD1                                   #  OCT 25; INDEX FOR CLOKTASK
033721,000255: 
033722,000256: 32,3254           00500        CODE500            OCT      00500                                 
033723,000257: 
033724,000258: 32,3255           00035 30373  99999CON           2DEC     30479.7    B-24                       
033725,000259: 
033726,000260: 32,3257           00004 01610  GUIDDURN           2DEC     +66440     B-28                       #  GUIDDURN +6.64400314 E+2
033727,000261: 32,3261           00000 00010  DDUMCRIT           2DEC     +8         B-28                       #  CRITERION FOR IGNALG CONVERGENCE
033728,000262: 

Page 790

033730,000264:                                                                                                  #        ----------------------------------------
033731,000265: 

Page 791

033733,000267:                                                                                                  #        ****************************************
033734,000268:                                                                                                  #        P68: LANDING CONFIRMATION
033735,000269:                                                                                                  #        ****************************************
033736,000270: 
033737,000271: 31,2144                                           BANK     31                                    
033738,000272: 31,2000                                           SETLOC   F2DPS*31                              
033739,000273: 31,2000                                           BANK                                           
033740,000274: 
033741,000275: 31,2144                                           COUNT*   $$/P6567                              
033742,000276: 
033743,000277: 31,2144           05353        LANDJUNK           TC       PHASCHNG                              
033744,000278: 31,2145           04024                           OCT      04024                                 
033745,000279: 
033746,000280: 31,2146           00004                           INHINT                                         
033747,000281: 31,2147           04616                           TC       BANKCALL                              #  ZERO ATTITUDE ERROR
033748,000282: 31,2150           40153                           CADR     ZATTEROR                              
033749,000283: 
033750,000284: 31,2151           04616                           TC       BANKCALL                              #  SET 5 DEGREE DEADBAND
033751,000285: 31,2152           40127                           CADR     SETMAXDB                              
033752,000286: 
033753,000287: 31,2153           06037                           TC       INTPRET                               #  TO INTERPRETIVE AS TIME IS NOT CRITICAL
033754,000288: 31,2154           43014                           SET      CLEAR                                 
033755,000289: 31,2155           04067                                    SURFFLAG                              
033756,000290: 31,2156           04666                                    LETABORT                              
033757,000291: 31,2157           77214                           SET      VLOAD                                 
033758,000292: 31,2160           05062                                    APSFLAG                               
033759,000293: 31,2161           01221                                    RN                                    
033760,000294: 31,2162           16032                           STODL    ALPHAV                                
033761,000295: 31,2163           01235                                    PIPTIME                               
033762,000296: 31,2164           45014                           SET      CALL                                  
033763,000297: 31,2165           01463                                    LUNAFLAG                              
033764,000298: 31,2166           26351                                    LAT-LONG                              
033765,000299: 31,2167           77201                           SETPD    VLOAD                                 #  COMPUTE RLS AND STORE IT AWAY
033766,000300: 31,2170           00001                                    0                                     
033767,000301: 31,2171           01221                                    RN                                    
033768,000302: 31,2172           65352                           VSL2     PDDL                                  
033769,000303: 31,2173           01235                                    PIPTIME                               
033770,000304: 31,2174           45006                           PUSH     CALL                                  
033771,000305: 31,2175           51670                                    R-TO-RP                               
033772,000306: 31,2176           02023                           STORE    RLS                                   
033773,000307: 31,2177           77776                           EXIT                                           
033774,000308: 31,2200           32215                           CAF      V06N43*                               #  ASTRONAUT:  NOW LOOK WHERE YOU ENDED UP
033775,000309: 31,2201           04616                           TC       BANKCALL                              
033776,000310: 31,2202           20476                           CADR     GOFLASH                               
033777,000311: 31,2203           16001                           TCF      GOTOPOOH                              #  TERMINATE
033778,000312: 31,2204           12206                           TCF      +2                                    #  PROCEED
033779,000313: 31,2205           12200                           TCF      -5                                    #  RECYCLE
033780,000314: 
033781,000315: 31,2206           06037                           TC       INTPRET                               

Page 792

033783,000317: 31,2207           77775                           VLOAD                                          #  INITIALIZE GSAV AND (USING REFMF)
033784,000318: 31,2210           06520                                    UNITX                                 #  YNBSAV, ZNBSAV AND ATTFLAG FOR P57
033785,000319: 31,2211           36231                           STCALL   GSAV                                  
033786,000320: 31,2212           33506                                    REFMF                                 
033787,000321: 31,2213           77776                           EXIT                                           
033788,000322: 
033789,000323: 31,2214           16001                           TCF      GOTOPOOH                              #  ASTRONAUT:  PLEASE SELECT P57
033790,000324: 
033791,000325: 31,2215           01453        V06N43*            VN       0643                                  
033792,000326: 

End of include-file THE_LUNAR_LANDING.agc.  Parent file is MAIN.agc