Source Code

These source-code files were obtained by digitally photographing an Artemis 72 program listing from a private collection and then modifying pre-existing Comanche 55 (Apollo 11) source files to incorporate changes. Note that the page images presented online are of reduced quality, and that additional images may be available. Report any conversion errors or legibility problems in page images to info@sandroid.org. Notations on the program listing read, in part:

	GAP: ASSEMBLE REVISION 072 OF AGC PROGRAM ARTEMIS 
	BY NASA 2021114-011 11:40 FEB. 26, 1971

	THIS AGC PROGRAM SHALL ALSO BE REFERRED TO AS
				COLOSSUS 3
	THIS PROGRAM IS INTENDED FOR USE IN THE CM AS SPECIFIED
	IN REPORT R-577.  THIS PROGRAM WAS PREPARED UNDER OSR
	PROJECT 55-23890, SPONSORED BY THE MANNED SPACECRAFT
	CENTER OF THE NATIONAL AERONAUTICS AND SPACE
	ADMINISTRATION THROUGH CONTRACT NAS 9-4065 WITH THE
	CHARLES STARK DRAPER LABORATORY, MASSACHUSETTS INSTITUTE OF
	TECHNOLOGY, CAMBRIDGE, MASS.

022184,000002:                                                                                                 #  Copyright:     Public domain.
022185,000003:                                                                                                 #  Filename:      R31.agc
022186,000004:                                                                                                 #  Purpose:       Part of the source code for Artemis (i.e., Colossus 3),
022187,000005:                                                                                                 #                 build 072.  This is for the Command Module's (CM) 
022188,000006:                                                                                                 #                 Apollo Guidance Computer (AGC), we believe for 
022189,000007:                                                                                                 #                 Apollo 15-17.
022190,000008:                                                                                                 #  Assembler:     yaYUL
022191,000009:                                                                                                 #  Contact:       Hartmuth Gutsche <hgutsche@xplornet.com>
022192,000010:                                                                                                 #  Website:       www.ibiblio.org/apollo/index.html
022193,000011:                                                                                                 #  Page scans:    www.ibiblio.org/apollo/ScansForConversion/Artemis072/
022194,000012:                                                                                                 #  Mod history:   2009-09-20 HG   Adapted from corresponding Comanche 055 file.
022195,000013:                                                                                                 #                 2009-09-21 JL   Fixed minor typos. 
022196,000014:                                                                                                 #                 2010-01-26 JL   Updated header comments.
022197,000015:                                                                                                 #                 2010-01-31 JL   Fixed page number.
022198,000016:                                                                                                 #                 2010-02-20 RSB  Un-##'d this header.
022199,000017: 

Page 507

022201,000019: 31,2000                                          SETLOC   R31                                   
022202,000020: 31,2000                                          BANK                                           
022203,000021: 
022204,000022: 31,2000                                          COUNT*   $$/R3134                              
022205,000023: 31,2000           35045        R31CALL           CAF      PRIO3                                 
022206,000024: 31,2001           05135                          TC       FINDVAC                               
022207,000025: 31,2002  E4,1760                                 EBANK=   SUBEXIT                               
022208,000026: 31,2002           02031 62064                    2CADR    V83CALL                               
022209,000027: 
022210,000028: 31,2004           04636        DSPDELAY          TC       BANKCALL                              
022211,000029: 31,2005           01730                          CADR     1SECDELY                              
022212,000030: 31,2006           31247                          CA       EXTVBACT                              
022213,000031: 31,2007           74755                          MASK     BIT12                                 
022214,000032: 31,2010           00006                          EXTEND                                         
022215,000033: 31,2011           12004                          BZF      DSPDELAY                              
022216,000034: 
022217,000035: 31,2012           30105        DISPN5X           CA       FLAGWRD9                              #  TEST R31FLAG (IN SUNDANCE R31FLAG WILL
022218,000036: 31,2013           74765                          MASK     R31FLBIT                              #  ALWAYS BE SET AS R34 DOES NOT EXIST
022219,000037: 31,2014           00006                          EXTEND                                         
022220,000038: 31,2015           12020                          BZF      +3                                    
022221,000039: 31,2016           32135                          CAF      V16N54                                #  R31     USE NOUN 54
022222,000040: 31,2017           02021                          TC       +2                                    
022223,000041: 31,2020           32136                          CAF      V16N53                                #  R34     USE NOUN 53
022224,000042: 31,2021           04636                          TC       BANKCALL                              
022225,000043: 31,2022           20576                          CADR     GOMARKF                               
022226,000044: 31,2023           05626                          TC       B5OFF                                 
022227,000045: 31,2024           05626                          TC       B5OFF                                 
022228,000046: 31,2025           12012                          TCF      DISPN5X                               
022229,000047: 
022230,000048: 31,2026           06006        V83               TC       INTPRET                               
022231,000049: 31,2027           77650                          GOTO                                           
022232,000050: 31,2030           62177                                   HAVEBASE                              #  INTEG STATE VECTORS
022233,000051: 31,2031           06006        V83CALL           TC       INTPRET                               
022234,000052: 31,2032           77650                          GOTO                                           
022235,000053: 31,2033           62146                                   STATEXTP                              #  EXTRAPOLATE STATE VECTORS
022236,000054: 31,2034           52375        COMPDISP          VLOAD    VSU                                   
022237,000055: 31,2035           00001                                   RATT                                  
022238,000056: 31,2036           02320                                   RONE                                  
022239,000057: 31,2037           51406                          PUSH     ABVAL                                 #  RATT-RONE TO 0D                PD= 6
022240,000058: 31,2040           02312                          STORE    RANGE                                 #  METERS B-29
022241,000059: 31,2041           77301                          NORM     VLOAD                                 
022242,000060: 31,2042           00047                                   X1                                    #  RATT-RONE                      PD= 0
022243,000061: 31,2043           77762                          VSR1                                           
022244,000062: 31,2044           53457                          VSL*     UNIT                                  
022245,000063: 31,2045           20201                                   0,1                                   
022246,000064: 31,2046           52315                          PDVL     VSU                                   #  UNIT(LOS) TO 0D                PD= 6
022247,000065: 31,2047           00007                                   VATT                                  
022248,000066: 31,2050           02326                                   VONE                                  
022249,000067: 31,2051           77641                          DOT                                            #  (VATT-VONE).UNIT(LOS)          PD= 0

Page 508

022251,000069: 31,2052           77752                          SL1                                            
022252,000070: 31,2053           36314                          STCALL   RRATE                                 #  RANGE RATE M/CS B-7
022253,000071: 31,2054           47530                                   CDUTRIG                               #  TO INITIALIZE FOR *NBSM*
022254,000072: 31,2055           77624                          CALL                                           
022255,000073: 31,2056           62317                                   R34LOS                                #  NOTE. PDL MUST = 0.
022256,000074: 31,2057           53575        R34ANG            VLOAD    UNIT                                  
022257,000075: 31,2060           02320                                   RONE                                  
022258,000076: 31,2061           77715                          PDVL                                           #  UR TO 0D                       PD= 6
022259,000077: 31,2062           15334                                   THISAXIS                              #  UNITX FOR CM, UNITZ FOR LM
022260,000078: 31,2063           77214                          BON      VLOAD                                 #  CHK R31FLAG. ON=R31 THETA, OFF=R34 PHI
022261,000079: 31,2064           04713                                   R31FLAG                               
022262,000080: 31,2065           62067                                   +2                                    #         R31-THETA
022263,000081: 31,2066           00015                                   12D                                   
022264,000082: 31,2067           77624                          CALL                                           
022265,000083: 31,2070           47647                                   *NBSM*                                
022266,000084: 31,2071           41505                          VXM      PUSH                                  #  UXORZ TO 6D                    PD=12D
022267,000085: 31,2072           01734                                   REFSMMAT                              
022268,000086: 31,2073           72431                          VPROJ    VSL2                                  
022269,000087: 31,2074           00001                                   0D                                    
022270,000088: 31,2075           53445                          BVSU     UNIT                                  
022271,000089: 31,2076           00007                                   6D                                    
022272,000090: 31,2077           47315                          PDVL     VXV                                   #  UP/2 TO 12D                    PD=18D
022273,000091: 31,2100           02320                                   RONE                                  
022274,000092: 31,2101           02326                                   VONE                                  
022275,000093: 31,2102           47256                          UNIT     VXV                                   
022276,000094: 31,2103           02320                                   RONE                                  
022277,000095: 31,2104           63241                          DOT      PDVL                                  #  SIGN TO 12D, UP/2 TO MPAC      PD=18D
022278,000096: 31,2105           00015                                   12D                                   
022279,000097: 31,2106           50372                          VSL1     DOT                                   #  UP.UXORZ
022280,000098: 31,2107           00007                                   6D                                    
022281,000099: 31,2110           72565                          SIGN     SL1                                   
022282,000100: 31,2111           00015                                   12D                                   
022283,000101: 31,2112           77726                          ACOS                                           
022284,000102: 31,2113           26316                          STOVL    RTHETA                                
022285,000103: 31,2114           02320                                   RONE                                  
022286,000104: 31,2115           51041                          DOT      BPL                                   
022287,000105: 31,2116           00007                                   6D                                    
022288,000106: 31,2117           62124                                   +5                                    
022289,000107: 31,2120           44345                          DLOAD    BDSU                                  #  IF UXORZ.R NEG, RTHETA = 1 - RTHETA
022290,000108: 31,2121           02316                                   RTHETA                                
022291,000109: 31,2122           15344                                   DPPOSMAX                              
022292,000110: 31,2123           02316                          STORE    RTHETA                                #  RTHETA BETWEEN 0 AND 1 REV.
022293,000111: 31,2124           77776                 +5       EXIT                                           
022294,000112: 31,2125           34764                          CAF      BIT5                                  #  HAVE WE BEEN ANSWERED
022295,000113: 31,2126           71247                          MASK     EXTVBACT                              
022296,000114: 31,2127           00006                          EXTEND                                         
022297,000115: 31,2130           12137                          BZF      ISITP79                               
022298,000116: 
022299,000117: 31,2131           41247                          CS       EXTVBACT                              
022300,000118: 31,2132           74755                          MASK     BIT12                                 

Page 509

022302,000120: 31,2133           27247                          ADS      EXTVBACT                              
022303,000121: 
022304,000122: 31,2134           12026                          TCF      V83                                   
022305,000123: 31,2135           04066        V16N54            VN       1654                                  
022306,000124: 31,2136           04065        V16N53            VN       1653                                  
022307,000125: 31,2137           05354        ISITP79           TC       CHECKMM                               
022308,000126: 31,2140           00117                          MM       79         B-14                       
022309,000127: 31,2141           15524                          TCF      ENDEXT                                #  NO, DIE
022310,000128: 
022311,000129: 31,2142           05527                          TC       CLEARMRK                              
022312,000130: 31,2143           05561                          TC       DOWNFLAG                              
022313,000131: 31,2144           00226                          ADRES    PCMANFLG                              
022314,000132: 31,2145           14103                          TCF      GOTOPOOH                              
022315,000133: 

Page 510

022317,000135:                                                                                                 #  STATEXTP DOES AN INITIAL PRECISION EXTRAPOLATION OF THE
022318,000136:                                                                                                 #  LEM STATE VECTOR TO PRESENT TIME OR TO PIPTIME IF AV G
022319,000137:                                                                                                 #  IS ON AND SAVES AS BASE VECTOR. IF AV G IS ON RN + VN
022320,000138:                                                                                                 #  ARE USED AS THE CM STATE VECTOR AND THE INITIAL R RDOT
022321,000139:                                                                                                 #  RTHETA ARE COMPUTED WITH NO FURTHER INTEGRATION. IF AV
022322,000140:                                                                                                 #  G IS OFF A PRECISION EXTRAPOLATION IS MADE OF THE CM
022323,000141:                                                                                                 #  STATE VECTOR TO PRESENT TIME AND.....
022324,000142:                                                                                                 #    THE CM + LM STATE VECTORS ARE INTEGRATED TO PRES TIME
022325,000143:                                                                                                 #    USING PRECISION OR CONIC AS SURFFLAG IS SET OR CLEAR.
022326,000144:                                                                                                 #    IF AV G IS ON THEN SUBSEQUENT PASSES WILL PROVIDE
022327,000145:                                                                                                 #    USE OF RN + VN AS CM STATE VECTOR AND THE LM STATE
022328,000146:                                                                                                 #    VECTOR WILL BE PRECISION INTEGRATED USING LEMPREC
022329,000147:                                                                                                 #    IF SURFFLAG IS SET.
022330,000148:                                                                                                 #      CM STATE VECTOR RONE VONE + LM STATE VECTOR RATT
022331,000149:                                                                                                 #      VATT ARE USED IN COMPUTING R RDOT RTHETA.
022332,000150: 
022333,000151: 31,2146           43034        STATEXTP          RTB      BOF                                   #  INITIAL INTEGRATION
022334,000152: 31,2147           51751                                   LOADTIME                              
022335,000153: 31,2150           03751                                   V37FLAG                               
022336,000154: 31,2151           62154                                   BOTHGO                                #  AV G OFF, USE PRESENT TIME
022337,000155: 31,2152           77624                          CALL                                           
022338,000156: 31,2153           62301                                   GETRVN                                #       ON,  USE RN, VN, PIPTIME
022339,000157: 31,2154           02334        BOTHGO            STORE    BASETIME                              
022340,000158: 31,2155           34041                          STCALL   TDEC1                                 
022341,000159: 31,2156           27161                                   LEMPREC                               
022342,000160: 31,2157           77775                          VLOAD                                          #  BASE VECTOR, LM
022343,000161: 31,2160           00017                                   RATT1                                 
022344,000162: 31,2161           26224                          STOVL    BASEOTP                               #    POS.
022345,000163: 31,2162           00025                                   VATT1                                 
022346,000164: 31,2163           02240                          STORE    BASEOTV                               #    VEL.
022347,000165: 31,2164           71214                          BON      DLOAD                                 
022348,000166: 31,2165           03711                                   V37FLAG                               
022349,000167: 31,2166           62034                                   COMPDISP                              #  COMPUTE R RDOT RTHETA FROM
022350,000168:                                                                                                 #  RONE(RN) VONE(VN) RATT+VATT(LEMPREC)
022351,000169: 31,2167           00015                                   TAT                                   
022352,000170: 31,2170           34041                          STCALL   TDEC1                                 
022353,000171: 31,2171           27145                                   CSMPREC                               
022354,000172: 31,2172           77775                          VLOAD                                          #  BASE VECTOR, CM
022355,000173: 31,2173           00017                                   RATT1                                 
022356,000174: 31,2174           26254                          STOVL    BASETHP                               #   POS.
022357,000175: 31,2175           00025                                   VATT1                                 
022358,000176: 31,2176           02262                          STORE    BASETHV                               #   VEL.
022359,000177: 31,2177           47014        HAVEBASE          BON      RTB                                   #  SUBSEQUENT INTEGRATIONS
022360,000178: 31,2200           03711                                   V37FLAG                               
022361,000179: 31,2201           62264                                   GETRVN5                               
022362,000180: 31,2202           51751                                   LOADTIME                              
022363,000181: 31,2203           34041                          STCALL   TDEC1                                 #  AV G OFF, SET INTEG. OF CM
022364,000182: 31,2204           27516                                   INTSTALL                              
022365,000183: 31,2205           43175                          VLOAD    CLEAR                                 
022366,000184: 31,2206           02254                                   BASETHP                               

Page 511

022368,000186: 31,2207           00263                                   MOONFLAG                              
022369,000187: 31,2210           25535                          STOVL    RCV                                   
022370,000188: 31,2211           02262                                   BASETHV                               
022371,000189: 31,2212           15543                          STODL    VCV                                   
022372,000190: 31,2213           02334                                   BASETIME                              
022373,000191: 31,2214           43014                          BOF      SET                                   #  GET APPROPRIATE MOONFLAG SETTING
022374,000192: 31,2215           04343                                   MOONTHIS                              
022375,000193: 31,2216           62220                                   +2                                    
022376,000194: 31,2217           00063                                   MOONFLAG                              
022377,000195: 31,2220           77614                          CLEAR                                          
022378,000196: 31,2221           01673                                   INTYPFLG                              
022379,000197: 31,2222           43014                          BON      SET                                   
022380,000198: 31,2223           04307                                   SURFFLAG                              
022381,000199: 31,2224           62226                                   +2                                    #  PREC. IF LM DOWN
022382,000200: 31,2225           01473                                   INTYPFLG                              #  CONIC IF LM NOT DOWN
022383,000201: 31,2226           35517                          STCALL   TET                                   
022384,000202: 31,2227           27211                                   INTEGRVS                              #  INTEGRATION --- AT LAST---
022385,000203: 31,2230           77775                          VLOAD                                          
022386,000204: 31,2231           00001                                   RATT                                  
022387,000205: 31,2232           26320                          STOVL    RONE                                  
022388,000206: 31,2233           00007                                   VATT                                  
022389,000207: 31,2234           16326                          STODL    VONE                                  #  GET SET FOR CONIC EXTRAP.,OTHER.
022390,000208: 31,2235           00015                                   TAT                                   
022391,000209: 31,2236           45014                          BON      CALL                                  
022392,000210: 31,2237           04307                                   SURFFLAG                              
022393,000211: 31,2240           62275                                   GETRVN6                               #  LEMPREC IF LM DOWN
022394,000212: 31,2241           27516                                   INTSTALL                              #  LEMCONIC IF NOT DOWN
022395,000213: 31,2242           77614                          SET                                            
022396,000214: 31,2243           01473                                   INTYPFLG                              
022397,000215: 31,2244           00041        OTHINT            STORE    TDEC1                                 #  ENTERED IF AV G ON TO INTEG LM
022398,000216: 31,2245           43175                          VLOAD    CLEAR                                 
022399,000217: 31,2246           02224                                   BASEOTP                               
022400,000218: 31,2247           00263                                   MOONFLAG                              
022401,000219: 31,2250           25535                          STOVL    RCV                                   
022402,000220: 31,2251           02240                                   BASEOTV                               
022403,000221: 31,2252           15543                          STODL    VCV                                   
022404,000222: 31,2253           02334                                   BASETIME                              
022405,000223: 31,2254           43014                          BOF      SET                                   
022406,000224: 31,2255           04343                                   MOONTHIS                              
022407,000225: 31,2256           62260                                   +2                                    
022408,000226: 31,2257           00063                                   MOONFLAG                              
022409,000227: 31,2260           35517                          STCALL   TET                                   
022410,000228: 31,2261           27211                                   INTEGRVS                              
022411,000229: 31,2262           77650                          GOTO                                           
022412,000230: 31,2263           62034                                   COMPDISP                              #  COMPUTE R RDOT RTHETA          
022413,000231: 31,2264           77624        GETRVN5           CALL                                           #  AV G ON
022414,000232: 31,2265           62301                                   GETRVN                                
022415,000233: 31,2266           45014                          BON      CALL                                  
022416,000234: 31,2267           04307                                   SURFFLAG                              
022417,000235: 31,2270           62275                                   GETRVN6                               #  LM DOWN, LMPREC

Page 512

022419,000237: 31,2271           27516                                   INTSTALL                              
022420,000238: 31,2272           52014                          CLEAR    GOTO                                  #  INTEGRVS (PREC) IF LM NOT DOWN
022421,000239: 31,2273           01673                                   INTYPFLG                              
022422,000240: 31,2274           62244                                   OTHINT                                
022423,000241: 31,2275           34041        GETRVN6           STCALL   TDEC1                                 
022424,000242: 31,2276           27161                                   LEMPREC                               
022425,000243: 31,2277           77650                          GOTO                                           
022426,000244: 31,2300           62034                                   COMPDISP                              #  COMPUTE R RDOT RTHETA
022427,000245: 31,2301           77620        GETRVN            STQ                                            
022428,000246: 31,2302           00000                                   0D                                    
022429,000247: 31,2303           52175                          VLOAD    GOTO                                  #  AV G ON, RONE = RN  VONE = VN
022430,000248: 31,2304           01030                                   RN                                    #   AND USE PIPTIME
022431,000249: 31,2305           62306                                   +1                                    
022432,000250: 31,2306           36320                          STCALL   RONE                                  
022433,000251: 31,2307           62310                                   +1                                    
022434,000252: 31,2310           52175                          VLOAD    GOTO                                  
022435,000253: 31,2311           01036                                   VN                                    
022436,000254: 31,2312           62313                                   +1                                    
022437,000255: 31,2313           16326                          STODL    VONE                                  
022438,000256: 31,2314           01044                                   PIPTIME                               
022439,000257: 31,2315           77650                          GOTO                                           
022440,000258: 31,2316           00000                                   0D                                    
022441,000259: 31,2000                                          SETLOC   R34                                   
022442,000260: 31,2000                                          BANK                                           
022443,000261: 31,2317                                          COUNT*   $$/R3134                              
022444,000262: 31,2317           77776        R34LOS            EXIT                                           
022445,000263: 31,2320           30036                          CA       CDUS                                  
022446,000264: 31,2321           50120                          INDEX    FIXLOC                                
022447,000265: 31,2322           54011                          TS       9D                                    
022448,000266: 31,2323           30035                          CA       CDUT                                  
022449,000267: 31,2324           50120                          INDEX    FIXLOC                                
022450,000268: 31,2325           54013                          TS       11D                                   
022451,000269: 31,2326           30120                          CA       FIXLOC                                
022452,000270: 31,2327           66211                          AD       SIX                                   
022453,000271: 31,2330           40000                          COM                                            
022454,000272: 31,2331           50120                          INDEX    FIXLOC                                
022455,000273: 31,2332           54046                          TS       X1                                    
022456,000274: 31,2333           06006                          TC       INTPRET                               
022457,000275: 31,2334           77624                          CALL                                           
022458,000276: 31,2335           46000                                   SXTNB                                 
022459,000277: 31,2336           34015                          STCALL   12D                                   
022460,000278: 31,2337           62057                                   R34ANG                                

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