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!

025934,000002:                                                                                                  ## Copyright:   Public domain.
025935,000003:                                                                                                  ## Filename:    P30_P37.agc
025936,000004:                                                                                                  ## Purpose:     Part of the source code for Luminary 1A build 099.
025937,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
025938,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 11.
025939,000007:                                                                                                  ## Assembler:   yaYUL
025940,000008:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
025941,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo.
025942,000010:                                                                                                  ## Pages:       614-617
025943,000011:                                                                                                  ## Mod history: 2009-05-17 RSB  Adapted from the corresponding 
025944,000012:                                                                                                  ##                              Luminary131 file, using page 
025945,000013:                                                                                                  ##                              images from Luminary 1A.
025946,000014:                                                                                                  ##              2009-06-05 RSB  Removed 4 lines of code that shouldn't
025947,000015:                                                                                                  ##                              have survived from Luminary 131.
025948,000016:                                                                                                  ##              2016-12-13 RSB  GOTOP00H -> GOTOPOOH
025949,000017:                                                                                                  ##              2016-12-14 RSB  VNP00H -> VNPOOH.
025950,000018:                                                                                                  ##              2016-12-14 RSB  Proofed text comments with octopus/ProoferComments
025951,000019:                                                                                                  ##                              and corrected the errors found.
025952,000020:                                                                                                  ##              2017-03-03 RSB  Snapshot of Luminary 99 Rev 1. 
025953,000021: 

Page 614

025955,000023:                                                                                                  #  PROGRAM DESCRIPTION P30       DATE 3-6-67
025956,000024: 
025957,000025:                                                                                                  #  MOD.1 BY RAMA AIYAWAR
025958,000026: 
025959,000027:                                                                                                  #  FUNCTIONAL DESCRIPTION
025960,000028:                                                                                                  #        ACCEPT ASTRONAUT INPUTS OF TIG,DELV(LV)
025961,000029:                                                                                                  #        CALL IMU STATUS CHECK ROUTINE (R02)
025962,000030:                                                                                                  #        DISPLAY TIME TO GO, APOGEE, PERIGEE, DELV(MAG), MGA AT IGN
025963,000031:                                                                                                  #        REQUEST BURN PROGRAM
025964,000032: 
025965,000033:                                                                                                  #  CALLING SEQUENCE VIA JOB FROM V37
025966,000034: 
025967,000035:                                                                                                  #  EXIT VIA V37 CALL OR TO GOTOPOOH (V34E)
025968,000036: 
025969,000037:                                                                                                  #  SUBROUTINE CALLS -    FLAGUP, PHASCHNG, BANKCALL, ENDOFJOB, GOFLASH, GOFLASHR
025970,000038:                                                                                                  #                        GOPERF3R, INTPRET, BLANKET, GOTOPOOH, R02BOTH, S30.1,
025971,000039:                                                                                                  #                        TTG/N35, MIDGIM, DISPMGA
025972,000040: 
025973,000041:                                                                                                  #  ERASABLE INITIALIZATION - STATE VECTOR
025974,000042: 
025975,000043:                                                                                                  #  OUTPUT -      RINIT, VINIT, +MGA, VTIG, RTIG, DELVSIN, DELVSAB, DELVSLV, HAPO,
025976,000044:                                                                                                  #                HPER, TTOGO
025977,000045: 
025978,000046:                                                                                                  #  DEBRIS - A, L, MPAC, PUSHLIST
025979,000047: 
025980,000048: 32,2776                                           BANK     32                                    
025981,000049: 35,2000                                           SETLOC   P30S                                  
025982,000050: 35,2000                                           BANK                                           
025983,000051: 35,2000  E4,1652                                  EBANK=   +MGA                                  
025984,000052: 35,2000                                           COUNT*   $$/P30                                
025985,000053: 35,2000           05504        P30                TC       UPFLAG                                #  SET UPDATE FLAG
025986,000054: 35,2001           00027                           ADRES    UPDATFLG                              
025987,000055: 35,2002           05504                           TC       UPFLAG                                #  SET TRACK FLAG
025988,000056: 35,2003           00031                           ADRES    TRACKFLG                              
025989,000057: 
025990,000058: 35,2004           32025        P30N33             CAF      V06N33                                #  T OF IGN
025991,000059: 35,2005           03712                           TC       VNPOOH                                #  RETURNS ON PROCEED, POOH ON TERMINATE
025992,000060: 
025993,000061: 35,2006           33727                           CAF      V06N81                                #  DISPLAY DELTA V (LV)
025994,000062: 35,2007           03712                           TC       VNPOOH                                #        REDISPLAY ON RECYCLE
025995,000063: 
025996,000064: 35,2010           05516                           TC       DOWNFLAG                              #  RESET UPDATE FLAG
025997,000065: 35,2011           00027                           ADRES    UPDATFLG                              
025998,000066: 35,2012           06037                           TC       INTPRET                               
025999,000067: 35,2013           77624                           CALL                                           
026000,000068: 35,2014           70000                                    S30.1                                 
026001,000069: 35,2015           77414                           SET      EXIT                                  
026002,000070: 35,2016           00470                                    UPDATFLG                              
026003,000071: 35,2017           32026        PARAM30            CAF      V06N42                                #  DISPLAY APOGEE,PERIGEE,DELTA V
026004,000072: 35,2020           03712                           TC       VNPOOH                                

Page 615

026006,000074: 
026007,000075: 35,2021           06037                           TC       INTPRET                               
026008,000076: 35,2022           77614                           SETGO                                          
026009,000077: 35,2023           01027                                    XDELVFLG                              #  FOR P40'S: EXTERNAL DELTA-V GUIDANCE.
026010,000078: 35,2024           72540                                    REVN1645                              #  TRKMKCNT, TGO, +MGA  DISPLAY
026011,000079: 
026012,000080: 35,2025           01441        V06N33             VN       0633                                  
026013,000081: 35,2026           01452        V06N42             VN       0642                                  
026014,000082: 

Page 616

026016,000084:                                                                                                  #  PROGRAM DESCRIPTION S30.1     DATE 9NOV66
026017,000085:                                                                                                  #  MOD NO 1                      LOG SECTION P30,P37
026018,000086:                                                                                                  #  MOD BY RAMA AIYAWAR **
026019,000087: 
026020,000088:                                                                                                  #  FUNCTIONAL DESCRIPTION
026021,000089:                                                                                                  #        BASED ON STORED TARGET PARAMETERS (R OF IGNITION (RTIG), V OF
026022,000090:                                                                                                  #        IGNITION (VTIG), TIME OF IGNITION (TIG)), COMPUTE PERIGEE ALTITUDE
026023,000091:                                                                                                  #        APOGEE ALTITUDE AND DELTAV REQUIRED (DELVSIN).
026024,000092: 
026025,000093:                                                                                                  #  CALLING SEQUENCE
026026,000094:                                                                                                  #        L       CALL
026027,000095:                                                                                                  #        L+1             S30.1
026028,000096: 
026029,000097:                                                                                                  #  NORMAL EXIT MODE
026030,000098:                                                                                                  #        AT L+2 OR CALLING SEQUENCE (GOTO L+2)
026031,000099: 
026032,000100:                                                                                                  #  SUBROUTINES CALLED
026033,000101:                                                                                                  #        LEMPREC
026034,000102:                                                                                                  #        PERIAPO
026035,000103: 
026036,000104:                                                                                                  #  ALARM OR ABORT EXIT MODES
026037,000105:                                                                                                  #        NONE
026038,000106: 
026039,000107:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED
026040,000108:                                                                                                  #        TIG             TIME OF IGNITION        DP B28CS
026041,000109:                                                                                                  #        DELVSLV         SPECIFIED DELTA-V IN LOCAL VERT.
026042,000110:                                                                                                  #                        COORDS. OF ACTIVE VEHICLE AT
026043,000111:                                                                                                  #                        TIME OF IGNITION        VECTOR B+7 METERS/CS
026044,000112: 
026045,000113:                                                                                                  #  OUTPUT
026046,000114:                                                                                                  #        RTIG            POSITION AT TIG         VECTOR B+29 METERS
026047,000115:                                                                                                  #        VTIG            VELOCITY AT TIG         VECTOR B+29 METERS/CS
026048,000116:                                                                                                  #        PDL 4D          APOGEE ALTITUDE         DP B+29 M, B+27 METERS.
026049,000117:                                                                                                  #        HAPO            APOGEE ALTITUDE         DP B+29 METERS
026050,000118:                                                                                                  #        PDL 8D          PERIGEE ALTITUDE        DP B+29 M, B+27 METERS.
026051,000119:                                                                                                  #        HPER            PERIGEE ALTITUDE        DP B+29 METERS
026052,000120:                                                                                                  #        DELVSIN         SPECIFIED DELTA-V IN INERTIAL
026053,000121:                                                                                                  #                        COORD. OF ACTIVE VEHICLE AT
026054,000122:                                                                                                  #                        TIME OF IGNITION        VECTOR B+7 METERS/CS
026055,000123:                                                                                                  #        DELVSAB         MAG. OF DELVSIN         VECTOR B+7 METERS/CS
026056,000124: 
026057,000125:                                                                                                  #  DEBRIS        QTEMP   TEMP.ERASABLE
026058,000126:                                                                                                  #                QPRET, MPAC
026059,000127:                                                                                                  #                PUSHLIST
026060,000128: 
026061,000129: 34,2000                                           SETLOC   P30S1                                 
026062,000130: 34,2000                                           BANK                                           
026063,000131: 
026064,000132: 34,2000                                           COUNT*   $$/S30S                               
026065,000133: 
026066,000134: 34,2000           71220        S30.1              STQ      DLOAD                                 
026067,000135: 34,2001           03632                                    QTEMP                                 
026068,000136: 34,2002           03442                                    TIG                                   #  TIME IGNITION SCALED AT 2(+28)CS
026069,000137: 34,2003           34041                           STCALL   TDEC1                                 
026070,000138: 34,2004           27057                                    LEMPREC                               #  ENCKE ROUTINE FOR LEM
026071,000139: 
026072,000140: 34,2005           67175                           VLOAD    SXA,2                                 

Page 617

026074,000142: 34,2006           00001                                    RATT                                  
026075,000143: 34,2007           02777                                    RTX2                                  
026076,000144: 34,2010           03642                           STORE    RTIG                                  #  RADIUS VECTOR AT IGNITION TIME
026077,000145: 34,2011           57456                           UNIT     VCOMP                                 
026078,000146: 34,2012           27656                           STOVL    DELVSIN                               #  ZRF/LV IN DELVSIN SCALED AT 2
026079,000147: 34,2013           00007                                    VATT                                  #  VELOCITY VECTOR AT TIG, SCALED 2(7) M/CS
026080,000148: 34,2014           03650                           STORE    VTIG                                  
026081,000149: 34,2015           53435                           VXV      UNIT                                  
026082,000150: 34,2016           03642                                    RTIG                                  
026083,000151: 34,2017           66001                           SETPD    SXA,1                                 
026084,000152: 34,2020           00001                                    0                                     
026085,000153: 34,2021           02776                                    RTX1                                  
026086,000154: 34,2022           47206                           PUSH     VXV                                   #  YRF/LV PDL 0 SCALED AT 2
026087,000155: 34,2023           03656                                    DELVSIN                               
026088,000156: 34,2024           63372                           VSL1     PDVL                                  
026089,000157: 34,2025           63315                           PDVL     PDVL                                  #  YRF/LV PDL 6 SCALED AT 2
026090,000158: 34,2026           03656                                    DELVSIN                               #  ZRF/LV PDL 12D SCALED AT 2
026091,000159: 34,2027           03434                                    DELVSLV                               
026092,000160: 34,2030           76505                           VXM      VSL1                                  
026093,000161: 34,2031           00001                                    0                                     
026094,000162: 34,2032           03656                           STORE    DELVSIN                               #  DELTAV IN INERT. COOR. SCALED TO B+7M/CS
026095,000163: 34,2033           77646                           ABVAL                                          
026096,000164: 34,2034           27664                           STOVL    DELVSAB                               #  DELTA V MAG.
026097,000165: 34,2035           03642                                    RTIG                                  #  (FOR PERIAPO)
026098,000166: 34,2036           53315                           PDVL     VAD                                   #  VREQUIRED = VTIG + DELVSIN (FOR PERIAPO)
026099,000167: 34,2037           03650                                    VTIG                                  
026100,000168: 34,2040           03656                                    DELVSIN                               
026101,000169: 34,2041           77624                           CALL                                           
026102,000170: 34,2042           46316                                    PERIAPO1                              
026103,000171: 34,2043           77624                           CALL                                           
026104,000172: 34,2044           46426                                    SHIFTR1                               #  RESCALE IF NEEDED
026105,000173: 34,2045           77624                           CALL                                           #  LIMIT DISPLAY TO 9999.9 N. MI.
026106,000174: 34,2046           45636                                    MAXCHK                                
026107,000175: 34,2047           16321                           STODL    HPER                                  #  PERIGEE ALT 2(29) METERS, FOR DISPLAY
026108,000176: 34,2050           00005                                    4D                                    
026109,000177: 34,2051           77624                           CALL                                           
026110,000178: 34,2052           46426                                    SHIFTR1                               #  RESCALE IF NEEDED
026111,000179: 34,2053           77624                           CALL                                           #  LIMIT DISPLAY TO 9999.9 N. MI.
026112,000180: 34,2054           45636                                    MAXCHK                                
026113,000181: 34,2055           36317                           STCALL   HAPO                                  #  APOGEE ALT 2(29) METERS, FOR DISPLAY
026114,000182: 34,2056           03632                                    QTEMP                                 
026115,000183: 
026116,000184: 

End of include-file P30,P37.agc.  Parent file is MAIN.agc