Source Code

These source-code files are part of a reconstructed copy of Comanche 45/2 (AKA Manche45 revision 2), the final, flown mission release of the Apollo 10 Command Module (CM) Apollo Guidance Computer (AGC) software. Comanche 45/2 was preceded by Comanche 44 and Comanche 45. The reconstruction is believed to be exactly accurate, but in the absence of an actual Apollo-era listing of Comanche 45/2, some explanation of the reconstruction process is needed to insure confidence in that accuracy.

The starting point was the source code of Comanche 45 (itself previously accurately reconstructed). Comanche 45 source code was then modified by incorporating changes known from contemporary documentation to have been made between revisions 45 and 45/2. The now-reconstructed Comanche 45/2 source code was verified by assembling it and checking that the assembled code had the expected known-correct memory-bank checksums. Note that page numbers in the reconstructed code tend to match those in the Comanche 55, the most-similar revision of Comanche for which we have access to an actual non-reconstructed hardcopy; the source code would likely have different page numbers in a contemporary Comanche 45 listing.

Annotations that were not present in the contemporary source code have been added to the reconstructed code to justify each change relative to Comanche 44. Here's a guide to the Apollo documentation referenced in those annotations:
Comments expected to have been present in the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC Project's GitHub repository.

023694,000002:                                                                                                  ## Copyright:   Public domain.
023695,000003:                                                                                                  ## Filename:    TPI_SEARCH.agc
023696,000004:                                                                                                  ## Purpose:     A section of Manche45 revision 2.
023697,000005:                                                                                                  ##              It is part of the reconstructed source code for the
023698,000006:                                                                                                  ##              final, flown release of the flight software for the Command
023699,000007:                                                                                                  ##              Module's (CM) Apollo Guidance Computer (AGC) for Apollo 10.
023700,000008:                                                                                                  ##              The code has been recreated from a copy of Comanche 055. It
023701,000009:                                                                                                  ##              has been adapted such that the resulting bugger words
023702,000010:                                                                                                  ##              exactly match those specified for Manche 45/2 in NASA drawing
023703,000011:                                                                                                  ##              2021153D, which gives relatively high confidence that the
023704,000012:                                                                                                  ##              reconstruction is correct.
023705,000013:                                                                                                  ## Assembler:   yaYUL
023706,000014:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
023707,000015:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
023708,000016:                                                                                                  ## Mod history: 2020-12-24 MAS  Created from Comanche 45.
023709,000017: 

Page 551

023711,000019:                                                                                                  #  PROGRAM DESCRIPTION S17.1 AND S17.2
023712,000020: 
023713,000021:                                                                                                  #  FUNCTIONAL DESCRIPTION
023714,000022: 
023715,000023:                                                                                                  #  THE TPI SEARCH ROUTINE DETERMINES THE MINIMUM TOTAL VELOCITY TRANSFER TRAJECTORY FROM A GIVEN TPI
023716,000024:                                                                                                  #  MANEUVER TIME WITHIN THE CONSTRAINT OF A SAFE PERICENTER.  THIS VELOCITY IS THE SUM OF THE IMPULSIVE VELOCITIES
023717,000025:                                                                                                  #  FOR THE TPI AND TPF MANEUVERS.
023718,000026: 
023719,000027:                                                                                                  #  THE S17.1 ROUTINE EXTRAPOLATES THE STATE VECTORS OF BOTH VEHICLES TO THE TPI TIME AND COMPUTES THE
023720,000028:                                                                                                  #  RELATIVE PHASE ANGLE BETWEEN THE VEHICLES, THE ALTITUDE DIFFERENCE (I.E. THE MAGNITUDE DIFFERENCE OF THE 
023721,000029:                                                                                                  #  POSITION VECTORS) AND SELECTS A SEARCH SECTOR BASED ON THE SIGN OF THE ALTITUDE DIFFERENCE.
023722,000030: 
023723,000031:                                                                                                  #  THE S17.2 ROUTINE FURTHER DEFINES THE SEARCH SECTOR BY COMPUTING ANGULAR LIMITS AND USES THE TIME THETA
023724,000032:                                                                                                  #  SUBROUTINE TO COMPUTE THE SEARCH START AND END TIMES.  THE SEARCH IS THEN MADE IN AN ITERATIVE LOOP USING THE
023725,000033:                                                                                                  #  LAMBERT SUBROUTINE TO COMPUTE THE VELOCITIES REQUIRED AT TPI TIME AND AT TPF TIME.  EXIT FROM THE SEARCH LOOP
023726,000034:                                                                                                  #  IS MADE WHEN SOLUTION CRITERIA ARE MET (NORMAL EXIT) OR AS SOON AS IT IS EVIDENT THAT NO SOLUTION EXISTS IN
023727,000035:                                                                                                  #  THE SECTOR SEARCHED.
023728,000036: 
023729,000037:                                                                                                  #  CALLING SEQUENCE
023730,000038: 
023731,000039:                                                                                                  #        BOTH ROUTINES ARE CALLED IN INTERPRETIVE CODE AND RETURN VIA QPRET.  S17.1 HAS ONLY A NORMAL EXIT.
023732,000040:                                                                                                  #        S17.2 RETURNS VIA QPRET FOR NORMAL EXIT AND TO ALARUMS FOR ERROR EXIT.
023733,000041: 
023734,000042:                                                                                                  #  SUBROUTINES CALLED
023735,000043: 
023736,000044:                                                                                                  #        CSMCONIC
023737,000045:                                                                                                  #        LEMCONIC
023738,000046:                                                                                                  #        TIMETHET
023739,000047:                                                                                                  #        INITVEL
023740,000048: 
023741,000049: 36,2000                                           BANK     36                                    
023742,000050: 35,2000                                           SETLOC   P17S1                                 
023743,000051: 35,2000                                           BANK                                           
023744,000052: 
023745,000053: 35,3127                                           COUNT    36/TPI                                
023746,000054: 
023747,000055: 35,3127  E7,1537                                  EBANK=   RACT3                                 
023748,000056: 
023749,000057:                                                                                                  #  **** TEMPORARY ****
023750,000058: 
023751,000059: 35,3127           00004 31566  HPE                2DEC     157420.0   B-29                       #  EARTH'S MIN. PERICENTER ALTITUDE 85 N.M.
023752,000060: 
023753,000061: 35,3131           00000 12326  HPL                2DEC     10668.0213 B-29                       #  MOON:S MIN. PERICENTER ALTITUDE 35000 FT
023754,000062: 
023755,000063: 35,3133           00002 16100  CDSEC              2DEC     40000      B-28                       
023756,000064: 
023757,000065: 35,3135           00000 35230  CLSEC              2DEC     15000      B-28                       
023758,000066: 
023759,000067: 35,3137           12137 06033  PIINVERS           2DEC     .3183098862                            
023760,000068: 
023761,000069: 35,3141           06161 30707  SEC1THET           2DEC     .1944444444                            
023762,000070: 

Page 552

023764,000072: 35,3143           35252 25253  SEC2THET           2DEC     .9166666667                            
023765,000073: 
023766,000074: 35,3145           67777 77777  MANYFEET           2DEC     -1.0       B-2                        
023767,000075: 
023768,000076: 35,3147           00000 30760  LIMVEL             2DEC     .6096      E-2        B-7             #  2FPS
023769,000077: 
023770,000078: 35,3151           00000 00114  DFTMOON            2DEC     .1524      E3         B-29            #  500 FEET
023771,000079: 
023772,000080: 35,3153           00040 30447  DP-.002            2DEC     0.002                                 
023773,000081: 
023774,000082: 36,2000                                           SETLOC   P17S                                  
023775,000083: 36,2000                                           BANK                                           
023776,000084: 36,2000           71220        S17.1              STQ      DLOAD                                 
023777,000085: 36,2001           01340                                    NORMEX                                
023778,000086: 36,2002           03663                                    TTPI                                  
023779,000087: 36,2003           34041                           STCALL   TDEC1                                 #  ADVANCE PASSIVE VEHICLE TO TPI
023780,000088: 36,2004           27126                                    LEMCONIC                              
023781,000089: 36,2005           77624                           CALL                                           
023782,000090: 36,2006           45233                                    LEMSTORE                              
023783,000091: 36,2007           77745                           DLOAD                                          
023784,000092: 36,2010           03663                                    TTPI                                  
023785,000093: 36,2011           34041                           STCALL   TDEC1                                 #  ADVANCE ACTIVE VEHICLE TO TPI
023786,000094: 36,2012           27114                                    CSMCONIC                              
023787,000095: 36,2013           77624                           CALL                                           
023788,000096: 36,2014           45243                                    CSMSTORE                              
023789,000097: 36,2015           77775                           VLOAD                                          
023790,000098: 36,2016           03540                                    RACT3                                 
023791,000099: 36,2017           63246                           ABVAL    PDVL                                  #  /RA/ 0D                       PL 2D
023792,000100: 36,2020           03554                                    RPASS3                                
023793,000101: 36,2021           65256                           UNIT     PDDL                                  #  UNIT RP 0D                    PL 6D
023794,000102: 36,2022           43021                           BDSU     SET                                   
023795,000103: 36,2023           00045                                    36D                                   #  /RP/ -/RA/
023796,000104: 36,2024           00076                                    KFLAG                                 #  OFF = +
023797,000105: 36,2025           43040                           BMN      CLEAR                                 
023798,000106: 36,2026           74030                                    +2                                    
023799,000107: 36,2027           00276                                    KFLAG                                 #  ON = -
023800,000108: 36,2030           27754                           STOVL    DELHITE                               
023801,000109: 36,2031           00001                                    0D                                    
023802,000110: 36,2032           53435                           VXV      UNIT                                  
023803,000111: 36,2033           03562                                    VPASS3                                
023804,000112: 36,2034           27646                           STOVL    E2                                    #  ALMOST IT SAVE FOR 17.2
023805,000113: 36,2035           03540                                    RACT3                                 
023806,000114: 36,2036           46206                           PUSH     VPROJ                                 
023807,000115: 36,2037           03646                                    E2                                    
023808,000116: 36,2040           51352                           VSL2     BVSU                                  #  RPA
023809,000117: 36,2041           50256                           UNIT     DOT                                   
023810,000118: 36,2042           00001                                    0D                                    
023811,000119: 36,2043           65552                           SL1      ACOS                                  
023812,000120: 36,2044           77715                           PDVL                                           
023813,000121: 36,2045           50235                           VXV      DOT                                   

Page 553

023815,000123: 36,2046           03540                                    RACT3                                 
023816,000124: 36,2047           03646                                    E2                                    
023817,000125: 36,2050           75325                           PDDL     SIGN                                  
023818,000126: 36,2051           77626                           STADR                                          
023819,000127: 36,2052           61160                           STODL    THETZERO                              #  CENTRAL ANGLE
023820,000128: 36,2053           00047                                    X1                                    
023821,000129: 36,2054           37746                           STCALL   XRS                                   #  SAVE INDICES FOR FURTHER USE
023822,000130: 36,2055           01340                                    NORMEX                                #    += ACTIVE AHEAD  -= ACTIVE BEHIND
023823,000131: 36,2056           77220        S17.2              STQ      VLOAD                                 #  COMPUTE SEARCH SECTOR LIMITS
023824,000132: 36,2057           03657                                    QTEMP                                 
023825,000133: 36,2060           03540                                    RACT3                                 
023826,000134: 36,2061           50256                           UNIT     DOT                                   
023827,000135: 36,2062           03646                                    E2                                    
023828,000136: 36,2063           75446                           ABS      SQRT                                  
023829,000137: 36,2064           43352                           SL1      DAD                                   
023830,000138: 36,2065           33154                                    DP-.002                               #  ADD .002 RADIANS TO IT
023831,000139: 36,2066           57414                           BON      DCOMP                                 #  GIVES CORRECT SINE, COSINE MUST BE
023832,000140: 36,2067           00316                                    KFLAG                                 #  COMP. ADD .5 FOR ANGLE
023833,000141: 36,2070           74071                                    +1                                    
023834,000142:                                                                                                  #  PHI(0)=180-(-(THETAZERO +K5IT)), PHI(I)=180-(-(THETAZERO+K2IT))
023835,000143:                                                                                                  #  SIN(180-ALPHA)=SIN(ALPHA) ETC
023836,000144: 36,2071           40205                           DMP      SETPD                                 
023837,000145: 36,2072           33140                                    PIINVERS                              #  REVOLUTIONARY HERES TWO IT
023838,000146: 36,2073           00001                                    0D                                    
023839,000147: 36,2074           45206                           PUSH     DSU                                   
023840,000148: 36,2075           02617                                    THETZERO                              
023841,000149: 36,2076           02611                           STORE    IT                                    #  PHI(I) , -(THETZERO + K2IT)
023842,000150: 36,2077           41525                           PDDL     PUSH                                  
023843,000151: 36,2100           43342                           SR1      DAD                                   
023844,000152: 36,2101           41415                           DAD      PUSH                                  #  PHI(0) , -(THETZERO + K5IT)
023845,000153: 36,2102           43156                           SIN      SET                                   
023846,000154: 36,2103           03466                                    RVSW                                  
023847,000155: 36,2104           16732                           STODL    SNTH                                  
023848,000156: 36,2105           50146                           COS      BMN                                   
023849,000157: 36,2106           74110                                    +2                                    
023850,000158: 36,2107           77676                           DCOMP                                          
023851,000159: 36,2110           16734                           STODL    CSTH                                  
023852,000160: 36,2111           03746                                    XRS                                   
023853,000161: 36,2112           24047                           STOVL    X1                                    
023854,000162: 36,2113           03554                                    RPASS3                                
023855,000163: 36,2114           77657                           VSR*                                           
023856,000164: 36,2115           57176                                    0,2                                   
023857,000165: 36,2116           26657                           STOVL    RVEC                                  
023858,000166: 36,2117           03562                                    VPASS3                                
023859,000167: 36,2120           77657                           VSR*                                           
023860,000168: 36,2121           57176                                    0,2                                   
023861,000169: 36,2122           36746                           STCALL   VVEC                                  
023862,000170: 36,2123           24744                                    TIMETHET                              
023863,000171: 36,2124           77745                           DLOAD                                          #  SAVE START TIME AND GET END TIME
023864,000172: 36,2125           00037                                    T                                     

Page 554

023866,000174: 36,2126           03752                           STORE    TF                                    
023867,000175: 36,2127           16627                           STODL    TFO                                   
023868,000176: 36,2130           02611                                    IT                                    
023869,000177: 36,2131           73406                           PUSH     SIN                                   
023870,000178: 36,2132           16732                           STODL    SNTH                                  
023871,000179: 36,2133           50146                           COS      BMN                                   
023872,000180: 36,2134           74136                                    +2                                    
023873,000181: 36,2135           77676                           DCOMP                                          
023874,000182: 36,2136           02734                           STORE    CSTH                                  
023875,000183: 36,2137           45150                           LXA,1    CALL                                  
023876,000184: 36,2140           03745                                    XRS                                   
023877,000185: 36,2141           24744                                    TIMETHET                              
023878,000186:                                                                                                  #  INITIALIZE LOOP
023879,000187: 36,2142           43145                           DLOAD    CLEAR                                 
023880,000188: 36,2143           00037                                    T                                     
023881,000189: 36,2144           03661                                    ITSWICH                               
023882,000190: 36,2145           16621                           STODL    TFI                                   #  SAVE TIME FOR LOOP TEST
023883,000191: 36,2146           15343                                    DPPOSMAX                              
023884,000192: 36,2147           16623                           STODL    DELVEE                                
023885,000193: 36,2150           33146                                    MANYFEET                              
023886,000194: 36,2151           16625                           STODL    HP                                    
023887,000195: 36,2152           33142                                    SEC1THET                              #  70 DEGREES
023888,000196: 36,2153           71214                           BON      DLOAD                                 
023889,000197: 36,2154           00316                                    KFLAG                                 
023890,000198: 36,2155           74157                                    +2                                    
023891,000199: 36,2156           33144                                    SEC2THET                              #  330 DEGREES
023892,000200: 36,2157           37750                           STCALL   THETL                                 
023893,000201: 36,2160           74202                                    CONCAUL                               
023894,000202: 36,2161           70545        BIS                DLOAD    SR1                                   
023895,000203: 36,2162           02734                                    CSTH                                  
023896,000204: 36,2163           14021                           STODL    COSTH                                 
023897,000205: 36,2164           02732                                    SNTH                                  
023898,000206: 36,2165           77742                           SR1                                            
023899,000207: 36,2166           34023                           STCALL   SINTH                                 #  GET 4 QUADRANT THETA
023900,000208: 36,2167           47256                                    ARCTRIG                               
023901,000209: 36,2170           43244                           BPL      DAD                                   
023902,000210: 36,2171           74173                                    +2                                    
023903,000211: 36,2172           15343                                    DPPOSMAX                              #  PUT THETA BETWEEN 0,1
023904,000212: 36,2173           65221                           BDSU     PDDL                                  
023905,000213: 36,2174           03750                                    THETL                                 
023906,000214: 36,2175           03752                                    TF                                    
023907,000215: 36,2176           75225                           DSU      SIGN                                  #  FAST TIMES
023908,000216: 36,2177           02621                                    TFI                                   
023909,000217: 36,2200           77640                           BMN                                            
023910,000218: 36,2201           74404                                    RNGETEST                              #  TIME MUST HAVE A STOP
023911,000219:                                                                                                  #  ADVANCE PASSIVE FOR TARGET VECTOR
023912,000220: 36,2202           77745        CONCAUL            DLOAD                                          
023913,000221: 36,2203           03663                                    TTPI                                  
023914,000222: 36,2204           43015                           DAD      BON                                   
023915,000223: 36,2205           03752                                    TF                                    

Page 555

023917,000225: 36,2206           01312                                    AVFLAG                                
023918,000226: 36,2207           74214                                    ADVCSM                                
023919,000227: 36,2210           34041                           STCALL   TDEC1                                 
023920,000228: 36,2211           27126                                    LEMCONIC                              
023921,000229: 36,2212           77650                           GOTO                                           
023922,000230: 36,2213           74216                                    JUNCT3                                
023923,000231: 36,2214           34041        ADVCSM             STCALL   TDEC1                                 
023924,000232: 36,2215           27114                                    CSMCONIC                              
023925,000233:                                                                                                  #  SAVE BACK VALUES OF HP AND DELVEE
023926,000234: 36,2216           77775        JUNCT3             VLOAD                                          
023927,000235: 36,2217           00007                                    VATT                                  
023928,000236: 36,2220           27640                           STOVL    VPASS4                                
023929,000237: 36,2221           00001                                    RATT                                  
023930,000238: 36,2222           03632                           STORE    RPASS4                                
023931,000239: 36,2223           17415                           STODL    RTARG                                 
023932,000240: 36,2224           03752                                    TF                                    
023933,000241: 36,2225           17423                           STODL    DELLT4                                
023934,000242: 36,2226           02625                                    HP                                    
023935,000243: 36,2227           16631                           STODL    HPO                                   
023936,000244: 36,2230           02623                                    DELVEE                                
023937,000245: 36,2231           16633                           STODL    DELVEO                                
023938,000246:                                                                                                  #  PREPARE FOR LAMBERT
023939,000247: 36,2232           03663                                    TTPI                                  
023940,000248: 36,2233           17503                           STODL    INTIME                                
023941,000249: 36,2234           03746                                    XRS                                   
023942,000250: 36,2235           17746                           STODL    RTX1                                  
023943,000251: 36,2236           15335                                    HI6ZEROS                              
023944,000252: 36,2237           65201                           SETPD    PDDL                                  
023945,000253: 36,2240           00001                                    0D                                    
023946,000254: 36,2241           33126                                    EPSFOUR                               
023947,000255: 36,2242           77715                           PDVL                                           
023948,000256: 36,2243           03540                                    RACT3                                 
023949,000257: 36,2244           27570                           STOVL    RINIT                                 
023950,000258: 36,2245           03546                                    VACT3                                 
023951,000259: 36,2246           37576                           STCALL   VINIT                                 
023952,000260: 36,2247           22000                                    INITVEL                               
023953,000261:                                                                                                  #  COMPUTE H ET CETERA
023954,000262: 36,2250           52375                           VLOAD    VSU                                   
023955,000263: 36,2251           03620                                    VTPRIME                               
023956,000264: 36,2252           03640                                    VPASS4                                
023957,000265: 36,2253           41446                           ABVAL    PUSH                                  
023958,000266: 36,2254           26637                           STOVL    RELDELV                               #  /V2-VP(TPI+TF)/
023959,000267: 36,2255           03646                                    DELVEET3                              #  V1-VA
023960,000268: 36,2256           77646                           ABVAL                                          #  /V1-VA/
023961,000269: 36,2257           02635                           STORE    MAGVTPI                               
023962,000270: 36,2260           45415                           DAD      STADR                                 
023963,000271: 36,2261           61154                           STODL    DELVEE                                
023964,000272: 36,2262           03746                                    XRS                                   
023965,000273: 36,2263           24047                           STOVL    X1                                    
023966,000274: 36,2264           03612                                    VIPRIME                               

Page 556

023968,000276: 36,2265           77657                           VSR*                                           
023969,000277: 36,2266           57176                                    0,2                                   
023970,000278: 36,2267           26746                           STOVL    VVEC                                  
023971,000279: 36,2270           03540                                    RACT3                                 
023972,000280: 36,2271           77657                           VSR*                                           
023973,000281: 36,2272           57176                                    0,2                                   
023974,000282: 36,2273           36657                           STCALL   RVEC                                  
023975,000283: 36,2274           45163                                    PERIAPO                               
023976,000284: 36,2275           71354                           LXA,2    DLOAD                                 
023977,000285: 36,2276           03746                                    XRS        +1                         
023978,000286: 36,2277           77657                           SL*                                            
023979,000287: 36,2300           57576                                    0,2                                   
023980,000288: 36,2301           02625                           STORE    HP                                    
023981,000289:                                                                                                  #  ITSWICH DENOTES INTERPOLATION -- SOLUTION ACCEPTANCE IS FORCED
023982,000290: 36,2302           71214                           BON      DLOAD                                 
023983,000291: 36,2303           03701                                    ITSWICH                               
023984,000292: 36,2304           74415                                    ENDEN                                 
023985,000293: 36,2305           02321                                    HPERMIN                               
023986,000294: 36,2306           50025                           DSU      BMN                                   
023987,000295: 36,2307           02625                                    HP                                    
023988,000296: 36,2310           74353                                    HALFSAFE                              
023989,000297: 36,2311           45325                           PDDL     DSU                                   #  WAS PERICENTER ALT SAFE
023990,000298: 36,2312           02321                                    HPERMIN                               
023991,000299: 36,2313           02631                                    HPO                                   
023992,000300: 36,2314           45240                           BMN      DSU                                   #  (HPLIM-HPO)-(HPLIM-HP)=HP-HPO
023993,000301: 36,2315           74332                                    INTERP                                #  SOLUTION AT HAND
023994,000302: 36,2316           71240                           BMN      DLOAD                                 
023995,000303: 36,2317           73260                                    ALARUMS                               #  ITS GETTING WORSE - SOUND THE ALARM
023996,000304: 36,2320           33134                                    CDSEC                                 
023997,000305: 36,2321           57414        JUNCT1             BOFF     DCOMP                                 #  OFF IS PLUS ON IS MINUS
023998,000306: 36,2322           00356                                    KFLAG                                 
023999,000307: 36,2323           74324                                    +1                                    
024000,000308: 36,2324           03744                           STORE    DELTEE                                
024001,000309: 36,2325           43345        JUNCT2             DLOAD    DAD                                   
024002,000310: 36,2326           03744                                    DELTEE                                
024003,000311: 36,2327           03752                                    TF                                    
024004,000312: 36,2330           37752                           STCALL   TF                                    
024005,000313: 36,2331           74161                                    BIS                                   #  RECYCLE
024006,000314: 36,2332           45214        INTERP             SET      DSU                                   #  HP-HPO
024007,000315: 36,2333           03461                                    ITSWICH                               
024008,000316: 36,2334           65301                           NORM     PDDL                                  
024009,000317: 36,2335           00047                                    X1                                    
024010,000318: 36,2336           33152                                    DFTMOON                               
024011,000319: 36,2337           45215                           DAD      DSU                                   
024012,000320: 36,2340           02321                                    HPERMIN                               
024013,000321: 36,2341           02625                                    HP                                    
024014,000322: 36,2342           70501                           NORM     SR1                                   
024015,000323: 36,2343           00050                                    X2                                    
024016,000324: 36,2344           56264                           XSU,2    DDV                                   
024017,000325: 36,2345           00046                                    X1                                    

Page 557

024019,000327: 36,2346           53605                           DMP      SR*                                   
024020,000328: 36,2347           03744                                    DELTEE                                
024021,000329: 36,2350           57177                                    0          -1,2                       
024022,000330: 36,2351           37744                           STCALL   DELTEE                                
024023,000331: 36,2352           74325                                    JUNCT2                                
024024,000332: 36,2353           45325        HALFSAFE           PDDL     DSU                                   #  SAVE HP-HPLIM FOR POSSIBLE
024025,000333: 36,2354           02623                                    DELVEE                                
024026,000334: 36,2355           02633                                    DELVEO                                #  SAVE THIS TOO
024027,000335: 36,2356           51406                           PUSH     ABS                                   
024028,000336: 36,2357           50025                           DSU      BMN                                   
024029,000337: 36,2360           33150                                    LIMVEL                                #  2 FT PS
024030,000338: 36,2361           74415                                    ENDEN                                 
024031,000339: 36,2362           45345                           DLOAD    DSU                                   
024032,000340: 36,2363           02321                                    HPERMIN                               
024033,000341: 36,2364           02631                                    HPO                                   
024034,000342: 36,2365           77725                           PDDL                                           
024035,000343: 36,2366           71240                           BMN      DLOAD                                 
024036,000344: 36,2367           74376                                    LRGRDVO                               
024037,000345: 36,2370           71244                           BPL      DLOAD                                 
024038,000346: 36,2371           74332                                    INTERP                                
024039,000347: 36,2372           03744                                    DELTEE                                
024040,000348: 36,2373           57542                           SR1      DCOMP                                 
024041,000349: 36,2374           37744                           STCALL   DELTEE                                
024042,000350: 36,2375           74325                                    JUNCT2                                
024043,000351: 36,2376           77745        LRGRDVO            DLOAD                                          
024044,000352: 36,2377           71240                           BMN      DLOAD                                 
024045,000353: 36,2400           74325                                    JUNCT2                                
024046,000354: 36,2401           33136                                    CLSEC                                 
024047,000355: 36,2402           77650                           GOTO                                           
024048,000356: 36,2403           74321                                    JUNCT1                                
024049,000357:                                                                                                  #  TIME RAN OUT ASSUME SOLUTION IF SAFE PERICENTER
024050,000358: 36,2404           45345        RNGETEST           DLOAD    DSU                                   
024051,000359: 36,2405           02625                                    HP                                    
024052,000360: 36,2406           02321                                    HPERMIN                               
024053,000361: 36,2407           71240                           BMN      DLOAD                                 
024054,000362: 36,2410           73260                                    ALARUMS                               
024055,000363: 36,2411           03752                                    TF                                    
024056,000364: 36,2412           77625                           DSU                                            
024057,000365: 36,2413           03744                                    DELTEE                                
024058,000366: 36,2414           03752                           STORE    TF                                    #  TIME OF SOLUTION
024059,000367: 36,2415           77775        ENDEN              VLOAD                                          
024060,000368: 36,2416           03620                                    VTPRIME                               
024061,000369: 36,2417           65241                           DOT      PDDL                                  #  SG2 WITH MAGNITUDE
024062,000370: 36,2420           03632                                    RPASS4                                
024063,000371: 36,2421           02637                                    RELDELV                               
024064,000372: 36,2422           45565                           SIGN     STADR                                 #  NOW SIGN(RELDELV)=SIGN(SG2)
024065,000373: 36,2423           41140                           STCALL   RELDELV                               
024066,000374: 36,2424           16441                                    TRANSANG                              #  COMPUTE OMEGA T, CENTRAL ANGLE
024067,000375: 36,2425           50375                           VLOAD    DOT                                   
024068,000376: 36,2426           03540                                    RACT3                                 

Page 558

024070,000378: 36,2427           03612                                    VIPRIME                               #  SG1
024071,000379: 36,2430           51165                           SIGN     BPL                                   #  IF POSITIVE THEN SG1 = SG2 OTHERWISE
024072,000380: 36,2431           02637                                    RELDELV                               
024073,000381: 36,2432           74442                                    USEKAY                                #  SIGN(SG2-SG1)=SIGN(SG2)=SIGN(RELDELV)
024074,000382: 36,2433           57535                           SLOAD    DCOMP                                 
024075,000383: 36,2434           33123                                    DECTWO                                
024076,000384: 36,2435           51165                           SIGN     BPL                                   
024077,000385: 36,2436           02637                                    RELDELV                               
024078,000386: 36,2437           74450                                    NEXUS                                 
024079,000387: 36,2440           52076                           DCOMP    GOTO                                  
024080,000388: 36,2441           74446                                    USEKAY     +4                         
024081,000389: 36,2442           43135        USEKAY             SLOAD    BON                                   
024082,000390: 36,2443           33123                                    DECTWO                                
024083,000391: 36,2444           00316                                    KFLAG                                 
024084,000392: 36,2445           74450                                    NEXUS                                 
024085,000393: 36,2446           77625                           DSU                                            
024086,000394: 36,2447           36147                                    P21ONENN                              
024087,000395: 36,2450           17766        NEXUS              STODL    NN1                                   
024088,000396: 36,2451           02625                                    HP                                    
024089,000397: 36,2452           36641                           STCALL   POSTTPI                               
024090,000398: 36,2453           03657                                    QTEMP                                 
024091,000399: 07,2441                                           BANK     07                                    
024092,000400: 07,2000                                           SETLOC   XANG                                  
024093,000401: 07,2000                                           BANK                                           
024094,000402: 07,2441                                           COUNT    07/XANG                               
024095,000403: 
024096,000404:                                                                                                  #  CENTRAL ANGLE SUBROUTINE
024097,000405: 
024098,000406:                                                                                                  #  THIS SUBROUTINE COMPUTES THE CENTRAL ANGLE OF TRAVEL OF THE
024099,000407:                                                                                                  #  PASSIVE VEHICLE DURING THE TRANSFER.
024100,000408: 
024101,000409: 07,2441           40220        TRANSANG           STQ      SETPD                                 
024102,000410: 07,2442           02370                                    SUBEXIT                               
024103,000411: 07,2443           00001                                    0                                     
024104,000412: 07,2444           73150                           LXA,1    LXA,2                                 
024105,000413: 07,2445           03745                                    XRS                                   
024106,000414: 07,2446           03746                                    XRS        +1                         
024107,000415: 07,2447           53775                           VLOAD    VSR*                                  
024108,000416: 07,2450           03640                                    VPASS4                                
024109,000417: 07,2451           57176                                    0,2                                   
024110,000418: 07,2452           22746                           STODL*   VVEC                                  
024111,000419: 07,2453           11737                                    MUTABLE    +2,1                       
024112,000420: 07,2454           53715                           PDVL     VSR*                                  #  SQRT MU (+18 OR +15)                  00D
024113,000421: 07,2455           03632                                    RPASS4                                
024114,000422: 07,2456           57176                                    0,2                                   
024115,000423: 07,2457           64646                           ABVAL    PDDL*                                 #  MAGNITUDE OF R        (+29 OR +27)    02D
024116,000424: 07,2460           11735                                    MUTABLE,1                             
024117,000425: 07,2461           47515                           PDVL     VSQ                                   #  1/MU                  (+34 OR +28)    04D
024118,000426: 07,2462           02746                                    VVEC                                  
024119,000427: 07,2463           57301                           NORM     DMPR                                  #  PUSH LIST AT 02D
024120,000428: 07,2464           00047                                    X1                                    

Page 559

024122,000430: 07,2465           53605                           DMP      SRR*                                  
024123,000431: 07,2466           00003                                    02D                                   
024124,000432: 07,2467           21576                                    0          -3,1                       
024125,000433: 07,2470           77621                           BDSU                                           #  R V**/MU              (+6)
024126,000434: 07,2471           11613                                    D1/32                                 
024127,000435: 07,2472           65301                           NORM     PDDL                                  
024128,000436: 07,2473           00047                                    X1                                    #  (2 - R V**/MU)        (+6-N)
024129,000437: 07,2474           56362                           SR1R     DDV                                   #  MAGNITUDE OF R        (+30 OR +28)
024130,000438: 07,2475           41457                           SL*      PUSH                                  #  R/(2 - R V**/MU)      (+29 OR +27)    02D
024131,000439: 07,2476           20174                                    0          -5,1                       
024132,000440: 07,2477           75542                           SR1      SQRT                                  
024133,000441: 07,2500           77605                           DMP                                            
024134,000442: 07,2501           65301                           NORM     PDDL                                  #  ASUBP***                              00D
024135,000443: 07,2502           00047                                    X1                                    
024136,000444: 07,2503           56342                           SR1      DDV                                   
024137,000445: 07,2504           53605                           DMP      SL*                                   
024138,000446: 07,2505           03752                                    TF                                    
024139,000447: 07,2506           20201                                    0,1                                   
024140,000448: 07,2507           60325                           PDDL     NORM                                  
024141,000449: 07,2510           11625                                    2PISC                                 
024142,000450: 07,2511           00047                                    X1                                    
024143,000451: 07,2512           56325                           PDDL     DDV                                   
024144,000452: 07,2513           77657                           SL*                                            
024145,000453: 07,2514           20176                                    0          -3,1                       #  CENTANG = (SQRT(MU/ASUP***)TF)
024146,000454: 07,2515           37754                           STCALL   CENTANG                               #  IN REVOLUTIONS B-0
024147,000455: 07,2516           02370                                    SUBEXIT                               
024148,000456: 35,3155                                           BANK     35                                    
024149,000457: 35,2000                                           SETLOC   P17S1                                 
024150,000458: 35,2000                                           BANK                                           
024151,000459: 35,3155                                           COUNT    35/P17                                
024152,000460: 
024153,000461:                                                                                                  #  TPI SEARCH DISPLAY ROUTINE
024154,000462: 
024155,000463: 35,3155           04627        P17                TC       AVFLAGA                               #  AVFLAG = CSM, SET TRACK + UPDATE FLAGS
024156,000464: 35,3156           03160                           TC       P17.1                                 
024157,000465: 35,3157           04642        P77                TC       AVFLAGP                               #  AVFLAG = LEM, SET TRACK + UPDATE FLAGS
024158,000466: 35,3160           04647        P17.1              TC       P20FLGON                              #        SET UPDATE FLAG
024159,000467: 35,3161           34614                           CAF      V06N37                                #        DISPLAY TTPI TIME
024160,000468: 35,3162           04575                           TC       VNPOOH                                
024161,000469: 35,3163           06006                           TC       INTPRET                               
024162,000470: 35,3164           45014                           CLEAR    CALL                                  
024163,000471: 35,3165           00670                                    UPDATFLG                              
024164,000472: 35,3166           74000                                    S17.1                                 #  UPDATE STATE VECTORS TO TTPI
024165,000473: 35,3167           76014                           SET      AXT,1                                 
024166,000474: 35,3170           00470                                    UPDATFLG                              
024167,000475: 35,3171           00002                           DEC      2          B-14                       #  DELTA H = 2 K POSITIVE, KFLAG OFF
024168,000476: 35,3172           76014                           BOFF     AXT,1                                 
024169,000477: 35,3173           00356                                    KFLAG                                 
024170,000478: 35,3174           73176                                    +2                                    
024171,000479: 35,3175           00001                           DEC      1          B-14                       #  DELTA H = 1 K NEGATIVE, KFLAG ON

Page 560

024173,000481: 35,3176           77530                           SXA,1    EXIT                                  
024174,000482: 35,3177           01132                                    OPTION2                               
024175,000483: 35,3200           33267                           CAF      V06N72                                #  DISPLAY PHI, DELTA H, SEARCH OPTION K
024176,000484: 35,3201           03243                           TC       VNCOMP17                              
024177,000485: 35,3202           06006                           TC       INTPRET                               
024178,000486: 35,3203           43014                           CLEAR    SET                                   
024179,000487: 35,3204           00670                                    UPDATFLG                              
024180,000488: 35,3205           00076                                    KFLAG                                 
024181,000489: 35,3206           45335                           SLOAD    DSU                                   
024182,000490: 35,3207           01133                                    OPTION2                               #  RESET KFLAG ON FOR OPTION =1
024183,000491: 35,3210           36147                                    P21ONENN                              #             OFF FOR OPTION =2
024184,000492: 35,3211           43030                           BHIZ     CLEAR                                 
024185,000493: 35,3212           73214                                    +2                                    
024186,000494: 35,3213           00276                                    KFLAG                                 
024187,000495: 35,3214           46135                           SLOAD    BHIZ                                  
024188,000496: 35,3215           03747                                    XRS        +1                         
024189,000497: 35,3216           73222                                    +4                                    
024190,000498: 35,3217           52145                           DLOAD    GOTO                                  
024191,000499: 35,3220           33132                                    HPL                                   
024192,000500: 35,3221           73224                                    P17.2                                 
024193,000501: 35,3222           77745                           DLOAD                                          
024194,000502: 35,3223           33130                                    HPE                                   
024195,000503: 35,3224           36321        P17.2              STCALL   HPERMIN                               
024196,000504: 35,3225           74056                                    S17.2                                 
024197,000505: 35,3226           77414                           SET      EXIT                                  
024198,000506: 35,3227           00470                                    UPDATFLG                              
024199,000507: 35,3230           34616        P17.3              CAF      V06N58                                #  DISPLAY DELTA VTPI, DELTA VTPF, AND H
024200,000508: 35,3231           03243                           TC       VNCOMP17                              
024201,000509: 35,3232           34615                           CAF      V06N55                                #  DISPLAY PERICENTER CODE AND CENTRAL ANG,
024202,000510: 35,3233           04662                           TC       BANKCALL                              
024203,000511: 35,3234           21057                           CADR     GOFLASHR                              
024204,000512: 35,3235           04106                           TC       GOTOPOOH                              #  TERMINATE PROGRAM
024205,000513: 35,3236           04106                           TC       GOTOPOOH                              #  END PROGRAM
024206,000514: 35,3237           03160                           TC       P17.1                                 #  RECYCLE WITH NEW TTPI OR SEARCH OPTION
024207,000515: 35,3240           35016                           CAF      TWO                                   #  BLANK R2
024208,000516: 35,3241           05526                           TC       BLANKET                               
024209,000517: 35,3242           15217                           TCF      ENDOFJOB                              
024210,000518: 35,3243  E4,1767                                  EBANK=   RTRN                                  
024211,000519: 
024212,000520: 35,3243           00006        VNCOMP17           EXTEND                                         
024213,000521: 35,3244           23766                           QXCH     QSAVED                                
024214,000522: 35,3245           55765                           TS       VERBNOUN                              
024215,000523: 35,3246           31765                           CA       VERBNOUN                              
024216,000524: 35,3247           04662                           TCR      BANKCALL                              
024217,000525: 35,3250           20720                           CADR     GOFLASH                               
024218,000526: 35,3251           03246                           TC       -3                                    #  TERMINATE ILLEGAL REDISPLAY
024219,000527: 35,3252           01766                           TC       QSAVED                                #  PROCEED
024220,000528: 35,3253           40154                           CS       MPAC                                  #  RECYCLE WITH NEW TPI TIME
024221,000529: 35,3254           65012                           AD       BIT6                                  #  OR PROCEED WITH NEW SEARCH OPTION
024222,000530: 35,3255           00006                           EXTEND                                         

Page 561

024224,000532: 35,3256           13160                           BZF      P17.1                                 
024225,000533: 35,3257           03246                           TC       VNCOMP17   +3                         
024226,000534: 35,3260           77414        ALARUMS            SET      EXIT                                  
024227,000535: 35,3261           00470                                    UPDATFLG                              
024228,000536: 35,3262           05650                           TC       ALARM                                 
024229,000537: 35,3263           00124                           OCT      00124                                 #  NO SAFE PERCENTER IN THIS SECTOR
024230,000538: 35,3264           35050                           CAF      V05N09                                
024231,000539: 35,3265           03243                           TC       VNCOMP17                              
024232,000540: 35,3266           04106                           TC       GOTOPOOH                              #  PROCEED ILLEGAL TERMINATE PROGRAM
024233,000541: 35,3267           01510        V06N72             VN       0672                                  
024234,000542: 

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