Source Code

These source-code files are part of a reconstructed copy of Luminary 69/2, the flown, final release of the Apollo 10 Lunar Module (LM) Apollo Guidance Computer (AGC) software.

The reconstruction is based on the source code of Luminary 69 — i.e., the initial, unflown version, "revision 0" — of which a contemporary listing was available. The code was then updated by incorporating the differences between Luminary 69 and Luminary 69/2, known from other contemporary documentation. The only such difference is the implementation in Luminary 69/2 of the "R-2 Lunar Potential Model", the source code for which was taken from program Luminary 99/1 (Apollo 11 LM), of which a contemporary listing was also available. Finally, the now-reconstructed Luminary 69/2 was then validated by assembling it to executable form and verifying that its memory banks had the correct checksums, known from still other contemporary documentation.

Note that page numbers in the reconstructed code match those in the original Luminary 69 program listing, or in the ORBITAL INTEGRATION log section, in Luminary 99/1. Page numbers would certainly differ somewhat in a contemporary Luminary 69/2 listing. Moreover, annotations that were not present in the contemporary source code have been added to the reconstructed code to justify each change in Luminary 69/2 relative to Luminary 69. Here's a guide to the Apollo documentation referenced in those annotations:
Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository.

031056,000002:                                                                                                  ## Copyright:   Public domain.
031057,000003:                                                                                                  ## Filename:    P76.agc
031058,000004:                                                                                                  ## Purpose:     A section of LUM69 revision 2.
031059,000005:                                                                                                  ##              It is part of the reconstructed source code for the flown
031060,000006:                                                                                                  ##              version of the flight software for the Lunar Module's (LM)
031061,000007:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 10. The code has
031062,000008:                                                                                                  ##              been recreated from a copy of Luminary revsion 069, using
031063,000009:                                                                                                  ##              changes present in Luminary 099 which were described in
031064,000010:                                                                                                  ##              Luminary memos 75 and 78. The code has been adapted such
031065,000011:                                                                                                  ##              that the resulting bugger words exactly match those specified
031066,000012:                                                                                                  ##              for LUM69 revision 2 in NASA drawing 2021152B, which gives
031067,000013:                                                                                                  ##              relatively high confidence that the reconstruction is correct.
031068,000014:                                                                                                  ## Reference:   pp. 717-719
031069,000015:                                                                                                  ## Assembler:   yaYUL
031070,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
031071,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
031072,000018:                                                                                                  ## Mod history: 2019-07-27 MAS  Created from Luminary 69.
031073,000019: 

Page 717

031075,000021:                                                                                                  #  1)    PROGRAM NAME - TARGET DELTA V PROGRAM (P76).
031076,000022:                                                                                                  #  2)    FUNCTIONAL DESCRIPTION - UPON ENTRY BY ASTRONAUT ACTION, P76 FLASHES DSKY REQUESTS TO THE ASTRONAUT
031077,000023:                                                                                                  #        TO PROVIDE VIA DSKY (1) THE DELTA V TO BE APPLIED TO THE OTHER VEHICLE STATE VECTOR AND (2) THE
031078,000024:                                                                                                  #        TIME (TIG) AT WHICH THE OTHER VEHICLE VELOCITY WAS CHANGED BY  EXECUTION OF A THRUSTING MANEUVER. THE
031079,000025:                                                                                                  #        OTHER VEHICLE STATE VECTOR IS INTEGRATED TO TIG AND UPDATED BY THE ADDITION OF DELTA V (DELTA V HAVING
031080,000026:                                                                                                  #        BEEN TRANSFORMED FROM LV TO REF COSYS).  USING INTEGRVS, THE   PROGRAM THEN INTEGRATES THE OTHER
031081,000027:                                                                                                  #  VEHICLE STATE VECTOR TO THE STATE VECTOR OF THIS VEHICLE, THUS INSURING THAT THE W-MATRIX AND BOTH VEHICLE
031082,000028:                                                                                                  #  STATES CORRESPOND TO THE SAME TIME.
031083,000029:                                                                                                  #  3)    ERASABLE INITIALIZATION REQUIRED - NONE.
031084,000030:                                                                                                  #  4)    CALLING SEQUENCES AND EXIT MODES - CALLED BY ASTRONAUT REQUEST THRU DSKY V 37 E 76E.
031085,000031:                                                                                                  #        EXITS BY TCF ENDOFJOB.
031086,000032:                                                                                                  #  5)    OUTPUT - OTHER VEHICLE STATE VECTOR INTEGRATED TO TIG AND INCREMENTED BY DELTA V IN REF COSYS.
031087,000033:                                                                                                  #        THE PUSHLIST CONTAINS THE MATRIX BY WHICH THE INPUT DELTA V MUST BE POST-MULTIPLIED TO CONVERT FROM LV
031088,000034:                                                                                                  #        TO REF COSYS.
031089,000035:                                                                                                  #  6)    DEBRIS - OTHER VEHICLE STATE VECTOR.
031090,000036:                                                                                                  #  7)    SUBROUTINES CALLED - BANKCALL, GOXDSPF, CSMPREC (OR LEMPREC), ATOPCSM (OR ATOPLEM), INTSTALL, INTWAKE, PHASCHNG
031091,000037:                                                                                                  #        INTPRET, INTEGRVS, AND MINIRECT.
031092,000038:                                                                                                  #  8)    FLAG USE - MOONFLAG, CMOONFLAG, INTYPFLG, RASFLAG, AND MARKCTR.
031093,000039: 
031094,000040: 30,2006                                           BANK     30                                    
031095,000041: 13,2000                                           SETLOC   P76LOC                                
031096,000042: 13,2000                                           BANK                                           
031097,000043: 
031098,000044: 13,2207                                           COUNT*   $$/P76                                
031099,000045: 
031100,000046: 13,2207  E7,1437                                  EBANK=   TIG                                   
031101,000047: 
031102,000048: 13,2207           05504        P76                TC       UPFLAG                                
031103,000049: 13,2210           00031                           ADRES    TRACKFLG                              
031104,000050: 
031105,000051: 13,2211           06036                           TC       INTPRET                               
031106,000052: 13,2212           77775                           VLOAD                                          
031107,000053: 13,2213           03432                                    DELVLVC                               
031108,000054: 13,2214           02227                           STORE    DELVOV                                
031109,000055: 13,2215           77776                           EXIT                                           
031110,000056: 
031111,000057: 13,2216           32336                           CAF      V06N84                                #  FLASH LAST DELTA V,
031112,000058: 13,2217           04616                           TC       BANKCALL                              #  AND WAIT FOR KEYBOARD ACTION.
031113,000059: 13,2220           20351                           CADR     GOFLASH                               
031114,000060: 13,2221           12333                           TCF      ENDP76                                
031115,000061: 13,2222           02224                           TC       +2                                    #  PROCEED
031116,000062: 13,2223           02216                           TC       -5                                    #  STORE DATA AND REPEAT FLASHING
031117,000063: 13,2224           32337                           CAF      V06N84     +1                         #  FLASH VERB 06 NOUN 33, DISPLAY LAST TIG,
031118,000064: 13,2225           04616                           TC       BANKCALL                              #  AND WAIT FOR KEYBOARD ACTION.
031119,000065: 13,2226           20351                           CADR     GOFLASH                               
031120,000066: 13,2227           12333                           TCF      ENDP76                                
031121,000067: 13,2230           02232                           TC       +2                                    
031122,000068: 13,2231           02224                           TC       -5                                    
031123,000069: 13,2232           06036                           TC       INTPRET                               #  RETURN TO INTERPRETIVE CODE

Page 718

031125,000071: 13,2233           77745                           DLOAD                                          #  SET D(MPAC)=TIG IN CSEC B28
031126,000072: 13,2234           03440                                    TIG                                   
031127,000073: 13,2235           34041                           STCALL   TDEC1                                 #  SET TDEC1=TIG FOR ORBITAL INTEGRATION
031128,000074: 13,2236           27043                                    OTHPREC                               
031129,000075: 13,2237           53575        COMPMAT            VLOAD    UNIT                                  
031130,000076: 13,2240           00001                                    RATT                                  
031131,000077: 13,2241           77676                           VCOMP                                          #  U(-R)
031132,000078: 13,2242           00031                           STORE    24D                                   #  U(-R) TO 24D
031133,000079: 13,2243           53435                           VXV      UNIT                                  #  U(-R) X V = U(V X R)
031134,000080: 13,2244           00007                                    VATT                                  
031135,000081: 13,2245           00023                           STORE    18D                                   
031136,000082: 13,2246           53435                           VXV      UNIT                                  #  U(V X R) X U(-R) = U((R X V) X R)
031137,000083: 13,2247           00031                                    24D                                   
031138,000084: 13,2250           24015                           STOVL    12D                                   
031139,000085: 13,2251           02227                                    DELVOV                                
031140,000086: 13,2252           76505                           VXM      VSL1                                  #  V(MPAC)=DELTA V IN REFCOSYS
031141,000087: 13,2253           00015                                    12D                                   
031142,000088: 13,2254           77655                           VAD                                            
031143,000089: 13,2255           00007                                    VATT                                  
031144,000090: 13,2256           00007                           STORE    6                                     #  V(PD6)=VATT + DELTA V
031145,000091: 13,2257           77624                           CALL                                           #  PREVENT WOULD-BE USER OF ORBITAL
031146,000092: 13,2260           27412                                    INTSTALL                              #  INTEG FROM INTERFERING WITH UPDATING
031147,000093: 13,2261           77624                           CALL                                           
031148,000094: 13,2262           26340                                    P76SUB1                               
031149,000095: 13,2263           53775                           VLOAD    VSR*                                  
031150,000096: 13,2264           00007                                    6                                     
031151,000097: 13,2265           57176                                    0,2                                   
031152,000098: 13,2266           25543                           STOVL    VCV                                   
031153,000099: 13,2267           00001                                    RATT                                  
031154,000100: 13,2270           77657                           VSR*                                           
031155,000101: 13,2271           57176                                    0,2                                   
031156,000102: 13,2272           15535                           STODL    RCV                                   
031157,000103: 13,2273           03440                                    TIG                                   
031158,000104: 13,2274           01517                           STORE    TET                                   
031159,000105: 13,2275           71214                           CLEAR    DLOAD                                 
031160,000106: 13,2276           01673                                    INTYPFLG                              
031161,000107: 13,2277           01643                                    TETTHIS                               
031162,000108: 13,2300           34041        INTOTHIS           STCALL   TDEC1                                 
031163,000109: 13,2301           27107                                    INTEGRVS                              
031164,000110: 13,2302           77624                           CALL                                           
031165,000111: 13,2303           27412                                    INTSTALL                              
031166,000112: 13,2304           77775                           VLOAD                                          
031167,000113: 13,2305           00017                                    RATT1                                 
031168,000114: 13,2306           01503                           STORE    RRECT                                 
031169,000115: 13,2307           15535                           STODL    RCV                                   
031170,000116: 13,2310           00015                                    TAT                                   
031171,000117: 13,2311           25517                           STOVL    TET                                   
031172,000118: 13,2312           00025                                    VATT1                                 
031173,000119: 13,2313           77624                           CALL                                           
031174,000120: 13,2314           23361                                    MINIRECT                              

Page 719

031176,000122: 13,2315           77776                           EXIT                                           
031177,000123: 13,2316           05353                           TC       PHASCHNG                              
031178,000124: 13,2317           04024                           OCT      04024                                 
031179,000125: 
031180,000126: 13,2320           05504                           TC       UPFLAG                                
031181,000127: 13,2321           00236                           ADRES    REINTFLG                              
031182,000128: 
031183,000129: 13,2322           06036                           TC       INTPRET                               
031184,000130: 13,2323           77624                           CALL                                           
031185,000131: 13,2324           26661                                    ATOPOTH                               
031186,000132: 13,2325           77531                           SSP      EXIT                                  
031187,000133: 13,2326           00053                                    QPRET                                 
031188,000134: 13,2327           26332                                    OUT                                   
031189,000135: 13,2330           04616                           TC       BANKCALL                              #  PERMIT USE OF ORBITAL INTEGRATION
031190,000136: 13,2331           27447                           CADR     INTWAKE1                              
031191,000137: 13,2332           77776        OUT                EXIT                                           
031192,000138: 13,2333           34755        ENDP76             CAF      ZERO                                  
031193,000139: 13,2334           55460                           TS       MARKCTR                               #  CLEAR RR TRACKING MARK COUNTER
031194,000140: 13,2335           16001                           TCF      GOTOPOOH                              
031195,000141: 
031196,000142: 13,2336           01524        V06N84             NV       0684                                  
031197,000143: 13,2337           01441                           NV       0633                                  
031198,000144: 13,2340           43174        P76SUB1            AXT,2    SET                                   
031199,000145: 13,2341           00002                                    2                                     
031200,000146: 13,2342           00063                                    MOONFLAG                              #  SET MEANS MOON IS SPHERE OF INFLUENCE.
031201,000147: 13,2343           77014                           BON      AXT,2                                 
031202,000148: 13,2344           04303                                    CMOONFLG                              #  SET MEANS PERM CM STATE IN LUNAR SPHERE.
031203,000149: 13,2345           00052                                    QPRET                                 
031204,000150: 13,2346           00000                                    0                                     
031205,000151: 13,2347           43414                           CLEAR    RVQ                                   
031206,000152: 13,2350           00263                                    MOONFLAG                              
031207,000153: 
031208,000154: 
031209,000155: 

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