Source Code

This is a reconstruction of the AGC program Luminary 99 Rev 0. It was the second release of the Lunar Module flight software targeted for use in Apollo 11, after Luminary 97. A bug (which had been around since at least Apollo 10, Luminary 69) was discovered in Rev 0 shortly before the Apollo 11 flight, resulting in a last minute revision into Rev 1, which is what actually flew rather than the Rev 0 presented here. A hardcopy of Rev 0 is known to exist — it belonged to AGC developer Allan Klumpp for many years — but unfortunately the Virtual AGC Project has not had access to that hardcopy. Thus the code you see here had been reconstructed (we believe accurately) rather than transcribed. The first step of the reconstruction of the Rev 0 source code was the transcription of the Rev 1 source code from a hardcopy in the MIT Museum collection. The process of reverting the active portion of the source code (i.e., other than program comments) from Rev 1 to Rev 0 was very minor, consisting only of moving the position of the STARTSB1 label in FRESH START AND RESTART. Allan had previously given us the checksums of the memory banks of Rev 0, and we have verified the program presented here has checksums identical to all banks of Allan's listing of Rev 0. The notations on Allan's Rev 0 program listing read, in part:

	GAP:  ASSEMBLE REVISION 099 OF AGC PROGRAM LUMINARY BY NASA 2021112-051

A single program comment is known to differ between Rev 0 and Rev 1, but these are harder to reconstruct and verify than changes to the active portion of the code. Thus it is possible that there are additional differences between the program comments in Rev 0 and Rev 1 that are unknown to us, and therefore are not reflected in the code presented here.

031164,000002:                                                                                                  ## Copyright:   Public domain.
031165,000003:                                                                                                  ## Filename:    R30.agc
031166,000004:                                                                                                  ## Purpose:     Part of the reconstructed source code for LMY99 Rev 0,
031167,000005:                                                                                                  ##              otherwise known as Luminary Rev 99, the second release
031168,000006:                                                                                                  ##              of the Apollo Guidance Computer (AGC) software for Apollo 11.
031169,000007:                                                                                                  ##              It differs from LMY99 Rev 1 (the flown version) only in the
031170,000008:                                                                                                  ##              placement of a single label. The corrections shown here have
031171,000009:                                                                                                  ##              been verified to have the same bank checksums as AGC developer
031172,000010:                                                                                                  ##              Allan Klumpp's copy of Luminary Rev 99, and so are believed
031173,000011:                                                                                                  ##              to be accurate. This file is intended to be a faithful 
031174,000012:                                                                                                  ##              recreation, except that the code format has been changed to 
031175,000013:                                                                                                  ##              conform to the requirements of the yaYUL assembler rather than 
031176,000014:                                                                                                  ##              the original YUL assembler.
031177,000015:                                                                                                  ##
031178,000016:                                                                                                  ## Assembler:   yaYUL
031179,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
031180,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo.
031181,000019:                                                                                                  ## Pages:       712-722
031182,000020:                                                                                                  ## Mod history: 2009-05-19 RSB  Adapted from the corresponding 
031183,000021:                                                                                                  ##                              Luminary131 file, using page 
031184,000022:                                                                                                  ##                              images from Luminary 1A.
031185,000023:                                                                                                  ##              2009-06-07 RSB  Removed a space between two components of
031186,000024:                                                                                                  ##                              a 2OCT that isn't legal in yaYUL.
031187,000025:                                                                                                  ##              2016-12-14 RSB  Proofed text comments with octopus/ProoferComments
031188,000026:                                                                                                  ##                              and corrected the errors found.
031189,000027:                                                                                                  ##              2017-02-08 RSB  Comment-text fixes discovered while proofing Artemis 72.
031190,000028:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 5-way
031191,000029:                                                                                                  ##                              side-by-side diff of Luminary 69/99/116/131/210.
031192,000030:                                                                                                  ##              2017-03-17 RSB  Comment-text fixes identified in diff'ing
031193,000031:                                                                                                  ##                              Luminary 99 vs Comanche 55.
031194,000032:                                                                                                  ##              2017-08-01 MAS  Created from LMY99 Rev 1.
031195,000033: 
031196,000034:                                                                                                  ## This source code has been transcribed or otherwise adapted from
031197,000035:                                                                                                  ## digitized images of a hardcopy from the MIT Museum.  The digitization
031198,000036:                                                                                                  ## was performed by Paul Fjeld, and arranged for by Deborah Douglas of
031199,000037:                                                                                                  ## the Museum.  Many thanks to both.  The images (with suitable reduction
031200,000038:                                                                                                  ## in storage size and consequent reduction in image quality as well) are
031201,000039:                                                                                                  ## available online at www.ibiblio.org/apollo.  If for some reason you
031202,000040:                                                                                                  ## find that the images are illegible, contact me at info@sandroid.org
031203,000041:                                                                                                  ## about getting access to the (much) higher-quality images which Paul
031204,000042:                                                                                                  ## actually created.
031205,000043:                                                                                                  ##
031206,000044:                                                                                                  ## The code has been modified to match LMY99 Revision 0, otherwise
031207,000045:                                                                                                  ## known as Luminary Revision 99, the Apollo 11 software release preceeding
031208,000046:                                                                                                  ## the listing from which it was transcribed. It has been verified to
031209,000047:                                                                                                  ## contain the same bank checksums as AGC developer Allan Klumpp's listing
031210,000048:                                                                                                  ## of Luminary Revision 99 (for which we do not have scans).
031211,000049:                                                                                                  ##
031212,000050:                                                                                                  ## Notations on Allan Klumpp's listing read, in part:
031213,000051:                                                                                                  ##
031214,000052:                                                                                                  ##      ASSEMBLE REVISION 099 OF AGC PROGRAM LUMINARY BY NASA 2021112-51
031215,000053: 

Page 712

031217,000055:                                                                                                  #  SUBROUTINE NAME:  V82CALL
031218,000056:                                                                                                  #  MOD NO: 0                                                             DATE: 16 FEB 67
031219,000057:                                                                                                  #  MOD BY: RR BAIRNSFATHER                                               LOG SECTION:  R30
031220,000058:                                                                                                  #  MOD NO: 1     MOD BY:  RR BAIRNSFATHER        DATE: 11 APR 67         SR30.1 CHANGED TO ALLOW MONITOR OPERN
031221,000059:                                                                                                  #  MOD NO: 2     MOD BY  ALONSO                  DATE: 11 DEC 67         VB82 PROGRAM REWRITTEN
031222,000060:                                                                                                  #  MOD NO: 3     MOD BY  ALONSO                  DATE: 26 MAR 68         PROG MOD TO HANDLE DIF EARTH/MOON SCALE
031223,000061: 
031224,000062:                                                                                                  #  NEW FUNCTIONAL DESCRIPTION:   CALLED BY VERB 82 ENTER.  PRIORITY 10
031225,000063:                                                                                                  #  USED THROUGHOUT.              CALCULATE AND DISPLAY ORBITAL PARAMETERS
031226,000064: 
031227,000065:                                                                                                  #  1.    IF AVERAGE G IS OFF:
031228,000066:                                                                                                  #                FLASH DISPLAY V04N06.  R2 INDICATES WHICH SHIP'S STATE VECTOR IS
031229,000067:                                                                                                  #                        TO BE UPDATED.  INITIAL CHOICE IS THIS SHIP (R2=1).  ASTRONAUT
031230,000068:                                                                                                  #                        CAN CHANGE TO OTHER SHIP BY V22EXE, WHERE X NOT EQ 1.
031231,000069:                                                                                                  #                SELECTED STATE VECTOR UPDATED BY THISPREC (OTHPREC).
031232,000070:                                                                                                  #                CALLS SR30.1 (WHICH CALLS TFFCONMU + TFFRP/RA) TO CALCULATE
031233,000071:                                                                                                  #                        RPER (PERIGEE RADIUS), RAPO (APOGEE RADIUS), HPER (PERIGEE
031234,000072:                                                                                                  #                        HEIGHT ABOVE LAUNCH PAD OR LUNAR LANDING SITE), HAPO (APOGEE
031235,000073:                                                                                                  #                        HEIGHT AS ABOVE), TPER (TIME TO PERIGEE), TFF (TIME TO
031236,000074:                                                                                                  #                        INTERSECT 300 KFT ABOVE PAD OR 35KFT ABOVE LANDING SITE).
031237,000075:                                                                                                  #                FLASH MONITOR V16N44 (HAPO, HPER, TFF).  TFF IS -59M59S IF IT WAS
031238,000076:                                                                                                  #                        NOT COMPUTABLE, OTHERWISE IT INCREMENTS ONCE PER SECOND.
031239,000077:                                                                                                  #                        ASTRONAUT HAS OPTION TO MONITOR TPER BY KEYING IN N 32 E.
031240,000078:                                                                                                  #                        DISPLAY IS IN HMS, IS NEGATIVE (AS WAS TFF), AND INCREMENTS
031241,000079:                                                                                                  #                        ONCE PER SECOND ONLY IF TFF DISPLAY WAS -59M59S.
031242,000080:                                                                                                  #        2.      IF AVERAGE G IS ON:
031243,000081:                                                                                                  #                        CALLS SR30.1 APPROX EVERY TWO SECS.  STATE VECTOR IS ALWAYS
031244,000082:                                                                                                  #                                FOR THIS VEHICLE.  V82 DOES NOT DISTURB STATE VECTOR.  RESULTS
031245,000083:                                                                                                  #                                OF SR30.1 ARE RAPO, RPER, HAPO, HPER, TPER, TFF.
031246,000084:                                                                                                  #                        FLASH MONITOR V16N44 (HAPO, HPER, TFF).
031247,000085:                                                                                                  #        ADDENDUM:  HAPO AND HPER SHOULD BE CHANGED TO READ HAPOX AND HPERX IN THE
031248,000086:                                                                                                  #                ABOVE REMARKS.
031249,000087: 
031250,000088:                                                                                                  #  CALLING SEQUENCE: VERB 82 ENTER.
031251,000089: 
031252,000090:                                                                                                  #  SUBROUTINES CALLED:   SR30.1, GOXDSPF
031253,000091:                                                                                                  #                        MAYBE - THISPREC, OTHPREC, LOADTIME, DELRSPL
031254,000092: 
031255,000093:                                                                                                  #  NORMAL EXIT MODES:  TC ENDEXT
031256,000094: 
031257,000095:                                                                                                  #  ALARMS:  NONE
031258,000096: 
031259,000097:                                                                                                  #  OUTPUT:       HAPOX   (-29) M
031260,000098:                                                                                                  #                HPERX   (-29) M
031261,000099:                                                                                                  #                RAPO    (-29) M EARTH
031262,000100:                                                                                                  #                        (-27) M MOON
031263,000101:                                                                                                  #                RPER    (-29) M EARTH
031264,000102:                                                                                                  #                        (-27) M MOON
031265,000103:                                                                                                  #                TFF     (-28) CS        CONTAINS NEGATIVE QUANTITY
031266,000104:                                                                                                  #                -TPER   (-28) CS        CONTAINS NEGATIVE QUANTITY
031267,000105: 

Page 713

031269,000107:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED:  STATE VECTOR.
031270,000108: 
031271,000109:                                                                                                  #  DEBRIS:       QPRET, RONE, VONE, TFF/RTMU, HPERMIN, RPADTEM, V82EMFLG.
031272,000110:                                                                                                  #                MAYBE:  TSTART82, V82FLAGS, TDEC1.
031273,000111: 
031274,000112: 13,2351  E4,1517                                  EBANK=   HAPOX                                 
031275,000113: 31,2144                                           BANK     31                                    
031276,000114: 22,2000                                           SETLOC   R30LOC                                
031277,000115: 22,2000                                           BANK                                           
031278,000116: 22,3242                                           COUNT*   $$/R30                                
031279,000117: 
031280,000118: 22,3242           06037        V82CALL            TC       INTPRET                               
031281,000119: 22,3243           52014                           BON      GOTO                                  
031282,000120: 22,3244           03712                                    AVEGFLAG                              
031283,000121: 22,3245           45465                                    V82GON                                #  IF AVERAGE G ON
031284,000122: 22,3246           45247                                    V82GOFF                               #  IF AVERAGE G OFF
031285,000123: 
031286,000124: 22,3247           77776        V82GOFF            EXIT                                           #  ALLOW ASTRONAUT TO SELECT VEHICLE
031287,000125: 22,3250           34752                           CAF      TWO                                   #  DESIRED FOR ORBITAL PARAMETERS
031288,000126: 22,3251           55051                           TS       OPTIONX                               #  CALCULATION AND DISPLAY.
031289,000127: 22,3252           34753                           CAF      ONE                                   
031290,000128: 22,3253           55052                           TS       OPTIONX    +1                         
031291,000129: 22,3254           33316                           CAF      OPTIONVN                              #  V 04 N 06
031292,000130: 22,3255           04616                           TC       BANKCALL                              
031293,000131: 22,3256           20334                           CADR     GOXDSPF                               
031294,000132: 22,3257           05472                           TC       ENDEXT                                #  TERMINATE
031295,000133: 22,3260           03262                           TC       +2                                    #  PROCEED
031296,000134: 22,3261           03254                           TC       -5                                    #  DATA IN.  OPTION1+1 = 1 FOR THIS VEHICLE.
031297,000135:                                                                                                  #                UNEQ 1 FOR OTHER VEHICLE.
031298,000136: 22,3262           34750                           CAF      BIT4                                  #  80 MS
031299,000137: 22,3263           05203                           TC       WAITLIST                              
031300,000138: 22,3264  E4,1540                                  EBANK=   TFF                                   
031301,000139: 22,3264           03430 44064                     2CADR    TICKTEST                              
031302,000140: 
031303,000141: 22,3266           00003                           RELINT                                         
031304,000142: 22,3267           33320        V82GOFLP           CAF      TFFBANK                               #  MAJOR RECYCLE LOOP ENTRY
031305,000143: 22,3270           54003                           TS       EBANK                                 
031306,000144: 22,3271           34755                           CAF      ZERO                                  
031307,000145: 22,3272           55537                           TS       V82FLAGS                              #  ZERO FLAGS FOR TICKTEST. INHIBITS
031308,000146:                                                                                                  #  DECREMENTING OF TFF AND -TPER.
031309,000147: 22,3273           35021                           CAF      PRIO7                                 
031310,000148: 22,3274           05105                           TC       FINDVAC                               #  V82GOFF1 WILL EXECUTE STATE VECTOR
031311,000149: 22,3275  E4,1540                                  EBANK=   TFF                                   #  UPDATE AND ORBIT CALCULATIONS FOR
031312,000150: 22,3275           03321 44064                     2CADR    V82GOFF1                              #  SELECTED VEHICLE ABOUT PROPER BODY.
031313,000151: 
031314,000152: 22,3277           00003                           RELINT                                         
031315,000153: 22,3300           36245        V82STALL           CAF      THREE                                 #  STALL IN THIS LOOP AND WITHOLD V 16 N 44

Page 714

031317,000155: 22,3301           71537                           MASK     V82FLAGS                              #  UNTIL STATE VECTOR UPDATE SETS ONE OF
031318,000156: 22,3302           10000                           CCS      A                                     #  OUR FLAG BITS.
031319,000157: 22,3303           03310                           TC       FLAGGON                               #  EXIT FROM STALL LOOP.
031320,000158: 22,3304           34777                           CAF      1SEC                                  
031321,000159: 22,3305           04616                           TC       BANKCALL                              
031322,000160: 22,3306           01735                           CADR     DELAYJOB                              
031323,000161: 22,3307           03300                           TC       V82STALL                              
031324,000162: 
031325,000163: 22,3310           33317        FLAGGON            CAF      V16N44                                #  MONITOR HAPO,HPER,TFF.
031326,000164: 22,3311           04616                           TC       BANKCALL                              
031327,000165: 22,3312           20334                           CADR     GOXDSPF                               
031328,000166: 22,3313           05563                           TC       B5OFF                                 #  TERM  THIS TELLS TICKTEST TO KILL ITSELF
031329,000167: 22,3314           05563                           TC       B5OFF                                 #  PROCEED   DITTO
031330,000168: 22,3315           03267                           TC       V82GOFLP                              #  RECYCLE   RECOMPUTE STATE VECT + DISPLAY
031331,000169: 
031332,000170: 22,3316           01014        OPTIONVN           VN       412                                   
031333,000171: 22,3317           04054        V16N44             VN       1644                                  
031334,000172: 22,3320           02140        TFFBANK            ECADR    TFF                                   
031335,000173: 
031336,000174: 22,3321           06037        V82GOFF1           TC       INTPRET                               
031337,000175: 22,3322           77634                           RTB                                            
031338,000176: 22,3323           21573                                    LOADTIME                              
031339,000177: 22,3324           00041                           STORE    TDEC1                                 #  TIME FOR STATE VECTOR UPDATE.
031340,000178: 22,3325           02205                           STORE    TSTART82                              #  TIME FOR INTERNAL USE.
031341,000179: 22,3326           77776                           EXIT                                           
031342,000180: 22,3327           41052                           CS       OPTIONX    +1                         #  1 FOR THIS VEHICLE, NOT 1 FOR OTHER.
031343,000181: 22,3330           64753                           AD       ONE                                   
031344,000182: 22,3331           00006                           EXTEND                                         
031345,000183: 22,3332           13356                           BZF      THISSHIP                              
031346,000184: 22,3333           06037        OTHSHIP            TC       INTPRET                               
031347,000185: 22,3334           77624                           CALL                                           #  CALL STATE VECTOR UPDATE FOR OTHER SHIP.
031348,000186: 22,3335           27043                                    OTHPREC                               
031349,000187: 22,3336           77775        BOTHSHIP           VLOAD                                          #  MOVE RESULTS INTO TFFCONIC STORAGE AREAS
031350,000188: 22,3337           00001                                    RATT                                  #  TO BE CALLED BY SR30.1.
031351,000189: 22,3340           26207                           STOVL    RONE                                  #  RATT AT (-29)M FOR EARTH OR MOON
031352,000190: 22,3341           00007                                    VATT                                  
031353,000191: 22,3342           02215                           STORE    VONE                                  #  VATT AT (-7)M/CS FOR EARTH OR MOON
031354,000192: 22,3343           77743                           DLOAD*                                         
031355,000193: 22,3344           73774                                    1/RTMUE,2                             #  X2 IS 0 FOR EARTH CENTERED STATE VEC
031356,000194: 22,3345           00037                           STORE    TFF/RTMU                              #  X2 IS 2 FOR MOON
031357,000195: 22,3346           77743                           DLOAD*                                         #  AS LEFT BY THISPREC OR OTHPREC.
031358,000196: 22,3347           72411                                    MINPERE,2                             
031359,000197: 22,3350           02201                           STORE    HPERMIN                               #  TFFRTMU, HPERMIN AND RPADTEM ARE ALL
031360,000198: 22,3351           46135                           SLOAD    BHIZ                                  #  EARTH/MOON PARAMETERS AS SET HERE.
031361,000199: 22,3352           00050                                    X2                                    
031362,000200: 22,3353           45367                                    EARTHPAD                              
031363,000201: 22,3354           77650                           GOTO                                           
031364,000202: 22,3355           45373                                    MOONPAD                               

Page 715

031366,000204: 22,3356           06037        THISSHIP           TC       INTPRET                               
031367,000205: 22,3357           77624                           CALL                                           #  CALL STATE VECTOR UPDATE FOR THIS SHIP.
031368,000206: 22,3360           27057                                    THISPREC                              
031369,000207: 22,3361           77650                           GOTO                                           
031370,000208: 22,3362           45336                                    BOTHSHIP                              
031371,000209: 
031372,000210:                                                                                                  #  THE FOLLOWING CONSTANTS ARE PAIRWISE INDEXED.  DO NOT SEPARATE PAIRS.
031373,000211: 
031374,000212: 22,3363           00001 11530  MINPERM            2DEC     10668      B-27                       #  35 KFT MIN PERIGEE HEIGHT FOR MOON(-27)M
031375,000213: 
031376,000214: 22,3365           00002 31230  MINPERE            2DEC     91440      B-29                       #  300 KFT (-29)M FOR EARTH
031377,000215: 
031378,000216: 22,3367           43145        EARTHPAD           DLOAD    CLRGO                                 #  PAD 37-B RADIUS.  SCALED AT (-29)M.
031379,000217: 22,3370           06315                                    RPAD                                  
031380,000218: 22,3371           03635                                    V82EMFLG                              #  INDICATE EARTH SCALING FOR SR30.1
031381,000219: 22,3372           45377                                    BOTHPAD                               
031382,000220: 
031383,000221: 22,3373           51575        MOONPAD            VLOAD    ABVAL                                 #  COMPUTE MOON PAD RADIUS FROM RLS VECTOR.
031384,000222: 22,3374           02023                                    RLS                                   #  SCALED AT (-27)M.
031385,000223: 22,3375           77614                           SET                                            
031386,000224: 22,3376           03475                                    V82EMFLG                              #  INDICATE MOON  SCALING FOR SR30.1
031387,000225: 22,3377           36203        BOTHPAD            STCALL   RPADTEM                               
031388,000226: 22,3400           45551                                    SR30.1                                #  CALCULATE ORBITAL PARAMETERS
031389,000227: 22,3401           45234                           RTB      DSU                                   
031390,000228: 22,3402           21573                                    LOADTIME                              
031391,000229: 22,3403           02205                                    TSTART82                              #  PRESENT TIME - TIME V82GOFF1 BEGAN
031392,000230: 22,3404           02205                           STORE    TSTART82                              #                  SAVE IT
031393,000231: 22,3405           53145                           DLOAD    BZE                                   #  SR30.1 SETS -TPER=0 IF HPER L/
031394,000232: 22,3406           02143                                    -TPER                                 #  HPERMIN (300 OR 35) KFT.
031395,000233: 22,3407           45420                                    TICKTIFF                              #  (-TPER = 0)
031396,000234: 22,3410           43345        TICKTPER           DLOAD    DAD                                   #  (-TPER NON ZERO) TFF WAS NOT COMPUTED,
031397,000235: 22,3411           02143                                    -TPER                                 #  BUT WAS SET TO 59M59S.  DONT TICK TFF, DO
031398,000236: 22,3412           02205                                    TSTART82                              #  TICK -TPER.  DISPLAY BOTH.
031399,000237: 22,3413           02143                           STORE    -TPER                                 #  -TPER CORRECTED FOR TIME SINCE V82GOFF1
031400,000238: 22,3414           77776                           EXIT                                           #  BEGAN.
031401,000239: 22,3415           34753                           CAF      BIT1                                  
031402,000240: 22,3416           55537                           TS       V82FLAGS                              #  INFORMS TICKTEST TO INCREMENT ONLY -TPER
031403,000241: 22,3417           05155                           TC       ENDOFJOB                              
031404,000242: 
031405,000243: 22,3420           43345        TICKTIFF           DLOAD    DAD                                   #  (-TPER=0) TFF WAS COMPUTED.  TICK TFF.
031406,000244: 22,3421           02141                                    TFF                                   #  DO NOT TICK -TPER.  DISPLAY TFF, BUT NOT
031407,000245: 22,3422           02205                                    TSTART82                              #  -TPER.
031408,000246: 22,3423           02141                           STORE    TFF                                   #  TFF CORRECTED FOR TIME SINCE V82GOFF1
031409,000247: 22,3424           77776                           EXIT                                           #  BEGAN.
031410,000248: 22,3425           34752                           CAF      BIT2                                  
031411,000249: 22,3426           55537                           TS       V82FLAGS                              #  INFORMS TICKTEST TO INCREMENT ONLY TFF.
031412,000250: 22,3427           05155                           TC       ENDOFJOB                              
031413,000251: 

Page 716

031415,000253: 22,3430           34747        TICKTEST           CAF      BIT5                                  #  THIS WAITLIST PROGRAM PERPETUATES ITSELF
031416,000254: 22,3431           71044                           MASK     EXTVBACT                              #  ONCE A SEC UNTIL BIT 5 OF EXTVBACT =0.
031417,000255: 22,3432           10000                           CCS      A                                     
031418,000256: 22,3433           03441                           TC       DOTICK                                
031419,000257: 22,3434           37713                           CAF      PRIO25                                
031420,000258: 22,3435           05072                           TC       NOVAC                                 #  TERMINATE V 82.  CANT CALL ENDEXT IN RUPT.
031421,000259: 22,3436     1044                                  EBANK=   EXTVBACT                              
031422,000260: 22,3436           05472 04062                     2CADR    ENDEXT                                
031423,000261: 
031424,000262: 22,3440           05261                           TC       TASKOVER                              
031425,000263: 22,3441           34777        DOTICK             CAF      1SEC                                  #  RE-REQUEST TICKTEST.
031426,000264: 22,3442           05203                           TC       WAITLIST                              
031427,000265: 22,3443  E4,1540                                  EBANK=   TFF                                   
031428,000266: 22,3443           03430 44064                     2CADR    TICKTEST                              
031429,000267: 
031430,000268: 22,3445           36245                           CAF      THREE                                 
031431,000269: 22,3446           71537                           MASK     V82FLAGS                              
031432,000270: 22,3447           50000                           INDEX    A                                     
031433,000271: 22,3450           03451                           TC       +1                                    
031434,000272: 22,3451           05261                           TC       TASKOVER                              #  IF NO FLAGBITS SET DONT CHANGE TFF OR
031435,000273:                                                                                                  #  -TPER, BUT CONTINUE LOOP.
031436,000274: 22,3452           03460                           TC       TPERTICK                              #  ONLY BIT 1 SET.  INCR -TPER BY 1 SEC.
031437,000275: 22,3453           34777        TFFTICK            CAF      1SEC                                  #  ONLY BIT 2 SET.  INCR TFF BY 1 SEC.
031438,000276: 22,3454           54001                           TS       L                                     
031439,000277: 22,3455           34755                           CAF      ZERO                                  
031440,000278: 22,3456           21541                           DAS      TFF                                   
031441,000279: 22,3457           05261                           TC       TASKOVER                              
031442,000280: 22,3460           34777        TPERTICK           CAF      1SEC                                  
031443,000281: 22,3461           54001                           TS       L                                     
031444,000282: 22,3462           34755                           CAF      ZERO                                  
031445,000283: 22,3463           21543                           DAS      -TPER                                 
031446,000284: 22,3464           05261                           TC       TASKOVER                              
031447,000285: 

Page 717

031449,000287: 22,3465           77776        V82GON             EXIT                                           #  AVERAGE G ON.  USE CURRENT STATE VECTOR
031450,000288:                                                                                                  #  FOR ORBITAL PARAMETER CALCULATIONS.
031451,000289: 22,3466           35021                           CAF      PRIO7                                 #  LESS THAN LAMBERT
031452,000290: 22,3467           05105                           TC       FINDVAC                               #  V82GON1 WILL PERFORM ORBIT CALCULATIONS
031453,000291: 22,3470  E4,1540                                  EBANK=   TFF                                   #  ABOUT PROPER BODY APPROX ONCE PER SEC.
031454,000292: 22,3470           03503 44064                     2CADR    V82GON1                               
031455,000293: 
031456,000294: 22,3472           00003                           RELINT                                         
031457,000295: 22,3473           10067                           CCS      NEWJOB                                #  WITHOLD V16 N44 UNTIL FIRST ORBIT CALC
031458,000296: 22,3474           05122                           TC       CHANG1                                #  IS DONE.  NOTE:  V82GON1 (PRIO7, FINDVAC
031459,000297:                                                                                                  #  JOB) IS COMPLETED BEFORE V82GON (PRIO7,
031460,000298:                                                                                                  #  NOVAC JOB).
031461,000299: 22,3475           33317        V82REDSP           CAF      V16N44                                #  MONITOR HAPO, HPER, TFF
031462,000300: 22,3476           04616                           TC       BANKCALL                              
031463,000301: 22,3477           20334                           CADR     GOXDSPF                               
031464,000302: 22,3500           05563                           TC       B5OFF                                 #  TERM THIS TELLS V82GON1 TO KILL ITSELF.
031465,000303: 22,3501           05563                           TC       B5OFF                                 #  PROC DITTO.
031466,000304: 22,3502           03475                           TC       V82REDSP                              #  RECYCLE
031467,000305: 
031468,000306: 22,3503           06037        V82GON1            TC       INTPRET                               #  THIS EXEC PROGRAM PERPETUATES ITSELF
031469,000307:                                                                                                  #  ONCE A SEC UNTIL BIT 5 OF EXTVBACT =0.
031470,000308: 22,3504           52175                           VLOAD    GOTO                                  #  HOLDS OFF CCS NEWJOB BETWEEN RN AND
031471,000309: 22,3505           01221                                    RN                                    #  VN FETCH SO RN, VN ARE FROM SAME
031472,000310: 22,3506           45507                                    NEXTLINE                              #  STATE VECTOR UPDATE.
031473,000311: 22,3507           26207        NEXTLINE           STOVL    RONE                                  #  RN AT (-29)M FOR EARTH OR MOON
031474,000312: 22,3510           01227                                    VN                                    
031475,000313: 22,3511           02215                           STORE    VONE                                  #  VN AT (-7)M/CS FOR EARTH OR MOON
031476,000314: 22,3512           52014                           BON      GOTO                                  
031477,000315: 22,3513           04304                                    MOONTHIS                              #  FLAG INDICATES BODY ABOUT WHICH ORBITAL
031478,000316: 22,3514           45516                                    MOONGON                               #  CALCULATIONS ARE TO BE PERFORMED.
031479,000317: 22,3515           45527                                    EARTHGON                              #  IF SET - MOON, IF RESET - EARTH.
031480,000318: 
031481,000319: 22,3516           71214        MOONGON            SET      DLOAD                                 
031482,000320: 22,3517           03475                                    V82EMFLG                              #  INDICATE MOON SCALING FOR SR30.1
031483,000321: 22,3520           04001                                    1/RTMUM                               #  LUNAR PARAMETERS LOADED HERE FOR SR30.1
031484,000322: 22,3521           14037                           STODL    TFF/RTMU                              
031485,000323: 22,3522           05364                                    MINPERM                               
031486,000324: 22,3523           26201                           STOVL    HPERMIN                               
031487,000325: 22,3524           02023                                    RLS                                   #  SCALED AT (-27)M.
031488,000326: 22,3525           52046                           ABVAL    GOTO                                  
031489,000327: 22,3526           45536                                    V82GON2                               
031490,000328: 22,3527           71214        EARTHGON           CLEAR    DLOAD                                 
031491,000329: 22,3530           03675                                    V82EMFLG                              #  INDICATE EARTH SCALING FOR SR30.1
031492,000330: 22,3531           04003                                    1/RTMUE                               #  EARTH PARAMETERS LOADED HERE FOR SR30.1
031493,000331: 22,3532           14037                           STODL    TFF/RTMU                              
031494,000332: 22,3533           05366                                    MINPERE                               
031495,000333: 22,3534           16201                           STODL    HPERMIN                               
031496,000334: 22,3535           06315                                    RPAD                                  
031497,000335: 22,3536           36203        V82GON2            STCALL   RPADTEM                               #  COMMON CODE FOR EARTH & MOON.
031498,000336: 22,3537           45551                                    SR30.1                                

Page 718

031500,000338: 22,3540           77776                           EXIT                                           
031501,000339: 22,3541           34747        V82GON3            CAF      BIT5                                  
031502,000340: 22,3542           71044                           MASK     EXTVBACT                              #  SEE IF ASTRONAUT HAS SIGNALLED TERMINATE
031503,000341: 22,3543           00006                           EXTEND                                         
031504,000342: 22,3544           15472                           BZF      ENDEXT                                #  YES, TERMINATE VB 82 LOOP
031505,000343: 22,3545           34777                           CAF      1SEC                                  
031506,000344: 22,3546           04616                           TC       BANKCALL                              #  WAIT ONE SECOND BEFORE REPEATING
031507,000345: 22,3547           01735                           CADR     DELAYJOB                              #  ORBITAL PARAMETER COMPUTATION.
031508,000346: 22,3550           03503                           TC       V82GON1                               
031509,000347: 
031510,000348: 22,3551  22,3541               SPLRET             =        V82GON3                               
031511,000349: 

Page 719

031513,000351:                                                                                                  #  SUBROUTINE NAME: SR30.1
031514,000352:                                                                                                  #  MOD NO: 0                                                             DATE: 16 FEB 67
031515,000353:                                                                                                  #  MOD BY: RR BAIRNSFATHER                                               LOG SECTION: R32
031516,000354:                                                                                                  #  MOD NO: 1     MOD BY: RR BAIRNSFATHER         DATE: 11 APR 67         SR30.1 CHANGED TO ALLOW MONITOR OPERN
031517,000355:                                                                                                  #  MOD NO: 2     MOD BY: RR BAIRNSFATHER         DATE: 14 APR 67         ADD OVFL CK FOR RAPO
031518,000356:                                                                                                  #  MOD NO: 3     MOD BY ALONSO                   DATE: 11 DEC 67         SUBROUTINE REWRITTEN
031519,000357:                                                                                                  #  MOD NO: 4     MOD BY ALONSO                   DATE: 26 MAR 68         PROG MOD TO HANDLE DIF EARTH/MOON SCALE
031520,000358:                                                                                                  #  MOD NO: 5     MOD BY: RR BAIRNSFATHER         DATE: 6 AUG 68          OVFL CK FOR HAPO & HPER. VOIDS MOD #2.
031521,000359: 
031522,000360:                                                                                                  #  NEW FUNCTIONAL DESCRIPTION:  ORBITAL PARAMETERS DISPLAY FOR NOUNS 32 AND 44.
031523,000361:                                                                                                  #  SR30.1 CALLS TFFCONMU AND TFFRP/RA TO CALCULATE RPER (PERIGEE RADIUS),
031524,000362:                                                                                                  #  RAPO (APOGEE RADIUS), HPER (PERIGEE HEIGHT ABOVE LAUNCH PAD OR LUNAR
031525,000363:                                                                                                  #  LANDING SITE), HAPO (APOGEE HEIGHT AS ABOVE), TPER (TIME TO PERIGEE),
031526,000364:                                                                                                  #  TFF (TIME TO INTERSECT 300 KFT ABOVE PAD OR 35KFT ABOVE LANDING SITE).
031527,000365:                                                                                                  #  IF HPER IS GREATER THAN OR EQUAL TO HPERMIN, CALCULATES TPER AND STORES
031528,000366:                                                                                                  #  NEGATIVE IN -TPER.  OTHERWISE STORES +0 IN -TPER.  WHENEVER TPER IS
031529,000367:                                                                                                  #  CALCULATED, TFF IS NOT COMPUTABLE AND DEFAULTS TO -59MIN 59SEC.  IF HAPO
031530,000368:                                                                                                  #  WOULD EXCEED 9999.9 NM, IT IS LIMITED TO THAT VALUE FOR DISPLAY.
031531,000369: 
031532,000370:                                                                                                  #  ADDENDUM:     HAPO AND HPER SHOULD BE CHANGED TO READ HAPOX AND HPERX IN THE
031533,000371:                                                                                                  #                ABOVE REMARKS.
031534,000372: 
031535,000373:                                                                                                  #  CALLING SEQUENCE:     CALL
031536,000374:                                                                                                  #                                SR30.1
031537,000375: 
031538,000376:                                                                                                  #  SUBROUTINES CALLED:   TFFCONMU, TFFRP/RA, CALCTPER, CALCTFF
031539,000377: 
031540,000378:                                                                                                  #  NORMAL EXIT MODE:     CALLING LINE +1 (STILL IN INTERPRETIVE MODE)
031541,000379: 
031542,000380:                                                                                                  #  ALARMS:       NONE
031543,000381: 
031544,000382:                                                                                                  #  OUTPUT:       RAPO    (-29) M EARTH   APOGEE RADIUS   EARTH CENTERED COORD.
031545,000383:                                                                                                  #                        (-27) M MOON                    MOON CENTERED COORD.
031546,000384:                                                                                                  #                RPER    (-29) M EARTH   PERIGEE RADIUS  EARTH CENTERED COORD.
031547,000385:                                                                                                  #                        (-27) M MOON                    MOON CENTERED COORD.
031548,000386:                                                                                                  #                HAPOX   (-29) M         APOGEE ALTITUDE ABOVE PAD OR LAND. SITE MAX VALUE LIMITED TO 9999.9 NM.
031549,000387:                                                                                                  #                HPERX   (-29) M         PERIGEE ALT. ABOVE PAD OR LAND. SITE    MAX VALUE LIMITED TO 9999.9 NM.
031550,000388:                                                                                                  #                TFF     (-28) CS        TIME TO 300KFT OR 35KFT ALTITUDE
031551,000389:                                                                                                  #                -TPER   (-28) CS        TIME TO PERIGEE
031552,000390: 
031553,000391:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED -
031554,000392:                                                                                                  #        TFF/RTMU        (+17) EARTH     RECIPROCAL OF PROPER GRAV CONSTANT FOR
031555,000393:                                                                                                  #                        (+14) MOON      EARTH OR MOON = 1/SQRT(MU).
031556,000394:                                                                                                  #        RONE            (-29) M         STATE VECTOR
031557,000395:                                                                                                  #        VONE            (-7)  M/CS      STATE VECTOR
031558,000396:                                                                                                  #        RPADTEM         (-29) M EARTH   RADIUS OF LAUNCH PAD OR LUNAR LANDING
031559,000397:                                                                                                  #                        (-27) M MOON    SITE.
031560,000398:                                                                                                  #        HPERMIN         (-29) M EARTH   (300 OR 35) KFT MINIMUM PERIGEE ALTITUDE
031561,000399:                                                                                                  #                        (-27) M MOON    ABOVE LAUNCH PAD OR LUNAR LANDING SITE.
031562,000400:                                                                                                  #        V82EMFLG        (INT SW BIT)    RESET FOR EARTH, SET FOR MOON.
031563,000401: 
031564,000402:                                                                                                  #  DEBRIS:       QPRET, PDL, S2
031565,000403: 

Page 720

031567,000405: 22,3551                                           COUNT*   $$/SR30S                              
031568,000406: 
031569,000407: 22,3551           44001        SR30.1             SETPD    STQ                                   #  INITIALIZE PUSHDOWN LIST.
031570,000408: 22,3552           00001                                    0                                     
031571,000409: 22,3553           00051                                    S2                                    
031572,000410:                                                                                                  #  SR30.1 INPUT: RONE AT (-29)M EARTH/MOON
031573,000411:                                                                                                  #                VONE AT (-7)M/CS
031574,000412:                                                                                                  #  TFFCONMU, TFFRP/RA, CALCTPER AND CALCTFF
031575,000413:                                                                                                  #  CALLS REQUIRE:
031576,000414:                                                                                                  #  EARTH CENTERED (NO RESCALING REQUIRED)
031577,000415:                                                                                                  #        RONE SCALED TO B-29 M
031578,000416:                                                                                                  #        VONE SCALED TO B-7  M/CS
031579,000417:                                                                                                  #  MOON CENTERED (RESCALING REQUIRED)
031580,000418:                                                                                                  #        RONE SCALED TO B-27 M
031581,000419:                                                                                                  #        VONE SCALED TO B-5  M/CS
031582,000420: 22,3554           77214                           BOFF     VLOAD                                 
031583,000421: 22,3555           03755                                    V82EMFLG                              #  OFF FOR EARTH, ON FOR MOON.
031584,000422: 22,3556           45565                                    TFFCALLS                              
031585,000423: 22,3557           02207                                    RONE                                  
031586,000424: 22,3560           77752                           VSL2                                           
031587,000425: 22,3561           26207                           STOVL    RONE                                  
031588,000426: 22,3562           02215                                    VONE                                  
031589,000427: 22,3563           77752                           VSL2                                           
031590,000428: 22,3564           02215                           STORE    VONE                                  
031591,000429: 22,3565           77624        TFFCALLS           CALL                                           
031592,000430: 22,3566           57361                                    TFFCONMU                              
031593,000431: 22,3567           77624                           CALL                                           #  TFFRP/RA COMPUTES RAPO,RPER.
031594,000432: 22,3570           57427                                    TFFRP/RA                              
031595,000433:                                                                                                  #  RETURNS WITH RAPO IN D(MPAC).
031596,000434: 22,3571           77625                           DSU                                            
031597,000435: 22,3572           02203                                    RPADTEM                               
031598,000436: 22,3573           64414                           BOFF     SR2R                                  #  NEED HAPO AT (-29)M FOR DISPLAY.
031599,000437:                                                                                                  #  IF MOON CENTERED, RESCALE FROM (-27)M.
031600,000438:                                                                                                  #  IF EARTH CENTERED ALREADY AT (-29)M.
031601,000439: 22,3574           03755                                    V82EMFLG                              #  OFF FOR EARTH, ON FOR MOON.
031602,000440: 22,3575           45576                                    +1                                    
031603,000441: 22,3576           77624                           CALL                                           #  IF HAPO > MAXNM, SET HAPO =9999.9 NM.
031604,000442: 22,3577           45636                                    MAXCHK                                #  OTHERWISE STORE (RAPO-RPADTEM) IN HAPO.
031605,000443: 22,3600           16120        STORHAPO           STODL    HAPOX                                 
031606,000444: 22,3601           00017                                    RPER                                  
031607,000445: 22,3602           77625                           DSU                                            
031608,000446: 22,3603           02203                                    RPADTEM                               #  GIVES HPER AT (-29)M EARTH, (-27)M MOON.
031609,000447: 22,3604           00161                           STORE    MPAC       +4                         #  SAVE THIS FOR COMPARISON TO HPERMIN.
031610,000448: 22,3605           64414                           BOFF     SR2R                                  #  NEED HPER AT (-29)M FOR DISPLAY.
031611,000449:                                                                                                  #  IF MOON CENTERED, RESCALE FROM (-27)M.
031612,000450:                                                                                                  #  IF EARTH CENTERED ALREADY AT (-29)M.
031613,000451: 22,3606           03755                                    V82EMFLG                              #  OFF FOR EARTH, ON FOR MOON.
031614,000452: 22,3607           45610                                    +1                                    
031615,000453: 22,3610           77624                           CALL                                           #  IF HPER > MAXNM, SET HPER = 9999.9 NM.
031616,000454: 22,3611           45636                                    MAXCHK                                

Page 721

031618,000456: 22,3612           16122        STORHPER           STODL    HPERX                                 #  STORE (RPER - RPADTEM) INTO HPERX.
031619,000457: 22,3613           00161                                    MPAC       +4                         
031620,000458: 22,3614           51025                           DSU      BPL                                   #  HPERMIN AT (-29)M FOR EARTH, (-27)M MOON
031621,000459: 22,3615           02201                                    HPERMIN                               #  IF HPER L/ HPERMIN (300 OR 35) KFT,
031622,000460: 22,3616           45622                                    DOTPER                                #  THEN ZERO INTO -TPER.
031623,000461: 22,3617           52145                           DLOAD    GOTO                                  #  OTHERWISE CALCULATE TPER.
031624,000462: 22,3620           06522                                    HI6ZEROS                              
031625,000463: 22,3621           45626                                    SKIPTPER                              
031626,000464: 22,3622           45145        DOTPER             DLOAD    CALL                                  
031627,000465: 22,3623           00017                                    RPER                                  
031628,000466: 22,3624           57465                                    CALCTPER                              
031629,000467: 22,3625           77676                           DCOMP                                          #  TPER IS PUT NEG INTO -TPER.
031630,000468: 22,3626           16143        SKIPTPER           STODL    -TPER                                 
031631,000469: 22,3627           02201                                    HPERMIN                               #  HPERMIN AT (-29)M FOR EARTH, (-27)M MOON
031632,000470: 22,3630           45015                           DAD      CALL                                  
031633,000471: 22,3631           02203                                    RPADTEM                               #  RPADTEM AT (-29)M FOR EARTH, (-27)M MOON
031634,000472: 22,3632           57470                                    CALCTFF                               #  GIVES 59M59S FOR TFF IF RPER G/
031635,000473: 22,3633           77676                           DCOMP                                          #  HPERMIN + RPADTEM.  (TPER WAS NON ZERO)
031636,000474: 22,3634           36141                           STCALL   TFF                                   #  OTHERWISE COMPUTES TFF.       (GOTO)
031637,000475: 22,3635           00051                                    S2                                    
031638,000476: 
031639,000477: 22,3636           51025        MAXCHK             DSU      BPL                                   #  IF C(MPAC) > 9999.9 NM, MPAC = 9999.9 NM
031640,000478: 22,3637           05646                                    MAXNM                                 
031641,000479: 22,3640           45643                                    +3                                    #  OTHERWISE C(MPAC) = B(MPAC).
031642,000480: 22,3641           43415                           DAD      RVQ                                   
031643,000481: 22,3642           05646                                    MAXNM                                 
031644,000482: 22,3643           43545                 +3        DLOAD    RVQ                                   #  (USED BY P30 - P37 ALSO)
031645,000483: 22,3644           05646                                    MAXNM                                 
031646,000484: 
031647,000485: 22,3645           01065 05603  MAXNM              2OCT     0106505603                            
031648,000486: 

Page 722 Empty page.

031651,000489: 

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