Source Code

These source-code files were transcribed from scans made from Don Eyles's personal copy of Luminary 069. They were scanned at archive.org's Boston facility, and the scanning was sponsored by Onno Hommes. The code was transcribed from these scans by a team of volunteers who are referenced in the program comments. Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". In some cases, where similar code blocks exist in previously-transcribed AGC programs (primarily Luminary 99, from Apollo 11) those code blocks were used as a starting point and then corrected to agree with the Luminary 69 scans. The full scans are available at the Virtual AGC project's collection at archive.org, while more-convenient reduced-size (but reduced-quality) images are available at the main Virtual AGC website. Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository. Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 069 OF AGC PROGRAM LUMINARY BY NASA 2021112-011
	19:02 NOV. 25,1968
Note that the date is the date of the printout, not the date of the program revision.

027335,000002:                                                                                                  ## Copyright:   Public domain.
027336,000003:                                                                                                  ## Filename:    P30,P37.agc
027337,000004:                                                                                                  ## Purpose:     The main source file for Luminary revision 069.
027338,000005:                                                                                                  ##              It is part of the source code for the original release
027339,000006:                                                                                                  ##              of the flight software for the Lunar Module's (LM) Apollo
027340,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 10. The actual flown
027341,000008:                                                                                                  ##              version was Luminary 69 revision 2, which included a
027342,000009:                                                                                                  ##              newer lunar gravity model and only affected module 2.
027343,000010:                                                                                                  ##              This file is intended to be a faithful transcription, except
027344,000011:                                                                                                  ##              that the code format has been changed to conform to the
027345,000012:                                                                                                  ##              requirements of the yaYUL assembler rather than the
027346,000013:                                                                                                  ##              original YUL assembler.
027347,000014:                                                                                                  ## Reference:   pp. 624-627
027348,000015:                                                                                                  ## Assembler:   yaYUL
027349,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
027350,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
027351,000018:                                                                                                  ## Mod history: 2016-12-13 MAS  Created from Luminary 99.
027352,000019:                                                                                                  ##              2016-12-14 MAS  Updated from comment-proofed Luminary 99 version.
027353,000020:                                                                                                  ##              2016-12-17 RRB  Updated for Luminary 69.
027354,000021:                                                                                                  ##              2017-01-27 RSB  Proofed comment text using octopus/prooferComments
027355,000022:                                                                                                  ##                              but no errors found.
027356,000023: 

Page 624

027358,000025:                                                                                                  #  PROGRAM DESCRIPTION P30       DATE 3-6-67
027359,000026: 
027360,000027:                                                                                                  #  MOD.1 BY RAMA AIYAWAR
027361,000028:                                                                                                  #  FUNCTIONAL DESCRIPTION
027362,000029:                                                                                                  #        ACCEPT ASTRONAUT INPUTS OF TIG,DELV(LV)
027363,000030:                                                                                                  #        CALL IMU STATUS CHECK ROUTINE (R02)
027364,000031:                                                                                                  #        DISPLAY TIME TO GO, APOGEE, PERIGEE, DELV(MAG), MGA AT IGN
027365,000032:                                                                                                  #        REQUEST BURN PROGRAM
027366,000033: 
027367,000034:                                                                                                  #  CALLING SEQUENCE VIA JOB FROM V37
027368,000035: 
027369,000036:                                                                                                  #  EXIT VIA V37 CALL OR TO GOTOPOOH (V34E)
027370,000037: 
027371,000038:                                                                                                  #  SUBROUTINE CALLS -    FLAGUP, PHASCHNG, BANKCALL, ENDOFJOB, GOFLASH, GOFLASHR
027372,000039:                                                                                                  #                        GOPERF3R, INTPRET, BLANKET, GOTOPOOH, R02BOTH, S30.1,
027373,000040:                                                                                                  #                        TTG/N35, MIDGIM, DISPMGA
027374,000041: 
027375,000042:                                                                                                  #  ERASABLE INITIALIZATION - STATE VECTOR
027376,000043: 
027377,000044:                                                                                                  #  OUTPUT-RINIT, VINIT, +MGA, VTIG, RTIG, DELVSIN, DELVSAB, DELVSLV, HAPO,
027378,000045:                                                                                                  #         HPER, TTOGO
027379,000046: 
027380,000047:                                                                                                  #  DEBRIS- A,L, MPAC, PUSHLIST
027381,000048: 
027382,000049: 32,2772                                           BANK     32                                    
027383,000050: 35,2000                                           SETLOC   P30S                                  
027384,000051: 35,2000                                           BANK                                           
027385,000052: 35,2000  E4,1656                                  EBANK=   +MGA                                  
027386,000053: 35,2000                                           COUNT*   $$/P30                                
027387,000054: 35,2000           05504        P30                TC       UPFLAG                                #  SET UPDATE FLAG
027388,000055: 35,2001           00027                           ADRES    UPDATFLG                              
027389,000056: 35,2002           05504                           TC       UPFLAG                                #  SET TRACK FLAG
027390,000057: 35,2003           00031                           ADRES    TRACKFLG                              
027391,000058: 
027392,000059: 35,2004           32025        P30N33             CAF      V06N33                                #  T OF IGN
027393,000060: 35,2005           03651                           TC       VNPOOH                                #  RETURNS ON PROCEED, POOH ON TERMINATE
027394,000061: 
027395,000062: 35,2006           33666                           CAF      V06N81                                #  DISPLAY DELTA V (LV)
027396,000063: 35,2007           03651                           TC       VNPOOH                                #        REDISPLAY ON RECYCLE
027397,000064: 
027398,000065: 35,2010           05516                           TC       DOWNFLAG                              #  RESET UPDATE FLAG
027399,000066: 35,2011           00027                           ADRES    UPDATFLG                              
027400,000067: 35,2012           06036                           TC       INTPRET                               
027401,000068: 35,2013           77624                           CALL                                           
027402,000069: 35,2014           70000                                    S30.1                                 
027403,000070: 35,2015           77414                           SET      EXIT                                  
027404,000071: 35,2016           00470                                    UPDATFLG                              
027405,000072: 35,2017           32026        PARAM30            CAF      V06N42                                #  DISPLAY APOGEE,PERIGEE ,DELTA V
027406,000073: 35,2020           03651                           TC       VNPOOH                                

Page 625

027408,000075: 
027409,000076: 35,2021           06036                           TC       INTPRET                               
027410,000077: 35,2022           77614                           SETGO                                          
027411,000078: 35,2023           01027                                    XDELVFLG                              #  FOR P40'S: EXTERNAL DELTA-V GUIDANCE.
027412,000079: 35,2024           72504                                    REVN1645                              #  TRKMKCNT, TGO, +MGA  DISPLAY
027413,000080: 
027414,000081: 35,2025           01441        V06N33             VN       0633                                  
027415,000082: 35,2026           01452        V06N42             VN       0642                                  
027416,000083: 

Page 626

027418,000085:                                                                                                  #  PROGRAM DESCRIPTION S30.1     DATE 9NOV66
027419,000086: 
027420,000087:                                                                                                  #  MOD NO 1                      LOG SECTION P30,P37
027421,000088:                                                                                                  #  MOD BY RAMA AIYAWAR **
027422,000089: 
027423,000090:                                                                                                  #  FUNCTIONAL DESCRIPTION
027424,000091:                                                                                                  #        BASED ON STORED TARGET PARAMETERS(R OF IGNITION (RTIG), V OF
027425,000092:                                                                                                  #        IGNITION(VTIG), TIME OF IGNITION (TIG)),COMPUTE PERIGEE ALTITUDE
027426,000093:                                                                                                  #        APOGEE ALTITUDE AND DELTAV REQUIRED(DELVSIN).
027427,000094: 
027428,000095:                                                                                                  #  CALLING SEQUENCE
027429,000096:                                                                                                  #        L       CALL
027430,000097:                                                                                                  #        L+1             S30.1
027431,000098: 
027432,000099:                                                                                                  #  NORMAL EXIT MODE
027433,000100:                                                                                                  #        AT L+2 OR CALLING SEQUENCE (GOTO L+2)
027434,000101: 
027435,000102:                                                                                                  #  SUBROUTINES CALLED
027436,000103:                                                                                                  #        LEMPREC
027437,000104:                                                                                                  #        PERIAPO
027438,000105: 
027439,000106:                                                                                                  #  ALARM OR ABORT EXIT MODES
027440,000107:                                                                                                  #                NONE
027441,000108: 
027442,000109:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED
027443,000110:                                                                                                  #        TIG             TIME OF IGNITION                DP B28CS
027444,000111:                                                                                                  #        DELVSLV         SPECIFIED DELTA-V IN LOCAL VERT.
027445,000112:                                                                                                  #                        COORDS. OF ACTIVE VEHICLE AT
027446,000113:                                                                                                  #                TIME OF IGNITION        VECTOR B+7 METERS/CS
027447,000114: 
027448,000115:                                                                                                  #  OUTPUT
027449,000116:                                                                                                  #        RTIG    POSITION AT TIG         VECTOR  B+29 METERS
027450,000117:                                                                                                  #        VTIG    VELOCITY AT TIG         VECTOR  B+29 METERS/CS
027451,000118:                                                                                                  #        PDL 4D  APOGEE ALTITUDE         DP      B+29 M ,  B+27 METERS.
027452,000119:                                                                                                  #        HAPO    APOGEE ALTITUDE         DP      B+29 METERS
027453,000120:                                                                                                  #        PDL 8D  PERIGEE ALTITUDE        DP      B+29 M ,  B+27 METERS.
027454,000121:                                                                                                  #        HPER    PERIGEE ALTITUDE        DP      B+29 METERS
027455,000122:                                                                                                  #        DELVSIN    SPECIFIED DELTA-V IN INERTIAL
027456,000123:                                                                                                  #                   COORD. OF ACTIVE VEHICLE AT
027457,000124:                                                                                                  #                TIME OF IGNITION        VECTOR  B+7 METERS/CS
027458,000125:                                                                                                  #        DELVSAB MAG. OF DELVSIN         VECTOR  B+7 METERS/CS
027459,000126: 
027460,000127:                                                                                                  #  DEBRIS        QTEMP   TEMP.ERASABLE
027461,000128:                                                                                                  #                QPRET, MPAC
027462,000129:                                                                                                  #                PUSHLIST
027463,000130: 
027464,000131: 34,2000                                           SETLOC   P30S1                                 
027465,000132: 34,2000                                           BANK                                           
027466,000133: 
027467,000134: 34,2000                                           COUNT*   $$/S30S                               
027468,000135: 
027469,000136: 34,2000           71220        S30.1              STQ      DLOAD                                 
027470,000137: 34,2001           03630                                    QTEMP                                 
027471,000138: 34,2002           03440                                    TIG                                   #  TIME IGNITION SCALED AT 2(+28)CS
027472,000139: 34,2003           34041                           STCALL   TDEC1                                 
027473,000140: 34,2004           27057                                    LEMPREC                               #  ENCKE ROUTINE FOR LEM
027474,000141: 
027475,000142: 34,2005           67175                           VLOAD    SXA,2                                 

Page 627

027477,000144: 34,2006           00001                                    RATT                                  
027478,000145: 34,2007           03376                                    RTX2                                  
027479,000146: 34,2010           03640                           STORE    RTIG                                  #  RADIUS VECTOR AT IGNITION TIME
027480,000147: 34,2011           57456                           UNIT     VCOMP                                 
027481,000148: 34,2012           27654                           STOVL    DELVSIN                               #  ZRF/LV IN DELVSIN SCALED AT 2
027482,000149: 34,2013           00007                                    VATT                                  #  VELOCITY VECTOR AT TIG, SCALED 2(7) M/CS
027483,000150: 34,2014           03646                           STORE    VTIG                                  
027484,000151: 34,2015           53435                           VXV      UNIT                                  
027485,000152: 34,2016           03640                                    RTIG                                  
027486,000153: 34,2017           66001                           SETPD    SXA,1                                 
027487,000154: 34,2020           00001                                    0                                     
027488,000155: 34,2021           03375                                    RTX1                                  
027489,000156: 34,2022           47206                           PUSH     VXV                                   #  YRF/LV PDL 0 SCALED AT 2
027490,000157: 34,2023           03654                                    DELVSIN                               
027491,000158: 34,2024           63372                           VSL1     PDVL                                  
027492,000159: 34,2025           63315                           PDVL     PDVL                                  #  YRF/LV PDL 6 SCALED AT 2
027493,000160: 34,2026           03654                                    DELVSIN                               #  ZRF/LV PDL 12D SCALED AT 2
027494,000161: 34,2027           03432                                    DELVSLV                               
027495,000162: 34,2030           76505                           VXM      VSL1                                  
027496,000163: 34,2031           00001                                    0                                     
027497,000164: 34,2032           03654                           STORE    DELVSIN                               #  DELTAV IN INERT. COOR. SCALED TO B+7M/CS
027498,000165: 34,2033           77646                           ABVAL                                          
027499,000166: 34,2034           27662                           STOVL    DELVSAB                               #  DELTA V MAG.
027500,000167: 34,2035           03640                                    RTIG                                  #  (FOR PERIAPO)
027501,000168: 34,2036           53315                           PDVL     VAD                                   #  VREQUIRED = VTIG + DELVSIN (FOR PERIAPO)
027502,000169: 34,2037           03646                                    VTIG                                  
027503,000170: 34,2040           03654                                    DELVSIN                               
027504,000171: 34,2041           77624                           CALL                                           
027505,000172: 34,2042           46277                                    PERIAPO1                              
027506,000173: 34,2043           77624                           CALL                                           
027507,000174: 34,2044           46407                                    SHIFTR1                               #  RESCALE IF NEEDED
027508,000175: 34,2045           77624                           CALL                                           #  LIMIT DISPLAY TO 9999.9 N. MI.
027509,000176: 34,2046           45636                                    MAXCHK                                
027510,000177: 34,2047           16325                           STODL    HPER                                  #  PERIGEE ALT 2(29) METERS, FOR DISPLAY
027511,000178: 34,2050           00005                                    4D                                    
027512,000179: 34,2051           77624                           CALL                                           
027513,000180: 34,2052           46407                                    SHIFTR1                               #  RESCALE IF NEEDED
027514,000181: 34,2053           77624                           CALL                                           #  LIMIT DISPLAY TO 9999.9 N. MI.
027515,000182: 34,2054           45636                                    MAXCHK                                
027516,000183: 34,2055           36323                           STCALL   HAPO                                  #  APOGEE ALT 2(29) METERS, FOR DISPLAY
027517,000184: 34,2056           03630                                    QTEMP                                 
027518,000185: 
027519,000186: 

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