Source Code

These source-code files were transcribed from scans made from Don Eyles's personal copy of Luminary 069. They were scanned at archive.org's Boston facility, and the scanning was sponsored by Onno Hommes. The code was transcribed from these scans by a team of volunteers who are referenced in the program comments. Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". In some cases, where similar code blocks exist in previously-transcribed AGC programs (primarily Luminary 99, from Apollo 11) those code blocks were used as a starting point and then corrected to agree with the Luminary 69 scans. The full scans are available at the Virtual AGC project's collection at archive.org, while more-convenient reduced-size (but reduced-quality) images are available at the main Virtual AGC website. Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository. Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 069 OF AGC PROGRAM LUMINARY BY NASA 2021112-011
	19:02 NOV. 25,1968
Note that the date is the date of the printout, not the date of the program revision.

031205,000002:                                                                                                  ## Copyright:   Public domain.
031206,000003:                                                                                                  ## Filename:    P76.agc
031207,000004:                                                                                                  ## Purpose:     The main source file for Luminary revision 069.
031208,000005:                                                                                                  ##              It is part of the source code for the original release
031209,000006:                                                                                                  ##              of the flight software for the Lunar Module's (LM) Apollo
031210,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 10. The actual flown
031211,000008:                                                                                                  ##              version was Luminary 69 revision 2, which included a
031212,000009:                                                                                                  ##              newer lunar gravity model and only affected module 2.
031213,000010:                                                                                                  ##              This file is intended to be a faithful transcription, except
031214,000011:                                                                                                  ##              that the code format has been changed to conform to the
031215,000012:                                                                                                  ##              requirements of the yaYUL assembler rather than the
031216,000013:                                                                                                  ##              original YUL assembler.
031217,000014:                                                                                                  ## Reference:   pp. 717-719
031218,000015:                                                                                                  ## Assembler:   yaYUL
031219,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
031220,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
031221,000018:                                                                                                  ## Mod history: 2016-12-13 MAS  Created from Luminary 99.
031222,000019:                                                                                                  ##              2016-12-14 MAS  Updated from comment-proofed Luminary 99 version.
031223,000020:                                                                                                  ##              2016-12-15 RRB  Updated for Luminary 69.
031224,000021:                                                                                                  ##              2017-01-28 RSB  Proofed comment text using octopus/prooferComments
031225,000022:                                                                                                  ##                              but no errors found.
031226,000023: 

Page 717

031228,000025:                                                                                                  #  1)    PROGRAM NAME - TARGET DELTA V PROGRAM (P76).
031229,000026:                                                                                                  #  2)    FUNCTIONAL DESCRIPTION - UPON ENTRY BY ASTRONAUT ACTION, P76 FLASHES DSKY REQUESTS TO THE ASTRONAUT
031230,000027:                                                                                                  #        TO PROVIDE VIA DSKY (1) THE DELTA V TO BE APPLIED TO THE OTHER VEHICLE STATE VECTOR AND (2) THE
031231,000028:                                                                                                  #        TIME (TIG) AT WHICH THE OTHER VEHICLE VELOCITY WAS CHANGED BY  EXECUTION OF A THRUSTING MANEUVER. THE
031232,000029:                                                                                                  #        OTHER VEHICLE STATE VECTOR IS INTEGRATED TO TIG AND UPDATED BY THE ADDITION OF DELTA V (DELTA V HAVING
031233,000030:                                                                                                  #        BEEN TRANSFORMED FROM LV TO REF COSYS).  USING INTEGRVS, THE   PROGRAM THEN INTEGRATES THE OTHER
031234,000031:                                                                                                  #  VEHICLE STATE VECTOR TO THE STATE VECTOR OF THIS VEHICLE, THUS INSURING THAT THE W-MATRIX AND BOTH VEHICLE
031235,000032:                                                                                                  #  STATES CORRESPOND TO THE SAME TIME.
031236,000033:                                                                                                  #  3)    ERASABLE INITIALIZATION REQUIRED - NONE.
031237,000034:                                                                                                  #  4)    CALLING SEQUENCES AND EXIT MODES - CALLED BY ASTRONAUT REQUEST THRU DSKY V 37 E 76E.
031238,000035:                                                                                                  #        EXITS BY TCF ENDOFJOB.
031239,000036:                                                                                                  #  5)    OUTPUT - OTHER VEHICLE STATE VECTOR INTEGRATED TO TIG AND INCREMENTED BY DELTA V IN REF COSYS.
031240,000037:                                                                                                  #        THE PUSHLIST CONTAINS THE MATRIX BY WHICH THE INPUT DELTA V MUST BE POST-MULTIPLIED TO CONVERT FROM LV
031241,000038:                                                                                                  #        TO REF COSYS.
031242,000039:                                                                                                  #  6)    DEBRIS - OTHER VEHICLE STATE VECTOR.
031243,000040:                                                                                                  #  7)    SUBROUTINES CALLED - BANKCALL, GOXDSPF, CSMPREC (OR LEMPREC), ATOPCSM (OR ATOPLEM), INTSTALL, INTWAKE, PHASCHNG
031244,000041:                                                                                                  #        INTPRET, INTEGRVS, AND MINIRECT.
031245,000042:                                                                                                  #  8)    FLAG USE - MOONFLAG, CMOONFLAG, INTYPFLG, RASFLAG, AND MARKCTR.
031246,000043: 
031247,000044: 30,2006                                           BANK     30                                    
031248,000045: 13,2000                                           SETLOC   P76LOC                                
031249,000046: 13,2000                                           BANK                                           
031250,000047: 
031251,000048: 13,2207                                           COUNT*   $$/P76                                
031252,000049: 
031253,000050: 13,2207  E7,1437                                  EBANK=   TIG                                   
031254,000051: 
031255,000052: 13,2207           05504        P76                TC       UPFLAG                                
031256,000053: 13,2210           00031                           ADRES    TRACKFLG                              
031257,000054: 
031258,000055: 13,2211           06036                           TC       INTPRET                               
031259,000056: 13,2212           77775                           VLOAD                                          
031260,000057: 13,2213           03432                                    DELVLVC                               
031261,000058: 13,2214           02227                           STORE    DELVOV                                
031262,000059: 13,2215           77776                           EXIT                                           
031263,000060: 
031264,000061: 13,2216           32336                           CAF      V06N84                                #  FLASH LAST DELTA V,
031265,000062: 13,2217           04616                           TC       BANKCALL                              #  AND WAIT FOR KEYBOARD ACTION.
031266,000063: 13,2220           20351                           CADR     GOFLASH                               
031267,000064: 13,2221           12333                           TCF      ENDP76                                
031268,000065: 13,2222           02224                           TC       +2                                    #  PROCEED
031269,000066: 13,2223           02216                           TC       -5                                    #  STORE DATA AND REPEAT FLASHING
031270,000067: 13,2224           32337                           CAF      V06N84     +1                         #  FLASH VERB 06 NOUN 33, DISPLAY LAST TIG,
031271,000068: 13,2225           04616                           TC       BANKCALL                              #  AND WAIT FOR KEYBOARD ACTION.
031272,000069: 13,2226           20351                           CADR     GOFLASH                               
031273,000070: 13,2227           12333                           TCF      ENDP76                                
031274,000071: 13,2230           02232                           TC       +2                                    
031275,000072: 13,2231           02224                           TC       -5                                    
031276,000073: 13,2232           06036                           TC       INTPRET                               #  RETURN TO INTERPRETIVE CODE

Page 718

031278,000075: 13,2233           77745                           DLOAD                                          #  SET D(MPAC)=TIG IN CSEC B28
031279,000076: 13,2234           03440                                    TIG                                   
031280,000077: 13,2235           34041                           STCALL   TDEC1                                 #  SET TDEC1=TIG FOR ORBITAL INTEGRATION
031281,000078: 13,2236           27043                                    OTHPREC                               
031282,000079: 13,2237           53575        COMPMAT            VLOAD    UNIT                                  
031283,000080: 13,2240           00001                                    RATT                                  
031284,000081: 13,2241           77676                           VCOMP                                          #  U(-R)
031285,000082: 13,2242           00031                           STORE    24D                                   #  U(-R) TO 24D
031286,000083: 13,2243           53435                           VXV      UNIT                                  #  U(-R) X V = U(V X R)
031287,000084: 13,2244           00007                                    VATT                                  
031288,000085: 13,2245           00023                           STORE    18D                                   
031289,000086: 13,2246           53435                           VXV      UNIT                                  #  U(V X R) X U(-R) = U((R X V) X R)
031290,000087: 13,2247           00031                                    24D                                   
031291,000088: 13,2250           24015                           STOVL    12D                                   
031292,000089: 13,2251           02227                                    DELVOV                                
031293,000090: 13,2252           76505                           VXM      VSL1                                  #  V(MPAC)=DELTA V IN REFCOSYS
031294,000091: 13,2253           00015                                    12D                                   
031295,000092: 13,2254           77655                           VAD                                            
031296,000093: 13,2255           00007                                    VATT                                  
031297,000094: 13,2256           00007                           STORE    6                                     #  V(PD6)=VATT + DELTA V
031298,000095: 13,2257           77624                           CALL                                           #  PREVENT WOULD-BE USER OF ORBITAL
031299,000096: 13,2260           27412                                    INTSTALL                              #  INTEG FROM INTERFERING WITH UPDATING
031300,000097: 13,2261           77624                           CALL                                           
031301,000098: 13,2262           26340                                    P76SUB1                               
031302,000099: 13,2263           53775                           VLOAD    VSR*                                  
031303,000100: 13,2264           00007                                    6                                     
031304,000101: 13,2265           57176                                    0,2                                   
031305,000102: 13,2266           25543                           STOVL    VCV                                   
031306,000103: 13,2267           00001                                    RATT                                  
031307,000104: 13,2270           77657                           VSR*                                           
031308,000105: 13,2271           57176                                    0,2                                   
031309,000106: 13,2272           15535                           STODL    RCV                                   
031310,000107: 13,2273           03440                                    TIG                                   
031311,000108: 13,2274           01517                           STORE    TET                                   
031312,000109: 13,2275           71214                           CLEAR    DLOAD                                 
031313,000110: 13,2276           01673                                    INTYPFLG                              
031314,000111: 13,2277           01643                                    TETTHIS                               
031315,000112: 13,2300           34041        INTOTHIS           STCALL   TDEC1                                 
031316,000113: 13,2301           27107                                    INTEGRVS                              
031317,000114: 13,2302           77624                           CALL                                           
031318,000115: 13,2303           27412                                    INTSTALL                              
031319,000116: 13,2304           77775                           VLOAD                                          
031320,000117: 13,2305           00017                                    RATT1                                 
031321,000118: 13,2306           01503                           STORE    RRECT                                 
031322,000119: 13,2307           15535                           STODL    RCV                                   
031323,000120: 13,2310           00015                                    TAT                                   
031324,000121: 13,2311           25517                           STOVL    TET                                   
031325,000122: 13,2312           00025                                    VATT1                                 
031326,000123: 13,2313           77624                           CALL                                           
031327,000124: 13,2314           23361                                    MINIRECT                              

Page 719

031329,000126: 13,2315           77776                           EXIT                                           
031330,000127: 13,2316           05353                           TC       PHASCHNG                              
031331,000128: 13,2317           04024                           OCT      04024                                 
031332,000129: 
031333,000130: 13,2320           05504                           TC       UPFLAG                                
031334,000131: 13,2321           00236                           ADRES    REINTFLG                              
031335,000132: 
031336,000133: 13,2322           06036                           TC       INTPRET                               
031337,000134: 13,2323           77624                           CALL                                           
031338,000135: 13,2324           26661                                    ATOPOTH                               
031339,000136: 13,2325           77531                           SSP      EXIT                                  
031340,000137: 13,2326           00053                                    QPRET                                 
031341,000138: 13,2327           26332                                    OUT                                   
031342,000139: 13,2330           04616                           TC       BANKCALL                              #  PERMIT USE OF ORBITAL INTEGRATION
031343,000140: 13,2331           27447                           CADR     INTWAKE1                              
031344,000141: 13,2332           77776        OUT                EXIT                                           
031345,000142: 13,2333           34755        ENDP76             CAF      ZERO                                  
031346,000143: 13,2334           55460                           TS       MARKCTR                               #  CLEAR RR TRACKING MARK COUNTER
031347,000144: 13,2335           16001                           TCF      GOTOPOOH                              
031348,000145: 
031349,000146: 13,2336           01524        V06N84             NV       0684                                  
031350,000147: 13,2337           01441                           NV       0633                                  
031351,000148: 13,2340           43174        P76SUB1            AXT,2    SET                                   
031352,000149: 13,2341           00002                                    2                                     
031353,000150: 13,2342           00063                                    MOONFLAG                              #  SET MEANS MOON IS SPHERE OF INFLUENCE.
031354,000151: 13,2343           77014                           BON      AXT,2                                 
031355,000152: 13,2344           04303                                    CMOONFLG                              #  SET MEANS PERM CM STATE IN LUNAR SPHERE.
031356,000153: 13,2345           00052                                    QPRET                                 
031357,000154: 13,2346           00000                                    0                                     
031358,000155: 13,2347           43414                           CLEAR    RVQ                                   
031359,000156: 13,2350           00263                                    MOONFLAG                              
031360,000157: 
031361,000158: 
031362,000159: 

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