Source Code

These source-code files were transcribed from a printout in Don Eyles's personal collection, scanned by archive.org, and financially sponsored by Linden Sims. A team of volunteers performed the transcription and proof-reading. The scanned page images are available at the Virtual AGC Project website, as well as higher-quality (but much larger) images at the Virtual AGC Project's collection in the Internet Archive. Report any problems by creating "issues" at the Virtual AGC Project's GitHub Repository.

Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 56 OF AGC PROGRAM ZERLINA BY ZOROASTER
	9:12 OCT. 21,1970
Note that the date is the date of the printout, not the date of the program revision.

034502,000002:                                                                                                  ## Copyright:   Public domain.
034503,000003:                                                                                                  ## Filename:    THROTTLE_CONTROL_ROUTINES.agc
034504,000004:                                                                                                  ## Purpose:     A log section of Zerlina 56, the final revision of
034505,000005:                                                                                                  ##              Don Eyles's offline development program for the variable 
034506,000006:                                                                                                  ##              guidance period servicer. It also includes a new P66 with LPD 
034507,000007:                                                                                                  ##              (Landing Point Designator) capability, based on an idea of John 
034508,000008:                                                                                                  ##              Young's. Neither of these advanced features were actually flown,
034509,000009:                                                                                                  ##              but Zerlina was also the birthplace of other big improvements to
034510,000010:                                                                                                  ##              Luminary including the terrain model and new (Luminary 1E)
034511,000011:                                                                                                  ##              analog display programs. Zerlina was branched off of Luminary 145,
034512,000012:                                                                                                  ##              and revision 56 includes all changes up to and including Luminary
034513,000013:                                                                                                  ##              183. It is therefore quite close to the Apollo 14 program,
034514,000014:                                                                                                  ##              Luminary 178, where not modified with new features.
034515,000015:                                                                                                  ## Reference:   pp. 779-783
034516,000016:                                                                                                  ## Assembler:   yaYUL
034517,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
034518,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
034519,000019:                                                                                                  ## Mod history: 2017-07-28 MAS  Created from Luminary 210.
034520,000020:                                                                                                  ##              2017-08-19 MAS  Updated for Zerlina 56.
034521,000021:                                                                                                  ##              2017-08-24 MAS  Corrected some instructions related to storing to PIF.
034522,000022: 

Page 779

034524,000024:                                                                                                  #  T  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  E
034525,000025:                                                                                                  #   H  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  Y
034526,000026:                                                                                                  #    R  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  L
034527,000027:                                                                                                  #     O  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  E
034528,000028:                                                                                                  #      T  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  S
034529,000029: 
034530,000030: 31,2000                                           SETLOC   FTHROT                                
034531,000031: 31,2000                                           BANK                                           
034532,000032: 31,2144                                           COUNT*   $$/THROT                              
034533,000033: 31,2144  E7,1612                                  EBANK=   PIF                                   
034534,000034: 
034535,000035:                                                                                                  #      ENTER HERE FROM P66ROD WITH PIF IN A.
034536,000036: 
034537,000037: 31,2144           00006        P66THROT           EXTEND                                         
034538,000038: 31,2145           23607                           QXCH     RTNHOLD                               
034539,000039: 31,2146           55612                           TS       PIF                                   
034540,000040: 31,2147           12250                           TCF      DOITP66                               
034541,000041: 
034542,000042:                                                                                                  #      ENTER HERE IN P63 AND P64.  FIRST COMPUTE FP (PRESENT THRUST) AND FC (DESIRED THRUST) IN OUTPUT BIT UNITS.
034543,000043: 
034544,000044: 31,2150           31247        THROTTLE           CA       ABDELV                                #  COMPUTE PRESENT ACCELERATION IN UNITS OF
034545,000045: 31,2151           00006                           EXTEND                                         #    2(-4) M/CS/CS, SAVING SERVICER TROUBLE
034546,000046: 31,2152           72356                           MP       /AF/CNST                              
034547,000047: 31,2153           00006                           EXTEND                                         
034548,000048: 31,2154           23607                           QXCH     RTNHOLD                               
034549,000049: 31,2155           02337        AFDUMP             TC       MASSMULT                              
034550,000050: 31,2156           53470                           DXCH     FP                                    #  FP = PRESENT THRUST
034551,000051: 31,2157           00006                           EXTEND                                         
034552,000052: 31,2160           31611                           DCA      FWEIGHT                               
034553,000053: 31,2161           21470                           DAS      FP                                    
034554,000054: 31,2162           53470                           DXCH     FP                                    
034555,000055: 31,2163           00006                           EXTEND                                         
034556,000056: 31,2164           75000                           MP       2SECS                                 
034557,000057: 31,2165           00006                           EXTEND                                         
034558,000058: 31,2166           11243                           DV       PGUIDE                                
034559,000059: 31,2167           55467                           TS       FP                                    
034560,000060: 
034561,000061: 31,2170           00006                           EXTEND                                         
034562,000062: 31,2171           31464                           DCA      /AFC/                                 
034563,000063: 31,2172           02337                           TC       MASSMULT                              
034564,000064: 31,2173           00004                           INHINT                                         #  PREVENT A DOWNRUPT
034565,000065: 31,2174           55615                           TS       FC                                    #  FC = THRUST DESIRED BY GUIDANCE
034566,000066: 31,2175           53466                           DXCH     FCODD                                 #  FCODD = WHAT IT IS GOING TO GET
034567,000067: 
034568,000068: 
034569,000069: 31,2176           00006                           EXTEND                                         
034570,000070: 31,2177           31234                           DCA      PIPTIME                               
034571,000071: 31,2200           53671                           DXCH     GTCTIME                               #  DOWNLINK TIME AGREEMENT
034572,000072: 31,2201           00003                           RELINT                                         
034573,000073: 

Page 780

034575,000075:                                                                                                  #      THIS LOGIC DETERMINES THE THROTTLING IN THE REGION 10% - 94%.   THE MANUAL THROTTLE, NOMINALLY SET AT
034576,000076:                                                                                                  #  MINIMUM BY THE ASTRONAUT, PROVIDES THE LOWER BOUND.   A STOP IN THE THROTTLE HARDWARE PROVIDES THE UPPER.
034577,000077: 
034578,000078: 31,2202           35014        WHERETO            CA       EBANK5                                #  INITIALIZE L*WCR*T AND H*GHCR*T FROM
034579,000079: 31,2203           54003                           TS       EBANK                                 #    PAD LOADED ERASABLES IN W-MATRIX
034580,000080: 31,2204  E5,1472                                  EBANK=   LOWCRIT                               
034581,000081: 31,2204           00006                           EXTEND                                         
034582,000082: 31,2205           31473                           DCA      LOWCRIT                               
034583,000083: 31,2206           52131                           DXCH     L*WCR*T                               
034584,000084: 31,2207           35016                           CA       EBANK7                                
034585,000085: 31,2210           54003                           TS       EBANK                                 
034586,000086: 31,2211  E7,1612                                  EBANK=   PIF                                   
034587,000087: 31,2211           44755                           CS       ZERO                                  #  INITIALIZE PIFPSET
034588,000088: 31,2212           55606                           TS       PIFPSET                               
034589,000089: 31,2213           40131                           CS       H*GHCR*T                              
034590,000090: 31,2214           61620                           AD       FCOLD                                 
034591,000091: 31,2215           00006                           EXTEND                                         
034592,000092: 31,2216           62230                           BZMF     LOWFCOLD                              #  BRANCH IF FCOLD < OR = HIGHCRIT
034593,000093: 31,2217           40130                           CS       L*WCR*T                               
034594,000094: 31,2220           61465                           AD       FCODD                                 
034595,000095: 31,2221           00006                           EXTEND                                         
034596,000096: 31,2222           62225                           BZMF     FCOMPSET                              #  BRANCH IF FC < OR = LOWCRIT
034597,000097: 31,2223           31467                           CA       FP                                    #  SEE NOTE 1
034598,000098: 31,2224           12235                           TCF      FLATOUT1                              
034599,000099: 
034600,000100: 31,2225           42002        FCOMPSET           CS       FMAXODD                               #  SEE NOTE 2
034601,000101: 31,2226           61467                           AD       FP                                    
034602,000102: 31,2227           12237                           TCF      FLATOUT2                              
034603,000103: 
034604,000104: 31,2230           40131        LOWFCOLD           CS       H*GHCR*T                              
034605,000105: 31,2231           61465                           AD       FCODD                                 
034606,000106: 31,2232           00006                           EXTEND                                         
034607,000107: 31,2233           62240                           BZMF     DOPIF                                 #  BRANCH IF FC < OR = HIGHCRIT
034608,000108: 
034609,000109: 31,2234           32003                           CA       FMAXPOS                               #  NO:   THROTTLE-UP
034610,000110: 31,2235           57465        FLATOUT1           XCH      FCODD                                 
034611,000111: 31,2236           34737                           CA       FEXTRA                                
034612,000112: 31,2237           55606        FLATOUT2           TS       PIFPSET                               
034613,000113: 
034614,000114:                                                                                                  #                                          NOTE 1   FC IS SET EQUAL TO FP SO PIF WILL BE ZERO.   THIS IS DESIRABLE
034615,000115:                                                                                                  #                                                   AS THERE IS ACTUALLY NO THROTTLE CHANGE.
034616,000116: 
034617,000117:                                                                                                  #                                          NOTE 2   HERE, SINCE WE ARE ABOUT TO RETURN TO THE THROTTLEABLE REGION
034618,000118:                                                                                                  #                                                   (BELOW 55%) THE QUANTITY -(FMAXODD - FP) IS COMPUTED AND PUT
034619,000119:                                                                                                  #                                                   INTO PIFPSET TO COMPENSATE FOR THE DIFFERENCE BETWEEN THE
034620,000120:                                                                                                  #                                                   NUMBER OF BITS CORRESPONDING TO FULL THROTTLE (FMAXODD) AND THE
034621,000121:                                                                                                  #                                                   NUMBER CORRESPONDING TO ACTUAL THRUST (FP).   THUS THE TOTAL
034622,000122:                                                                                                  #                                                   THROTTLE COMMAND PIF = FC - FP -(FMAXODD - FP) = FC - FMAXODD.
034623,000123: 
034624,000124: 31,2240           41467        DOPIF              CS       FP                                    #  COMPUTE PIF AND LIMIT IT TO 4096 BITS

Page 781

034626,000126: 31,2241           61465                           AD       FCODD                                 #    SO FWEIGHT COMPUTATION CAN'T OVERFLOW
034627,000127: 31,2242           54001                           TS       L                                     
034628,000128: 31,2243           34737                           CAF      BIT13                                 
034629,000129: 31,2244           04616                           TC       BANKCALL                              
034630,000130: 31,2245           61713                           CADR     LIMITSUB                              
034631,000131: 
034632,000132: 31,2246           55612        DOIT               TS       PIF                                   
034633,000133: 31,2247           61606                           AD       PIFPSET                               #  ADD IN PIFPSET, WITHOUT CHANGING PIF
034634,000134: 31,2250           57606        DOITP66            XCH      PIFPSET                               #  STASH IT IN PIFPSET FOR A MOMENT
034635,000135: 31,2251           34742                           CAF      BIT10                                 #  DOES PGNCS HAVE CONTROL?
034636,000136: 31,2252           00006                           EXTEND                                         
034637,000137: 31,2253           02030                           RAND     CHAN30                                
034638,000138: 31,2254           10000                           CCS      A                                     
034639,000139: 31,2255           12332                           TCF      ZILCH                                 #  NO:   AGS, DARN IT, ZERO AUTO-THROTTLE
034640,000140: 31,2256           31606                           CA       PIFPSET                               #  YES:  RETRIEVE OUTPUT AND PRESS ON
034641,000141: 31,2257           55614        THROTOUT           TS       PSEUDO55                              
034642,000142: 31,2260           54055                           TS       THRUST                                
034643,000143: 31,2261           34750                           CAF      BIT4                                  
034644,000144: 31,2262           00006                           EXTEND                                         
034645,000145: 31,2263           05014                           WOR      CHAN14                                
034646,000146: 
034647,000147:                                                                                                  #      SINCE /AF/ IS NOT AN INSTANTANEOUS ACCELERATION, BUT RATHER AN "AVERAGE" OF THE ACCELERATION LEVELS DURING
034648,000148:                                                                                                  #  THE PRECEEDING PIPA INTERVAL, AND SINCE FP IS COMPUTED DIRECTLY FROM /AF/, FP IN ORDER TO CORRESPOND TO THE
034649,000149:                                                                                                  #  ACTUAL THRUST LEVEL AT THE END OF THE INTERVAL MUST BE WEIGHTED BY
034650,000150: 
034651,000151:                                                                                                  #                                    PIF(PPROCESS + TL)     PIF /PIF/
034652,000152:                                                                                                  #                          FWEIGHT = ------------------ + -------------
034653,000153:                                                                                                  #                                          PGUID          2 PGUID FRATE
034654,000154: 
034655,000155:                                                                                                  #  WHERE PPROCESS IS THE TIME BETWEEN PIPA READING AND THE START OF THROTTLING, PGUID IS THE GUIDANCE PERIOD, AND
034656,000156:                                                                                                  #  FRATE IS THE THROTTLING RATE (32 UNITS PER CENTISECOND).  PGUID IS EITHER 1 OR 2 SECONDS. THE "TL" IN THE
034657,000157:                                                                                                  #  FIRST TERM REPRESENTS THE ENGINE'S RESPONSE LAG.   HERE FWEIGHT IS COMPUTED FOR USE NEXT PASS.
034658,000158: 
034659,000159: 31,2264           32360                           CAF      8SECS                                 
034660,000160: 31,2265           54002                           TS       Q                                     
034661,000161: 31,2266           00006                           EXTEND                                         
034662,000162: 31,2267           74747                           MP       BIT5                                  
034663,000163: 31,2270           22131                           LXCH     BUF        +1                         
034664,000164: 31,2271           41671                           CS       GTCTIME    +1                         #  TIME AT LAST PIPA READING.
034665,000165: 31,2272           60025                           AD       TIME1                                 

"AD THROTLAG" below is surrounded by drawn-in parentheses.

034667,000167: 31,2273           62004                           AD       THROTLAG                              #  COMPENSATE FOR ENGINE RESPONSE LAG
034668,000168: 31,2274           75004                           MASK     LOW9                                  #  MAKE SURE SMALL AND POSITIVE
034669,000169: 31,2275           22007                           ZL                                             
034670,000170: 31,2276           00006                           EXTEND                                         
034671,000171: 31,2277           10002                           DV       Q                                     
034672,000172: 31,2300           00006                           EXTEND                                         
034673,000173: 31,2301           71612                           MP       PIF                                   
034674,000174: 31,2302           20001                           DDOUBL                                         
034675,000175: 31,2303           20001                           DDOUBL                                         
034676,000176: 31,2304           53617                           DXCH     FWEIGHT1                              

Page 782

034678,000178: 31,2305           11612                           CCS      PIF                                   
034679,000179: 31,2306           64753                           AD       ONE                                   
034680,000180: 31,2307           12311                           TCF      +2                                    
034681,000181: 31,2310           64753                           AD       ONE                                   
034682,000182: 31,2311           00006                           EXTEND                                         
034683,000183: 31,2312           71612                           MP       PIF                                   
034684,000184: 31,2313           00006                           EXTEND                                         
034685,000185: 31,2314           10131                           DV       BUF        +1                         
034686,000186: 31,2315           27616                           ADS      FWEIGHT1                              
034687,000187:                                                                                                  #      COMPUTE DESIRED THRUST FOR DISPLAY AS A PERCENTAGE OF 10500 POUNDS.
034688,000188: 
034689,000189: 31,2316           31615                           CA       FC                                    
034690,000190: 31,2317           00006                           EXTEND                                         
034691,000191: 31,2320           72357                           MP       100/3727                              
034692,000192: 31,2321           55672                           TS       THRDISP                               #  FOR DISPLAY IN  N92
034693,000193: 
034694,000194: 31,2322           01607        THDUMP             TC       RTNHOLD                               
034695,000195: 
034696,000196: 
034697,000197:                                                                                                  #      FLATOUT THROTTLES UP THE DESCENT ENGINE, AND IS CALLED AS A BASIC SUBROUTINE.
034698,000198: 
034699,000199: 31,2323           34737        FLATOUT            CAF      BIT13                                 #  4096 PULSES
034700,000200: 31,2324           55606        WHATOUT            TS       PIFPSET                               #  USE PIFPSET SO FWEIGHT WILL BE ZERO
034701,000201: 31,2325           44755                           CS       ZERO                                  
034702,000202: 31,2326           55620                           TS       FCOLD                                 
034703,000203: 31,2327           00006                           EXTEND                                         
034704,000204: 31,2330           23607                           QXCH     RTNHOLD                               
034705,000205: 31,2331           12246                           TCF      DOIT                                  
034706,000206: 
034707,000207: 
034708,000208:                                                                                                  #      DO WHAT HAS TO BE DONE WHEN AGS HAS CONTROL.
034709,000209: 
034710,000210: 31,2332           44755        ZILCH              CS       ZERO                                  #  COME HERE WHEN IN AGS TO ZERO THE AUTO-
034711,000211: 31,2333           55612                           TS       PIF                                   #    THROTTLE.  FIRST SET PIF AND FC SO THE
034712,000212: 31,2334           55615                           TS       FC                                    #    FWEIGHT AND N92 DISPLAY COMPUTATIONS
034713,000213: 31,2335           44737                           CS       FEXTRA                                #    WILL COME OUT RIGHTER.  THEN GRAB A
034714,000214: 31,2336           12257                           TCF      THROTOUT                              #    BATCH OF NEG BITS AND RETURN.
034715,000215: 
034716,000216:                                                                                                  #      MASSMULT SCALES ACCELERATION, ARRIVING IN A AND L IN UNITS OF 2(-4) M/CS/CS, TO FORCE IN PULSE UNITS.
034717,000217: 
034718,000218: 31,2337           52155        MASSMULT           DXCH     MPAC                                  
034719,000219: 31,2340           00006                 +1        EXTEND                                         
034720,000220: 31,2341           22130                           QXCH     BUF                                   
034721,000221: 31,2342           07115                           TC       DMP                                   
034722,000222: 31,2343           01245                           ADRES    MASS                                  
034723,000223: 31,2344           07115                           TC       DMP                                   #  LEAVES PROPERLY SCALED FORCE IM MPAC
034724,000224: 31,2345           02005                           ADRES    SCALEFAC                              
034725,000225: 31,2346           07271                           TC       TPAGREE                               
034726,000226: 31,2347           30154                           CA       MPAC                                  
034727,000227: 31,2350           00006                           EXTEND                                         

Page 783

034729,000229: 31,2351           12354                           BZF      +3                                    
034730,000230: 31,2352           34733                           CAF      POSMAX                                
034731,000231: 31,2353           00130                           TC       BUF                                   
034732,000232: 31,2354           52156                           DXCH     MPAC       +1                         
034733,000233: 31,2355           00130                           TC       BUF                                   
034734,000234: 
034735,000235: 
034736,000236:                                                                                                  #            CONSTANTS:-
034737,000237: 
034738,000238: 31,2356     4737               FEXTRA             =        BIT13                                 #  FEXT        +5.13309020 E+4
034739,000239: 
034740,000240: 31,2356           04143        /AF/CNST           DEC      .13107                                
034741,000241: 
034742,000242: 31,2357           00670        100/3727           DEC      .02683                                
034743,000243: 
034744,000244: 31,2360           01440        8SECS              DEC      +800       B-14                       
034745,000245: 
034746,000246:                                                                                                  #  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *
034747,000247:                                                                                                  #   *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *
034748,000248:                                                                                                  #    *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *
034749,000249: 
034750,000250:                                                                                                  #    *  *  *  *  *  *  *  *  *  *  *  *  *

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