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
	20'35 OCT. 28,1968
Note that the date is the date of the printout, not the date of the program revision.

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

Page 709

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

Page 710

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

Page 711

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

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