Source Code

This is the source-code for the Apollo 9 Command Module's Guidance Computer. These files were derived originally from the scan from MIT's Dibner Institute's now-discontinued website titled "History of Recent Science and Technology", which in turn was originally created by Gary Neff, though his high-quality scans were unfortunately reduced in legibility when presented online. The markings on the front of the printout imply that it was the original AGC developer Norm Brodeur's copy. A scan by Ron Burkey has superceded it, made from a more-legible copy from the collection of original AGC developer Fred Martin. The source code was transcribed from those images by Ron Burkey. Note that the page images presented online are of reduced quality, and that higher-quality images are available. Report any conversion errors or legibility problems in page images to info@sandroid.org. Notations on the program listing read, in part:

	ASSEMBLE REVISION 249 OF AGC PROGRAM COLOSSUS BY NASA 2021111-041
	20'35 OCT. 28,1968
Note that the date is the date of the printout, not the date of the program revision.

023906,000002:                                                                                                  ## Copyright:   Public domain.
023907,000003:                                                                                                  ## Filename:    TPI_SEARCH.agc
023908,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus, build 249.
023909,000005:                                                                                                  ##              It is part of the source code for the Command Module's (CM)
023910,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 9.
023911,000007:                                                                                                  ## Assembler:   yaYUL
023912,000008:                                                                                                  ## Reference:   pp. 541-551.
023913,000009:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
023914,000010:                                                                                                  ## Website:     www.ibiblio.org/apollo.
023915,000011:                                                                                                  ## Mod history: 08/14/04 RSB.   Began transcribing.
023916,000012:                                                                                                  ##              2017-01-06 RSB  Page numbers now agree with those on the
023917,000013:                                                                                                  ##                              original hardcopy, as opposed to the PDF page
023918,000014:                                                                                                  ##                              numbers in 1701.pdf.
023919,000015:                                                                                                  ##              2017-01-20 RSB  Cross-diff'd comment text (not whitespace)
023920,000016:                                                                                                  ##                              vs the already-proofed corresponding Colossus
023921,000017:                                                                                                  ##                              237 and Comanche 55 source-code files
023922,000018:                                                                                                  ##                              and corrected errors found.
023923,000019:                                                                                                  ##              2017-03-09 RSB  Fixed VNP00H to VNPOOH.
023924,000020:                                                                                                  ##
023925,000021:                                                                                                  ## The contents of the "Colossus249" files, in general, are transcribed 
023926,000022:                                                                                                  ## from a scanned copy of the program listing.  Notations on this
023927,000023:                                                                                                  ## document read, in part:
023928,000024:                                                                                                  ##
023929,000025:                                                                                                  ##      Assemble revision 249 of AGC program Colossus by NASA
023930,000026:                                                                                                  ##      2021111-041.  October 28, 1968.  
023931,000027:                                                                                                  ##
023932,000028:                                                                                                  ##      This AGC program shall also be referred to as
023933,000029:                                                                                                  ##                              Colossus 1A
023934,000030:                                                                                                  ##
023935,000031:                                                                                                  ##      Prepared by
023936,000032:                                                                                                  ##                      Massachusetts Institute of Technology
023937,000033:                                                                                                  ##                      75 Cambridge Parkway
023938,000034:                                                                                                  ##                      Cambridge, Massachusetts
023939,000035:                                                                                                  ##      under NASA contract NAS 9-4065.
023940,000036:                                                                                                  ##
023941,000037:                                                                                                  ## Refer directly to the online document mentioned above for further information.
023942,000038:                                                                                                  ## Please report any errors (relative to the scanned pages) to info@sandroid.org.
023943,000039:                                                                                                  ##
023944,000040:                                                                                                  ## In some cases, where the source code for Luminary 131 overlaps that of 
023945,000041:                                                                                                  ## Colossus 249, this code is instead copied from the corresponding Luminary 131
023946,000042:                                                                                                  ## source file, and then is proofed to incorporate any changes.
023947,000043: 

Page 541

023949,000045:                                                                                                  #  PROGRAM DESCRIPTION S17.1 AND S17.2
023950,000046: 
023951,000047:                                                                                                  #  FUNCTIONAL DESCRIPTION
023952,000048: 
023953,000049:                                                                                                  #  THE TPI SEARCH ROUTINE DETERMINES THE MINIMUM TOTAL VELOCITY TRANSFER TRAJECTORY FROM A GIVEN TPI
023954,000050:                                                                                                  #  MANEUVER TIME WITHIN THE CONSTRAINT OF A SAFE PERICENTER.  THIS VELOCITY IS THE SUM OF THE IMPULSIVE VELOCITIES
023955,000051:                                                                                                  #  FOR THE TPI AND TPF MANEUVERS.
023956,000052: 
023957,000053:                                                                                                  #  THE S17.1 ROUTINE EXTRAPOLATES THE STATE VECTORS OF BOTH VEHICLES TO THE TPI TIME AND COMPUTES THE
023958,000054:                                                                                                  #  RELATIVE PHASE ANGLE BETWEEN THE VEHICLES, THE ALTITUDE DIFFERENCE (I.E. THE MAGNITUDE DIFFERENCE OF THE 
023959,000055:                                                                                                  #  POSITION VECTORS) AND SELECTS A SEARCH SECTOR BASED ON THE SIGN OF THE ALTITUDE DIFFERENCE.
023960,000056: 
023961,000057:                                                                                                  #  THE S17.2 ROUTINE FURTHER DEFINES THE SEARCH SECTOR BY COMPUTING ANGULAR LIMITS AND USES THE TIME THETA
023962,000058:                                                                                                  #  SUBROUTINE TO COMPUTE THE SEARCH START AND END TIMES.  THE SEARCH IS THEN MADE IN AN ITERATIVE LOOP USING THE
023963,000059:                                                                                                  #  LAMBERT SUBROUTINE TO COMPUTE THE VELOCITIES REQUIRED AT TPI TIME AND AT TPF TIME.  EXIT FROM THE SEARCH LOOP
023964,000060:                                                                                                  #  IS MADE WHEN SOLUTION CRITERIA ARE MET (NORMAL EXIT) OR AS SOON AS IT IS EVIDENT THAT NO SOLUTION EXISTS IN
023965,000061:                                                                                                  #  THE SECTOR SEARCHED.
023966,000062: 
023967,000063:                                                                                                  #  CALLING SEQUENCE
023968,000064: 
023969,000065:                                                                                                  #        BOTH ROUTINES ARE CALLED IN INTERPRETIVE CODE AND RETURN VIA QPRET.  S17.1 HAS ONLY A NORMAL EXIT.
023970,000066:                                                                                                  #        S17.2 RETURNS VIA QPRET FOR NORMAL EXIT AND TO ALARUMS FOR ERROR EXIT.
023971,000067: 
023972,000068:                                                                                                  #  SUBROUTINES CALLED
023973,000069: 
023974,000070:                                                                                                  #        CSMCONIC
023975,000071:                                                                                                  #        LEMCONIC
023976,000072:                                                                                                  #        TIMETHET
023977,000073:                                                                                                  #        INITVEL
023978,000074: 
023979,000075: 36,2000                                           BANK     36                                    
023980,000076: 36,2000                                           SETLOC   P17S                                  
023981,000077: 36,2000                                           BANK                                           
023982,000078: 
023983,000079: 36,2000                                           COUNT    36/TPI                                
023984,000080: 
023985,000081: 36,2000  E7,1537                                  EBANK=   RACT3                                 
023986,000082: 
023987,000083:                                                                                                  #  **** TEMPORARY ****
023988,000084: 
023989,000085: 36,2000           00004 31566  HPE                2DEC     157420.0   B-29                       #  EARTH'S MIN. PERICENTER ALTITUDE 85 N.M.
023990,000086: 
023991,000087: 36,2002           00000 12326  HPL                2DEC     10668.0213 B-29                       #  MOON:S MIN. PERICENTER ALTITUDE 35000 FT
023992,000088: 
023993,000089: 36,2004           00002 16100  CDSEC              2DEC     40000      B-28                       
023994,000090: 
023995,000091: 36,2006           00000 35230  CLSEC              2DEC     15000      B-28                       
023996,000092: 
023997,000093: 36,2010           12137 06033  PIINVERS           2DEC     .3183098862                            
023998,000094: 
023999,000095: 36,2012           06161 30707  SEC1THET           2DEC     .1944444444                            
024000,000096: 

Page 542

024002,000098: 36,2014           35252 25253  SEC2THET           2DEC     .9166666667                            
024003,000099: 
024004,000100: 36,2016           67777 77777  MANYFEET           2DEC     -1.0       B-2                        
024005,000101: 
024006,000102: 36,2020           00000 30760  LIMVEL             2DEC     .6096      E-2        B-7             #  2FPS
024007,000103: 
024008,000104: 36,2022           00000 00114  DFTMOON            2DEC     .1524      E3         B-29            #  500 FEET
024009,000105: 
024010,000106: 36,2024           00040 30447  DP-.002            2DEC     0.002                                 
024011,000107: 
024012,000108: 36,2026           71220        S17.1              STQ      DLOAD                                 
024013,000109: 36,2027           01340                                    NORMEX                                
024014,000110: 36,2030           03663                                    TTPI                                  
024015,000111: 36,2031           34041                           STCALL   TDEC1                                 #  ADVANCE PASSIVE VEHICLE TO TPI
024016,000112: 36,2032           27057                                    LEMCONIC                              
024017,000113: 36,2033           77624                           CALL                                           
024018,000114: 36,2034           45372                                    LEMSTORE                              
024019,000115: 36,2035           77745                           DLOAD                                          
024020,000116: 36,2036           03663                                    TTPI                                  
024021,000117: 36,2037           34041                           STCALL   TDEC1                                 #  ADVANCE ACTIVE VEHICLE TO TPI
024022,000118: 36,2040           27045                                    CSMCONIC                              
024023,000119: 36,2041           77624                           CALL                                           
024024,000120: 36,2042           45402                                    CSMSTORE                              
024025,000121: 36,2043           77775                           VLOAD                                          
024026,000122: 36,2044           03540                                    RACT3                                 
024027,000123: 36,2045           63246                           ABVAL    PDVL                                  #  /RA/ 0D                       PL 2D
024028,000124: 36,2046           03554                                    RPASS3                                
024029,000125: 36,2047           65256                           UNIT     PDDL                                  #  UNIT RP 0D                    PL 6D
024030,000126: 36,2050           43021                           BDSU     SET                                   
024031,000127: 36,2051           00045                                    36D                                   #  /RP/ -/RA/
024032,000128: 36,2052           00076                                    KFLAG                                 #  OFF = +
024033,000129: 36,2053           43040                           BMN      CLEAR                                 
024034,000130: 36,2054           74056                                    +2                                    
024035,000131: 36,2055           00276                                    KFLAG                                 #  ON = -
024036,000132: 36,2056           27754                           STOVL    DELHITE                               
024037,000133: 36,2057           00001                                    0D                                    
024038,000134: 36,2060           53435                           VXV      UNIT                                  
024039,000135: 36,2061           03562                                    VPASS3                                
024040,000136: 36,2062           27646                           STOVL    E2                                    #  ALMOST IT SAVE FOR 17.2
024041,000137: 36,2063           03540                                    RACT3                                 
024042,000138: 36,2064           46206                           PUSH     VPROJ                                 
024043,000139: 36,2065           03646                                    E2                                    
024044,000140: 36,2066           51352                           VSL2     BVSU                                  #  RPA
024045,000141: 36,2067           50256                           UNIT     DOT                                   
024046,000142: 36,2070           00001                                    0D                                    
024047,000143: 36,2071           65552                           SL1      ACOS                                  
024048,000144: 36,2072           77715                           PDVL                                           
024049,000145: 36,2073           50235                           VXV      DOT                                   
024050,000146: 36,2074           03540                                    RACT3                                 
024051,000147: 36,2075           03646                                    E2                                    

Page 543

024053,000149: 36,2076           75325                           PDDL     SIGN                                  
024054,000150: 36,2077           77626                           STADR                                          
024055,000151: 36,2100           61160                           STODL    THETZERO                              #  CENTRAL ANGLE
024056,000152: 36,2101           00047                                    X1                                    
024057,000153: 36,2102           37746                           STCALL   XRS                                   #  SAVE INDICES FOR FURTHER USE
024058,000154: 36,2103           01340                                    NORMEX                                #    += ACTIVE AHEAD  -= ACTIVE BEHIND
024059,000155: 36,2104           77220        S17.2              STQ      VLOAD                                 #  COMPUTE SEARCH SECTOR LIMITS
024060,000156: 36,2105           03657                                    QTEMP                                 
024061,000157: 36,2106           03540                                    RACT3                                 
024062,000158: 36,2107           50256                           UNIT     DOT                                   
024063,000159: 36,2110           03646                                    E2                                    
024064,000160: 36,2111           75446                           ABS      SQRT                                  
024065,000161: 36,2112           43352                           SL1      DAD                                   
024066,000162: 36,2113           34025                                    DP-.002                               #  ADD .002 RADIANS TO IT
024067,000163: 36,2114           57414                           BON      DCOMP                                 #  GIVES CORRECT SINE, COSINE MUST BE
024068,000164: 36,2115           00316                                    KFLAG                                 #  COMP. ADD .5 FOR ANGLE
024069,000165: 36,2116           74117                                    +1                                    
024070,000166: 
024071,000167:                                                                                                  #  PHI(0)=180-(-(THETAZERO +K5IT)), PHI(I)=180-(-(THETAZERO+K2IT))
024072,000168:                                                                                                  #  SIN(180-ALPHA)=SIN(ALPHA) ETC
024073,000169: 
024074,000170: 36,2117           40205                           DMP      SETPD                                 
024075,000171: 36,2120           34011                                    PIINVERS                              #  REVOLUTIONARY HERES TWO IT
024076,000172: 36,2121           00001                                    0D                                    
024077,000173: 36,2122           45206                           PUSH     DSU                                   
024078,000174: 36,2123           02617                                    THETZERO                              
024079,000175: 36,2124           02611                           STORE    IT                                    #  PHI(I) , -(THETZERO + K2IT)
024080,000176: 36,2125           41525                           PDDL     PUSH                                  
024081,000177: 36,2126           43342                           SR1      DAD                                   
024082,000178: 36,2127           41415                           DAD      PUSH                                  #  PHI(0) , -(THETZERO + K5IT)
024083,000179: 36,2130           43156                           SIN      SET                                   
024084,000180: 36,2131           03466                                    RVSW                                  
024085,000181: 36,2132           16732                           STODL    SNTH                                  
024086,000182: 36,2133           50146                           COS      BMN                                   
024087,000183: 36,2134           74136                                    +2                                    
024088,000184: 36,2135           77676                           DCOMP                                          
024089,000185: 36,2136           16734                           STODL    CSTH                                  
024090,000186: 36,2137           03746                                    XRS                                   
024091,000187: 36,2140           24047                           STOVL    X1                                    
024092,000188: 36,2141           03554                                    RPASS3                                
024093,000189: 36,2142           77657                           VSR*                                           
024094,000190: 36,2143           57176                                    0,2                                   
024095,000191: 36,2144           26657                           STOVL    RVEC                                  
024096,000192: 36,2145           03562                                    VPASS3                                
024097,000193: 36,2146           77657                           VSR*                                           
024098,000194: 36,2147           57176                                    0,2                                   
024099,000195: 36,2150           36746                           STCALL   VVEC                                  
024100,000196: 36,2151           24737                                    TIMETHET                              
024101,000197: 36,2152           77745                           DLOAD                                          #  SAVE START TIME AND GET END TIME
024102,000198: 36,2153           00037                                    T                                     
024103,000199: 36,2154           03752                           STORE    TF                                    
024104,000200: 36,2155           16627                           STODL    TFO                                   

Page 544

024106,000202: 36,2156           02611                                    IT                                    
024107,000203: 36,2157           73406                           PUSH     SIN                                   
024108,000204: 36,2160           16732                           STODL    SNTH                                  
024109,000205: 36,2161           50146                           COS      BMN                                   
024110,000206: 36,2162           74164                                    +2                                    
024111,000207: 36,2163           77676                           DCOMP                                          
024112,000208: 36,2164           02734                           STORE    CSTH                                  
024113,000209: 36,2165           45150                           LXA,1    CALL                                  
024114,000210: 36,2166           03745                                    XRS                                   
024115,000211: 36,2167           24737                                    TIMETHET                              
024116,000212:                                                                                                  #  INITIALIZE LOOP
024117,000213: 36,2170           43145                           DLOAD    CLEAR                                 
024118,000214: 36,2171           00037                                    T                                     
024119,000215: 36,2172           03661                                    ITSWICH                               
024120,000216: 36,2173           16621                           STODL    TFI                                   #  SAVE TIME FOR LOOP TEST
024121,000217: 36,2174           15340                                    DPPOSMAX                              
024122,000218: 36,2175           16623                           STODL    DELVEE                                
024123,000219: 36,2176           34017                                    MANYFEET                              
024124,000220: 36,2177           16625                           STODL    HP                                    
024125,000221: 36,2200           34013                                    SEC1THET                              #  70 DEGREES
024126,000222: 36,2201           71214                           BON      DLOAD                                 
024127,000223: 36,2202           00316                                    KFLAG                                 
024128,000224: 36,2203           74205                                    +2                                    
024129,000225: 36,2204           34015                                    SEC2THET                              #  330 DEGREES
024130,000226: 36,2205           37750                           STCALL   THETL                                 
024131,000227: 36,2206           74230                                    CONCAUL                               
024132,000228: 36,2207           70545        BIS                DLOAD    SR1                                   
024133,000229: 36,2210           02734                                    CSTH                                  
024134,000230: 36,2211           14021                           STODL    COSTH                                 
024135,000231: 36,2212           02732                                    SNTH                                  
024136,000232: 36,2213           77742                           SR1                                            
024137,000233: 36,2214           34023                           STCALL   SINTH                                 #  GET 4 QUADRANT THETA
024138,000234: 36,2215           47211                                    ARCTRIG                               
024139,000235: 36,2216           43244                           BPL      DAD                                   
024140,000236: 36,2217           74221                                    +2                                    
024141,000237: 36,2220           15340                                    DPPOSMAX                              #  PUT THETA BETWEEN 0,1
024142,000238: 36,2221           65221                           BDSU     PDDL                                  
024143,000239: 36,2222           03750                                    THETL                                 
024144,000240: 36,2223           03752                                    TF                                    
024145,000241: 36,2224           75225                           DSU      SIGN                                  #  FAST TIMES
024146,000242: 36,2225           02621                                    TFI                                   
024147,000243: 36,2226           77640                           BMN                                            
024148,000244: 36,2227           74432                                    RNGETEST                              #  TIME MUST HAVE A STOP
024149,000245:                                                                                                  #  ADVANCE PASSIVE FOR TARGET VECTOR
024150,000246: 36,2230           77745        CONCAUL            DLOAD                                          
024151,000247: 36,2231           03663                                    TTPI                                  
024152,000248: 36,2232           43015                           DAD      BON                                   
024153,000249: 36,2233           03752                                    TF                                    
024154,000250: 36,2234           01312                                    AVFLAG                                
024155,000251: 36,2235           74242                                    ADVCSM                                

Page 545

024157,000253: 36,2236           34041                           STCALL   TDEC1                                 
024158,000254: 36,2237           27057                                    LEMCONIC                              
024159,000255: 36,2240           77650                           GOTO                                           
024160,000256: 36,2241           74244                                    JUNCT3                                
024161,000257: 36,2242           34041        ADVCSM             STCALL   TDEC1                                 
024162,000258: 36,2243           27045                                    CSMCONIC                              
024163,000259:                                                                                                  #  SAVE BACK VALUES OF HP AND DELVEE
024164,000260: 36,2244           77775        JUNCT3             VLOAD                                          
024165,000261: 36,2245           00007                                    VATT                                  
024166,000262: 36,2246           27640                           STOVL    VPASS4                                
024167,000263: 36,2247           00001                                    RATT                                  
024168,000264: 36,2250           03632                           STORE    RPASS4                                
024169,000265: 36,2251           17415                           STODL    RTARG                                 
024170,000266: 36,2252           03752                                    TF                                    
024171,000267: 36,2253           17423                           STODL    DELLT4                                
024172,000268: 36,2254           02625                                    HP                                    
024173,000269: 36,2255           16631                           STODL    HPO                                   
024174,000270: 36,2256           02623                                    DELVEE                                
024175,000271: 36,2257           16633                           STODL    DELVEO                                
024176,000272:                                                                                                  #  PREPARE FOR LAMBERT
024177,000273: 36,2260           03663                                    TTPI                                  
024178,000274: 36,2261           17503                           STODL    INTIME                                
024179,000275: 36,2262           03746                                    XRS                                   
024180,000276: 36,2263           17746                           STODL    RTX1                                  
024181,000277: 36,2264           15332                                    HI6ZEROS                              
024182,000278: 36,2265           65201                           SETPD    PDDL                                  
024183,000279: 36,2266           00001                                    0D                                    
024184,000280: 36,2267           33147                                    EPSFOUR                               
024185,000281: 36,2270           77715                           PDVL                                           
024186,000282: 36,2271           03540                                    RACT3                                 
024187,000283: 36,2272           27570                           STOVL    RINIT                                 
024188,000284: 36,2273           03546                                    VACT3                                 
024189,000285: 36,2274           37576                           STCALL   VINIT                                 
024190,000286: 36,2275           22000                                    INITVEL                               
024191,000287:                                                                                                  #  COMPUTE H ET CETERA
024192,000288: 36,2276           52375                           VLOAD    VSU                                   
024193,000289: 36,2277           03620                                    VTPRIME                               
024194,000290: 36,2300           03640                                    VPASS4                                
024195,000291: 36,2301           41446                           ABVAL    PUSH                                  
024196,000292: 36,2302           26637                           STOVL    RELDELV                               #  /V2-VP(TPI+TF)/
024197,000293: 36,2303           03646                                    DELVEET3                              #  V1-VA
024198,000294: 36,2304           77646                           ABVAL                                          #  /V1-VA/
024199,000295: 36,2305           02635                           STORE    MAGVTPI                               
024200,000296: 36,2306           45415                           DAD      STADR                                 
024201,000297: 36,2307           61154                           STODL    DELVEE                                
024202,000298: 36,2310           03746                                    XRS                                   
024203,000299: 36,2311           24047                           STOVL    X1                                    
024204,000300: 36,2312           03612                                    VIPRIME                               
024205,000301: 36,2313           77657                           VSR*                                           
024206,000302: 36,2314           57176                                    0,2                                   

Page 546

024208,000304: 36,2315           26746                           STOVL    VVEC                                  
024209,000305: 36,2316           03540                                    RACT3                                 
024210,000306: 36,2317           77657                           VSR*                                           
024211,000307: 36,2320           57176                                    0,2                                   
024212,000308: 36,2321           36657                           STCALL   RVEC                                  
024213,000309: 36,2322           45322                                    PERIAPO                               
024214,000310: 36,2323           71354                           LXA,2    DLOAD                                 
024215,000311: 36,2324           03746                                    XRS        +1                         
024216,000312: 36,2325           77657                           SL*                                            
024217,000313: 36,2326           57576                                    0,2                                   
024218,000314: 36,2327           02625                           STORE    HP                                    
024219,000315:                                                                                                  #  ITSWICH DENOTES INTERPOLATION -- SOLUTION ACCEPTANCE IS FORCED
024220,000316: 36,2330           71214                           BON      DLOAD                                 
024221,000317: 36,2331           03701                                    ITSWICH                               
024222,000318: 36,2332           74443                                    ENDEN                                 
024223,000319: 36,2333           02321                                    HPERMIN                               
024224,000320: 36,2334           50025                           DSU      BMN                                   
024225,000321: 36,2335           02625                                    HP                                    
024226,000322: 36,2336           74401                                    HALFSAFE                              
024227,000323: 36,2337           45325                           PDDL     DSU                                   #  WAS PERICENTER ALT SAFE
024228,000324: 36,2340           02321                                    HPERMIN                               
024229,000325: 36,2341           02631                                    HPO                                   
024230,000326: 36,2342           45240                           BMN      DSU                                   #  (HPLIM-HPO)-(HPLIM-HP)=HP-HPO
024231,000327: 36,2343           74360                                    INTERP                                #  SOLUTION AT HAND
024232,000328: 36,2344           71240                           BMN      DLOAD                                 
024233,000329: 36,2345           73534                                    ALARUMS                               #  ITS GETTING WORSE - SOUND THE ALARM
024234,000330: 36,2346           34005                                    CDSEC                                 
024235,000331: 36,2347           57414        JUNCT1             BOFF     DCOMP                                 #  OFF IS PLUS ON IS MINUS
024236,000332: 36,2350           00356                                    KFLAG                                 
024237,000333: 36,2351           74352                                    +1                                    
024238,000334: 36,2352           03744                           STORE    DELTEE                                
024239,000335: 36,2353           43345        JUNCT2             DLOAD    DAD                                   
024240,000336: 36,2354           03744                                    DELTEE                                
024241,000337: 36,2355           03752                                    TF                                    
024242,000338: 36,2356           37752                           STCALL   TF                                    
024243,000339: 36,2357           74207                                    BIS                                   #  RECYCLE
024244,000340: 36,2360           45214        INTERP             SET      DSU                                   #  HP-HPO
024245,000341: 36,2361           03461                                    ITSWICH                               
024246,000342: 36,2362           65301                           NORM     PDDL                                  
024247,000343: 36,2363           00047                                    X1                                    
024248,000344: 36,2364           34023                                    DFTMOON                               
024249,000345: 36,2365           45215                           DAD      DSU                                   
024250,000346: 36,2366           02321                                    HPERMIN                               
024251,000347: 36,2367           02625                                    HP                                    
024252,000348: 36,2370           70501                           NORM     SR1                                   
024253,000349: 36,2371           00050                                    X2                                    
024254,000350: 36,2372           56264                           XSU,2    DDV                                   
024255,000351: 36,2373           00046                                    X1                                    
024256,000352: 36,2374           53605                           DMP      SR*                                   
024257,000353: 36,2375           03744                                    DELTEE                                

Page 547

024259,000355: 36,2376           57177                                    0          -1,2                       
024260,000356: 36,2377           37744                           STCALL   DELTEE                                
024261,000357: 36,2400           74353                                    JUNCT2                                
024262,000358: 36,2401           45325        HALFSAFE           PDDL     DSU                                   #  SAVE HP-HPLIM FOR POSSIBLE
024263,000359: 36,2402           02623                                    DELVEE                                
024264,000360: 36,2403           02633                                    DELVEO                                #  SAVE THIS TOO
024265,000361: 36,2404           51406                           PUSH     ABS                                   
024266,000362: 36,2405           50025                           DSU      BMN                                   
024267,000363: 36,2406           34021                                    LIMVEL                                #  2 FT PS
024268,000364: 36,2407           74443                                    ENDEN                                 
024269,000365: 36,2410           45345                           DLOAD    DSU                                   
024270,000366: 36,2411           02321                                    HPERMIN                               
024271,000367: 36,2412           02631                                    HPO                                   
024272,000368: 36,2413           77725                           PDDL                                           
024273,000369: 36,2414           71240                           BMN      DLOAD                                 
024274,000370: 36,2415           74424                                    LRGRDVO                               
024275,000371: 36,2416           71244                           BPL      DLOAD                                 
024276,000372: 36,2417           74360                                    INTERP                                
024277,000373: 36,2420           03744                                    DELTEE                                
024278,000374: 36,2421           57542                           SR1      DCOMP                                 
024279,000375: 36,2422           37744                           STCALL   DELTEE                                
024280,000376: 36,2423           74353                                    JUNCT2                                
024281,000377: 36,2424           77745        LRGRDVO            DLOAD                                          
024282,000378: 36,2425           71240                           BMN      DLOAD                                 
024283,000379: 36,2426           74353                                    JUNCT2                                
024284,000380: 36,2427           34007                                    CLSEC                                 
024285,000381: 36,2430           77650                           GOTO                                           
024286,000382: 36,2431           74347                                    JUNCT1                                
024287,000383:                                                                                                  #  TIME RAN OUT ASSUME SOLUTION IF SAFE PERICENTER
024288,000384: 36,2432           45345        RNGETEST           DLOAD    DSU                                   
024289,000385: 36,2433           02625                                    HP                                    
024290,000386: 36,2434           02321                                    HPERMIN                               
024291,000387: 36,2435           71240                           BMN      DLOAD                                 
024292,000388: 36,2436           73534                                    ALARUMS                               
024293,000389: 36,2437           03752                                    TF                                    
024294,000390: 36,2440           77625                           DSU                                            
024295,000391: 36,2441           03744                                    DELTEE                                
024296,000392: 36,2442           03752                           STORE    TF                                    #  TIME OF SOLUTION
024297,000393: 36,2443           77775        ENDEN              VLOAD                                          
024298,000394: 36,2444           03620                                    VTPRIME                               
024299,000395: 36,2445           65241                           DOT      PDDL                                  #  SG2 WITH MAGNITUDE
024300,000396: 36,2446           03632                                    RPASS4                                
024301,000397: 36,2447           02637                                    RELDELV                               
024302,000398: 36,2450           45565                           SIGN     STADR                                 #  NOW SIGN(RELDELV)=SIGN(SG2)
024303,000399: 36,2451           41140                           STCALL   RELDELV                               
024304,000400: 36,2452           16440                                    TRANSANG                              #  COMPUTE OMEGA T, CENTRAL ANGLE
024305,000401: 36,2453           50375                           VLOAD    DOT                                   
024306,000402: 36,2454           03540                                    RACT3                                 
024307,000403: 36,2455           03612                                    VIPRIME                               #  SG1
024308,000404: 36,2456           51165                           SIGN     BPL                                   #  IF POSITIVE THEN SG1 = SG2 OTHERWISE

Page 548

024310,000406: 36,2457           02637                                    RELDELV                               
024311,000407: 36,2460           74470                                    USEKAY                                #  SIGN(SG2-SG1)=SIGN(SG2)=SIGN(RELDELV)
024312,000408: 36,2461           57535                           SLOAD    DCOMP                                 
024313,000409: 36,2462           33144                                    DECTWO                                
024314,000410: 36,2463           51165                           SIGN     BPL                                   
024315,000411: 36,2464           02637                                    RELDELV                               
024316,000412: 36,2465           74476                                    NEXUS                                 
024317,000413: 36,2466           52076                           DCOMP    GOTO                                  
024318,000414: 36,2467           74474                                    USEKAY     +4                         
024319,000415: 36,2470           43135        USEKAY             SLOAD    BON                                   
024320,000416: 36,2471           33144                                    DECTWO                                
024321,000417: 36,2472           00316                                    KFLAG                                 
024322,000418: 36,2473           74476                                    NEXUS                                 
024323,000419: 36,2474           77625                           DSU                                            
024324,000420: 36,2475           36100                                    P21ONENN                              
024325,000421: 36,2476           17646        NEXUS              STODL    NN1                                   
024326,000422: 36,2477           02625                                    HP                                    
024327,000423: 36,2500           36641                           STCALL   POSTTPI                               
024328,000424: 36,2501           03657                                    QTEMP                                 
024329,000425: 07,2440                                           BANK     07                                    
024330,000426: 07,2000                                           SETLOC   XANG                                  
024331,000427: 07,2000                                           BANK                                           
024332,000428: 07,2440                                           COUNT    07/XANG                               
024333,000429: 
024334,000430:                                                                                                  #  CENTRAL ANGLE SUBROUTINE
024335,000431: 
024336,000432:                                                                                                  #  THIS SUBROUTINE COMPUTES THE CENTRAL ANGLE OF TRAVEL OF THE
024337,000433:                                                                                                  #  PASSIVE VEHICLE DURING THE TRANSFER.
024338,000434: 
024339,000435: 07,2440           40220        TRANSANG           STQ      SETPD                                 
024340,000436: 07,2441           02370                                    SUBEXIT                               
024341,000437: 07,2442           00001                                    0                                     
024342,000438: 07,2443           73150                           LXA,1    LXA,2                                 
024343,000439: 07,2444           03745                                    XRS                                   
024344,000440: 07,2445           03746                                    XRS        +1                         
024345,000441: 07,2446           53775                           VLOAD    VSR*                                  
024346,000442: 07,2447           03640                                    VPASS4                                
024347,000443: 07,2450           57176                                    0,2                                   
024348,000444: 07,2451           22746                           STODL*   VVEC                                  
024349,000445: 07,2452           11633                                    MUTABLE    +2,1                       
024350,000446: 07,2453           53715                           PDVL     VSR*                                  #  SQRT MU (+18 OR +15)                  00D
024351,000447: 07,2454           03632                                    RPASS4                                
024352,000448: 07,2455           57176                                    0,2                                   
024353,000449: 07,2456           64646                           ABVAL    PDDL*                                 #  MAGNITUDE OF R        (+29 OR +27)    02D
024354,000450: 07,2457           11631                                    MUTABLE,1                             
024355,000451: 07,2460           47515                           PDVL     VSQ                                   #  1/MU                  (+34 OR +28)    04D
024356,000452: 07,2461           02746                                    VVEC                                  
024357,000453: 07,2462           57301                           NORM     DMPR                                  #  PUSH LIST AT 02D
024358,000454: 07,2463           00047                                    X1                                    
024359,000455: 07,2464           53605                           DMP      SRR*                                  
024360,000456: 07,2465           00003                                    02D                                   

Page 549

024362,000458: 07,2466           21576                                    0          -3,1                       
024363,000459: 07,2467           77621                           BDSU                                           #  R V**/MU              (+6)
024364,000460: 07,2470           11506                                    D1/32                                 
024365,000461: 07,2471           65301                           NORM     PDDL                                  
024366,000462: 07,2472           00047                                    X1                                    #  (2 - R V**/MU)        (+6-N)
024367,000463: 07,2473           56362                           SR1R     DDV                                   #  MAGNITUDE OF R        (+30 OR +28)
024368,000464: 07,2474           41457                           SL*      PUSH                                  #  R/(2 - R V**/MU)      (+29 OR +27)    02D
024369,000465: 07,2475           20174                                    0          -5,1                       
024370,000466: 07,2476           75542                           SR1      SQRT                                  
024371,000467: 07,2477           77605                           DMP                                            
024372,000468: 07,2500           65301                           NORM     PDDL                                  #  ASUBP***                              00D
024373,000469: 07,2501           00047                                    X1                                    
024374,000470: 07,2502           56342                           SR1      DDV                                   
024375,000471: 07,2503           53605                           DMP      SL*                                   
024376,000472: 07,2504           03752                                    TF                                    
024377,000473: 07,2505           20201                                    0,1                                   
024378,000474: 07,2506           60325                           PDDL     NORM                                  
024379,000475: 07,2507           11520                                    2PISC                                 
024380,000476: 07,2510           00047                                    X1                                    
024381,000477: 07,2511           56325                           PDDL     DDV                                   
024382,000478: 07,2512           77657                           SL*                                            
024383,000479: 07,2513           20176                                    0          -3,1                       #  CENTANG = (SQRT(MU/ASUP***)TF)
024384,000480: 07,2514           37754                           STCALL   CENTANG                               #  IN REVOLUTIONS B-0
024385,000481: 07,2515           02370                                    SUBEXIT                               
024386,000482: 35,3431                                           BANK     35                                    
024387,000483: 35,2000                                           SETLOC   P17S1                                 
024388,000484: 35,2000                                           BANK                                           
024389,000485: 35,3431                                           COUNT    35/P17                                
024390,000486: 
024391,000487:                                                                                                  #  TPI SEARCH DISPLAY ROUTINE
024392,000488: 
024393,000489: 35,3431           03726        P17                TC       AVFLAGA                               #  AVFLAG = CSM, SET TRACK + UPDATE FLAGS
024394,000490: 35,3432           03434                           TC       P17.1                                 
024395,000491: 35,3433           03741        P77                TC       AVFLAGP                               #  AVFLAG = LEM, SET TRACK + UPDATE FLAGS
024396,000492: 35,3434           03746        P17.1              TC       P20FLGON                              #        SET UPDATE FLAG
024397,000493: 35,3435           33125                           CAF      V06N37                                #        DISPLAY TTPI TIME
024398,000494: 35,3436           03114                           TC       VNPOOH                                
024399,000495: 35,3437           06006                           TC       INTPRET                               
024400,000496: 35,3440           45014                           CLEAR    CALL                                  
024401,000497: 35,3441           00670                                    UPDATFLG                              
024402,000498: 35,3442           74026                                    S17.1                                 #  UPDATE STATE VECTORS TO TTPI
024403,000499: 35,3443           76014                           SET      AXT,1                                 
024404,000500: 35,3444           00470                                    UPDATFLG                              
024405,000501: 35,3445           00002                           DEC      2          B-14                       #  DELTA H = 2 K POSITIVE, KFLAG OFF
024406,000502: 35,3446           76014                           BOFF     AXT,1                                 
024407,000503: 35,3447           00356                                    KFLAG                                 
024408,000504: 35,3450           73452                                    +2                                    
024409,000505: 35,3451           00001                           DEC      1          B-14                       #  DELTA H = 1 K NEGATIVE, KFLAG ON
024410,000506: 35,3452           77530                           SXA,1    EXIT                                  
024411,000507: 35,3453           01132                                    OPTION2                               

Page 550

024413,000509: 35,3454           33543                           CAF      V06N72                                #  DISPLAY PHI, DELTA H, SEARCH OPTION K
024414,000510: 35,3455           03517                           TC       VNCOMP17                              
024415,000511: 35,3456           06006                           TC       INTPRET                               
024416,000512: 35,3457           43014                           CLEAR    SET                                   
024417,000513: 35,3460           00670                                    UPDATFLG                              
024418,000514: 35,3461           00076                                    KFLAG                                 
024419,000515: 35,3462           45335                           SLOAD    DSU                                   
024420,000516: 35,3463           01133                                    OPTION2                               #  RESET KFLAG ON FOR OPTION =1
024421,000517: 35,3464           36100                                    P21ONENN                              #             OFF FOR OPTION =2
024422,000518: 35,3465           43030                           BHIZ     CLEAR                                 
024423,000519: 35,3466           73470                                    +2                                    
024424,000520: 35,3467           00276                                    KFLAG                                 
024425,000521: 35,3470           46135                           SLOAD    BHIZ                                  
024426,000522: 35,3471           03747                                    XRS        +1                         
024427,000523: 35,3472           73476                                    +4                                    
024428,000524: 35,3473           52145                           DLOAD    GOTO                                  
024429,000525: 35,3474           34003                                    HPL                                   
024430,000526: 35,3475           73500                                    P17.2                                 
024431,000527: 35,3476           77745                           DLOAD                                          
024432,000528: 35,3477           34001                                    HPE                                   
024433,000529: 35,3500           36321        P17.2              STCALL   HPERMIN                               
024434,000530: 35,3501           74104                                    S17.2                                 
024435,000531: 35,3502           77414                           SET      EXIT                                  
024436,000532: 35,3503           00470                                    UPDATFLG                              
024437,000533: 35,3504           33127        P17.3              CAF      V06N58                                #  DISPLAY DELTA VTPI, DELTA VTPF,AND H
024438,000534: 35,3505           03517                           TC       VNCOMP17                              
024439,000535: 35,3506           33126                           CAF      V06N55                                #  DISPLAY PERICENTER CODE AND CENTRAL ANG,
024440,000536: 35,3507           04555                           TC       BANKCALL                              
024441,000537: 35,3510           20763                           CADR     GOFLASHR                              
024442,000538: 35,3511           04106                           TC       GOTOPOOH                              #  TERMINATE PROGRAM
024443,000539: 35,3512           04106                           TC       GOTOPOOH                              #  END PROGRAM
024444,000540: 35,3513           03434                           TC       P17.1                                 #  RECYCLE WITH NEW TTPI OR SEARCH OPTION
024445,000541: 35,3514           34711                           CAF      TWO                                   #  BLANK R2
024446,000542: 35,3515           05415                           TC       BLANKET                               
024447,000543: 35,3516           15112                           TCF      ENDOFJOB                              
024448,000544: 35,3517  E4,1767                                  EBANK=   RTRN                                  
024449,000545: 
024450,000546: 35,3517           00006        VNCOMP17           EXTEND                                         
024451,000547: 35,3520           23766                           QXCH     QSAVED                                
024452,000548: 35,3521           55765                           TS       VERBNOUN                              
024453,000549: 35,3522           31765                           CA       VERBNOUN                              
024454,000550: 35,3523           04555                           TCR      BANKCALL                              
024455,000551: 35,3524           20624                           CADR     GOFLASH                               
024456,000552: 35,3525           03522                           TC       -3                                    #  TERMINATE ILLEGAL REDISPLAY
024457,000553: 35,3526           01766                           TC       QSAVED                                #  PROCEED
024458,000554: 35,3527           40154                           CS       MPAC                                  #  RECYCLE WITH NEW TPI TIME
024459,000555: 35,3530           64705                           AD       BIT6                                  #  OR PROCEED WITH NEW SEARCH OPTION
024460,000556: 35,3531           00006                           EXTEND                                         
024461,000557: 35,3532           13434                           BZF      P17.1                                 
024462,000558: 35,3533           03522                           TC       VNCOMP17   +3                         

Page 551

024464,000560: 35,3534           77414        ALARUMS            SET      EXIT                                  
024465,000561: 35,3535           00470                                    UPDATFLG                              
024466,000562: 35,3536           05537                           TC       ALARM                                 
024467,000563: 35,3537           00124                           OCT      00124                                 #  NO SAFE PERCENTER IN THIS SECTOR
024468,000564: 35,3540           34743                           CAF      V05N09                                
024469,000565: 35,3541           03517                           TC       VNCOMP17                              
024470,000566: 35,3542           04106                           TC       GOTOPOOH                              #  PROCEED ILLEGAL TERMINATE PROGRAM
024471,000567: 35,3543           01510        V06N72             VN       0672                                  
024472,000568: 

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