Source Code

These source-code files are part of a reconstructed copy of Luminary 173, the second (unflown) release of the Apollo 14 Lunar Module (LM) Apollo Guidance Computer (AGC) software.

The reconstruction began with reconstructed source code for Luminary 178. Changes between revision 173 and 178 were backed out, as described by Luminary memo 167 (revision 1). The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152N. Note that page numbers in the reconstructed code match those for the baseline log section mentioned in each file's changelog; the page numbers for a real Luminary 173 listing would be different.

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.

030256,000002:                                                                                                  ## Copyright:   Public domain.
030257,000003:                                                                                                  ## Filename:    P76.agc
030258,000004:                                                                                                  ## Purpose:     A section of Luminary revision 173.
030259,000005:                                                                                                  ##              It is part of the reconstructed source code for the second
030260,000006:                                                                                                  ##              (unflown) release of the flight software for the Lunar
030261,000007:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 14.
030262,000008:                                                                                                  ##              The code has been recreated from a reconstructed copy of
030263,000009:                                                                                                  ##              Luminary 178, as well as Luminary memo 167 (revision 1).
030264,000010:                                                                                                  ##              It has been adapted such that the resulting bugger words
030265,000011:                                                                                                  ##              exactly match those specified for Luminary 173 in NASA
030266,000012:                                                                                                  ##              drawing 2021152N, which gives relatively high confidence
030267,000013:                                                                                                  ##              that the reconstruction is correct.
030268,000014:                                                                                                  ## Reference:   pp. 703-705
030269,000015:                                                                                                  ## Assembler:   yaYUL
030270,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
030271,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
030272,000018:                                                                                                  ## Mod history: 2019-09-18 MAS  Created from Luminary 178.
030273,000019: 

Page 703

030275,000021:                                                                                                  #  1) PROGRAM NAME - TARGET DELTA V PROGRAM (P76).
030276,000022:                                                                                                  #  2) FUNCTIONAL DESCRIPTION - UPON ENTRY BY ASTRONAUT ACTION, P76 FLASHES DSKY REQUESTS TO THE ASTRONAUT
030277,000023:                                                                                                  #           TO PROVIDE VIA DSKY (1) THE DELTA V TO BE APPLIED TO THE OTHER VEHICLE STATE VECTOR AND (2) THE
030278,000024:                                                                                                  #           TIME (TIG) AT WHICH THE OTHER VEHICLE VELOCITY WAS CHANGED BY  EXECUTION OF A THRUSTING MANEUVER. THE
030279,000025:                                                                                                  #           OTHER VEHICLE STATE VECTOR IS INTEGRATED TO TIG AND UPDATED BY THE ADDITION OF DELTA V (DELTA V HAVING
030280,000026:                                                                                                  #           BEEN TRANSFORMED FROM LV TO REF COSYS).  USING INTEGRVS, THE   PROGRAM THEN INTEGRATES THE OTHER
030281,000027:                                                                                                  #  VEHICLE STATE VECTOR TO THE STATE VECTOR OF THIS VEHICLE, THUS INSURING THAT THE W-MATRIX AND BOTH VEHICLE
030282,000028:                                                                                                  #  STATES CORRESPOND TO THE SAME TIME.
030283,000029:                                                                                                  #  3) ERASABLE INITIALIZATION REQUIRED - NONE.
030284,000030:                                                                                                  #  4) CALLING SEQUENCES AND EXIT MODES - CALLED BY ASTRONAUT REQUEST THRU DSKY V 37 E 76 E.
030285,000031:                                                                                                  #           EXITS BY TCF ENDOFJOB.
030286,000032:                                                                                                  #  5) OUTPUT - OTHER VEHICLE STATE VECTOR INTEGRATED TO TIG AND INCREMENTED BY DELTA V IN REF COSYS.
030287,000033:                                                                                                  #           THE PUSHLIST CONTAINS THE MATRIX BY WHICH THE INPUT DELTA V MUST BE POST-MULTIPLIED TO CONVERT FROM LV
030288,000034:                                                                                                  #           TO REF COSYS.
030289,000035:                                                                                                  #  6) DEBRIS - OTHER VEHICLE STATE VECTOR.
030290,000036:                                                                                                  #  7) SUBROUTINES CALLED - BANKCALL,GOXDSPF,CSMPREC (OR LEMPREC),ATOPCSM (OR ATOPLEM),INTSTALL,INTWAKE, PHASCHNG
030291,000037:                                                                                                  #           INTPRET, INTEGRVS, AND MINIRECT.
030292,000038: 
030293,000039:                                                                                                  #  8) FLAG USE - MOONFLAG,CMOONFLAG,INTYPFLG,RASFLAG, AND MARKCTR.
030294,000040: 
030295,000041: 30,2061                                           BANK     30                                    
030296,000042: 13,2000                                           SETLOC   P76LOC                                
030297,000043: 13,2000                                           BANK                                           
030298,000044: 
030299,000045: 13,2207                                           COUNT*   $$/P76                                
030300,000046: 
030301,000047: 13,2207  E7,1441                                  EBANK=   TIG                                   
030302,000048: 
030303,000049: 13,2207           05515        P76                TC       UPFLAG                                
030304,000050: 13,2210           00031                           ADRES    TRACKFLG                              
030305,000051: 
030306,000052: 13,2211           06042                           TC       INTPRET                               
030307,000053: 13,2212           77775                           VLOAD                                          
030308,000054: 13,2213           03434                                    DELVLVC                               
030309,000055: 13,2214           02223                           STORE    DELVOV                                
030310,000056: 13,2215           77776                           EXIT                                           
030311,000057: 
030312,000058: 13,2216           32335                           CAF      V06N84     +1                         #  FLASH VERB 06 NOUN 33, DISPLAY LAST TIG,
030313,000059: 13,2217           04616                           TC       BANKCALL                              #  AND WAIT FOR KEYBOARD ACTION.
030314,000060: 13,2220           20477                           CADR     GOFLASH                               
030315,000061: 13,2221           12331                           TCF      ENDP76                                
030316,000062: 13,2222           02224                           TC       +2                                    #  PROCEED
030317,000063: 13,2223           02216                           TC       -5                                    #  STORE DATA AND REPEAT FLASHING
030318,000064: 13,2224           32334                           CAF      V06N84                                #  FLASH LAST DELTA V,
030319,000065: 13,2225           04616                           TC       BANKCALL                              #  AND WAIT FOR KEYBOARD ACTION.
030320,000066: 13,2226           20477                           CADR     GOFLASH                               
030321,000067: 13,2227           12331                           TCF      ENDP76                                
030322,000068: 13,2230           02232                           TC       +2                                    
030323,000069: 13,2231           02224                           TC       -5                                    
030324,000070: 13,2232           06042                           TC       INTPRET                               #  RETURN TO INTERPRETIVE CODE

Page 704

030326,000072: 13,2233           43145                           DLOAD    SET                                   
030327,000073: 13,2234           03442                                    TIG                                   
030328,000074: 13,2235           01076                                    NODOFLAG                              
030329,000075: 13,2236           34041                           STCALL   TDEC1                                 #  SET TDEC1=TIG FOR ORBITAL INTEGRATION
030330,000076: 13,2237           27042                                    OTHPREC                               
030331,000077: 13,2240           53575        COMPMAT            VLOAD    UNIT                                  
030332,000078: 13,2241           00001                                    RATT                                  
030333,000079: 13,2242           77676                           VCOMP                                          #  U(-R)
030334,000080: 13,2243           00031                           STORE    24D                                   #  U(-R) TO 24D
030335,000081: 13,2244           53435                           VXV      UNIT                                  #  U(-R)XV = U(VXR)
030336,000082: 13,2245           00007                                    VATT                                  
030337,000083: 13,2246           00023                           STORE    18D                                   
030338,000084: 13,2247           53435                           VXV      UNIT                                  #  U(VXR)XU(-R) = U((RXV)XR)
030339,000085: 13,2250           00031                                    24D                                   
030340,000086: 13,2251           24015                           STOVL    12D                                   
030341,000087: 13,2252           02223                                    DELVOV                                
030342,000088: 13,2253           76505                           VXM      VSL1                                  #  V(MPAC)=DELTA V IN REFCOSYS
030343,000089: 13,2254           00015                                    12D                                   
030344,000090: 13,2255           77655                           VAD                                            
030345,000091: 13,2256           00007                                    VATT                                  
030346,000092: 13,2257           00007                           STORE    6                                     #  V(PD6)=VATT + DELTA V
030347,000093: 13,2260           77624                           CALL                                           #  PREVENT WOULD-BE USER OF ORBITAL
030348,000094: 13,2261           27410                                    INTSTALL                              #  INTEG FROM INTERFERING WITH UPDATING
030349,000095: 13,2262           77624                           CALL                                           
030350,000096: 13,2263           26336                                    P76SUB1                               
030351,000097: 13,2264           53775                           VLOAD    VSR*                                  
030352,000098: 13,2265           00007                                    6                                     
030353,000099: 13,2266           57176                                    0,2                                   
030354,000100: 13,2267           25543                           STOVL    VCV                                   
030355,000101: 13,2270           00001                                    RATT                                  
030356,000102: 13,2271           77657                           VSR*                                           
030357,000103: 13,2272           57176                                    0,2                                   
030358,000104: 13,2273           15535                           STODL    RCV                                   
030359,000105: 13,2274           03442                                    TIG                                   
030360,000106: 13,2275           01517                           STORE    TET                                   
030361,000107: 13,2276           71214                           CLEAR    DLOAD                                 
030362,000108: 13,2277           01673                                    INTYPFLG                              
030363,000109: 13,2300           01643                                    TETTHIS                               
030364,000110: 13,2301           34041        INTOTHIS           STCALL   TDEC1                                 
030365,000111: 13,2302           27106                                    INTEGRVS                              
030366,000112: 13,2303           77624                           CALL                                           
030367,000113: 13,2304           27410                                    INTSTALL                              
030368,000114: 13,2305           77775                           VLOAD                                          
030369,000115: 13,2306           00017                                    RATT1                                 
030370,000116: 13,2307           01503                           STORE    RRECT                                 
030371,000117: 13,2310           15535                           STODL    RCV                                   
030372,000118: 13,2311           00015                                    TAT                                   
030373,000119: 13,2312           25517                           STOVL    TET                                   
030374,000120: 13,2313           00025                                    VATT1                                 
030375,000121: 13,2314           77624                           CALL                                           

Page 705

030377,000123: 13,2315           27705                                    MINIRECT                              
030378,000124: 13,2316           77776                           EXIT                                           
030379,000125: 13,2317           05364                           TC       PHASCHNG                              
030380,000126: 13,2320           04024                           OCT      04024                                 
030381,000127: 
030382,000128: 13,2321           06042                           TC       INTPRET                               
030383,000129: 13,2322           45014                           SET      CALL                                  
030384,000130: 13,2323           05070                                    REINTFLG                              
030385,000131: 13,2324           26660                                    ATOPOTH                               
030386,000132: 13,2325           77624                           CALL                                           
030387,000133: 13,2326           27417                                    INTWAKE0                              
030388,000134: 13,2327           77414        OUT                CLEAR    EXIT                                  #  ALLOW V37.  NO NEED TO CLEAR NODOFLAG AT
030389,000135: 13,2330           01276                                    NODOFLAG                              #   ENDP76 SINCE FLAG NOT SET WHEN DISPLAY
030390,000136:                                                                                                  #   RESPONSES TRANSFER THERE FROM P76+.
030391,000137: 13,2331           34755        ENDP76             CAF      ZERO                                  
030392,000138: 13,2332           55462                           TS       MARKCTR                               #  CLEAR RR TRACKING MARK COUNTER
030393,000139: 13,2333           16001                           TCF      GOTOPOOH                              
030394,000140: 
030395,000141: 13,2334           01524        V06N84             NV       0684                                  
030396,000142: 13,2335           01441                           NV       0633                                  
030397,000143: 13,2336           43174        P76SUB1            AXT,2    SET                                   
030398,000144: 13,2337           00002                                    2                                     
030399,000145: 13,2340           00063                                    MOONFLAG                              #  SET MEANS MOON IS SPHERE OF INFLUENCE.
030400,000146: 13,2341           77014                           BON      AXT,2                                 
030401,000147: 13,2342           04303                                    CMOONFLG                              #  SET MEANS PERM CM STATE IN LUNAR SPHERE.
030402,000148: 13,2343           00052                                    QPRET                                 
030403,000149: 13,2344           00000                                    0                                     
030404,000150: 13,2345           43414                           CLEAR    RVQ                                   
030405,000151: 13,2346           00263                                    MOONFLAG                              

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