Source Code

These source-code files are part of a reconstructed copy of Luminary 96, the original release of the Apollo 11 Lunar Module (LM) Apollo Guidance Computer (AGC) software.

The reconstruction began with reconstructed source code for Luminary 97. Changes between revisions 96 and 97 were backed out, as described by anomal report LNY-59. transcribed from a digitized copy of that program. The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152D. Note that page numbers in the reconstructed code match those on the Luminary 099 revision 001 printout, although the added code would likely have changed page numbers for a real Luminary 96 listing.

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.

029822,000002:                                                                                                  ## Copyright:   Public domain.
029823,000003:                                                                                                  ## Filename:    P76.agc
029824,000004:                                                                                                  ## Purpose:     A section of Luminary revision 96.
029825,000005:                                                                                                  ##              It is part of the reconstructed source code for the
029826,000006:                                                                                                  ##              original release of the flight software for the Lunar 
029827,000007:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 11.
029828,000008:                                                                                                  ##              The code has been recreated from a previously reconstructed
029829,000009:                                                                                                  ##              copy of Luminary 97 by undoing changes described in anomaly
029830,000010:                                                                                                  ##              report LNY-59. The code has been adapted such that the
029831,000011:                                                                                                  ##              resulting bugger words exactly match those specified for
029832,000012:                                                                                                  ##              Luminary 96 in NASA drawing 2021152D, which gives relatively
029833,000013:                                                                                                  ##              high confidence that the reconstruction is correct.
029834,000014:                                                                                                  ## Reference:   pp. 709-711
029835,000015:                                                                                                  ## Assembler:   yaYUL
029836,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
029837,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
029838,000018:                                                                                                  ## Mod history: 2019-08-04 MAS  Created from Luminary 97.
029839,000019: 

Page 709

029841,000021:                                                                                                  #  1)    PROGRAM NAME - TARGET DELTA V PROGRAM (P76).
029842,000022:                                                                                                  #  2)    FUNCTIONAL DESCRIPTION - UPON ENTRY BY ASTRONAUT ACTION, P76 FLASHES DSKY REQUESTS TO THE ASTRONAUT
029843,000023:                                                                                                  #        TO PROVIDE VIA DSKY (1) THE DELTA V TO BE APPLIED TO THE OTHER VEHICLE STATE VECTOR AND (2) THE
029844,000024:                                                                                                  #        TIME (TIG) AT WHICH THE OTHER VEHICLE VELOCITY WAS CHANGED BY EXECUTION OF A THRUSTING MANEUVER. THE
029845,000025:                                                                                                  #        OTHER VEHICLE STATE VECTOR IS INTEGRATED TO TIG AND UPDATED BY THE ADDITION OF DELTA V (DELTA V HAVING
029846,000026:                                                                                                  #        BEEN TRANSFORMED FROM LV TO REF COSYS).  USING INTEGRVS, THE PROGRAM THEN INTEGRATES THE OTHER
029847,000027:                                                                                                  #        VEHICLE STATE VECTOR TO THE STATE VECTOR OF THIS VEHICLE, THUS INSURING THAT THE W-MATRIX AND BOTH VEHICLE
029848,000028:                                                                                                  #        STATES CORRESPOND TO THE SAME TIME.
029849,000029:                                                                                                  #  3)    ERASABLE INITIALIZATION REQUIRED - NONE.
029850,000030:                                                                                                  #  4)    CALLING SEQUENCES AND EXIT MODES - CALLED BY ASTRONAUT REQUEST THRU DSKY V 37 E 76E.
029851,000031:                                                                                                  #        EXITS BY TCF ENDOFJOB.
029852,000032:                                                                                                  #  5)    OUTPUT - OTHER VEHICLE STATE VECTOR INTEGRATED TO TIG AND INCREMENTED BY DELTA V IN REF COSYS.
029853,000033:                                                                                                  #        THE PUSHLIST CONTAINS THE MATRIX BY WHICH THE INPUT DELTA V MUST BE POST-MULTIPLIED TO CONVERT FROM LV
029854,000034:                                                                                                  #        TO REF COSYS.
029855,000035:                                                                                                  #  6)    DEBRIS - OTHER VEHICLE STATE VECTOR.
029856,000036:                                                                                                  #  7)    SUBROUTINES CALLED - BANKCALL, GOXDSPF, CSMPREC (OR LEMPREC), ATOPCSM (OR ATOPLEM), INTSTALL, INTWAKE, PHASCHNG
029857,000037:                                                                                                  #        INTPRET, INTEGRVS, AND MINIRECT.
029858,000038:                                                                                                  #  8)    FLAG USE - MOONFLAG, CMOONFLAG, INTYPFLG, RASFLAG, AND MARKCTR.
029859,000039: 
029860,000040: 30,2061                                           BANK     30                                    
029861,000041: 13,2000                                           SETLOC   P76LOC                                
029862,000042: 13,2000                                           BANK                                           
029863,000043: 
029864,000044: 13,2207                                           COUNT*   $$/P76                                
029865,000045: 
029866,000046: 13,2207  E7,1441                                  EBANK=   TIG                                   
029867,000047: 
029868,000048: 13,2207           05504        P76                TC       UPFLAG                                
029869,000049: 13,2210           00031                           ADRES    TRACKFLG                              
029870,000050: 
029871,000051: 13,2211           06037                           TC       INTPRET                               
029872,000052: 13,2212           77775                           VLOAD                                          
029873,000053: 13,2213           03434                                    DELVLVC                               
029874,000054: 13,2214           02223                           STORE    DELVOV                                
029875,000055: 13,2215           77776                           EXIT                                           
029876,000056: 
029877,000057: 13,2216           32336                           CAF      V06N84                                #  FLASH LAST DELTA V,
029878,000058: 13,2217           04616                           TC       BANKCALL                              #  AND WAIT FOR KEYBOARD ACTION.
029879,000059: 13,2220           20476                           CADR     GOFLASH                               
029880,000060: 13,2221           12333                           TCF      ENDP76                                
029881,000061: 13,2222           02224                           TC       +2                                    #  PROCEED
029882,000062: 13,2223           02216                           TC       -5                                    #  STORE DATA AND REPEAT FLASHING
029883,000063: 13,2224           32337                           CAF      V06N84     +1                         #  FLASH VERB 06 NOUN 33, DISPLAY LAST TIG,
029884,000064: 13,2225           04616                           TC       BANKCALL                              #  AND WAIT FOR KEYBOARD ACTION.
029885,000065: 13,2226           20476                           CADR     GOFLASH                               
029886,000066: 13,2227           12333                           TCF      ENDP76                                
029887,000067: 13,2230           02232                           TC       +2                                    
029888,000068: 13,2231           02224                           TC       -5                                    
029889,000069: 13,2232           06037                           TC       INTPRET                               #  RETURN TO INTERPRETIVE CODE

Page 710

029891,000071: 13,2233           77745                           DLOAD                                          #  SET D(MPAC)=TIG IN CSEC B28
029892,000072: 13,2234           03442                                    TIG                                   
029893,000073: 13,2235           34041                           STCALL   TDEC1                                 #  SET TDEC1=TIG FOR ORBITAL INTEGRATION
029894,000074: 13,2236           27043                                    OTHPREC                               
029895,000075: 13,2237           53575        COMPMAT            VLOAD    UNIT                                  
029896,000076: 13,2240           00001                                    RATT                                  
029897,000077: 13,2241           77676                           VCOMP                                          #  U(-R)
029898,000078: 13,2242           00031                           STORE    24D                                   #  U(-R) TO 24D
029899,000079: 13,2243           53435                           VXV      UNIT                                  #  U(-R) X V = U(V X R)
029900,000080: 13,2244           00007                                    VATT                                  
029901,000081: 13,2245           00023                           STORE    18D                                   
029902,000082: 13,2246           53435                           VXV      UNIT                                  #  U(V X R) X U(-R) = U((R X V) X R)
029903,000083: 13,2247           00031                                    24D                                   
029904,000084: 13,2250           24015                           STOVL    12D                                   
029905,000085: 13,2251           02223                                    DELVOV                                
029906,000086: 13,2252           76505                           VXM      VSL1                                  #  V(MPAC)=DELTA V IN REFCOSYS
029907,000087: 13,2253           00015                                    12D                                   
029908,000088: 13,2254           77655                           VAD                                            
029909,000089: 13,2255           00007                                    VATT                                  
029910,000090: 13,2256           00007                           STORE    6                                     #  V(PD6)=VATT + DELTA V
029911,000091: 13,2257           77624                           CALL                                           #  PREVENT WOULD-BE USER OF ORBITAL
029912,000092: 13,2260           27414                                    INTSTALL                              #  INTEG FROM INTERFERING WITH UPDATING
029913,000093: 13,2261           77624                           CALL                                           
029914,000094: 13,2262           26340                                    P76SUB1                               
029915,000095: 13,2263           53775                           VLOAD    VSR*                                  
029916,000096: 13,2264           00007                                    6                                     
029917,000097: 13,2265           57176                                    0,2                                   
029918,000098: 13,2266           25543                           STOVL    VCV                                   
029919,000099: 13,2267           00001                                    RATT                                  
029920,000100: 13,2270           77657                           VSR*                                           
029921,000101: 13,2271           57176                                    0,2                                   
029922,000102: 13,2272           15535                           STODL    RCV                                   
029923,000103: 13,2273           03442                                    TIG                                   
029924,000104: 13,2274           01517                           STORE    TET                                   
029925,000105: 13,2275           71214                           CLEAR    DLOAD                                 
029926,000106: 13,2276           01673                                    INTYPFLG                              
029927,000107: 13,2277           01643                                    TETTHIS                               
029928,000108: 13,2300           34041        INTOTHIS           STCALL   TDEC1                                 
029929,000109: 13,2301           27107                                    INTEGRVS                              
029930,000110: 13,2302           77624                           CALL                                           
029931,000111: 13,2303           27414                                    INTSTALL                              
029932,000112: 13,2304           77775                           VLOAD                                          
029933,000113: 13,2305           00017                                    RATT1                                 
029934,000114: 13,2306           01503                           STORE    RRECT                                 
029935,000115: 13,2307           15535                           STODL    RCV                                   
029936,000116: 13,2310           00015                                    TAT                                   
029937,000117: 13,2311           25517                           STOVL    TET                                   
029938,000118: 13,2312           00025                                    VATT1                                 
029939,000119: 13,2313           77624                           CALL                                           
029940,000120: 13,2314           23455                                    MINIRECT                              

Page 711

029942,000122: 13,2315           77776                           EXIT                                           
029943,000123: 13,2316           05353                           TC       PHASCHNG                              
029944,000124: 13,2317           04024                           OCT      04024                                 
029945,000125: 
029946,000126: 13,2320           05504                           TC       UPFLAG                                
029947,000127: 13,2321           00236                           ADRES    REINTFLG                              
029948,000128: 
029949,000129: 13,2322           06037                           TC       INTPRET                               
029950,000130: 13,2323           77624                           CALL                                           
029951,000131: 13,2324           26661                                    ATOPOTH                               
029952,000132: 13,2325           77531                           SSP      EXIT                                  
029953,000133: 13,2326           00053                                    QPRET                                 
029954,000134: 13,2327           26332                                    OUT                                   
029955,000135: 13,2330           04616                           TC       BANKCALL                              #  PERMIT USE OF ORBITAL INTEGRATION
029956,000136: 13,2331           27445                           CADR     INTWAKE1                              
029957,000137: 13,2332           77776        OUT                EXIT                                           
029958,000138: 13,2333           34755        ENDP76             CAF      ZERO                                  
029959,000139: 13,2334           55462                           TS       MARKCTR                               #  CLEAR RR TRACKING MARK COUNTER
029960,000140: 13,2335           16001                           TCF      GOTOPOOH                              
029961,000141: 
029962,000142: 13,2336           01524        V06N84             NV       0684                                  
029963,000143: 13,2337           01441                           NV       0633                                  
029964,000144: 13,2340           43174        P76SUB1            AXT,2    SET                                   
029965,000145: 13,2341           00002                                    2                                     
029966,000146: 13,2342           00063                                    MOONFLAG                              #  SET MEANS MOON IS SPHERE OF INFLUENCE.
029967,000147: 13,2343           77014                           BON      AXT,2                                 
029968,000148: 13,2344           04303                                    CMOONFLG                              #  SET MEANS PERM CM STATE IN LUNAR SPHERE.
029969,000149: 13,2345           00052                                    QPRET                                 
029970,000150: 13,2346           00000                                    0                                     
029971,000151: 13,2347           43414                           CLEAR    RVQ                                   
029972,000152: 13,2350           00263                                    MOONFLAG                              
029973,000153: 
029974,000154: 
029975,000155: 

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