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.

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

Page 717

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

Page 718

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

Page 719

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

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