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.

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

Page 709

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

Page 710

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

Page 711

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

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