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.

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

Page 779

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

Page 780

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

Page 781

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

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

034658,000167: 31,2273           62004                           AD       THROTLAG                              #  COMPENSATE FOR ENGINE RESPONSE LAG
034659,000168: 31,2274           75004                           MASK     LOW9                                  #  MAKE SURE SMALL AND POSITIVE
034660,000169: 31,2275           22007                           ZL                                             
034661,000170: 31,2276           00006                           EXTEND                                         
034662,000171: 31,2277           10002                           DV       Q                                     
034663,000172: 31,2300           00006                           EXTEND                                         
034664,000173: 31,2301           71612                           MP       PIF                                   
034665,000174: 31,2302           20001                           DDOUBL                                         
034666,000175: 31,2303           20001                           DDOUBL                                         
034667,000176: 31,2304           53617                           DXCH     FWEIGHT1                              

Page 782

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

Page 783

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

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