Source Code

These source-code files were from the printout at the MIT Museum, with many thanks to Deborah Douglas, the Museum's Curator of Science and Technology, for releasing it to us. The printout was digitally photographed by Paul Fjeld. A team of volunteers transcribed the source code manually from these images or, where appropriate, modified already-transcribed but similar source Luminary 131 (Apollo 13) source code to agree with the images from the printout. Note that the page images presented online are of reduced quality, and that higher-quality images are available. Report any conversion errors or legibility problems in page images to info@sandroid.org. Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 001 OF AGC PROGRAM LMY99 BY NASA 2021112-061
	16:27 JULY 14,1969
Note that the date is the date of the printout, not the date of the program revision.

030450,000002:                                                                                                  ## Copyright:   Public domain.
030451,000003:                                                                                                  ## Filename:    P76.agc
030452,000004:                                                                                                  ## Purpose:     Part of the source code for Luminary 1A build 099.
030453,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
030454,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 11.
030455,000007:                                                                                                  ## Assembler:   yaYUL
030456,000008:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
030457,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo.
030458,000010:                                                                                                  ## Pages:       709-711
030459,000011:                                                                                                  ## Mod history: 2009-05-19 RSB  Adapted from the corresponding 
030460,000012:                                                                                                  ##                              Luminary131 file, using page 
030461,000013:                                                                                                  ##                              images from Luminary 1A.
030462,000014:                                                                                                  ##              2016-12-13 RSB  GOTOP00H -> GOTOPOOH
030463,000015:                                                                                                  ##              2016-12-14 RSB  Proofed text comments with octopus/ProoferComments
030464,000016:                                                                                                  ##                              and corrected the errors found.
030465,000017:                                                                                                  ##
030466,000018:                                                                                                  ## This source code has been transcribed or otherwise adapted from
030467,000019:                                                                                                  ## digitized images of a hardcopy from the MIT Museum.  The digitization
030468,000020:                                                                                                  ## was performed by Paul Fjeld, and arranged for by Deborah Douglas of
030469,000021:                                                                                                  ## the Museum.  Many thanks to both.  The images (with suitable reduction
030470,000022:                                                                                                  ## in storage size and consequent reduction in image quality as well) are
030471,000023:                                                                                                  ## available online at www.ibiblio.org/apollo.  If for some reason you
030472,000024:                                                                                                  ## find that the images are illegible, contact me at info@sandroid.org
030473,000025:                                                                                                  ## about getting access to the (much) higher-quality images which Paul
030474,000026:                                                                                                  ## actually created.
030475,000027:                                                                                                  ##
030476,000028:                                                                                                  ## Notations on the hardcopy document read, in part:
030477,000029:                                                                                                  ##
030478,000030:                                                                                                  ##      Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
030479,000031:                                                                                                  ##      16:27 JULY 14, 1969 
030480,000032: 

Page 709

030482,000034:                                                                                                  #  1)    PROGRAM NAME - TARGET DELTA V PROGRAM (P76).
030483,000035:                                                                                                  #  2)    FUNCTIONAL DESCRIPTION - UPON ENTRY BY ASTRONAUT ACTION, P76 FLASHES DSKY REQUESTS TO THE ASTRONAUT
030484,000036:                                                                                                  #        TO PROVIDE VIA DSKY (1) THE DELTA V TO BE APPLIED TO THE OTHER VEHICLE STATE VECTOR AND (2) THE
030485,000037:                                                                                                  #        TIME (TIG) AT WHICH THE OTHER VEHICLE VELOCITY WAS CHANGED BY EXECUTION OF A THRUSTING MANEUVER. THE
030486,000038:                                                                                                  #        OTHER VEHICLE STATE VECTOR IS INTEGRATED TO TIG AND UPDATED BY THE ADDITION OF DELTA V (DELTA V HAVING
030487,000039:                                                                                                  #        BEEN TRANSFORMED FROM LV TO REF COSYS).  USING INTEGRVS, THE PROGRAM THEN INTEGRATES THE OTHER
030488,000040:                                                                                                  #        VEHICLE STATE VECTOR TO THE STATE VECTOR OF THIS VEHICLE, THUS INSURING THAT THE W-MATRIX AND BOTH VEHICLE
030489,000041:                                                                                                  #        STATES CORRESPOND TO THE SAME TIME.
030490,000042:                                                                                                  #  3)    ERASABLE INITIALIZATION REQUIRED - NONE.
030491,000043:                                                                                                  #  4)    CALLING SEQUENCES AND EXIT MODES - CALLED BY ASTRONAUT REQUEST THRU DSKY V 37 E 76E.
030492,000044:                                                                                                  #        EXITS BY TCF ENDOFJOB.
030493,000045:                                                                                                  #  5)    OUTPUT - OTHER VEHICLE STATE VECTOR INTEGRATED TO TIG AND INCREMENTED BY DELTA V IN REF COSYS.
030494,000046:                                                                                                  #        THE PUSHLIST CONTAINS THE MATRIX BY WHICH THE INPUT DELTA V MUST BE POST-MULTIPLIED TO CONVERT FROM LV
030495,000047:                                                                                                  #        TO REF COSYS.
030496,000048:                                                                                                  #  6)    DEBRIS - OTHER VEHICLE STATE VECTOR.
030497,000049:                                                                                                  #  7)    SUBROUTINES CALLED - BANKCALL, GOXDSPF, CSMPREC (OR LEMPREC), ATOPCSM (OR ATOPLEM), INTSTALL, INTWAKE, PHASCHNG
030498,000050:                                                                                                  #        INTPRET, INTEGRVS, AND MINIRECT.
030499,000051:                                                                                                  #  8)    FLAG USE - MOONFLAG, CMOONFLAG, INTYPFLG, RASFLAG, AND MARKCTR.
030500,000052: 
030501,000053: 30,2061                                           BANK     30                                    
030502,000054: 13,2000                                           SETLOC   P76LOC                                
030503,000055: 13,2000                                           BANK                                           
030504,000056: 
030505,000057: 13,2207                                           COUNT*   $$/P76                                
030506,000058: 
030507,000059: 13,2207  E7,1441                                  EBANK=   TIG                                   
030508,000060: 
030509,000061: 13,2207           05504        P76                TC       UPFLAG                                
030510,000062: 13,2210           00031                           ADRES    TRACKFLG                              
030511,000063: 
030512,000064: 13,2211           06037                           TC       INTPRET                               
030513,000065: 13,2212           77775                           VLOAD                                          
030514,000066: 13,2213           03434                                    DELVLVC                               
030515,000067: 13,2214           02223                           STORE    DELVOV                                
030516,000068: 13,2215           77776                           EXIT                                           
030517,000069: 
030518,000070: 13,2216           32336                           CAF      V06N84                                #  FLASH LAST DELTA V,
030519,000071: 13,2217           04616                           TC       BANKCALL                              #  AND WAIT FOR KEYBOARD ACTION.
030520,000072: 13,2220           20476                           CADR     GOFLASH                               
030521,000073: 13,2221           12333                           TCF      ENDP76                                
030522,000074: 13,2222           02224                           TC       +2                                    #  PROCEED
030523,000075: 13,2223           02216                           TC       -5                                    #  STORE DATA AND REPEAT FLASHING
030524,000076: 13,2224           32337                           CAF      V06N84     +1                         #  FLASH VERB 06 NOUN 33, DISPLAY LAST TIG,
030525,000077: 13,2225           04616                           TC       BANKCALL                              #  AND WAIT FOR KEYBOARD ACTION.
030526,000078: 13,2226           20476                           CADR     GOFLASH                               
030527,000079: 13,2227           12333                           TCF      ENDP76                                
030528,000080: 13,2230           02232                           TC       +2                                    
030529,000081: 13,2231           02224                           TC       -5                                    
030530,000082: 13,2232           06037                           TC       INTPRET                               #  RETURN TO INTERPRETIVE CODE

Page 710

030532,000084: 13,2233           77745                           DLOAD                                          #  SET D(MPAC)=TIG IN CSEC B28
030533,000085: 13,2234           03442                                    TIG                                   
030534,000086: 13,2235           34041                           STCALL   TDEC1                                 #  SET TDEC1=TIG FOR ORBITAL INTEGRATION
030535,000087: 13,2236           27043                                    OTHPREC                               
030536,000088: 13,2237           53575        COMPMAT            VLOAD    UNIT                                  
030537,000089: 13,2240           00001                                    RATT                                  
030538,000090: 13,2241           77676                           VCOMP                                          #  U(-R)
030539,000091: 13,2242           00031                           STORE    24D                                   #  U(-R) TO 24D
030540,000092: 13,2243           53435                           VXV      UNIT                                  #  U(-R) X V = U(V X R)
030541,000093: 13,2244           00007                                    VATT                                  
030542,000094: 13,2245           00023                           STORE    18D                                   
030543,000095: 13,2246           53435                           VXV      UNIT                                  #  U(V X R) X U(-R) = U((R X V) X R)
030544,000096: 13,2247           00031                                    24D                                   
030545,000097: 13,2250           24015                           STOVL    12D                                   
030546,000098: 13,2251           02223                                    DELVOV                                
030547,000099: 13,2252           76505                           VXM      VSL1                                  #  V(MPAC)=DELTA V IN REFCOSYS
030548,000100: 13,2253           00015                                    12D                                   
030549,000101: 13,2254           77655                           VAD                                            
030550,000102: 13,2255           00007                                    VATT                                  
030551,000103: 13,2256           00007                           STORE    6                                     #  V(PD6)=VATT + DELTA V
030552,000104: 13,2257           77624                           CALL                                           #  PREVENT WOULD-BE USER OF ORBITAL
030553,000105: 13,2260           27414                                    INTSTALL                              #  INTEG FROM INTERFERING WITH UPDATING
030554,000106: 13,2261           77624                           CALL                                           
030555,000107: 13,2262           26340                                    P76SUB1                               
030556,000108: 13,2263           53775                           VLOAD    VSR*                                  
030557,000109: 13,2264           00007                                    6                                     
030558,000110: 13,2265           57176                                    0,2                                   
030559,000111: 13,2266           25543                           STOVL    VCV                                   
030560,000112: 13,2267           00001                                    RATT                                  
030561,000113: 13,2270           77657                           VSR*                                           
030562,000114: 13,2271           57176                                    0,2                                   
030563,000115: 13,2272           15535                           STODL    RCV                                   
030564,000116: 13,2273           03442                                    TIG                                   
030565,000117: 13,2274           01517                           STORE    TET                                   
030566,000118: 13,2275           71214                           CLEAR    DLOAD                                 
030567,000119: 13,2276           01673                                    INTYPFLG                              
030568,000120: 13,2277           01643                                    TETTHIS                               
030569,000121: 13,2300           34041        INTOTHIS           STCALL   TDEC1                                 
030570,000122: 13,2301           27107                                    INTEGRVS                              
030571,000123: 13,2302           77624                           CALL                                           
030572,000124: 13,2303           27414                                    INTSTALL                              
030573,000125: 13,2304           77775                           VLOAD                                          
030574,000126: 13,2305           00017                                    RATT1                                 
030575,000127: 13,2306           01503                           STORE    RRECT                                 
030576,000128: 13,2307           15535                           STODL    RCV                                   
030577,000129: 13,2310           00015                                    TAT                                   
030578,000130: 13,2311           25517                           STOVL    TET                                   
030579,000131: 13,2312           00025                                    VATT1                                 
030580,000132: 13,2313           77624                           CALL                                           
030581,000133: 13,2314           23455                                    MINIRECT                              

Page 711

030583,000135: 13,2315           77776                           EXIT                                           
030584,000136: 13,2316           05353                           TC       PHASCHNG                              
030585,000137: 13,2317           04024                           OCT      04024                                 
030586,000138: 
030587,000139: 13,2320           05504                           TC       UPFLAG                                
030588,000140: 13,2321           00236                           ADRES    REINTFLG                              
030589,000141: 
030590,000142: 13,2322           06037                           TC       INTPRET                               
030591,000143: 13,2323           77624                           CALL                                           
030592,000144: 13,2324           26661                                    ATOPOTH                               
030593,000145: 13,2325           77531                           SSP      EXIT                                  
030594,000146: 13,2326           00053                                    QPRET                                 
030595,000147: 13,2327           26332                                    OUT                                   
030596,000148: 13,2330           04616                           TC       BANKCALL                              #  PERMIT USE OF ORBITAL INTEGRATION
030597,000149: 13,2331           27445                           CADR     INTWAKE1                              
030598,000150: 13,2332           77776        OUT                EXIT                                           
030599,000151: 13,2333           34755        ENDP76             CAF      ZERO                                  
030600,000152: 13,2334           55462                           TS       MARKCTR                               #  CLEAR RR TRACKING MARK COUNTER
030601,000153: 13,2335           16001                           TCF      GOTOPOOH                              
030602,000154: 
030603,000155: 13,2336           01524        V06N84             NV       0684                                  
030604,000156: 13,2337           01441                           NV       0633                                  
030605,000157: 13,2340           43174        P76SUB1            AXT,2    SET                                   
030606,000158: 13,2341           00002                                    2                                     
030607,000159: 13,2342           00063                                    MOONFLAG                              #  SET MEANS MOON IS SPHERE OF INFLUENCE.
030608,000160: 13,2343           77014                           BON      AXT,2                                 
030609,000161: 13,2344           04303                                    CMOONFLG                              #  SET MEANS PERM CM STATE IN LUNAR SPHERE.
030610,000162: 13,2345           00052                                    QPRET                                 
030611,000163: 13,2346           00000                                    0                                     
030612,000164: 13,2347           43414                           CLEAR    RVQ                                   
030613,000165: 13,2350           00263                                    MOONFLAG                              
030614,000166: 
030615,000167: 
030616,000168: 

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