Source Code

These source-code files are part of a reconstructed copy of Artemis 071, the first release of the Apollo 15 through 17 Command Module (CM) Apollo Guidance Computer (AGC) software.

The reconstruction began with source code of Artemis 072 previously transcribed from a digitized copy of that program. The code was then updated by undoing changes between the two versions. The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021154-. Note that page numbers in the reconstructed code match those on the Artemis 072 printout, although the changed code would likely have changed page numbers for a real Artemis 071 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.

022447,000002:                                                                                                  ## Copyright:   Public domain.
022448,000003:                                                                                                  ## Filename:    P76.agc
022449,000004:                                                                                                  ## Purpose:     A section of Artemis revision 071.
022450,000005:                                                                                                  ##              It is part of the reconstructed source code for the first
022451,000006:                                                                                                  ##              release of the flight software for the Command Module's
022452,000007:                                                                                                  ##              (CM) Apollo Guidance Computer (AGC) for Apollo 15 through
022453,000008:                                                                                                  ##              17. The code has been recreated from a copy of Artemis 072.
022454,000009:                                                                                                  ##              It has been adapted such that the resulting bugger words
022455,000010:                                                                                                  ##              exactly match those specified for Artemis 071 in NASA
022456,000011:                                                                                                  ##              drawing 2021154-, which gives relatively high confidence
022457,000012:                                                                                                  ##              that the reconstruction is correct.
022458,000013:                                                                                                  ## Reference:   513
022459,000014:                                                                                                  ## Assembler:   yaYUL
022460,000015:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
022461,000016:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
022462,000017:                                                                                                  ## Mod history: 2019-08-14 MAS  Created from Artemis 072.
022463,000018: 

Page 513

022465,000020:                                                                                                  #  1) PROGRAM NAME - TARGET DELTA V PROGRAM (P76).
022466,000021:                                                                                                  #  2) FUNCTIONAL DESCRIPTION - UPON ENTRY BY ASTRONAUT ACTION, P76 FLASHES DSKY REQUESTS TO THE ASTRONAUT
022467,000022:                                                                                                  #        TO PROVIDE VIA DSKY (1) THE DELTA V TO BE APPLIED TO THE OTHER VEHICLE STATE VECTOR AND (2) THE
022468,000023:                                                                                                  #        TIME (TIG) AT WHICH THE OTHER VEHICLE VELOCITY WAS CHANGED BY  EXECUTION OF A THRUSTING MANEUVER. THE
022469,000024:                                                                                                  #        OTHER VEHICLE STATE VECTOR IS INTEGRATED TO TIG AND UPDATED BY THE ADDITION OF DELTA V (DELTA V HAVING
022470,000025:                                                                                                  #        BEEN TRANSFORMED FROM LV TO REF COSYS). USING INTEGRVS, THE PROGRAM THEN INTEGRATES THE OTHER
022471,000026:                                                                                                  #        VEHICLE STATE VECTOR TO THE STATE VECTOR OF THIS VEHICLE, THUS INSURING THAT THE W-MATRIX AND BOTH VEHICLE
022472,000027:                                                                                                  #        STATES CORRESPOND TO THE SAME TIME.
022473,000028:                                                                                                  #  3) ERASABLE INITIALIZATION REQUIRED - NONE.
022474,000029:                                                                                                  #  4) CALLING SEQUENCES AND EXIT MODES - CALLED BY ASTRONAUT REQUEST THRU DSKY V 37 E 76 E.
022475,000030:                                                                                                  #        EXITS BY TCF ENDOFJOB.
022476,000031:                                                                                                  #  5) OUTPUT - OTHER VEHICLE STATE VECTOR INTEGRATED TO TIG AND INCREMENTED BY DELTA V IN REF COSYS.
022477,000032:                                                                                                  #        THE PUSHLIST CONTAINS THE MATRIX BY WHICH THE INPUT DELTA V MUST BE POST-MULTIPLIED TO CONVERT FROM LV
022478,000033:                                                                                                  #        TO REF COSYS.
022479,000034:                                                                                                  #  6) DEBRIS - OTHER VEHICLE STATE VECTOR.
022480,000035:                                                                                                  #  7) SUBROUTINES CALLED - BANKCALL,GOXDSPF,CSMPREC (OR LEMPREC),ATOPCSM (OR ATOPLEM),INTSTALL,INTWAKE, PHASCHNG
022481,000036:                                                                                                  #        INTPRET, INTEGRVS, AND MINIRECT.
022482,000037:                                                                                                  #  8) FLAG USE - MOONFLAG,CMOONFLAG,INTYPFLG,RASFLAG, AND MARKCTR.
022483,000038: 
022484,000039: 13,2000                                           SETLOC   P76LOC                                
022485,000040: 13,2000                                           BANK                                           
022486,000041: 
022487,000042: 13,2071                                           COUNT*   $$/P7677                              
022488,000043: 13,2071  E7,1412                                  EBANK=   TIG                                   
022489,000044: 
022490,000045: 13,2071           31214        P76ER77            CA       MODREG                                
022491,000046: 13,2072           74770                           MASK     BIT1                                  
022492,000047: 13,2073           55545                           TS       OPTFLAG                               #  OPTFLAG = 0  LM (P76)
022493,000048: 13,2074           00006                           EXTEND                                         #          = 1 CSM (P77)
022494,000049: 13,2075           31450                           DCA      NOMTIG                                
022495,000050: 13,2076           53413                           DXCH     TIG                                   
022496,000051: 
022497,000052: 13,2077           35026                           CAF      V06N33                                
022498,000053: 13,2100           04636                           TC       BANKCALL                              #  AND WAIT FOR KEYBOARD ACTION
022499,000054: 13,2101           20743                           CADR     GOFLASH                               
022500,000055: 13,2102           12234                           TCF      ENDP76                                
022501,000056: 13,2103           02105                           TC       +2                                    #  PROCEED
022502,000057: 13,2104           02077                           TC       -5                                    #  STORE DATA AND REPEAT FLASHING
022503,000058: 13,2105           05402                           TC       PHASCHNG                              
022504,000059: 13,2106           04024                           OCT      04024                                 
022505,000060: 13,2107           51545                           INDEX    OPTFLAG                               
022506,000061: 13,2110           32237                           CAF      V06N84                                #  FLASH V06 N84 OR N81
022507,000062: 13,2111           04636                           TC       BANKCALL                              #  AND WAIT FOR KEYBOARD ACTION.
022508,000063: 13,2112           20743                           CADR     GOFLASH                               
022509,000064: 13,2113           12234                           TCF      ENDP76                                
022510,000065: 13,2114           02116                           TC       +2                                    
022511,000066: 13,2115           02107                           TC       -6                                    #  STORE DATA AND REPEAT FLASHING
022512,000067: 13,2116           06006                           TC       INTPRET                               #  RETURN TO INTERPRETIVE CODE
022513,000068: 13,2117           43145                           DLOAD    SET                                   #  SET D(MPAC)=TIG IN CSEC B28

Page 514

022515,000070: 13,2120           03413                                    TIG                                   
022516,000071: 13,2121           01076                                    NODOFLAG                              #  DISALLOW V37
022517,000072: 13,2122           00041                           STORE    TDEC1                                 
022518,000073: 13,2123           77711                           CCALL                                          
022519,000074: 13,2124           03546                                    OPTFLAG                               
022520,000075: 13,2125           26241                                    INTADR                                
022521,000076: 13,2126           53575        COMPMAT            VLOAD    UNIT                                  
022522,000077: 13,2127           00001                                    RATT                                  
022523,000078: 13,2130           77676                           VCOMP                                          #  U(-R)
022524,000079: 13,2131           00031                           STORE    24D                                   #  U(-R) TO 24D
022525,000080: 13,2132           53435                           VXV      UNIT                                  #  U(-R)XV = U(VXR)
022526,000081: 13,2133           00007                                    VATT                                  
022527,000082: 13,2134           00023                           STORE    18D                                   
022528,000083: 13,2135           53435                           VXV      UNIT                                  #  U(VXR)XU(-R) = U((RXV)XR)
022529,000084: 13,2136           00031                                    24D                                   
022530,000085: 13,2137           00015                           STORE    12D                                   
022531,000086: 13,2140           46135                           SLOAD    BHIZ                                  
022532,000087: 13,2141           03546                                    OPTFLAG                               
022533,000088: 13,2142           26146                                    +4                                    
022534,000089: 13,2143           52175                           VLOAD    GOTO                                  
022535,000090: 13,2144           03405                                    DELVLVC                               #  FROM CSM
022536,000091: 13,2145           26150                                    DVTRANS                               
022537,000092: 13,2146           77775                           VLOAD                                          
022538,000093: 13,2147           03540                                    DELVOV                                #  FROM LM
022539,000094: 13,2150           76505        DVTRANS            VXM      VSL1                                  #  V(MPAC)=DELTA-V IN REFCOSYS
022540,000095: 13,2151           00015                                    12D                                   
022541,000096: 13,2152           77655                           VAD                                            
022542,000097: 13,2153           00007                                    VATT                                  
022543,000098: 13,2154           00007                           STORE    6                                     #  V(PD6)=VATT + DELTA V
022544,000099: 13,2155           77624                           CALL                                           #  PREVENT WOULD-BE USER OF ORBITAL
022545,000100: 13,2156           27516                                    INTSTALL                              #  INTEG FROM INTERFERING WITH UPDATING
022546,000101: 13,2157           77624                           CALL                                           
022547,000102: 13,2160           26245                                    P76SUB1                               
022548,000103: 13,2161           53775                           VLOAD    VSR*                                  
022549,000104: 13,2162           00007                                    6                                     
022550,000105: 13,2163           57176                                    0,2                                   
022551,000106: 13,2164           25543                           STOVL    VCV                                   
022552,000107: 13,2165           00001                                    RATT                                  
022553,000108: 13,2166           77657                           VSR*                                           
022554,000109: 13,2167           57176                                    0,2                                   
022555,000110: 13,2170           15535                           STODL    RCV                                   
022556,000111: 13,2171           03413                                    TIG                                   
022557,000112: 13,2172           01517                           STORE    TET                                   
022558,000113: 13,2173           71214                           CLEAR    DLOAD                                 
022559,000114: 13,2174           01673                                    INTYPFLG                              
022560,000115: 13,2175           01571                                    TETTHIS                               
022561,000116: 13,2176           34041        INTOTHIS           STCALL   TDEC1                                 
022562,000117: 13,2177           27211                                    INTEGRVS                              
022563,000118: 13,2200           77624                           CALL                                           
022564,000119: 13,2201           27516                                    INTSTALL                              

Page 515

022566,000121: 13,2202           77624                           CALL                                           
022567,000122: 13,2203           26245                                    P76SUB1                               #  SET/CLEAR MOONFLAG
022568,000123: 13,2204           77775                           VLOAD                                          
022569,000124: 13,2205           00017                                    RATT1                                 
022570,000125: 13,2206           01503                           STORE    RRECT                                 
022571,000126: 13,2207           15535                           STODL    RCV                                   
022572,000127: 13,2210           00015                                    TAT                                   
022573,000128: 13,2211           25517                           STOVL    TET                                   
022574,000129: 13,2212           00025                                    VATT1                                 
022575,000130: 13,2213           77624                           CALL                                           
022576,000131: 13,2214           23434                                    MINIRECT                              
022577,000132: 13,2215           77776                           EXIT                                           
022578,000133: 13,2216           05402                           TC       PHASCHNG                              
022579,000134: 13,2217           04024                           OCT      04024                                 
022580,000135: 
022581,000136: 13,2220           06006                           TC       INTPRET                               
022582,000137: 13,2221           62214                           SET      CCALL                                 
022583,000138: 13,2222           05062                                    REINTFLG                              
022584,000139: 13,2223           03546                                    OPTFLAG                               
022585,000140: 13,2224           26243                                    UPDATADR                              
022586,000141: 13,2225           77624                           CALL                                           
022587,000142: 13,2226           27525                                    INTWAKE0                              #  PERMIT USE OF ORBITAL INTEGRATION
022588,000143: 13,2227           77414        OUT                CLEAR    EXIT                                  #  ALLOW V37, NO NEED TO CLEAR NODOFLAG AT
022589,000144: 13,2230           01276                                    NODOFLAG                              #   ENDP76 SINCE FLAG NOT SET WHEN DISPLAY
022590,000145:                                                                                                  #   RESPONSES TRANSFER THERE FROM P76+.
022591,000146: 13,2231           37702                           CAF      NEGONE                                
022592,000147: 13,2232           55722                           TS       MRKBUF1                               
022593,000148: 13,2233           14105                           TCF      MNKGOPOO                              
022594,000149: 
022595,000150: 13,2234           37702        ENDP76             CAF      NEGONE                                
022596,000151: 13,2235           55722                           TS       MRKBUF1                               #  INVALIDATE MARK BUFFER
022597,000152: 
022598,000153: 13,2236           14103                           TCF      GOTOPOOH                              
022599,000154: 
022600,000155: 13,2237           01524        V06N84             NV       0684                                  
022601,000156: 13,2240           01521                           NV       0681                                  #  MUST BE EQUAL TO V06N84 + 1
022602,000157: 13,2241           27161        INTADR             CADR     OTHPREC                               
022603,000158: 13,2242           27145                           CADR     THISPREC                              #  MUST BE EQUAL TO INTADR + 1
022604,000159: 13,2243           27034        UPDATADR           CADR     ATOPOTH                               
022605,000160: 13,2244           26761                           CADR     ATOPTHIS                              #  MUST BE EQUAL TO UPDATADR + 1
022606,000161: 13,2245           67214        P76SUB1            CLEAR    SLOAD                                 
022607,000162: 13,2246           00263                                    MOONFLAG                              
022608,000163: 13,2247           00050                                    X2                                    
022609,000164: 13,2250           43030                           BHIZ     SET                                   #  X2=0...CLEAR MOONFLAG
022610,000165: 13,2251           26253                                    +2                                    #    =2.....SET MOONFLAG
022611,000166: 13,2252           00063                                    MOONFLAG                              
022612,000167: 13,2253           77616                           RVQ                                            

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