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.

034296,000002:                                                                                                  ## Copyright:   Public domain.
034297,000003:                                                                                                  ## Filename:    THRUST_MISSION_CONTROL_PROGRAM_TJS.agc
034298,000004:                                                                                                  ## Purpose:     A section of Sunburst revision 37, or Shepatin revision 0.
034299,000005:                                                                                                  ##              It is part of an early development version of the software
034300,000006:                                                                                                  ##              for Apollo Guidance Computer (AGC) on the unmanned Lunar
034301,000007:                                                                                                  ##              Module (LM) flight Apollo 5. Sunburst 37 was the program
034302,000008:                                                                                                  ##              upon which Don Eyles's offline development program Shepatin
034303,000009:                                                                                                  ##              was based; the listing herein transcribed was actually for
034304,000010:                                                                                                  ##              the equivalent revision 0 of Shepatin.
034305,000011:                                                                                                  ##              This file is intended to be a faithful transcription, except
034306,000012:                                                                                                  ##              that the code format has been changed to conform to the
034307,000013:                                                                                                  ##              requirements of the yaYUL assembler rather than the
034308,000014:                                                                                                  ##              original YUL assembler.
034309,000015:                                                                                                  ## Reference:   pp. 763-776
034310,000016:                                                                                                  ## Assembler:   yaYUL
034311,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
034312,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
034313,000019:                                                                                                  ## Mod history: 2017-05-24 MAS  Created from Sunburst 120.
034314,000020:                                                                                                  ##              2017-06-03 MAS  Transcribed.
034315,000021:                                                                                                  ##              2017-06-08 HG   Fix operand SETDVCNT -> DVSELECT
034316,000022:                                                                                                  ##                              Remove non existent section
034317,000023:                                                                                                  ##              2017-06-23 RSB  Proofed comment text with
034318,000024:                                                                                                  ##                              octopus/ProoferComments.
034319,000025: 

Page 763

034321,000027:                                                                                                  #  **SERVICER ROUTINES**
034322,000028: 
034323,000029:                                                                                                  #        MOD NO. 00      MODIFICATION BY A. KOSMALA      NOV. 1966
034324,000030: 
034325,000031: 
034326,000032: 
034327,000033:                                                                                                  #    *FUNCTIONAL DESCRIPTION*
034328,000034: 
034329,000035:                                                                                                  #      THE THRUST MISSION CONTROL PROGRAM TJS IS USED BY ALL MISSION PHASES WHICH INCLUDE A BURN.
034330,000036: 
034331,000037:                                                                                                  #      THE NORMAL ENTRY TO THE THRUST MISSION CONTROL PROGRAM IS THROUGH PREREAD.  PREREAD SCHEDULES THE JOB
034332,000038:                                                                                                  #  LASTBIAS.  BOOST PHASE ENTERS THE PREREAD ROUTINE AT BIBIBIAS, BYPASSING THE LASTBIAS JOB.  PIPS ARE CLEARED,
034333,000039:                                                                                                  #  AVERAGE G FLAG IS SET, DRIFT FLAG IS UNSET.  DV MONITOR AND FINDCUD ARE INITIALIZED, THE JOB NORMLIZE IS
034334,000040:                                                                                                  #  SCHEDULED, AND A WAITLIST CALL IS MADE TO START READACCS IN TWO SECONDS.
034335,000041: 
034336,000042:                                                                                                  #      NORMLIZE PERFORMS THE SCALING AND INITIALIZATION REQUIRED PRIOR TO THE FIRST ENTRY TO AVERAGE G.
034337,000043: 
034338,000044:                                                                                                  #      IN THE READACCS SECTION, THE ACCELEROMETERS ARE READ BY THE PIPASR SUBROUTINE.  IF THE AVERAGE G FLAG IS
034339,000045:                                                                                                  #  SET, READACCS IS CALLED TO RECYCLE IN TWO SECONDS.  IF THE AVERAGE G FLAG IS DOWN, AVERAGE G EXIT (AVEGEXIT)
034340,000046: 
034341,000047:                                                                                                  #  IS SET FOR THE FINAL PASS, AND READACCS IS NOT CALLED AGAIN.  IN EITHER CASE, THE SERVICER JOB IS ESTABLISHED.
034342,000048: 
034343,000049:                                                                                                  #      THE SERVICER ROUTINE CHECKS FOR RUNAWAY PIPS (DELV GREATER THAN 3200 PULSES/SEC FOR 2 SEC) AND SENDS
034344,000050:                                                                                                  #  ALARM CODE 205 IF BAD PIP IS FOUND.  PIPS ARE COMPENSATED IN 1/PIPA SUBROUTINE, MASS IS UPDATED BY MASSMON
034345,000051:                                                                                                  #  SUBROUTINE, AND CONTROL IS TRANSFERRED TO THE MONITOR SPECIFIED BY DVSELECT.   DVSELECT IS SET BY THE BOOST
034346,000052:                                                                                                  #  PHASE TO BOOSTMON, AND BY THE ENGINEON ROUTINE TO PGNCSMON.  USERS STARTING SERVICER BEFORE THE ENGINE IS
034347,000053:                                                                                                  #  TURNED ON SHOULD INSURE BYPASSING DVMON INITIALLY BY SETTING DVSELECT TO THE GENADR OF AVERAGE G.
034348,000054: 
034349,000055:                                                                                                  #      THE BOOST MONITOR (BOOSTMON) CHECKS DELV AGAINST THRSHLD+, THE THRESHOLD ACCELERATION FOR THE BOOST PHASE.
034350,000056:                                                                                                  #  IF DELV IS BELOW THRESHOLD, INDICATING TERMINATION OF BOOST, MISSION PHASE 6 IS SCHEDULED AS A JOB, DVSELECT
034351,000057: 
034352,000058:                                                                                                  #  IS ALTERED TO BYPASS BOOSTMON AND PROCEED DIRECTLY TO AVERAGE G.
034353,000059: 
034354,000060:                                                                                                  #      THE PGNCS MONITOR (PGNCSMON) COMPARES ACTUAL THRUST TO THE THRESHOLD VALUE FOR THE +X ACCELERATION
034355,000061:                                                                                                  #  (100 CM/SEC).  IF THRUST IS FOUND BELOW THIS VALUE FOR TWO CYCLES (I.E., FOUR SECONDS) AS DETERMINED BY DVCNTR,
034356,000062:                                                                                                  #  A JOB IS SCHEDULED TO BRANCH TO THE LOCATION SPECIFIED BY DVMNEXIT, PREVIOUSLY SET BY THE USERS PROGRAM.
034357,000063:                                                                                                  #  DVSELECT IS ALTERED TO BYPASS PGNCSMON, AND CONTROL IS TRANSFERRED TO AVERAGE G.
034358,000064: 
034359,000065:                                                                                                  #      THE AVERAGE G ROUTINE UPDATES RN, VN, AND GDT/2 VECTORS, USING THE SUBROUTINE CALCRVG.  THE NORMAL EXIT IS
034360,000066:                                                                                                  #  THROUGH AVEGEXIT, WHICH MUST PREVIOUSLY HAVE BEEN SET BY THE USER.  THE  FINAL EXIT, SET INTO AVEGEXIT BY
034361,000067:                                                                                                  #  READACCS WHEN IT  FINDS THE AVERAGE G FLAG DOWN, SETS UP FREE FALL GYRO COMPENSATION, SETS THE DRIFT FLAG ON,
034362,000068:                                                                                                  #  PERFORMS AVETOMID ROUTINE, AND TRANSFERS CONTROL TO POOH, THUS CLEARING  ALL ACTIVITY UNTIL A NEW MISSION
034363,000069:                                                                                                  #  PHASE IS DUE.
034364,000070: 
034365,000071: 
034366,000072:                                                                                                  #  ***** WARNING TO USERS *****
034367,000073: 
034368,000074:                                                                                                  #  THE USER MUST SET DVMNEXIT TO THE 2CADR OF A JOB TO BE PERFORMED WHEN ENGINE SHUTDOWN IS DETECTED BY SERVICER.
034369,000075:                                                                                                  #  IN GENERAL, THE AVERAGE G FLAG WILL BE TURNED OFF BY THE USER AT THAT TIME, ALLOWING JUST ONE MORE PASS THROUGH
034370,000076:                                                                                                  #  AVERAGE G.  ALL ACTIVITY OF THE USERS MISSION PHASE MUST HAVE BEEN COMPLETED BEFORE THIS LAST PASS THROUGH
034371,000077:                                                                                                  #  AVERAGE G, DUE TO THE PERFORMANCE OF POOH AS DESCRIBED ABOVE.
034372,000078: 
034373,000079:                                                                                                  #      AVGEXIT MUST BE SET BY THE USER TO THE 2CADR OF THE JOB (E.G., STEERING) TO BE PERFORMED AFTER EACH PASS

Page 764

034375,000081:                                                                                                  #  THROUGH AVERAGE G.  IF NO OTHER JOB IS TO BE DONE, AVEGEXIT SHOULD BE SET TO SERVEXIT.
034376,000082: 
034377,000083: 
034378,000084:                                                                                                  #      USER MUST INITIALIZE DVSELECT TO THE GENADR OF AVERAGE G UNLESS THE ENGINEON ROUTINE HAS BEEN PERFORMED
034379,000085:                                                                                                  #  BEFORE THE START OF SERVICER.
034380,000086: 
034381,000087:                                                                                                  #      USERS (EXCEPT FOR BOOST PHASE) MUST PERFORM MTDTOAVE ROUTINE BEFORE STARTING PREREAD.
034382,000088: 
034383,000089: 
034384,000090: 
034385,000091:                                                                                                  #  CALLING SEQUENCE IS NORMAL WAITLIST CALL FOR PREREAD.  (READACCS WILL START TWO SECONDS LATER.)
034386,000092: 

Page 765

034388,000094:                                                                                                  #  SUBROUTINES CALLED
034389,000095: 
034390,000096:                                                                                                  #  LASTBIAS  PIPASR  FLAG1UP  FLAG2DWN  NORMLIZE  READACCS  SERVICER  1/PIPA  MASSMON  AVERAGE G  CALCRVG
034391,000097:                                                                                                  #  PHASCHNG  AVETOMID  POOH
034392,000098: 
034393,000099: 
034394,000100: 
034395,000101:                                                                                                  #  NORMAL EXIT MODES .. AVEGEXIT, DVMNEXIT, TASKOVER, ENDOFJOB.
034396,000102: 
034397,000103: 
034398,000104:                                                                                                  #  ALARM CODE 205 GIVEN IF RUNAWAY PIP.  PROGRAM THEN CONTINUES IN NORMAL SEQUENCE.
034399,000105: 
034400,000106: 
034401,000107: 
034402,000108:                                                                                                  #      ERASABLE INITIALIZATION REQUIRED
034403,000109: 
034404,000110:                                                                                                  #                 MASS .. INITIALIZED IN ERASABLE LOAD
034405,000111:                                                                                                  #                 RAVEGON AND VAVEGON .. INITIALIZED IN ERASABLE LOAD - UPDATED BEFORE EACH CALL FOR PREREAD.
034406,000112: 
034407,000113: 
034408,000114: 
034409,000115:                                                                                                  #  OUTPUT
034410,000116: 
034411,000117:                                                                                                  #  DELV(6)  RN(6)  VN(6)  GDT/2(6)  CDUTEMP(6)  MASS(2)  DELAREA(2)  PIPTIME(2)  OLDBT1(1)
034412,000118: 
034413,000119: 
034414,000120: 
034415,000121:                                                                                                  #  DEBRIS
034416,000122: 
034417,000123:                                                                                                  #       CENTRALS ... A, L, Q
034418,000124: 
034419,000125:                                                                                                  #       OTHER .... DVCNTR, ITEMP1, ITEMP2, RN1(6), VN1(6), GDT1/2(6), DAREATMP(2), MASSTEMP(2), PIPAGE, TEMX,
034420,000126: 
034421,000127:                                                                                                  #                  TEMY, TEMZ, TEMXY, PIPCTR
034422,000128: 
034423,000129: 
034424,000130:                                                                                                  #      *** THRUST MISSION CONTROL IS RESTART PROTECTED AND USES RESTART GROUP 5. *** 
034425,000131: 
034426,000132: 
034427,000133: 
034428,000134: 30,2000                                           BANK     30                                    
034429,000135: 30,2000  E5,1511                                  EBANK=   DVCNTR                                
034430,000136:                                                                                                  #  *************************************   PREREAD   **************************************************************
034431,000137: 
034432,000138: 30,2000           04147        PREREAD            TC       PHASCHNG                              
034433,000139: 30,2001           07015                           OCT      07015                                 
034434,000140: 30,2002           77777                           OCT      77777                                 
034435,000141: 
034436,000142: 30,2003  E5,1511                                  EBANK=   DVCNTR                                

Page 766

034438,000144: 30,2003           02011 60065                     2CADR    BIBIBIAS                              #  SKIP LASTBIAS AFTER RESTART
034439,000145: 
034440,000146: 
034441,000147: 30,2005           35671                           CAF      PRIO32                                
034442,000148: 30,2006           05523                           TC       NOVAC                                 
034443,000149: 30,2007  E3,1444                                  EBANK=   NBDX                                  
034444,000150: 30,2007           03571 24003                     2CADR    LASTBIAS                              #  DO LAST GYRO COMPENSATION IN FREE FALL
034445,000151: 
034446,000152: 30,2011           00006        BIBIBIAS           EXTEND                                         
034447,000153: 30,2012           32106                           DCA      PIP2CADR                              #  CLEAR + READ PIPS LAST TIME IN FREE FALL
034448,000154: 30,2013           52006                           DXCH     Z                                     
034449,000155: 
034450,000156: 30,2014           06020                           TC       FLAG1UP                               #  SET AVEG FLAG
034451,000157: 30,2015           00001                           OCT      1                                     
034452,000158: 
034453,000159: 
034454,000160: 30,2016           06045                           TC       FLAG2DWN                              #  KNOCK DOWN DRIFT FLAG
034455,000161: 30,2017           40000                           OCT      40000                                 
034456,000162: 
034457,000163: 30,2020           37755                           CAF      ONE                                   #  INITIALIZE DV MONITOR
034458,000164: 30,2021           55511                           TS       DVCNTR                                
034459,000165: 30,2022           37743                           CAF      EBANK4                                
034460,000166: 30,2023           54003                           TS       EBANK                                 
034461,000167: 30,2024  E4,1640                                  EBANK=   AXIS                                  #  CORCT IS DEAD, LONG LIVE AXIS
034462,000168: 
034463,000169: 30,2024           37740                           CAF      BIT14                                 #  INITIALIZE AXIS TO (0.5,0,0)
034464,000170: 30,2025           55640                           TS       AXIS                                  #  FOR FINDCDUD
034465,000171: 30,2026           37761                           CAF      ZERO                                  
034466,000172: 30,2027           55641                           TS       AXIS       +1                         
034467,000173: 30,2030           55642                           TS       AXIS       +2                         
034468,000174: 30,2031           55643                           TS       AXIS       +3                         
034469,000175: 30,2032           55644                           TS       AXIS       +4                         
034470,000176: 30,2033           55645                           TS       AXIS       +5                         
034471,000177: 
034472,000178: 30,2034           35662                           CAF      PRIO21                                #  SET UP TO DO NORMLIZE REQUIRED PRIOR
034473,000179: 30,2035           05534                           TC       FINDVAC                               #  TO FIRST ENTRY TO AVERAGE G.
034474,000180: 30,2036  E4,1514                                  EBANK=   RAVEGON                               
034475,000181: 30,2036           02317 60064                     2CADR    NORMLIZE                              
034476,000182: 
034477,000183: 
034478,000184: 30,2040           32154                           CAF      200DEC                                
034479,000185: 30,2041           05701                           TC       WAITLIST                              
034480,000186: 30,2042  E5,1511                                  EBANK=   DVCNTR                                
034481,000187: 30,2042           02047 60065                     2CADR    READACCS                              
034482,000188: 
034483,000189: 30,2044           04147                           TC       PHASCHNG                              
034484,000190: 30,2045           40025                           OCT      40025                                 
034485,000191: 
034486,000192: 30,2046           15745                           TCF      TASKOVER                              
034487,000193: 

Page 767

034489,000195:                                                                                                  #  *************************************   READACCS   *************************************************************
034490,000196: 30,2047  E5,1537                                  EBANK=   NEGXDV                                
034491,000197: 30,2047           00006        READACCS           EXTEND                                         
034492,000198: 30,2050           32106                           DCA      PIP2CADR                              
034493,000199: 30,2051           52006                           DXCH     Z                                     #  CALL PIPASR
034494,000200: 30,2052           11110                           CCS      PHASE5                                #  LAST PASS CHECK
034495,000201: 
034496,000202: 30,2053           12055                           TCF      +2                                    
034497,000203: 30,2054           15745                           TCF      TASKOVER                              
034498,000204: 30,2055           41110                           CS       PHASE5                                #  THESE 4 INSTRUCTIONS ONLY IN FOR
034499,000205: 30,2056           67760                           AD       FIVE                                  #  FAKESTART.  REMOVE IF REAL RESTARTS
034500,000206: 30,2057           00006                           EXTEND                                         #  RETURN.
034501,000207: 30,2060           15745                           BZF      TASKOVER                              
034502,000208: 
034503,000209: 30,2061           04147        PIPSDONE           TC       PHASCHNG                              
034504,000210: 30,2062           05015                           OCT      05015                                 
034505,000211: 30,2063           77777                           OCT      77777                                 
034506,000212: 
034507,000213: 30,2064           37754                           CAF      TWO                                   #  SHOW PIPS HAVE BEEN READ FOR REREADAC
034508,000214: 
034509,000215: 30,2065           55160                           TS       PIPAGE                                
034510,000216: 
034511,000217: 30,2066           40075        CHEKAVEG           CS       FLAGWRD1                              
034512,000218: 30,2067           77755                           MASK     BIT1                                  
034513,000219: 30,2070           10000                           CCS      A                                     #  IF AVEG FLAG DOWN SET FINAL EXIT AVEG
034514,000220: 30,2071           02107                           TC       AVEGOUT                               
034515,000221: 
034516,000222: 30,2072           32154                           CAF      200DEC                                #  READ PIPS AT 2 SECOND INTERVALS
034517,000223: 30,2073           05701                           TC       WAITLIST                              
034518,000224: 30,2074  E5,1570                                  EBANK=   BMEMORY                               
034519,000225: 
034520,000226: 30,2074           02047 60065                     2CADR    READACCS                              
034521,000227: 
034522,000228: 30,2076           37740        MAKESERV           CAF      PRIO20                                #  ESTABLISH SERVICER ROUTINE
034523,000229: 30,2077           05534                           TC       FINDVAC                               
034524,000230: 30,2100  E5,1570                                  EBANK=   BMEMORY                               
034525,000231: 30,2100           02115 60065                     2CADR    SERVICER                              
034526,000232: 
034527,000233: 30,2102           04147                           TC       PHASCHNG                              #  RESTART SERVICER AND READACCS
034528,000234: 30,2103           40065                           OCT      40065                                 #  SEE RESTART TABLES
034529,000235: 
034530,000236: 30,2104           15745                           TCF      TASKOVER                              #  END PREVIOUS READACCS WAITLIST TASK
034531,000237: 
034532,000238: 
034533,000239: 30,2105  E5,1570                                  EBANK=   BMEMORY                               
034534,000240: 30,2105           02506 60065  PIP2CADR           2CADR    PIPASR                                
034535,000241: 
034536,000242: 30,2107           00006        AVEGOUT            EXTEND                                         
034537,000243: 30,2110           32114                           DCA      AVOUTCAD                              
034538,000244: 30,2111           53073                           DXCH     AVGEXIT                               
034539,000245: 30,2112           12076                           TCF      MAKESERV                              
034540,000246: 
034541,000247: 30,2113  E5,1570                                  EBANK=   BMEMORY                               
034542,000248: 30,2113           02274 60065  AVOUTCAD           2CADR    AVGEND                                
034543,000249: 

Page 768

034545,000251:                                                                                                  #  *************************************   SERVICER   *************************************************************
034546,000252:                                                                                                  #  
034547,000253: 
034548,000254: 
034549,000255:                                                                                                  #  DO SAVEM AND RESTOREM LATER IF NORMAL RESTARTS SHOULD EVER RETURN
034550,000256: 
034551,000257: 30,2115           37754        SERVICER           CAF      TWO                                   
034552,000258: 30,2116           55512        PIPCHECK           TS       PIPCTR                                
034553,000259: 
034554,000260: 30,2117           60000                           DOUBLE                                         
034555,000261: 30,2120           50000                           INDEX    A                                     
034556,000262: 30,2121           10403                           CCS      DELVX                                 
034557,000263: 30,2122           02124                           TC       +2                                    
034558,000264: 
034559,000265: 30,2123           02132                           TC       PIPLOOP                               
034560,000266: 
034561,000267: 30,2124           62152                           AD       -MAXDELV                              #  DO PIPA-SATURATION TEST BEFORE
034562,000268: 30,2125           00006                           EXTEND                                         
034563,000269: 30,2126           62132                           BZMF     PIPLOOP                               #  COMPENSATION.
034564,000270: 
034565,000271: 30,2127           04744                           TC       ALARM                                 
034566,000272: 30,2130           00205                           OCT      00205                                 #  SATURATED-PIPA ALARM
034567,000273: 30,2131           02233                           TC       AVERAGEG                              
034568,000274: 
034569,000275: 30,2132           11512        PIPLOOP            CCS      PIPCTR                                
034570,000276: 30,2133           12116                           TCF      PIPCHECK                              
034571,000277: 
034572,000278: 
034573,000279: 30,2134           04147                           TC       PHASCHNG                              #  RESTART REREADAC + SERVICER
034574,000280: 30,2135           16035                           OCT      16035                                 
034575,000281: 30,2136           20000                           OCT      20000                                 
034576,000282: 30,2137  E5,1570                                  EBANK=   BMEMORY                               
034577,000283: 30,2137           02143 60065                     2CADR    GOMASS                                
034578,000284: 
034579,000285: 30,2141           05224                           TC       BANKCALL                              #  PIPA COMPENSATION CALL
034580,000286: 30,2142           25220                           CADR     1/PIPA                                
034581,000287: 
034582,000288: 30,2143           06103        GOMASS             TC       INTPRET                               
034583,000289: 30,2144           51575                           VLOAD    ABVAL                                 
034584,000290: 30,2145           00404                                    DELV                                  
034585,000291: 30,2146           36535                           STCALL   ABDELV                                
034586,000292: 30,2147           61146                                    MASSMON                               
034587,000293: 
034588,000294: 30,2150           77776                           EXIT                                           
034589,000295: 30,2151           01322                           TC       DVSELECT                              
034590,000296: 30,2152  30,2233               AGSMON             EQUALS   AVERAGEG                              
034591,000297: 
034592,000298: 30,2152           63401        -MAXDELV           DEC      -6398      B-14                       #  3200 PULSES/SEC FOR 2 SEC.  CCS TAKES 1.
034593,000299: 30,2153           00132        PLUSXDVA           DEC      90         B-14                       #  90 CM/SEC = ASCENT THRESHOLD
034594,000300: 30,2154           00310        200DEC             DEC      200        B-14                       
034595,000301: 
034596,000302: 
034597,000303: 30,2155           00062        PLUSXDVD           DEC      50         B-14                       #  50 CM/SEC = DESCENT THRESHOLD
034598,000304: 30,2156           37754        PGNCSMON           CAF      BIT2                                  #  CHECK CHANNEL 30 TO SEE IF STAGING HAS

Page 769

034600,000306: 30,2157           00006                           EXTEND                                         #  OCCURRED.  IF BIT2 IS ON WE ARE UNSTAGED
034601,000307: 30,2160           02030                           RAND     30                                    #  AND DESCENT PLUSXDV IS USED -- OTHERWISE
034602,000308: 30,2161           50000                           INDEX    A                                     #  THE ASCENT PLUSXDV IS EMPLOYED.
034603,000309: 30,2162           42153                           CS       PLUSXDVA                              
034604,000310: 30,2163           61534                           AD       ABDELV                                #  ACCELERATION
034605,000311: 30,2164           00006                           EXTEND                                         
034606,000312: 30,2165           62171                           BZMF     THRUSTLO                              
034607,000313: 
034608,000314: 
034609,000315: 30,2166           37755        RESETDV            CAF      ONE                                   
034610,000316: 30,2167           55511                           TS       DVCNTR                                #  THRUST OK. RESET DV MONITOR AND
034611,000317: 30,2170           12233                           TCF      AVERAGEG                              #  BRANCH TO AVERAGEG
034612,000318: 
034613,000319: 30,2171           31511        THRUSTLO           CA       DVCNTR                                
034614,000320: 30,2172           00006                           EXTEND                                         
034615,000321: 30,2173           62203                           BZMF     NODV                                  
034616,000322: 30,2174           04147                           TC       PHASCHNG                              
034617,000323: 30,2175           12035                           OCT      12035                                 
034618,000324: 30,2176  E5,1511                                  EBANK=   DVCNTR                                
034619,000325: 
034620,000326: 30,2176           02233 60065                     2CADR    AVERAGEG                              
034621,000327: 
034622,000328: 30,2200           00006                           EXTEND                                         
034623,000329: 30,2201           27511                           DIM      DVCNTR                                
034624,000330: 30,2202           12233                           TCF      AVERAGEG                              
034625,000331: 
034626,000332: 30,2203           35226        NODV               CAF      PRIO30                                #  SET UP HIGH PRIO FINDVAC TO DVEXIT
034627,000333: 30,2204           00004                           INHINT                                         
034628,000334: 30,2205           05534                           TC       FINDVAC                               
034629,000335: 30,2206  E5,1511                                  EBANK=   DVCNTR                                
034630,000336: 30,2206           02211 60065                     2CADR    DVEXIT                                
034631,000337: 
034632,000338: 
034633,000339: 30,2210           12225                           TCF      DVMNKILL   -1                         #  AND REMOVE DV MONITOR
034634,000340: 
034635,000341: 30,2211           00006        DVEXIT             EXTEND                                         #  BRANCH TO SELECTED LOCATION
034636,000342: 30,2212           31075                           DCA      DVMNEXIT                              
034637,000343: 30,2213           52006                           DXCH     Z                                     
034638,000344: 
034639,000345: 30,2214           41534        BOOSTMON           CS       ABDELV                                #  COMPARE ABDELV TO THRSHLD+ TO DETECT
034640,000346: 30,2215           62231                           AD       THRSHLD+                              #  BOOSTER SHUTDOWN
034641,000347: 30,2216           00006                           EXTEND                                         
034642,000348: 30,2217           62166                           BZMF     RESETDV                               
034643,000349: 
034644,000350: 30,2220           00004                           INHINT                                         #  SHUTDOWN HAS OCCURRED
034645,000351: 30,2221           37740                           CAF      PRIO20                                
034646,000352: 30,2222           05523                           TC       NOVAC                                 #  SET UP MISSION PHASE 6 JOB
034647,000353: 30,2223  E5,1570                                  EBANK=   BMEMORY                               
034648,000354: 30,2223           02463 56005                     2CADR    MP6JOB                                #  NO VAC AREA NEEDED
034649,000355: 
034650,000356: 30,2225           00003                 -1        RELINT                                         
034651,000357: 30,2226           32230        DVMNKILL           CAF      AVEGADDR                              #  REMOVE DV MONITOR FROM SERVICER
034652,000358: 30,2227           55322                           TS       DVSELECT                              
034653,000359: 

Page 770

034655,000361: 30,2230           02233        AVEGADDR           TC       AVERAGEG                              
034656,000362: 
034657,000363: 30,2231           00000 00000  THRSHLD+           2DEC     0.                                    #  TEMPORARY **************** PLEASE PATCH
034658,000364: 
034659,000365: 
034660,000366:                                                                                                  #  *********************************   FLAG SUBROUTINES   *********************************************************
034661,000367: 
034662,000368:    6020                                           BLOCK    03                                    
034663,000369:                                                                                                  #     THE FLAG SUBROUTINES ARE USED TO SET OR RESET FLAGS (BITS) IN FLAGWRD1 AND FLAGWRD2. THE BIT(S) TO BE SET OR
034664,000370:                                                                                                  #  RESET IS(ARE) INDICATED BY THE OCTAL NUMBER FOLLOWING THE TC CALL. THE CALLING SEQUENCES ARE -
034665,000371: 
034666,000372:                                                                                                  #                                                   TC     FLAG1UP         SET BIT(S) IN FLAGWRD1 CORRESPONDING TO
034667,000373: 
034668,000374:                                                                                                  #                                                   OCT    XXXXX           THE 1 BITS IN NUMBER XXXXX.
034669,000375: 
034670,000376:                                                                                                  #                                                   TC     FLAG1DWN        RESET BIT(S) IN FLAGWRD1 CORRESPONDING
034671,000377:                                                                                                  #                                                   OCT    XXXXX           TO THE 1 BITS IN NUMBER XXXXX.
034672,000378: 
034673,000379:                                                                                                  #  THE CALLING SEQUENCES FOR FLAGWRD2 ARE SIMILAR.
034674,000380: 
034675,000381:                                                                                                  #     NOTE THAT FLAGWRD1 AND FLAGWRD2 CORRESPOND TO INTERPRETIVE SWITCHES 15D THROUGH 44D.
034676,000382: 
034677,000383:                                                                                                  #           FLAGWORD BITS ARE DEFINED IN LOG SECTION "ERASABLE ASSIGNMENTS"
034678,000384: 
034679,000385:    6020           00004        FLAG1UP            INHINT                                         #  SET FLAG 1 SUBROUTINE
034680,000386:    6021           40075                           CS       FLAGWRD1                              
034681,000387:    6022           50002                           INDEX    Q                                     
034682,000388:    6023           70000                           MASK     0                                     
034683,000389:    6024           26075                           ADS      FLAGWRD1                              
034684,000390: 
034685,000391:    6025           00003                           RELINT                                         
034686,000392:    6026           17006                           TCF      Q+1                                   
034687,000393: 
034688,000394:    6027           00004        FLAG2UP            INHINT                                         #  SET FLAG 2 SUBROUTINE
034689,000395:    6030           40076                           CS       FLAGWRD2                              
034690,000396:    6031           50002                           INDEX    Q                                     
034691,000397: 
034692,000398:    6032           70000                           MASK     0                                     
034693,000399:    6033           26076                           ADS      FLAGWRD2                              
034694,000400: 
034695,000401:    6034           00003                           RELINT                                         
034696,000402:    6035           17006                           TCF      Q+1                                   
034697,000403: 
034698,000404:    6036           50002        FLAG1DWN           INDEX    Q                                     #  RESET FLAG 1 SUBROUTINE
034699,000405:    6037           40000                           CS       0                                     
034700,000406:    6040           00004                           INHINT                                         
034701,000407:    6041           70075                           MASK     FLAGWRD1                              
034702,000408: 
034703,000409:    6042           54075                           TS       FLAGWRD1                              
034704,000410:    6043           00003                           RELINT                                         
034705,000411:    6044           17006                           TCF      Q+1                                   
034706,000412: 

Page 771

034708,000414:    6045           50002        FLAG2DWN           INDEX    Q                                     #  RESET FLAG 2 SUBROUTINE
034709,000415:    6046           40000                           CS       0                                     
034710,000416:    6047           00004                           INHINT                                         
034711,000417:    6050           70076                           MASK     FLAGWRD2                              
034712,000418:    6051           54076                           TS       FLAGWRD2                              
034713,000419:    6052           00003                           RELINT                                         
034714,000420: 
034715,000421:    6053           17006                           TCF      Q+1                                   
034716,000422: 
034717,000423:    6054  E4,1566                                  EBANK=   TDEC                                  
034718,000424:                                                                                                  #  ******************************************ENGINE ON-OFF ROUTINES**********************************************
034719,000425: 
034720,000426:                                                                                                  #  ALL BLOCK 2 COMPUTERS HAVE THE ENGINE-ON AND ENGINE-OFF DISCRETES IN BITS 13 AND 14 RESPECTIVELY OF CHANNEL 11.
034721,000427:                                                                                                  #  IF LEM DESCENT ENGINE SEES A 1,1 CONDITION (BOTH OUTPUT TRANSISTORS CONDUCTING) OR A 0,0 CONDITION (BOTH OUTPUT
034722,000428:                                                                                                  #  TRANSISTORS NON-CONDUCTING) THEY WILL IGNORE THE SIGNAL AND REMAIN IN THE STATE THEY WERE PREVIOUSLY IN. THIS
034723,000429:                                                                                                  #  ALLOWS THE COMPUTER TO ZERO ALL THE OUTPUT BITS DURING A RESTART AND NOT SHUT THE ENGINE OFF. THERE IS NO TIME
034724,000430:                                                                                                  #  LIMIT AS TO HOW LONG AN IMPROPER STATE (1,1) OR (0,0) CAN LAST WITH DESCENT ENGINE.
034725,000431: 
034726,000432:                                                                                                  #  THE LEM ASCENT ENGINE WILL BE TURNED ON BY AN ERRONEOUS 1,1 CONDITION WHICH LASTS LONGER THAN 1 MILLISECOND,
034727,000433: 
034728,000434:                                                                                                  #  THEREFORE THE LGC MUST BE PROGRAMMED TO SET THE BITS TO THE PROPER STATE WITHIN 0.5 MILLISECOND FOLLOWING
034729,000435:                                                                                                  #  RECOVERY FROM A RESTART
034730,000436: 
034731,000437:                                                                                                  #  ENGINE ON AND OFF COMMANDS ARE NOTED IN THE EVENT REGISTERS FOR
034732,000438:                                                                                                  #  DOWNLINK.  IF IT IS DESIRED TO SIMPLY ENSURE ENGINE OFF PRIOR TO AN
034733,000439:                                                                                                  #  ENGINE ARM COMMAND, ENGINEOF1 SHOULD BE USED SO THAT EVENT IS NOT
034734,000440:                                                                                                  #  ENTERED IN DOWNLINK.
034735,000441: 
034736,000442:    6054           00006        ENGINEON           EXTEND                                         
034737,000443:    6055           30025                           DCA      TIME2                                 #  ENG ON EVENT NOTED IN DOWNLINK
034738,000444: 
034739,000445:    6056           53724                           DXCH     TEVENT                                
034740,000446: 
034741,000447:    6057           36070                           CA       PGNSCADR                              #  SET DVMONITOR TO EXPECT THRUST
034742,000448:    6060           55322                           TS       DVSELECT                              
034743,000449: 
034744,000450:    6061           45226                           CS       PRIO30                                #  ENGINE ON BIT13.  ENGINE OFF BIT14
034745,000451:    6062           00006                           EXTEND                                         
034746,000452:    6063           02011                           RAND     11                                    
034747,000453:    6064           67741                           AD       BIT13                                 
034748,000454:    6065           00006                           EXTEND                                         
034749,000455:    6066           01011                           WRITE    11                                    
034750,000456:    6067           00002                           TC       Q                                     
034751,000457: 
034752,000458: 
034753,000459: 
034754,000460: 
034755,000461:    6070           02156        PGNSCADR           GENADR   PGNCSMON                              
034756,000462: 
034757,000463:    6071           00006        ENGINOFF           EXTEND                                         
034758,000464:    6072           30025                           DCA      TIME2                                 #  NOTE ENGINE OFF EVENT TO DOWNLINK
034759,000465:    6073           53724                           DXCH     TEVENT                                
034760,000466: 
034761,000467:    6074           45226        ENGINOF1           CS       PRIOR30                               #  NO DWNLINK HERE

Page 772

034763,000469:    6075           00006                           EXTEND                                         
034764,000470:    6076           02011                           RAND     11                                    
034765,000471: 
034766,000472:    6077           67740                           AD       BIT14                                 
034767,000473:    6100           00006                           EXTEND                                         
034768,000474:    6101           01011                           WRITE    11                                    
034769,000475:    6102           00002                           TC       Q                                     #  RETURN
034770,000476: 
034771,000477:    6103     5226               PRIOR30            EQUALS   PRIO30                                
034772,000478: 
034773,000479:    6103     1154               QTEMP              EQUALS   TEMX                                  
034774,000480: 
034775,000481: 30,2233                                           BANK     30                                    
034776,000482: 
034777,000483: 
034778,000484: 
034779,000485: 
034780,000486: 
034781,000487: 30,2233  E5,1506                                  EBANK=   DVTOTAL                               
034782,000488: 30,2233           06103        AVERAGEG           TC       INTPRET                               
034783,000489: 30,2234           77624                           CALL                                           
034784,000490: 30,2235           61077                                    CALCRVG                               
034785,000491: 30,2236           77776                           EXIT                                           
034786,000492: 
034787,000493: 30,2237           04147                           TC       PHASCHNG                              
034788,000494: 30,2240           10035                           OCT      10035                                 
034789,000495: 
034790,000496: 30,2241           00004        COPYCYCL           INHINT                                         
034791,000497: 30,2242           37752                           CAF      EIGHT                                 
034792,000498: 30,2243           54061                           TS       ITEMP1                                
034793,000499: 30,2244           60000                           DOUBLE                                         
034794,000500: 30,2245           54062                           TS       ITEMP2                                
034795,000501: 30,2246           00006                           EXTEND                                         
034796,000502: 30,2247           50062                           INDEX    ITEMP2                                
034797,000503: 30,2250           31051                           DCA      RN1                                   
034798,000504: 30,2251           50062                           INDEX    ITEMP2                                
034799,000505: 
034800,000506: 30,2252           53011                           DXCH     RN                                    
034801,000507: 30,2253           10061                           CCS      ITEMP1                                
034802,000508: 30,2254           12243                           TCF      COPYCYCL   +2                         
034803,000509: 30,2255           00006                           EXTEND                                         
034804,000510: 30,2256           31560                           DCA      DAREATMP                              
034805,000511: 30,2257           53552                           DXCH     DELAREA                               
034806,000512: 30,2260           00006                           EXTEND                                         
034807,000513: 30,2261           31562                           DCA      MASSTEMP                              
034808,000514: 30,2262           53333                           DXCH     MASS                                  
034809,000515: 30,2263           00006                           EXTEND                                         
034810,000516: 30,2264           31321                           DCA      PIPTIME                               
034811,000517: 30,2265           53341                           DXCH     STATIME                               #  STATE VECTOR TIME FOR DWNLINK
034812,000518: 
034813,000519: 30,2266           00003                           RELINT                                         
034814,000520: 
034815,000521: 30,2267           04147                           TC       PHASCHNG                              
034816,000522: 30,2270           10035                           OCT      10035                                 
034817,000523: 

Page 773

034819,000525: 30,2271           00006                           EXTEND                                         
034820,000526: 30,2272           31073                           DCA      AVGEXIT                               
034821,000527: 30,2273           52006                           DXCH     Z                                     #  AVERAGEG EXIT
034822,000528: 
034823,000529: 30,2274           31321        AVGEND             CA       PIPTIME    +1                         #  FINAL AVERAGE G EXIT
034824,000530: 30,2275           55163                           TS       OLDBT1                                #  SET UP FREE FALL GYRO COMPENSATION
034825,000531: 
034826,000532: 30,2276           06027                           TC       FLAG2UP                               #  SET DRIFT FLAG
034827,000533: 
034828,000534: 30,2277           40000                           OCT      40000                                 
034829,000535: 
034830,000536: 30,2300           00006                           EXTEND                                         
034831,000537: 30,2301           32316                           DCA      AVEMIDAD                              #  TRANSFER STATE VECTOR VIA AVETOMID
034832,000538: 30,2302           52006                           DXCH     Z                                     
034833,000539: 
034834,000540: 30,2303           04147                           TC       PHASCHNG                              
034835,000541: 30,2304           00055                           OCT      55                                    #  *** MEANS INACTIVE ONLY FOR FAKESTRT
034836,000542: 
034837,000543: 30,2305           47753                           CS       FOUR                                  
034838,000544: 
034839,000545: 30,2306           60765                           AD       PHASENUM                              
034840,000546: 30,2307           00006                           EXTEND                                         
034841,000547: 30,2310           15605                           BZF      ENDOFJOB                              
034842,000548: 
034843,000549: 30,2311           14261                           TCF      POOH                                  
034844,000550: 
034845,000551: 30,2312           04147        SERVEXIT           TC       PHASCHNG                              
034846,000552: 30,2313           00035                           OCT      00035                                 
034847,000553: 
034848,000554: 30,2314           15605                           TCF      ENDOFJOB                              
034849,000555: 
034850,000556: 30,2315  E4,1630                                  EBANK=   AVMIDRTN                              
034851,000557: 
034852,000558: 30,2315           02073 16004  AVEMIDAD           2CADR    AVETOMID                              
034853,000559: 

Page 774

034855,000561:                                                                                                  #     NORMLIZE PERFORMS THE INITIALIZATION REQUIRED PRIOR TO THE FIRST ENTRY TO AVERAGEG, AND SCALES RN SO THAT IT
034856,000562: 
034857,000563:                                                                                                  #  HAS 1 LEADING BINARY ZERO. IN MOST MISSIONS, RN WILL BE SCALED AT 2(+29), BUT IN THE 206 MISSION, RN WILL BE
034858,000564:                                                                                                  #  SCALED AT 2(+24)M.  TIME OF RN,VN IS IN STATIME FOR DWNLINK
034859,000565: 
034860,000566: 
034861,000567: 30,2317  E4,1514                                  EBANK=   RAVEGON                               
034862,000568: 30,2317           00004        NORMLIZE           INHINT                                         
034863,000569: 30,2320  E4,1566                                  EBANK=   TDEC                                  
034864,000570: 30,2320           37743                           CAF      EBANK4                                
034865,000571: 30,2321           56003                           XCH      EBANK                                 
034866,000572: 30,2322           54071                           TS       RUPTREG2                              
034867,000573: 30,2323           37756                           CAF      ELEVEN                                #  INITIALIZE INDEX-DEC 11
034868,000574: 
034869,000575: 30,2324           54070                           TS       RUPTREG1                              
034870,000576: 30,2325           50070                           INDEX    RUPTREG1                              
034871,000577: 30,2326           31514                           CA       RAVEGON                               
034872,000578: 30,2327           50070                           INDEX    RUPTREG1                              
034873,000579: 30,2330           55010                           TS       RN                                    #  STORE RN, VN
034874,000580: 30,2331           10070                           CCS      RUPTREG1                              
034875,000581: 30,2332           12321                           TCF      NORMLIZE   +2                         
034876,000582: 30,2333           00006                           EXTEND                                         
034877,000583: 30,2334           31511                           DCA      TAVEGON                               
034878,000584: 30,2335           53341                           DXCH     STATIME                               #  STATE TIME FOR DWNLINK
034879,000585: 
034880,000586: 30,2336           30071                           CA       RUPTREG2                              
034881,000587: 30,2337           54003                           TS       EBANK                                 
034882,000588: 30,2340           00003                           RELINT                                         
034883,000589: 30,2341           06103                           TC       INTPRET                               
034884,000590: 30,2342           77624                           CALL                                           
034885,000591: 30,2343           61043                                    CALCGRAV                              #  INITIALIZE UNITR RMAG GDT1
034886,000592: 30,2344           01025                           STORE    GDT/2                                 
034887,000593: 
034888,000594: 30,2345           77776                           EXIT                                           
034889,000595: 30,2346           15605                           TCF      ENDOFJOB                              
034890,000596: 

Page 775

034892,000598:                                                                                                  #     VPATCHER IS AN ADAPTATION OF NORMLIZE WHICH IS CALLED AFTER MIDTOAVE HAS BEEN PERFORMED AND PRIOR TO
034893,000599:                                                                                                  #  PREBURN PROGRAMS THAT REQUIRE IGNITION STATE POSITION, VELOCITY, AND GRAVITY VECTORS IN REGISTERS RN,VN, AND
034894,000600:                                                                                                  #  GDT/2.  THE REGISTERS ARE RE-INITIALIZED BY NORMLIZE WHEN PREREAD CALLEDRED BY NORMLIZE WHEN PREREAD IS CALLED
034895,000601: 
034896,000602: 
034897,000603:                                                                                                  #  NAME=               DATE=
034898,000604:                                                                                                  #     VPATCHER            20 OCTOBER 1966
034899,000605:                                                                                                  #  PROGRAMMER          SUBROUTINES CALLED
034900,000606:                                                                                                  #     SCHULENBERG         CALCGRAV
034901,000607: 
034902,000608:                                                                                                  #  CALLING SEQUENCE
034903,000609:                                                                                                  #     IF IN BASIC   L-1 TC      INTPRET
034904,000610:                                                                                                  #                   L   CALL    VPATCHER
034905,000611:                                                                                                  #                   L+1 EXIT
034906,000612:                                                                                                  #  NORMAL EXIT
034907,000613:                                                                                                  #     AT L+1 OF CALLING SEQUENCE
034908,000614:                                                                                                  #  DEBRIS
034909,000615:                                                                                                  #     RN, VN, GDT/2, UNITR, RMAG
034910,000616: 
034911,000617:                                                                                                  #  OUTPUT
034912,000618:                                                                                                  #     RIGNITION IN RN*2(+24)M
034913,000619:                                                                                                  #     VIGNITION IN VN*2(+7)M/CS
034914,000620:                                                                                                  #     GDT/2 AT IGNITION IN GDT/2*2(+7)M/CS
034915,000621:                                                                                                  #     UNIT RIGNITION IN UNITR *2(+1)M
034916,000622:                                                                                                  #     RMAG AT 2(+24)M
034917,000623: 
034918,000624: 30,2347           77620        VPATCHER           STQ                                            
034919,000625: 30,2350           01154                                    QTEMP                                 
034920,000626: 30,2351           77776                           EXIT                                           
034921,000627: 30,2352           00004                           INHINT                                         
034922,000628: 30,2353  E4,1566                                  EBANK=   TDEC                                  
034923,000629: 30,2353           37743                           CAF      EBANK4                                
034924,000630: 30,2354           56003                           XCH      EBANK                                 
034925,000631: 30,2355           54071                           TS       RUPTREG2                              
034926,000632: 30,2356           37756                           CAF      ELEVEN                                #  INITIALIZE INDEX TO DEC 11
034927,000633: 30,2357           54070        VPATLOOP           TS       RUPTREG1                              
034928,000634: 30,2360           50070                           INDEX    RUPTREG1                              
034929,000635: 30,2361           31400                           CA       RIGNTION                              
034930,000636: 30,2362           50070                           INDEX    RUPTREG1                              
034931,000637: 30,2363           55010                           TS       RN                                    #  STORE RN,VN
034932,000638: 
034933,000639: 30,2364           10070                           CCS      RUPTREG1                              
034934,000640: 30,2365           12357                           TCF      VPATLOOP                              
034935,000641: 30,2366           00006                           EXTEND                                         
034936,000642: 30,2367           31670                           DCA      TIGN                                  
034937,000643: 30,2370           53341                           DXCH     STATIME                               #  STATE TIME FOR DWNLINK
034938,000644: 30,2371           30071                           CA       RUPTREG2                              
034939,000645: 30,2372           54003                           TS       EBANK                                 
034940,000646: 30,2373           00003                           RELINT                                         
034941,000647: 30,2374           06103                           TC       INTPRET                               

Page 776

034943,000649: 30,2375           77624                           CALL                                           
034944,000650: 30,2376           61043                                    CALCGRAV                              
034945,000651: 
034946,000652: 30,2377           01025                           STORE    GDT/2                                 
034947,000653: 
034948,000654: 30,2400           77650                           GOTO                                           
034949,000655: 30,2401           01154                                    QTEMP                                 

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