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 Peter McDermott. 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:

	YUL SYSTEM FOR AGC: NEW PROGRAM SHEPATIN BY EYLES
	DEC 13, 1966

	THIS PROGRAM WAS ASSEMBLED AS A VERSION OF REVISION 37 
        OF PROGRAM SUNBURST BY LEM GROUP
Note that the date is the date of the printout, not the date of the program revision.

035895,000002:                                                                                                  ## Copyright:   Public domain.
035896,000003:                                                                                                  ## Filename:    THROTTLE_CONTROL.agc
035897,000004:                                                                                                  ## Purpose:     A section of Sunburst revision 37, or Shepatin revision 0.
035898,000005:                                                                                                  ##              It is part of an early development version of the software
035899,000006:                                                                                                  ##              for Apollo Guidance Computer (AGC) on the unmanned Lunar
035900,000007:                                                                                                  ##              Module (LM) flight Apollo 5. Sunburst 37 was the program
035901,000008:                                                                                                  ##              upon which Don Eyles's offline development program Shepatin
035902,000009:                                                                                                  ##              was based; the listing herein transcribed was actually for
035903,000010:                                                                                                  ##              the equivalent revision 0 of Shepatin.
035904,000011:                                                                                                  ##              This file is intended to be a faithful transcription, except
035905,000012:                                                                                                  ##              that the code format has been changed to conform to the
035906,000013:                                                                                                  ##              requirements of the yaYUL assembler rather than the
035907,000014:                                                                                                  ##              original YUL assembler.
035908,000015:                                                                                                  ## Reference:   pp. 795-801
035909,000016:                                                                                                  ## Assembler:   yaYUL
035910,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
035911,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
035912,000019:                                                                                                  ## Mod history: 2017-05-24 MAS  Created from Sunburst 120.
035913,000020:                                                                                                  ##              2017-06-09 HG   Transcribed
035914,000021:                                                                                                  ##              2017-06-15 HG   Fix operator DXCH -> DAS
035915,000022:                                                                                                  ##              2017-06-23 RSB  Proofed comment text with
035916,000023:                                                                                                  ##                              octopus/ProoferComments.
035917,000024: 

Page 795

035919,000026: 30,3356                                           BANK     30                                    
035920,000027: 30,3356  E5,1557                                  EBANK=   ETHROT                                
035921,000028: 
035922,000029: 
035923,000030:                                                                                                  #    INPUTS TO THROTTLE CONTROL ARE /A/ AND /AFC/, ACCELERATIONS PRESENT
035924,000031: 
035925,000032:                                                                                                  #  AND DESIRED, SCALED IN UNITS OF 2(-5) M/CS/CS, AND MASS IN UNITS OF
035926,000033:                                                                                                  #  2(15) KILOGRAMS.
035927,000034:                                                                                                  #    THIS PROGRAM CAUSES THE THROTTLE TO RESPOND TO ACCELERATION COMMANDS
035928,000035:                                                                                                  #  IN THE MANNER DESCRIBED BY FIGURE 5.3-5 OF THE FLIGHT 206 GSOP.
035929,000036: 
035930,000037:                                                                                                  #  ***************
035931,000038:                                                                                                  #  * SUBROUTINES *
035932,000039:                                                                                                  #  ***************
035933,000040: 
035934,000041:                                                                                                  #  THIS SUBROUTINE MULTIPLIES ACCELERATION
035935,000042:                                                                                                  #  (ARRIVING IN A AND L) BY MASS AND LEAVES
035936,000043:                                                                                                  #  FORCE (THRUST) IN A AND L, SCALED AT
035937,000044: 
035938,000045:                                                                                                  #  ABOUT 3.3 POUNDS PER BIT.
035939,000046: 30,3356           00006        MASSMULT           EXTEND                                         
035940,000047: 30,3357           22120                           QXCH     BUF                                   #  PRESERVING RETURN ADDRESS
035941,000048: 30,3360           52145                           DXCH     MPAC                                  
035942,000049: 30,3361           07146                           TC       DMP                                   #  LEAVES ODDLY SCALED FORCE IN MPAC
035943,000050: 30,3362           01332                           ADRES    MASS                                  
035944,000051: 30,3363           07146                           TC       DMP                                   #  LEAVES PROPERLY SCALED FORCE IN MPAC
035945,000052: 30,3364           03526                           ADRES    SCALEFAC                              
035946,000053: 30,3365           52146                           DXCH     MPAC       +1                         #  LOADING FORCE INTO A AND L
035947,000054: 30,3366           00120                           TC       BUF                                   
035948,000055: 

Page 796

035950,000057:                                                                                                  #  ***********
035951,000058: 
035952,000059:                                                                                                  #  * ENTRIES *
035953,000060:                                                                                                  #  ***********
035954,000061: 
035955,000062:                                                                                                  #  THIS ENTRY SETS UP A JOB WHICH WILL
035956,000063:                                                                                                  #  DELIVER A SPECIFIED FRACTION OF MAXIMUM
035957,000064:                                                                                                  #  THRUST.   THIS FRACTION ARRIVES (SP) IN
035958,000065:                                                                                                  #  REGISTER PCNTF.
035959,000066: 
035960,000067: 30,3367           53567        PCNTFMAX           DXCH     RTNHOLD                               #  RETAINING 2CADR FOR RETURN TO USER
035961,000068: 30,3370           35665                           CAF      PRIO25                                
035962,000069: 
035963,000070: 30,3371           00004                           INHINT                                         
035964,000071: 30,3372           05523                           TC       NOVAC                                 
035965,000072: 30,3373  E5,1557                                  EBANK=   ETHROT                                
035966,000073: 30,3373           03410 60065                     2CADR    PCNTJOB                               
035967,000074: 
035968,000075: 30,3375           00003                           RELINT                                         
035969,000076: 30,3376           13406                           TCF      AWAY                                  
035970,000077: 
035971,000078:                                                                                                  #  NORMAL ENTRY FROM GUIDANCE EQUATIONS:
035972,000079:                                                                                                  #                                          THE JOB SET UP HERE DELIVERS A THRUST
035973,000080:                                                                                                  #  CORRESPONDING TO THE DESIRED MAGNITUDE
035974,000081:                                                                                                  #  OF THRUST-ACCELERATION.   THIS VALUE
035975,000082: 
035976,000083:                                                                                                  #  ARRIVES (DP) IN /ACF/.
035977,000084: 
035978,000085: 30,3377           53567        THROTCON           DXCH     RTNHOLD                               #  RETAINING 2CADR FOR RETURN TO USER
035979,000086: 30,3400           35226                           CAF      PRIO30                                
035980,000087: 30,3401           00004                           INHINT                                         
035981,000088: 30,3402           05523                           TC       NOVAC                                 
035982,000089: 30,3403  E5,1557                                  EBANK=   ETHROT                                
035983,000090: 30,3403           03422 60065                     2CADR    ACCLJOB                               
035984,000091: 
035985,000092: 30,3405           00003                           RELINT                                         
035986,000093: 
035987,000094:                                                                                                  #  THIS RETURN IS COMMON TO BOTH ENTRIES.
035988,000095: 
035989,000096: 30,3406           53567        AWAY               DXCH     RTNHOLD                               
035990,000097: 30,3407           52006                           DTCB                                           
035991,000098: 

Page 797

035993,000100:                                                                                                  #  ***************
035994,000101:                                                                                                  #  * COMPUTATION *
035995,000102:                                                                                                  #  ***************
035996,000103: 
035997,000104: 30,3410           04147        PCNTJOB            TC       PHASCHNG                              
035998,000105: 30,3411           04024                           OCT      04024                                 #  ?
035999,000106: 
036000,000107: 
036001,000108: 30,3412           00006                           EXTEND                                         
036002,000109: 30,3413           43521                           DCS      -FMAX                                 
036003,000110: 30,3414           52145                           DXCH     MPAC                                  
036004,000111: 30,3415           31335                           CA       PCNTF                                 
036005,000112: 30,3416           07351                           TC       SHORTMP                               
036006,000113: 30,3417           52145                           DXCH     MPAC                                  #  LOADING
036007,000114: 30,3420           53563                           DXCH     FC                                    #  STORING
036008,000115: 30,3421           13430                           TCF      FOLDCALC                              
036009,000116: 
036010,000117: 
036011,000118: 
036012,000119: 30,3422  30,3422               ACCLJOB            =        FCCALC                                
036013,000120: 
036014,000121: 30,3422           04147        FCCALC             TC       PHASCHNG                              
036015,000122: 30,3423           04024                           OCT      04024                                 #  ?
036016,000123: 
036017,000124: 30,3424           00006                           EXTEND                                         
036018,000125: 30,3425           31335                           DCA      /ACF/                                 
036019,000126: 30,3426           03356                           TC       MASSMULT                              
036020,000127: 30,3427           53563                           DXCH     FC                                    #  FC = MASS /ACF/, SCALED
036021,000128: 
036022,000129: 
036023,000130: 
036024,000131: 30,3430           00006        FOLDCALC           EXTEND                                         
036025,000132: 30,3431           31337                           DCA      /AF/                                  
036026,000133: 30,3432           03356                           TC       MASSMULT                              
036027,000134: 30,3433           53560                           DXCH     FOLD                                  #  FOLD = MASS /AF/, SCALED
036028,000135: 
036029,000136: 
036030,000137: 
036031,000138:                                                                                                  #  AFTER FIRST ZEROING PIF, THIS ROUTINE
036032,000139:                                                                                                  #  CHECKS THE ENGINE-OFF BIT.  IF THE
036033,000140:                                                                                                  #  ENGINE PROVES TO BE OFF FCOLD IS SET TO
036034,000141: 
036035,000142:                                                                                                  #  10 PERCENT FMAX, AND, SINCE /AF/ DOES
036036,000143:                                                                                                  #  NOT REFLECT THE 10 PERCENT SETTING OF
036037,000144:                                                                                                  #  THE HAND THROTTLE, -10 PERCENT FMAX
036038,000145:                                                                                                  #  IS ADDED INTO PIF.
036039,000146: 
036040,000147: 30,3434           37761        NEXTNEXT           CA       ZERO                                  
036041,000148: 30,3435           55564                           TS       PIF                                   
036042,000149: 30,3436           55565                           TS       PIF        +1                         
036043,000150: 30,3437           37740                           CA       BIT14                                 
036044,000151: 

Page 798

036046,000153: 30,3440           00006                           EXTEND                                         
036047,000154: 
036048,000155: 30,3441           02011                           RAND     11                                    
036049,000156: 30,3442           00006                           EXTEND                                         
036050,000157: 30,3443           13450                           BZF      WHERETO                               #  BRANCH HERE IF ENGINE IS ON
036051,000158: 30,3444           43524                           CS       -.1FMAX                               
036052,000159: 30,3445           55561                           TS       FCOLD                                 #  SETTING FCOLD
036053,000160: 30,3446           33524                           CA       -.1FMAX                               
036054,000161: 30,3447           55564                           TS       PIF                                   #  SETTING PIF
036055,000162: 

Page 799

036057,000164: 
036058,000165:                                                                                                  #  ************
036059,000166:                                                                                                  #  * DECISION *
036060,000167:                                                                                                  #  ************
036061,000168: 
036062,000169: 30,3450           31562        WHERETO            CA       FC                                    
036063,000170: 
036064,000171: 30,3451           63524                           AD       -.1FMAX                               
036065,000172: 30,3452           00006                           EXTEND                                         
036066,000173: 30,3453           63473                           BZMF     TIPTOE                                #  BRANCH IF FC < OR = 10 PERCENT FMAX
036067,000174: 30,3454           31562                           CA       FC                                    
036068,000175: 30,3455           63523                           AD       -.52FMAX                              
036069,000176: 30,3456           00006                           EXTEND                                         
036070,000177: 30,3457           63476                           BZMF     DOPIF                                 #  BRANCH IF FC < 52 PERCENT
036071,000178: 30,3460           41562                           CS       FC                                    
036072,000179: 30,3461           63522                           AD       .58FMAX                               
036073,000180: 30,3462           00006                           EXTEND                                         
036074,000181: 30,3463           63470                           BZMF     FLATOUT                               #  BRANCH IF FC > OR = 58 PERCENT FMAX,
036075,000182: 30,3464           31561                           CA       FCOLD                                 #    OTHERWISE, TEST FCOLD
036076,000183: 
036077,000184: 30,3465           63520                           AD       -FMAX                                 
036078,000185: 30,3466           00006                           EXTEND                                         
036079,000186: 30,3467           63476                           BZMF     DOPIF                                 #  BRANCH IF FCOLD < OR = 100 PERCENT FMAX,
036080,000187:                                                                                                  #   OTHERWISE (IN WHICH CASE FCOLD=HIGHT)
036081,000188:                                                                                                  #   PROCEED TO FLATOUT
036082,000189: 

Page 800

036084,000191:                                                                                                  #  *************
036085,000192: 
036086,000193:                                                                                                  #  * EXECUTION *
036087,000194:                                                                                                  #  *************
036088,000195: 
036089,000196: 30,3470           33517        FLATOUT            CA       2FMAX                                 
036090,000197: 30,3471           55562                           TS       FC                                    
036091,000198: 30,3472           13476                           TCF      DOPIF                                 
036092,000199: 
036093,000200: 30,3473           00006        TIPTOE             EXTEND                                         
036094,000201: 30,3474           43525                           DCS      -.1FMAX                               
036095,000202: 30,3475           53563                           DXCH     FC                                    
036096,000203: 
036097,000204: 30,3476           04147        DOPIF              TC       PHASCHNG                              
036098,000205: 30,3477           04024                           OCT      04024                                 #  ?
036099,000206: 
036100,000207: 30,3500           00006                           EXTEND                                         
036101,000208: 30,3501           31563                           DCA      FC                                    
036102,000209: 30,3502           55561                           TS       FCOLD                                 #  HISTORY
036103,000210: 30,3503           21565                           DAS      PIF                                   #  OKAY SINCE PIF PREVIOUSLY WAS ZEROED
036104,000211: 30,3504           00006                           EXTEND                                         
036105,000212: 30,3505           41560                           DCS      FOLD                                  
036106,000213: 30,3506           21565                           DAS      PIF                                   #  PIF = FC - FOLD + PRESETTING (IF ANY)
036107,000214: 30,3507           31564                           CA       PIF                                   
036108,000215: 
036109,000216: 
036110,000217: 30,3510           54055        DOIT               TS       THRUST                                
036111,000218: 30,3511           37752                           CAF      BIT4                                  
036112,000219: 30,3512           00006                           EXTEND                                         
036113,000220: 30,3513           05014                           WOR      14                                    #  AND THE ENGINE DOES THE REST...
036114,000221: 
036115,000222: 30,3514           04147                           TC       PHASCHNG                              
036116,000223: 30,3515           04024                           OCT      04024                                 #  GROUP NUMBER NOT FINALIZED
036117,000224: 
036118,000225: 30,3516           15605                           TCF      ENDOFJOB                              
036119,000226: 

Page 801

036121,000228:                                                                                                  #  *************
036122,000229:                                                                                                  #  * CONSTANTS *
036123,000230:                                                                                                  #  *************
036124,000231: 
036125,000232:                                                                                                  #  CONSTANTS FOR DECISION
036126,000233: 
036127,000234: 30,3517           14400        2FMAX              DEC      +6400      B-14                       #  200% FMAX
036128,000235: 
036129,000236: 
036130,000237: 30,3520           06200 00000  -FMAX              2DEC     +3200      B-14                       #  100 % FMAX, NEGATIVE
036131,000238: 
036132,000239: 30,3522           03500        .58FMAX            DEC      +1856      B-14                       #   58 % FMAX
036133,000240: 
036134,000241: 30,3523           74601        -.52FMAX           DEC      -1662      B-14                       #  JUST UNDER 52 % FMAX, NEGATIVE
036135,000242: 
036136,000243: 30,3524           77277 77777  -.1FMAX            2DEC     -320       B-14                       #   10 % FMAX. NEGATIVE
036137,000244: 
036138,000245: 30,3526           00056 32570  SCALEFAC           2DEC     46.835424  B-14                       #  ABOUT 10000/(3 16 4.4482)  B-14

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