Source Code

These source-code files are part of a reconstructed copy of Luminary 163, the first (unflown) release of the Apollo 14 Lunar Module (LM) Apollo Guidance Computer (AGC) software.

The reconstruction began with reconstructed source code for Luminary 173. Changes between revision 163 and 173 were backed out, as described by Luminary memos 157 and 158. The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152N. Note that page numbers in the reconstructed code match those for the baseline log section mentioned in each file's changelog; the page numbers for a real Luminary 163 listing would be different.

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.

030399,000002:                                                                                                  ## Copyright:   Public domain.
030400,000003:                                                                                                  ## Filename:    R30.agc
030401,000004:                                                                                                  ## Purpose:     A section of Luminary revision 163.
030402,000005:                                                                                                  ##              It is part of the reconstructed source code for the first
030403,000006:                                                                                                  ##              (unflown) release of the flight software for the Lunar
030404,000007:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 14.
030405,000008:                                                                                                  ##              The code has been recreated from a reconstructed copy of
030406,000009:                                                                                                  ##              Luminary 173, as well as Luminary memos 157 amd 158.
030407,000010:                                                                                                  ##              It has been adapted such that the resulting bugger words
030408,000011:                                                                                                  ##              exactly match those specified for Luminary 163 in NASA
030409,000012:                                                                                                  ##              drawing 2021152N, which gives relatively high confidence
030410,000013:                                                                                                  ##              that the reconstruction is correct.
030411,000014:                                                                                                  ## Reference:   pp. 706-716
030412,000015:                                                                                                  ## Assembler:   yaYUL
030413,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
030414,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
030415,000018:                                                                                                  ## Mod history: 2019-08-21 MAS  Created from Luminary 173.
030416,000019:                                                                                                  ##              2021-05-30 ABS  TICKTIFF -> TICKTFF
030417,000020: 

Page 706

030419,000022:                                                                                                  #  SUBROUTINE NAME:     V82CALL
030420,000023:                                                                                                  #  MOD NO:  0                                                              DATE:           16 FEB 67
030421,000024:                                                                                                  #  MOD BY:  RR BAIRNSFATHER                                                LOG SECTION:    R30
030422,000025:                                                                                                  #  MOD NO: 1            MOD BY: RR BAIRNSFATHER       DATE: 11 APR 67      SR30.1 CHANGED TO ALLOW MONITOR OPERN
030423,000026:                                                                                                  #  MOD  NO: 2           MOD  BY ALONSO                DATE : 11 DEC 67     VB82 PROGRAM REWRITTEN
030424,000027:                                                                                                  #  MOD NO: 3            MOD  BY ALONSO                DATE: 26 MAR 68      PROG MOD TO HANDLE DIF EARTH/MOON SCALE
030425,000028:                                                                                                  #   NEW FUNCTIONAL DESCRIPTION:    CALLED BY VERB 82 ENTER.  PRIORITY 10
030426,000029:                                                                                                  #    USED THROUGHOUT.              CALCULATE AND DISPLAY ORBITAL PARAMETERS
030427,000030: 
030428,000031:                                                                                                  #  1. IF AVERAGE G IS OFF:
030429,000032:                                                                                                  #           FLASH DISPLAY V04N06. R2 INDICATES WHICH SHIP'S STATE VECTOR IS
030430,000033:                                                                                                  #            TO BE UPDATED. INITIAL CHOICE IS THIS SHIP (R2=1). ASTRONAUT
030431,000034:                                                                                                  #            CAN CHANGE TO OTHER SHIP BY V22EXE, WHERE X NOT EQ 1.
030432,000035:                                                                                                  #           SELECTED STATE VECTOR UPDATED BY THISPREC (OTHPREC).
030433,000036:                                                                                                  #           CALLS SR30.1 (WHICH CALLS TFFCONMU + TFFRP/RA) TO CALCULATE
030434,000037:                                                                                                  #            RPER (PERIGEE RADIUS), RAPO (APOGEE RADIUS), HPER (PERIGEE
030435,000038:                                                                                                  #            HEIGHT ABOVE LAUNCH PAD OR LUNAR LANDING SITE), HAPO (APOGEE
030436,000039:                                                                                                  #            HEIGHT AS ABOVE), TPER (TIME TO PERIGEE), TFF (TIME TO
030437,000040:                                                                                                  #            INTERSECT 300 KFT ABOVE PAD OR 35KFT ABOVE LANDING SITE).
030438,000041:                                                                                                  #           FLASH MONITOR V16N44 (HAPO, HPER, TFF).TFF IS -59M59S IF IT WAS
030439,000042:                                                                                                  #            NOT COMPUTABLE, OTHERWISE IT INCREMENTS ONCE PER SECOND.
030440,000043:                                                                                                  #            ASTRONAUT HAS OPTION TO MONITOR TPER BY KEYING IN N 32 E.
030441,000044:                                                                                                  #            DISPLAY IS IN HMS, IS NEGATIVE (AS WAS TFF), AND INCREMENTS
030442,000045:                                                                                                  #            ONCE PER SECOND ONLY IF TFF DISPLAY WAS -59M59S.
030443,000046: 
030444,000047:                                                                                                  #  2. IF AVERAGE G IS ON:
030445,000048:                                                                                                  #           CALLS SR30.1 APPROX EVERY TWO SECS.  STATE VECTOR IS ALWAYS
030446,000049:                                                                                                  #            FOR THIS VEHICLE. V82 DOES NOT DISTURB STATE VECTOR.  RESULTS
030447,000050:                                                                                                  #            OF SR30.1 ARE RAPO, RPER, HAPO, HPER, TPER, TFF.
030448,000051:                                                                                                  #           FLASH MONITOR V16N44 (HAPO, HPER, TFF).
030449,000052:                                                                                                  #  ADDENDUM: HAPO AND HPER SHOULD BE CHANGED TO READ HAPOX AND HPERX IN THE
030450,000053:                                                                                                  #            ABOVE REMARKS.
030451,000054: 
030452,000055:                                                                                                  #  CALLING SEQUENCE:  VERB 82 ENTER.
030453,000056: 
030454,000057: 
030455,000058:                                                                                                  #  SUBROUTINES CALLED:  SR30.1, GOXDSPF
030456,000059:                                                                                                  #                       MAYBE - THISPREC , OTHPREC, LOADTIME, DELRSPL
030457,000060:                                                                                                  #  NORMAL EXIT MODES:  TC ENDEXT
030458,000061: 
030459,000062:                                                                                                  #  ALARMS:  NONE
030460,000063: 
030461,000064:                                                                                                  #  OUTPUT:  HAPOX    (-29) M
030462,000065:                                                                                                  #           HPERX    (-29) M
030463,000066:                                                                                                  #           RAPO     (-29) M EARTH
030464,000067:                                                                                                  #                    (-27) M MOON
030465,000068:                                                                                                  #           RPER     (-29) M EARTH
030466,000069:                                                                                                  #                    (-27) M MOON
030467,000070:                                                                                                  #           TFF      (-28) CS      CONTAINS NEGATIVE QUANTITY
030468,000071:                                                                                                  #           -TPER    (-28) CS      CONTAINS NEGATIVE QUANTITY
030469,000072: 

Page 707

030471,000074: 
030472,000075:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED: STATE VECTOR.
030473,000076: 
030474,000077:                                                                                                  #  DEBRIS:  QPRET, RONE, VONE,TFF/RTMU, HPERMIN, RPADTEM, V82EMFLG.
030475,000078:                                                                                                  #           MAYBE: TSTART82, V82FLAGS, TDEC1.
030476,000079: 
030477,000080: 
030478,000081: 13,2347  E4,1517                                  EBANK=   HAPOX                                 
030479,000082: 31,2144                                           BANK     31                                    
030480,000083: 22,2000                                           SETLOC   R30LOC                                
030481,000084: 22,2000                                           BANK                                           
030482,000085: 22,3242                                           COUNT*   $$/R30                                
030483,000086: 
030484,000087: 22,3242           06042        V82CALL            TC       INTPRET                               
030485,000088: 22,3243           52014                           BON      GOTO                                  
030486,000089: 22,3244           03712                                    AVEGFLAG                              
030487,000090: 22,3245           45465                                    V82GON                                #  IF AVERAGE G ON
030488,000091: 22,3246           45247                                    V82GOFF                               #  IF AVERAGE G OFF
030489,000092: 
030490,000093: 
030491,000094: 22,3247           77776        V82GOFF            EXIT                                           #  ALLOW ASTRONAUT TO SELECT VEHICLE
030492,000095: 22,3250           34752                           CAF      TWO                                   #  DESIRED FOR ORBITAL PARAMETERS
030493,000096: 22,3251           55050                           TS       OPTIONX                               #  CALCULATION AND DISPLAY.
030494,000097: 22,3252           34753                           CAF      ONE                                   
030495,000098: 22,3253           55051                           TS       OPTIONX    +1                         
030496,000099: 22,3254           33316                           CAF      OPTIONVN                              #  V 04 N 06
030497,000100: 22,3255           04616                           TC       BANKCALL                              
030498,000101: 22,3256           20334                           CADR     GOXDSPF                               
030499,000102: 22,3257           05503                           TC       ENDEXT                                #  TERMINATE
030500,000103: 22,3260           03262                           TC       +2                                    #  PROCEED
030501,000104: 22,3261           03254                           TC       -5                                    #  DATA IN. OPTION1+1 = 1 FOR THIS VEHICLE.
030502,000105:                                                                                                  #                 UNEQ 1 FOR OTHER VEHICLE.
030503,000106: 22,3262           34750                           CAF      BIT4                                  #  80 MS
030504,000107: 22,3263           05214                           TC       WAITLIST                              
030505,000108: 22,3264  E4,1540                                  EBANK=   TFF                                   
030506,000109: 22,3264           03430 44064                     2CADR    TICKTEST                              
030507,000110: 
030508,000111: 22,3266           00003                           RELINT                                         
030509,000112: 22,3267           33320        V82GOFLP           CAF      TFFBANK                               #  MAJOR RECYCLE LOOP ENTRY
030510,000113: 22,3270           54003                           TS       EBANK                                 
030511,000114: 22,3271           34755                           CAF      ZERO                                  
030512,000115: 22,3272           55537                           TS       V82FLAGS                              #  ZERO FLAGS FOR TICKTEST. INHIBITS
030513,000116:                                                                                                  #  DECREMENTING OF TFF AND -TPER.
030514,000117: 22,3273           35021                           CAF      PRIO7                                 
030515,000118: 22,3274           05105                           TC       FINDVAC                               #  V82GOFF1 WILL EXECUTE STATE VECTOR
030516,000119: 22,3275  E4,1540                                  EBANK=   TFF                                   #  UPDATE AND ORBIT CALCULATIONS FOR
030517,000120: 22,3275           03321 44064                     2CADR    V82GOFF1                              #  SELECTED VEHICLE ABOUT PROPER BODY.
030518,000121: 
030519,000122: 22,3277           00003                           RELINT                                         
030520,000123: 22,3300           36250        V82STALL           CAF      THREE                                 #  STALL IN THIS LOOP AND WITHOLD V 16 N 44

Page 708

030522,000125: 22,3301           71537                           MASK     V82FLAGS                              #  UNTIL STATE VECTOR UPDATE SETS ONE OF
030523,000126: 22,3302           10000                           CCS      A                                     #  OUR FLAG BITS.
030524,000127: 22,3303           03310                           TC       FLAGGON                               #  EXIT FROM STALL LOOP.
030525,000128: 22,3304           34777                           CAF      1SEC                                  
030526,000129: 22,3305           04616                           TC       BANKCALL                              
030527,000130: 22,3306           01736                           CADR     DELAYJOB                              
030528,000131: 22,3307           03300                           TC       V82STALL                              
030529,000132: 
030530,000133: 22,3310           33317        FLAGGON            CAF      V16N44                                #  MONITOR HAPO,HPER,TFF.
030531,000134: 22,3311           04616                           TC       BANKCALL                              
030532,000135: 22,3312           20334                           CADR     GOXDSPF                               
030533,000136: 22,3313           05574                           TC       B5OFF                                 #  TERM  THIS TELLS TICKTEST TO KILL ITSELF
030534,000137: 22,3314           05574                           TC       B5OFF                                 #  PROCEED  DITTO
030535,000138: 22,3315           03267                           TC       V82GOFLP                              #  RECYCLE  RECOMPUTE STATE VECT + DISPLAY
030536,000139: 
030537,000140: 22,3316           01014        OPTIONVN           VN       412                                   
030538,000141: 22,3317           04054        V16N44             VN       1644                                  
030539,000142: 22,3320           02140        TFFBANK            ECADR    TFF                                   
030540,000143: 
030541,000144: 
030542,000145: 22,3321           06042        V82GOFF1           TC       INTPRET                               
030543,000146: 22,3322           77634                           RTB                                            
030544,000147: 22,3323           21574                                    LOADTIME                              
030545,000148: 22,3324           00041                           STORE    TDEC1                                 #  TIME FOR STATE VECTOR UPDATE.
030546,000149: 22,3325           02205                           STORE    TSTART82                              #  TIME FOR INTERNAL USE.
030547,000150: 22,3326           77776                           EXIT                                           
030548,000151: 22,3327           41051                           CS       OPTIONX    +1                         #  1 FOR THIS VEHICLE, NOT 1 FOR OTHER.
030549,000152: 22,3330           64753                           AD       ONE                                   
030550,000153: 22,3331           00006                           EXTEND                                         
030551,000154: 22,3332           13356                           BZF      THISSHIP                              
030552,000155: 22,3333           06042        OTHSHIP            TC       INTPRET                               
030553,000156: 22,3334           77624                           CALL                                           #  CALL STATE VECTOR UPDATE FOR OTHER SHIP.
030554,000157: 22,3335           27042                                    OTHPREC                               
030555,000158: 22,3336           77775        BOTHSHIP           VLOAD                                          #  MOVE RESULTS INTO TFFCONIC STORAGE AREAS
030556,000159: 22,3337           00001                                    RATT                                  #   TO BE CALLED BY SR30.1.
030557,000160: 22,3340           26207                           STOVL    RONE                                  #  RATT AT (-29)M FOR EARTH OR MOON
030558,000161: 22,3341           00007                                    VATT                                  
030559,000162: 22,3342           02215                           STORE    VONE                                  #   VATT AT (-7)M/CS FOR EARTH OR MOON
030560,000163: 22,3343           77743                           DLOAD*                                         
030561,000164: 22,3344           73774                                    1/RTMUE,2                             #   X2 IS 0 FOR EARTH CENTERED STATE VEC
030562,000165: 22,3345           00037                           STORE    TFF/RTMU                              #   X2 IS 2 FOR MOON
030563,000166: 22,3346           77743                           DLOAD*                                         #  AS LEFT BY THISPREC OR OTHPREC.
030564,000167: 22,3347           72411                                    MINPERE,2                             
030565,000168: 22,3350           02201                           STORE    HPERMIN                               #    TFFRTMU, HPERMIN AND RPADTEM ARE ALL
030566,000169: 22,3351           46135                           SLOAD    BHIZ                                  #  EARTH/MOON PARAMETERS AS SET HERE.
030567,000170: 22,3352           00050                                    X2                                    
030568,000171: 22,3353           45367                                    EARTHPAD                              
030569,000172: 22,3354           77650                           GOTO                                           
030570,000173: 22,3355           45373                                    MOONPAD                               

Page 709

030572,000175: 22,3356           06042        THISSHIP           TC       INTPRET                               
030573,000176: 22,3357           77624                           CALL                                           #  CALL STATE VECTOR UPDATE FOR THIS SHIP.
030574,000177: 22,3360           27056                                    THISPREC                              
030575,000178: 22,3361           77650                           GOTO                                           
030576,000179: 22,3362           45336                                    BOTHSHIP                              
030577,000180: 
030578,000181:                                                                                                  #  THE FOLLOWING CONSTANTS ARE PAIRWISE INDEXED. DO NOT SEPARATE PAIRS.
030579,000182: 
030580,000183: 22,3363           00001 11530  MINPERM            2DEC     10668      B-27                       #  35 KFT MIN PERIGEE HEIGHT FOR MOON(-27)M
030581,000184: 
030582,000185: 22,3365           00002 31230  MINPERE            2DEC     91440      B-29                       #  300 KFT (-29)M FOR EARTH
030583,000186: 
030584,000187: 22,3367           43145        EARTHPAD           DLOAD    CLRGO                                 #   PAD 37-B RADIUS.  SCALED AT (-29)M.
030585,000188: 22,3370           06334                                    RPAD                                  
030586,000189: 22,3371           03635                                    V82EMFLG                              #   INDICATE EARTH SCALING FOR SR30.1
030587,000190: 22,3372           45377                                    BOTHPAD                               
030588,000191: 
030589,000192: 22,3373           51575        MOONPAD            VLOAD    ABVAL                                 #  COMPUTE MOON PAD RADIUS FROM RLS VECTOR.
030590,000193: 22,3374           02021                                    RLS                                   #   SCALED AT (-27)M.
030591,000194: 22,3375           77614                           SET                                            
030592,000195: 22,3376           03475                                    V82EMFLG                              #   INDICATE MOON SCALING FOR SR30.1
030593,000196: 22,3377           36203        BOTHPAD            STCALL   RPADTEM                               
030594,000197: 22,3400           45551                                    SR30.1                                #  CALCULATE ORBITAL PARAMETERS
030595,000198: 22,3401           45234                           RTB      DSU                                   
030596,000199: 22,3402           21574                                    LOADTIME                              
030597,000200: 22,3403           02205                                    TSTART82                              #  PRESENT TIME - TIME V82GOFF1 BEGAN
030598,000201: 22,3404           02205                           STORE    TSTART82                              #                 SAVE IT
030599,000202: 22,3405           53145                           DLOAD    BZE                                   #  SR30.1 SETS -TPER=0 IF HPER L/
030600,000203: 22,3406           02143                                    -TPER                                 #   HPERMIN (300 OR 35) KFT.
030601,000204: 22,3407           45420                                    TICKTFF                               #  (-TPER = 0)
030602,000205: 22,3410           43345        TICKTPER           DLOAD    DAD                                   #  (-TPER NON ZERO)  TFF WAS NOT COMPUTED,
030603,000206: 22,3411           02143                                    -TPER                                 #  BUT WAS SET TO 59M59S.DONT TICK TFF, DO
030604,000207: 22,3412           02205                                    TSTART82                              #  TICK -TPER. DISPLAY BOTH.
030605,000208: 22,3413           02143                           STORE    -TPER                                 #  -TPER CORRECTED FOR TIME SINCE V82GOFF1
030606,000209: 22,3414           77776                           EXIT                                           #  BEGAN.
030607,000210: 22,3415           34753                           CAF      BIT1                                  
030608,000211: 22,3416           55537                           TS       V82FLAGS                              #  INFORMS TICKTEST TO INCREMENT ONLY -TPER
030609,000212: 22,3417           05155                           TC       ENDOFJOB                              
030610,000213: 
030611,000214: 22,3420           43345        TICKTFF            DLOAD    DAD                                   #  (-TPER=0)  TFF WAS COMPUTED.TICK TFF.
030612,000215: 22,3421           02141                                    TFF                                   #  DO NOT TICK -TPER.DISPLAY TFF, BUT NOT
030613,000216: 22,3422           02205                                    TSTART82                              #  -TPER.
030614,000217: 22,3423           02141                           STORE    TFF                                   #  TFF CORRECTED FOR TIME SINCE V82GOFF1
030615,000218: 22,3424           77776                           EXIT                                           #  BEGAN.
030616,000219: 22,3425           34752                           CAF      BIT2                                  
030617,000220: 22,3426           55537                           TS       V82FLAGS                              #  INFORMS TICKTEST TO INCREMENT ONLY TFF.
030618,000221: 22,3427           05155                           TC       ENDOFJOB                              
030619,000222: 

Page 710

030621,000224: 22,3430           34747        TICKTEST           CAF      BIT5                                  #  THIS WAITLIST PROGRAM PERPETUATES ITSELF
030622,000225: 22,3431           71043                           MASK     EXTVBACT                              #  ONCE A SEC UNTIL BIT 5 OF EXTVBACT =0.
030623,000226: 22,3432           10000                           CCS      A                                     
030624,000227: 22,3433           03441                           TC       DOTICK                                
030625,000228: 22,3434           37716                           CAF      PRIO25                                
030626,000229: 22,3435           05072                           TC       NOVAC                                 #  TERMINATE V 82.CANT CALL ENDEXT IN RUPT.
030627,000230: 22,3436     1043                                  EBANK=   EXTVBACT                              
030628,000231: 22,3436           05503 04062                     2CADR    ENDEXT                                
030629,000232: 
030630,000233: 22,3440           05272                           TC       TASKOVER                              
030631,000234: 22,3441           34777        DOTICK             CAF      1SEC                                  #  RE-REQUEST TICKTEST.
030632,000235: 22,3442           05214                           TC       WAITLIST                              
030633,000236: 22,3443  E4,1540                                  EBANK=   TFF                                   
030634,000237: 22,3443           03430 44064                     2CADR    TICKTEST                              
030635,000238: 
030636,000239: 22,3445           36250                           CAF      THREE                                 
030637,000240: 22,3446           71537                           MASK     V82FLAGS                              
030638,000241: 22,3447           50000                           INDEX    A                                     
030639,000242: 22,3450           03451                           TC       +1                                    
030640,000243: 22,3451           05272                           TC       TASKOVER                              #  IF NO FLAGBITS SET DONT CHANGE TFF OR
030641,000244:                                                                                                  #  -TPER, BUT CONTINUE LOOP.
030642,000245: 22,3452           03460                           TC       TPERTICK                              #  ONLY BIT 1 SET. INCR -TPER BY 1 SEC.
030643,000246: 22,3453           34777        TFFTICK            CAF      1SEC                                  #  ONLY BIT 2 SET. INCR TFF BY 1 SEC.
030644,000247: 22,3454           54001                           TS       L                                     
030645,000248: 22,3455           34755                           CAF      ZERO                                  
030646,000249: 22,3456           21541                           DAS      TFF                                   
030647,000250: 22,3457           05272                           TC       TASKOVER                              
030648,000251: 22,3460           34777        TPERTICK           CAF      1SEC                                  
030649,000252: 22,3461           54001                           TS       L                                     
030650,000253: 22,3462           34755                           CAF      ZERO                                  
030651,000254: 22,3463           21543                           DAS      -TPER                                 
030652,000255: 22,3464           05272                           TC       TASKOVER                              
030653,000256: 

Page 711

030655,000258: 22,3465           77776        V82GON             EXIT                                           #   AVERAGE G ON. USE CURRENT STATE VECTOR
030656,000259:                                                                                                  #  FOR ORBITAL PARAMETER CALCULATIONS.
030657,000260: 22,3466           35021                           CAF      PRIO7                                 #  LESS THAN LAMBERT
030658,000261: 22,3467           05105                           TC       FINDVAC                               #  V82GON1 WILL PERFORM ORBIT CALCULATIONS
030659,000262: 22,3470  E4,1540                                  EBANK=   TFF                                   #  ABOUT PROPER BODY APPROX ONCE PER SEC.
030660,000263: 22,3470           03503 44064                     2CADR    V82GON1                               
030661,000264: 
030662,000265: 22,3472           00003                           RELINT                                         
030663,000266: 22,3473           10067                           CCS      NEWJOB                                #  WITHOLD V16 N44 UNTIL FIRST ORBIT CALC
030664,000267: 22,3474           05122                           TC       CHANG1                                #  IS DONE. NOTE: V82GON1 (PRIO7, FINDVAC
030665,000268:                                                                                                  #  JOB) IS COMPLETED BEFORE V82GON (PRIO7,
030666,000269:                                                                                                  #  NOVAC JOB).
030667,000270: 22,3475           33317        V82REDSP           CAF      V16N44                                #  MONITOR HAPO, HPER, TFF
030668,000271: 22,3476           04616                           TC       BANKCALL                              
030669,000272: 22,3477           20334                           CADR     GOXDSPF                               
030670,000273: 22,3500           05574                           TC       B5OFF                                 #  TERM THIS TELLS V82GON1 TO KILL ITSELF.
030671,000274: 22,3501           05574                           TC       B5OFF                                 #  PROC DITTO.
030672,000275: 22,3502           03475                           TC       V82REDSP                              #  RECYCLE
030673,000276: 
030674,000277: 22,3503           06042        V82GON1            TC       INTPRET                               #  THIS EXEC PROGRAM PERPETUATES ITSELF
030675,000278:                                                                                                  #  ONCE A SEC UNTIL BIT 5 OF EXTVBACT =0.
030676,000279: 22,3504           52175                           VLOAD    GOTO                                  #  HOLDS OFF CCS NEWJOB BETWEEN RN AND
030677,000280: 22,3505           01220                                    RN                                    #    VN FETCH SO RN , VN ARE FROM SAME
030678,000281: 22,3506           45507                                    NEXTLINE                              #    STATE VECTOR UPDATE.
030679,000282: 22,3507           26207        NEXTLINE           STOVL    RONE                                  #   RN AT (-29)M FOR EARTH OR MOON
030680,000283: 22,3510           01226                                    VN                                    
030681,000284: 22,3511           02215                           STORE    VONE                                  #  VN AT (-7)M/CS FOR EARTH OR MOON
030682,000285: 22,3512           52014                           BON      GOTO                                  
030683,000286: 22,3513           04304                                    MOONTHIS                              #  FLAG INDICATES BODY ABOUT WHICH ORBITAL
030684,000287: 22,3514           45516                                    MOONGON                               #     CALCULATIONS ARE TO BE PERFORMED.
030685,000288: 22,3515           45527                                    EARTHGON                              #    IF SET - MOON , IF RESET - EARTH.
030686,000289: 
030687,000290: 22,3516           71214        MOONGON            SET      DLOAD                                 
030688,000291: 22,3517           03475                                    V82EMFLG                              #  INDICATE MOON SCALING FOR SR30.1
030689,000292: 22,3520           04001                                    1/RTMUM                               #  LUNAR PARAMETERS LOADED HERE FOR SR30.1
030690,000293: 22,3521           14037                           STODL    TFF/RTMU                              
030691,000294: 22,3522           05364                                    MINPERM                               
030692,000295: 22,3523           26201                           STOVL    HPERMIN                               
030693,000296: 22,3524           02021                                    RLS                                   #   SCALED AT (-27)M.
030694,000297: 22,3525           52046                           ABVAL    GOTO                                  
030695,000298: 22,3526           45536                                    V82GON2                               
030696,000299: 22,3527           71214        EARTHGON           CLEAR    DLOAD                                 
030697,000300: 22,3530           03675                                    V82EMFLG                              #  INDICATE EARTH SCALING FOR SR30.1
030698,000301: 22,3531           04003                                    1/RTMUE                               #  EARTH PARAMETERS LOADED HERE FOR SR30.1
030699,000302: 22,3532           14037                           STODL    TFF/RTMU                              
030700,000303: 22,3533           05366                                    MINPERE                               
030701,000304: 22,3534           16201                           STODL    HPERMIN                               
030702,000305: 22,3535           06334                                    RPAD                                  
030703,000306: 22,3536           36203        V82GON2            STCALL   RPADTEM                               #  COMMON CODE FOR EARTH & MOON.
030704,000307: 22,3537           45551                                    SR30.1                                

Page 712

030706,000309: 22,3540           77776                           EXIT                                           
030707,000310: 22,3541           34747        V82GON3            CAF      BIT5                                  
030708,000311: 22,3542           71043                           MASK     EXTVBACT                              #  SEE IF ASTRONAUT HAS SIGNALLED TERMINATE
030709,000312: 22,3543           00006                           EXTEND                                         
030710,000313: 22,3544           15503                           BZF      ENDEXT                                #  YES, TERMINATE VB 82 LOOP
030711,000314: 22,3545           34777                           CAF      1SEC                                  
030712,000315: 22,3546           04616                           TC       BANKCALL                              #  WAIT ONE SECOND BEFORE REPEATING
030713,000316: 22,3547           01736                           CADR     DELAYJOB                              #    ORBITAL PARAMETER COMPUTATION.
030714,000317: 22,3550           03503                           TC       V82GON1                               
030715,000318: 
030716,000319: 22,3551  22,3541               SPLRET             =        V82GON3                               
030717,000320: 

Page 713

030719,000322:                                                                                                  #  SUBROUTINE NAME:     SR30.1
030720,000323:                                                                                                  #  MOD NO:  0                                                              DATE:           16 FEB 67
030721,000324:                                                                                                  #  MOD BY:  RR BAIRNSFATHER                                                LOG SECTION:    R32
030722,000325:                                                                                                  #  MOD NO:  1           MOD BY:  RR BAIRNSFATHER      DATE: 11 APR 67      SR30.1 CHANGED TO ALLOW MONITOR OPERN
030723,000326:                                                                                                  #  MOD NO:  2           MOD BY:  RR BAIRNSFATHER      DATE:  14 APR 67     ADD OVFL CK FOR RAPO
030724,000327:                                                                                                  #  MOD NO:  3           MOD BY ALONSO                 DATE: 11 DEC 67      SUBROUTINE REWRITTEN
030725,000328:                                                                                                  #  MOD NO: 4            MOD BY ALONSO                 DATE: 26 MAR 68      PROG MOD TO HANDLE DIF EARTH/MOON SCALE
030726,000329:                                                                                                  #  MOD NO:  5           MOD BY:  RR BAIRNSFATHER      DATE:  6 AUG 68      OVFL CK FOR HAPO & HPER.VOIDS MOD #2.
030727,000330: 
030728,000331:                                                                                                  #  NEW FUNCTIONAL DESCRIPTION:     ORBITAL PARAMETERS DISPLAY FOR NOUNS 32  AND 44.
030729,000332:                                                                                                  #  SR30.1 CALLS TFFCONMU AND TFFRP/RA TO CALCULATE RPER (PERIGEE RADIUS),
030730,000333:                                                                                                  #  RAPO (APOGEE RADIUS), HPER (PERIGEE HEIGHT ABOVE LAUNCH PAD OR LUNAR
030731,000334:                                                                                                  #  LANDING SITE), HAPO (APOGEE HEIGHT AS ABOVE), TPER (TIME TO PERIGEE),
030732,000335:                                                                                                  #  TFF (TIME TO INTERSECT 300 KFT ABOVE PAD OR 35KFT ABOVE LANDING SITE).
030733,000336:                                                                                                  #  IF HPER IS GREATER THAN OR EQUAL TO HPERMIN, CALCULATES TPER AND STORES
030734,000337:                                                                                                  #  NEGATIVE    IN -TPER. OTHERWISE STORES +0 IN -TPER. WHENEVER TPER IS
030735,000338:                                                                                                  #  CALCULATED, TFF IS NOT COMPUTABLE AND DEFAULTS TO -59MIN 59SEC. IF HAPO
030736,000339:                                                                                                  #  WOULD EXCEED 9999.9 NM, IT IS LIMITED TO THAT VALUE FOR DISPLAY.
030737,000340: 
030738,000341:                                                                                                  #  ADDENDUM: HAPO AND HPER SHOULD BE CHANGED TO READ HAPOX AND HPERX IN THE
030739,000342:                                                                                                  #            ABOVE REMARKS.
030740,000343: 
030741,000344:                                                                                                  #  CALLING SEQUENCE:         CALL
030742,000345:                                                                                                  #                                  SR30.1
030743,000346:                                                                                                  #  SUBROUTINES CALLED:       TFFCONMU, TFFRP/RA, CALCTPER, CALCTFF
030744,000347:                                                                                                  #  NORMAL EXIT MODE:         CALLING LINE +1 (STILL IN INTERPRETIVE MODE)
030745,000348:                                                                                                  #  ALARMS:                   NONE
030746,000349:                                                                                                  #  OUTPUT:  RAPO   (-29) M EARTH   APOGEE RADIUS   EARTH CENTERED COORD.
030747,000350:                                                                                                  #                  (-27) M MOON                    MOON CENTERED COORD.
030748,000351:                                                                                                  #           RPER   (-29) M EARTH   PERIGEE RADIUS  EARTH CENTERED COORD.
030749,000352:                                                                                                  #                  (-27) M MOON                    MOON  CENTERED COORD.
030750,000353:                                                                                                  #           HAPOX  (-29) M         APOGEE ALTITUDE ABOVE PAD OR LAND. SITE MAX VALUE LIMITED TO 9999.9 NM.
030751,000354:                                                                                                  #           HPERX  (-29) M         PERIGEE ALT. ABOVE PAD OR LAND. SITE    MAX VALUE LIMITED TO 9999.9 NM.
030752,000355:                                                                                                  #           TFF    (-28) CS        TIME TO 300KFT OR 35KFT ALTITUDE
030753,000356:                                                                                                  #           -TPER  (-28) CS        TIME TO PERIGEE
030754,000357:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED-
030755,000358:                                                                                                  #           TFF/RTMU (+17) EARTH   RECIPROCAL OF PROPER GRAV CONSTANT FOR
030756,000359:                                                                                                  #                    (+14) MOON    EARTH OR MOON = 1/SQRT(MU).
030757,000360:                                                                                                  #           RONE    (-29) M        STATE VECTOR
030758,000361:                                                                                                  #           VONE    (-7)  M/CS     STATE VECTOR
030759,000362:                                                                                                  #           RPADTEM (-29) M EARTH  RADIUS OF LAUNCH PAD OR LUNAR LANDING
030760,000363:                                                                                                  #                   (-27) M MOON   SITE.
030761,000364:                                                                                                  #           HPERMIN (-29) M EARTH  (300 OR 35)KFT MINIMUM PERIGEE ALTITUDE
030762,000365:                                                                                                  #                   (-27) M MOON   ABOVE LAUNCH PAD OR LUNAR LANDING SITE.
030763,000366:                                                                                                  #           V82EMFLG (INT SW BIT) RESET FOR EARTH, SET FOR MOON.
030764,000367: 
030765,000368:                                                                                                  #  DEBRIS:       QPRET, PDL, S2
030766,000369: 

Page 714

030768,000371: 22,3551                                           COUNT*   $$/SR30S                              
030769,000372: 
030770,000373: 22,3551           44001        SR30.1             SETPD    STQ                                   #  INITIALIZE PUSHDOWN LIST.
030771,000374: 22,3552           00001                                    0                                     
030772,000375: 22,3553           00051                                    S2                                    
030773,000376:                                                                                                  #  SR30.1 INPUT: RONE AT (-29)M EARTH/MOON
030774,000377:                                                                                                  #                VONE AT (-7)M/CS
030775,000378:                                                                                                  #   TFFCONMU,TFFRP/RA,CALCTPER AND CALCTFF
030776,000379:                                                                                                  #   CALLS REQUIRE :
030777,000380:                                                                                                  #   EARTH CENTERED (NO RESCALING REQUIRED)
030778,000381:                                                                                                  #                 RONE SCALED TO B-29 M
030779,000382:                                                                                                  #                 VONE SCALED TO B-7 M/CS
030780,000383:                                                                                                  #   MOON CENTERED  (RESCALING REQUIRED)
030781,000384:                                                                                                  #                 RONE SCALED TO B-27 M
030782,000385:                                                                                                  #                 VONE SCALED TO B-5  M/CS
030783,000386: 22,3554           77214                           BOFF     VLOAD                                 
030784,000387: 22,3555           03755                                    V82EMFLG                              #    OFF FOR EARTH , ON FOR MOON.
030785,000388: 22,3556           45565                                    TFFCALLS                              
030786,000389: 22,3557           02207                                    RONE                                  
030787,000390: 22,3560           77752                           VSL2                                           
030788,000391: 22,3561           26207                           STOVL    RONE                                  
030789,000392: 22,3562           02215                                    VONE                                  
030790,000393: 22,3563           77752                           VSL2                                           
030791,000394: 22,3564           02215                           STORE    VONE                                  
030792,000395: 22,3565           77624        TFFCALLS           CALL                                           
030793,000396: 22,3566           57366                                    TFFCONMU                              
030794,000397: 22,3567           77624                           CALL                                           #  TFFRP/RA COMPUTES RAPO,RPER.
030795,000398: 22,3570           57434                                    TFFRP/RA                              
030796,000399:                                                                                                  #  RETURNS WITH RAPO IN D(MPAC).
030797,000400: 22,3571           77625                           DSU                                            
030798,000401: 22,3572           02203                                    RPADTEM                               
030799,000402: 22,3573           64414                           BOFF     SR2R                                  #  NEED HAPO AT (-29)M FOR DISPLAY.
030800,000403:                                                                                                  #  IF MOON CENTERED, RESCALE FROM (-27)M.
030801,000404:                                                                                                  #   IF EARTH CENTERED ALREADY AT (-29)M.
030802,000405: 22,3574           03755                                    V82EMFLG                              #   OFF FOR EARTH , ON FOR MOON.
030803,000406: 22,3575           45576                                    +1                                    
030804,000407: 22,3576           77624                           CALL                                           #  IF HAPO > MAXNM, SET HAPO =9999.9 NM.
030805,000408: 22,3577           45636                                    MAXCHK                                #  OTHERWISE STORE (RAPO-RPADTEM) IN HAPO.
030806,000409: 22,3600           16120        STORHAPO           STODL    HAPOX                                 
030807,000410: 22,3601           00017                                    RPER                                  
030808,000411: 22,3602           77625                           DSU                                            
030809,000412: 22,3603           02203                                    RPADTEM                               #  GIVES HPER AT (-29)M EARTH, (-27)M MOON.
030810,000413: 22,3604           00161                           STORE    MPAC       +4                         #  SAVE THIS FOR COMPARISON TO HPERMIN.
030811,000414: 22,3605           64414                           BOFF     SR2R                                  #  NEED HPER AT (-29)M FOR DISPLAY.
030812,000415:                                                                                                  #  IF MOON CENTERED, RESCALE FROM (-27)M.
030813,000416:                                                                                                  #  IF EARTH CENTERED ALREADY AT (-29)M.
030814,000417: 22,3606           03755                                    V82EMFLG                              #  OFF FOR EARTH,  ON FOR MOON.
030815,000418: 22,3607           45610                                    +1                                    
030816,000419: 22,3610           77624                           CALL                                           #  IF HPER > MAXNM, SET HPER = 9999.9 NM.
030817,000420: 22,3611           45636                                    MAXCHK                                

Page 715

030819,000422: 22,3612           16122        STORHPER           STODL    HPERX                                 #  STORE (RPER - RPADTEM) INTO HPERX.
030820,000423: 22,3613           00161                                    MPAC       +4                         
030821,000424: 22,3614           51025                           DSU      BPL                                   #  HPERMIN AT (-29)M FOR EARTH, (-27)M MOON
030822,000425: 22,3615           02201                                    HPERMIN                               #  IF HPER L/   HPERMIN (300 OR 35)KFT,
030823,000426: 22,3616           45622                                    DOTPER                                #   THEN ZERO INTO -TPER.
030824,000427: 22,3617           52145                           DLOAD    GOTO                                  #    OTHERWISE CALCULATE TPER.
030825,000428: 22,3620           06520                                    HI6ZEROS                              
030826,000429: 22,3621           45626                                    SKIPTPER                              
030827,000430: 22,3622           45145        DOTPER             DLOAD    CALL                                  
030828,000431: 22,3623           00017                                    RPER                                  
030829,000432: 22,3624           57472                                    CALCTPER                              
030830,000433: 22,3625           77676                           DCOMP                                          #  TPER IS PUT NEG INTO -TPER.
030831,000434: 22,3626           16143        SKIPTPER           STODL    -TPER                                 
030832,000435: 22,3627           02201                                    HPERMIN                               #  HPERMIN AT (-29)M FOR EARTH, (-27)M MOON
030833,000436: 22,3630           45015                           DAD      CALL                                  
030834,000437: 22,3631           02203                                    RPADTEM                               #  RPADTEM AT (-29)M FOR EARTH, (-27)M MOON
030835,000438: 22,3632           57475                                    CALCTFF                               #  GIVES 59M59S FOR TFF IF RPER G/
030836,000439: 22,3633           77676                           DCOMP                                          #    HPERMIN + RPADTEM. (TPER WAS NON ZERO)
030837,000440: 22,3634           36141                           STCALL   TFF                                   #  OTHERWISE COMPUTES TFF.       (GOTO)
030838,000441: 22,3635           00051                                    S2                                    
030839,000442: 
030840,000443: 22,3636           51025        MAXCHK             DSU      BPL                                   #  IF C(MPAC) > 9999.9 NM, MPAC = 9999.9 NM
030841,000444: 22,3637           05646                                    MAXNM                                 
030842,000445: 22,3640           45643                                    +3                                    #  OTHERWISE C(MPAC) = B(MPAC).
030843,000446: 22,3641           43415                           DAD      RVQ                                   
030844,000447: 22,3642           05646                                    MAXNM                                 
030845,000448: 22,3643           43545                 +3        DLOAD    RVQ                                   #  (USED BY P30 - P37 ALSO)
030846,000449: 22,3644           05646                                    MAXNM                                 
030847,000450: 
030848,000451: 22,3645           01065 05603  MAXNM              2OCT     0106505603                            
030849,000452: 

Page 716 This page of the original assembly-listing hardcopy was empty, except for messages generated by the assembler.


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