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.

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

Page 763

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

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

Page 765

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

Page 766

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

Page 767

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

Page 768

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

Page 769

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

Page 770

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

Page 771

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

Page 772

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

Page 773

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

Page 774

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

Page 775

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

Page 776

034936,000649: 30,2375           77624                           CALL                                           
034937,000650: 30,2376           61043                                    CALCGRAV                              
034938,000651: 
034939,000652: 30,2377           01025                           STORE    GDT/2                                 
034940,000653: 
034941,000654: 30,2400           77650                           GOTO                                           
034942,000655: 30,2401           01154                                    QTEMP                                 

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