Source Code

These source-code files are part of a reconstructed copy of Luminary 98, a development version of the Apollo 11 Lunar Module (LM) Apollo Guidance Computer (AGC) software.

The reconstruction began with source code of Luminary 99 revision 1 previously transcribed from a digitized copy of that program. The code was then updated by undoing changes described in original Luminary memo 85, using asterisks indicating changed lines in the listing as a guide. While no listing of this version is known to exist, nor are the memory-bank checksums available, the reconstruction is believed to be correct because it was an an intermediate step in reconstructing Luminary 97 whose reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152G. Note that page numbers in the reconstructed code match those on the Luminary 099 revision 001 printout, although the added code would likely have changed page numbers for a real Luminary 98 listing.

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.

025818,000002:                                                                                                  ## Copyright:   Public domain.
025819,000003:                                                                                                  ## Filename:    P30,P37.agc
025820,000004:                                                                                                  ## Purpose:     A section of Luminary revision 98.
025821,000005:                                                                                                  ##              It is part of the reconstructed source code for the a
025822,000006:                                                                                                  ##              development version of the flight software for the Lunar 
025823,000007:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 11.
025824,000008:                                                                                                  ##              The code has been recreated from a copy of Luminary 99
025825,000009:                                                                                                  ##              revision 001, using asterisks indicating changed lines in
025826,000010:                                                                                                  ##              the listing and Luminary Memo #85, which lists changes between
025827,000011:                                                                                                  ##              Luminary 98 and 99.
025828,000012:                                                                                                  ## Reference:   pp. 614-617
025829,000013:                                                                                                  ## Assembler:   yaYUL
025830,000014:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
025831,000015:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
025832,000016:                                                                                                  ## Mod history: 2019-07-28 MAS  Created from Luminary 99.
025833,000017: 

Page 614

025835,000019:                                                                                                  #  PROGRAM DESCRIPTION P30       DATE 3-6-67
025836,000020: 
025837,000021:                                                                                                  #  MOD.1 BY RAMA AIYAWAR
025838,000022: 
025839,000023:                                                                                                  #  FUNCTIONAL DESCRIPTION
025840,000024:                                                                                                  #        ACCEPT ASTRONAUT INPUTS OF TIG,DELV(LV)
025841,000025:                                                                                                  #        CALL IMU STATUS CHECK ROUTINE (R02)
025842,000026:                                                                                                  #        DISPLAY TIME TO GO, APOGEE, PERIGEE, DELV(MAG), MGA AT IGN
025843,000027:                                                                                                  #        REQUEST BURN PROGRAM
025844,000028: 
025845,000029:                                                                                                  #  CALLING SEQUENCE VIA JOB FROM V37
025846,000030: 
025847,000031:                                                                                                  #  EXIT VIA V37 CALL OR TO GOTOPOOH (V34E)
025848,000032: 
025849,000033:                                                                                                  #  SUBROUTINE CALLS -    FLAGUP, PHASCHNG, BANKCALL, ENDOFJOB, GOFLASH, GOFLASHR
025850,000034:                                                                                                  #                        GOPERF3R, INTPRET, BLANKET, GOTOPOOH, R02BOTH, S30.1,
025851,000035:                                                                                                  #                        TTG/N35, MIDGIM, DISPMGA
025852,000036: 
025853,000037:                                                                                                  #  ERASABLE INITIALIZATION - STATE VECTOR
025854,000038: 
025855,000039:                                                                                                  #  OUTPUT -      RINIT, VINIT, +MGA, VTIG, RTIG, DELVSIN, DELVSAB, DELVSLV, HAPO,
025856,000040:                                                                                                  #                HPER, TTOGO
025857,000041: 
025858,000042:                                                                                                  #  DEBRIS - A, L, MPAC, PUSHLIST
025859,000043: 
025860,000044: 32,2776                                           BANK     32                                    
025861,000045: 35,2000                                           SETLOC   P30S                                  
025862,000046: 35,2000                                           BANK                                           
025863,000047: 35,2000  E4,1652                                  EBANK=   +MGA                                  
025864,000048: 35,2000                                           COUNT*   $$/P30                                
025865,000049: 35,2000           05504        P30                TC       UPFLAG                                #  SET UPDATE FLAG
025866,000050: 35,2001           00027                           ADRES    UPDATFLG                              
025867,000051: 35,2002           05504                           TC       UPFLAG                                #  SET TRACK FLAG
025868,000052: 35,2003           00031                           ADRES    TRACKFLG                              
025869,000053: 
025870,000054: 35,2004           32025        P30N33             CAF      V06N33                                #  T OF IGN
025871,000055: 35,2005           03712                           TC       VNPOOH                                #  RETURNS ON PROCEED, POOH ON TERMINATE
025872,000056: 
025873,000057: 35,2006           33727                           CAF      V06N81                                #  DISPLAY DELTA V (LV)
025874,000058: 35,2007           03712                           TC       VNPOOH                                #        REDISPLAY ON RECYCLE
025875,000059: 
025876,000060: 35,2010           05516                           TC       DOWNFLAG                              #  RESET UPDATE FLAG
025877,000061: 35,2011           00027                           ADRES    UPDATFLG                              
025878,000062: 35,2012           06037                           TC       INTPRET                               
025879,000063: 35,2013           77624                           CALL                                           
025880,000064: 35,2014           70000                                    S30.1                                 
025881,000065: 35,2015           77414                           SET      EXIT                                  
025882,000066: 35,2016           00470                                    UPDATFLG                              
025883,000067: 35,2017           32026        PARAM30            CAF      V06N42                                #  DISPLAY APOGEE,PERIGEE,DELTA V
025884,000068: 35,2020           03712                           TC       VNPOOH                                

Page 615

025886,000070: 
025887,000071: 35,2021           06037                           TC       INTPRET                               
025888,000072: 35,2022           77614                           SETGO                                          
025889,000073: 35,2023           01027                                    XDELVFLG                              #  FOR P40'S: EXTERNAL DELTA-V GUIDANCE.
025890,000074: 35,2024           72540                                    REVN1645                              #  TRKMKCNT, TGO, +MGA  DISPLAY
025891,000075: 
025892,000076: 35,2025           01441        V06N33             VN       0633                                  
025893,000077: 35,2026           01452        V06N42             VN       0642                                  
025894,000078: 

Page 616

025896,000080:                                                                                                  #  PROGRAM DESCRIPTION S30.1     DATE 9NOV66
025897,000081:                                                                                                  #  MOD NO 1                      LOG SECTION P30,P37
025898,000082:                                                                                                  #  MOD BY RAMA AIYAWAR **
025899,000083: 
025900,000084:                                                                                                  #  FUNCTIONAL DESCRIPTION
025901,000085:                                                                                                  #        BASED ON STORED TARGET PARAMETERS (R OF IGNITION (RTIG), V OF
025902,000086:                                                                                                  #        IGNITION (VTIG), TIME OF IGNITION (TIG)), COMPUTE PERIGEE ALTITUDE
025903,000087:                                                                                                  #        APOGEE ALTITUDE AND DELTAV REQUIRED (DELVSIN).
025904,000088: 
025905,000089:                                                                                                  #  CALLING SEQUENCE
025906,000090:                                                                                                  #        L       CALL
025907,000091:                                                                                                  #        L+1             S30.1
025908,000092: 
025909,000093:                                                                                                  #  NORMAL EXIT MODE
025910,000094:                                                                                                  #        AT L+2 OR CALLING SEQUENCE (GOTO L+2)
025911,000095: 
025912,000096:                                                                                                  #  SUBROUTINES CALLED
025913,000097:                                                                                                  #        LEMPREC
025914,000098:                                                                                                  #        PERIAPO
025915,000099: 
025916,000100:                                                                                                  #  ALARM OR ABORT EXIT MODES
025917,000101:                                                                                                  #        NONE
025918,000102: 
025919,000103:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED
025920,000104:                                                                                                  #        TIG             TIME OF IGNITION        DP B28CS
025921,000105:                                                                                                  #        DELVSLV         SPECIFIED DELTA-V IN LOCAL VERT.
025922,000106:                                                                                                  #                        COORDS. OF ACTIVE VEHICLE AT
025923,000107:                                                                                                  #                        TIME OF IGNITION        VECTOR B+7 METERS/CS
025924,000108: 
025925,000109:                                                                                                  #  OUTPUT
025926,000110:                                                                                                  #        RTIG            POSITION AT TIG         VECTOR B+29 METERS
025927,000111:                                                                                                  #        VTIG            VELOCITY AT TIG         VECTOR B+29 METERS/CS
025928,000112:                                                                                                  #        PDL 4D          APOGEE ALTITUDE         DP B+29 M, B+27 METERS.
025929,000113:                                                                                                  #        HAPO            APOGEE ALTITUDE         DP B+29 METERS
025930,000114:                                                                                                  #        PDL 8D          PERIGEE ALTITUDE        DP B+29 M, B+27 METERS.
025931,000115:                                                                                                  #        HPER            PERIGEE ALTITUDE        DP B+29 METERS
025932,000116:                                                                                                  #        DELVSIN         SPECIFIED DELTA-V IN INERTIAL
025933,000117:                                                                                                  #                        COORD. OF ACTIVE VEHICLE AT
025934,000118:                                                                                                  #                        TIME OF IGNITION        VECTOR B+7 METERS/CS
025935,000119:                                                                                                  #        DELVSAB         MAG. OF DELVSIN         VECTOR B+7 METERS/CS
025936,000120: 
025937,000121:                                                                                                  #  DEBRIS        QTEMP   TEMP.ERASABLE
025938,000122:                                                                                                  #                QPRET, MPAC
025939,000123:                                                                                                  #                PUSHLIST
025940,000124: 
025941,000125: 34,2000                                           SETLOC   P30S1                                 
025942,000126: 34,2000                                           BANK                                           
025943,000127: 
025944,000128: 34,2000                                           COUNT*   $$/S30S                               
025945,000129: 
025946,000130: 34,2000           71220        S30.1              STQ      DLOAD                                 
025947,000131: 34,2001           03632                                    QTEMP                                 
025948,000132: 34,2002           03442                                    TIG                                   #  TIME IGNITION SCALED AT 2(+28)CS
025949,000133: 34,2003           34041                           STCALL   TDEC1                                 
025950,000134: 34,2004           27057                                    LEMPREC                               #  ENCKE ROUTINE FOR LEM
025951,000135: 
025952,000136: 34,2005           67175                           VLOAD    SXA,2                                 

Page 617

025954,000138: 34,2006           00001                                    RATT                                  
025955,000139: 34,2007           02777                                    RTX2                                  
025956,000140: 34,2010           03642                           STORE    RTIG                                  #  RADIUS VECTOR AT IGNITION TIME
025957,000141: 34,2011           57456                           UNIT     VCOMP                                 
025958,000142: 34,2012           27656                           STOVL    DELVSIN                               #  ZRF/LV IN DELVSIN SCALED AT 2
025959,000143: 34,2013           00007                                    VATT                                  #  VELOCITY VECTOR AT TIG, SCALED 2(7) M/CS
025960,000144: 34,2014           03650                           STORE    VTIG                                  
025961,000145: 34,2015           53435                           VXV      UNIT                                  
025962,000146: 34,2016           03642                                    RTIG                                  
025963,000147: 34,2017           66001                           SETPD    SXA,1                                 
025964,000148: 34,2020           00001                                    0                                     
025965,000149: 34,2021           02776                                    RTX1                                  
025966,000150: 34,2022           47206                           PUSH     VXV                                   #  YRF/LV PDL 0 SCALED AT 2
025967,000151: 34,2023           03656                                    DELVSIN                               
025968,000152: 34,2024           63372                           VSL1     PDVL                                  
025969,000153: 34,2025           63315                           PDVL     PDVL                                  #  YRF/LV PDL 6 SCALED AT 2
025970,000154: 34,2026           03656                                    DELVSIN                               #  ZRF/LV PDL 12D SCALED AT 2
025971,000155: 34,2027           03434                                    DELVSLV                               
025972,000156: 34,2030           76505                           VXM      VSL1                                  
025973,000157: 34,2031           00001                                    0                                     
025974,000158: 34,2032           03656                           STORE    DELVSIN                               #  DELTAV IN INERT. COOR. SCALED TO B+7M/CS
025975,000159: 34,2033           77646                           ABVAL                                          
025976,000160: 34,2034           27664                           STOVL    DELVSAB                               #  DELTA V MAG.
025977,000161: 34,2035           03642                                    RTIG                                  #  (FOR PERIAPO)
025978,000162: 34,2036           53315                           PDVL     VAD                                   #  VREQUIRED = VTIG + DELVSIN (FOR PERIAPO)
025979,000163: 34,2037           03650                                    VTIG                                  
025980,000164: 34,2040           03656                                    DELVSIN                               
025981,000165: 34,2041           77624                           CALL                                           
025982,000166: 34,2042           46316                                    PERIAPO1                              
025983,000167: 34,2043           77624                           CALL                                           
025984,000168: 34,2044           46426                                    SHIFTR1                               #  RESCALE IF NEEDED
025985,000169: 34,2045           77624                           CALL                                           #  LIMIT DISPLAY TO 9999.9 N. MI.
025986,000170: 34,2046           45636                                    MAXCHK                                
025987,000171: 34,2047           16321                           STODL    HPER                                  #  PERIGEE ALT 2(29) METERS, FOR DISPLAY
025988,000172: 34,2050           00005                                    4D                                    
025989,000173: 34,2051           77624                           CALL                                           
025990,000174: 34,2052           46426                                    SHIFTR1                               #  RESCALE IF NEEDED
025991,000175: 34,2053           77624                           CALL                                           #  LIMIT DISPLAY TO 9999.9 N. MI.
025992,000176: 34,2054           45636                                    MAXCHK                                
025993,000177: 34,2055           36317                           STCALL   HAPO                                  #  APOGEE ALT 2(29) METERS, FOR DISPLAY
025994,000178: 34,2056           03632                                    QTEMP                                 
025995,000179: 
025996,000180: 

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