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.

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

Page 795

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

Page 796

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

Page 797

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

Page 798

036039,000153: 30,3440           00006                           EXTEND                                         
036040,000154: 
036041,000155: 30,3441           02011                           RAND     11                                    
036042,000156: 30,3442           00006                           EXTEND                                         
036043,000157: 30,3443           13450                           BZF      WHERETO                               #  BRANCH HERE IF ENGINE IS ON
036044,000158: 30,3444           43524                           CS       -.1FMAX                               
036045,000159: 30,3445           55561                           TS       FCOLD                                 #  SETTING FCOLD
036046,000160: 30,3446           33524                           CA       -.1FMAX                               
036047,000161: 30,3447           55564                           TS       PIF                                   #  SETTING PIF
036048,000162: 

Page 799

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

Page 800

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

Page 801

036114,000228:                                                                                                  #  *************
036115,000229:                                                                                                  #  * CONSTANTS *
036116,000230:                                                                                                  #  *************
036117,000231: 
036118,000232:                                                                                                  #  CONSTANTS FOR DECISION
036119,000233: 
036120,000234: 30,3517           14400        2FMAX              DEC      +6400      B-14                       #  200% FMAX
036121,000235: 
036122,000236: 
036123,000237: 30,3520           06200 00000  -FMAX              2DEC     +3200      B-14                       #  100 % FMAX, NEGATIVE
036124,000238: 
036125,000239: 30,3522           03500        .58FMAX            DEC      +1856      B-14                       #   58 % FMAX
036126,000240: 
036127,000241: 30,3523           74601        -.52FMAX           DEC      -1662      B-14                       #  JUST UNDER 52 % FMAX, NEGATIVE
036128,000242: 
036129,000243: 30,3524           77277 77777  -.1FMAX            2DEC     -320       B-14                       #   10 % FMAX. NEGATIVE
036130,000244: 
036131,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