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.

033711,000002:                                                                                                  ## Copyright:   Public domain.
033712,000003:                                                                                                  ## Filename:    AS206_MISSION_SCHEDULING_PACKAGE.agc
033713,000004:                                                                                                  ## Purpose:     A section of Sunburst revision 37, or Shepatin revision 0.
033714,000005:                                                                                                  ##              It is part of an early development version of the software
033715,000006:                                                                                                  ##              for Apollo Guidance Computer (AGC) on the unmanned Lunar
033716,000007:                                                                                                  ##              Module (LM) flight Apollo 5. Sunburst 37 was the program
033717,000008:                                                                                                  ##              upon which Don Eyles's offline development program Shepatin
033718,000009:                                                                                                  ##              was based; the listing herein transcribed was actually for
033719,000010:                                                                                                  ##              the equivalent revision 0 of Shepatin.
033720,000011:                                                                                                  ##              This file is intended to be a faithful transcription, except
033721,000012:                                                                                                  ##              that the code format has been changed to conform to the
033722,000013:                                                                                                  ##              requirements of the yaYUL assembler rather than the
033723,000014:                                                                                                  ##              original YUL assembler.
033724,000015:                                                                                                  ## Reference:   pp. 748-762
033725,000016:                                                                                                  ## Assembler:   yaYUL
033726,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
033727,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
033728,000019:                                                                                                  ## Mod history: 2017-05-24 MAS  Created from Sunburst 120.
033729,000020:                                                                                                  ##              2017-06-07 MAS  Updated for Sunburst 37. There's a decent number
033730,000021:                                                                                                  ##                              of differences.
033731,000022:                                                                                                  ##              2017-06-15 HG   Fix page number 814 -> 762
033732,000023:                                                                                                  ##                              Add missing instruction TCF ENDUP
033733,000024:                                                                                                  ##                              remove operand modifier CHKUPDEX +1 -> CHKUPDEX
033734,000025:                                                                                                  ##              2017-06-23 RSB  Proofed comment text with
033735,000026:                                                                                                  ##                              octopus/ProoferComments.
033736,000027: 

Page 748

033738,000029:                                                                                                  #           THE FOLLOWING ROUTINES IMPLEMENT THE MISSION SCHEDULING LOGIC AS DESCRIBED IN CHAPTER 4 OF THE
033739,000030:                                                                                                  #  AS206 OPERATIONS PLAN. THE FOLLOWING ROUTINE IS ENTERED ONCE EACH SECOND FOR MOST OF THE DURATION OF THE
033740,000031: 
033741,000032:                                                                                                  #  FLIGHT, ONCE LIFT-OFF HAS OCCURRED. AN EXCEPTION TO THIS IS THE TIME-CRI
033742,000033: 
033743,000034:                                                                                                  #  RESTART  GROUP  FOR MISSION SCHEDULING PACKAGE IS GROUP 3.
033744,000035: 
033745,000036: 31,2000                                           BANK     31                                    
033746,000037: 31,2000     1167                                  EBANK=   MTIMER4                               
033747,000038: 
033748,000039: 31,2000           36301        MMAINT             CAF      THREE                                 #  LOOP TO PROCESS ALL FOUR TIMERS.
033749,000040: 31,2001           55212                           TS       MINH                                  #  AT END OF TIMER UPDATE, THIS REGISTER
033750,000041:                                                                                                  #  WILL NOT BE EQUAL TO 3 IF MAINTENANCE IS
033751,000042: 
033752,000043:                                                                                                  #  TO CEASE.
033753,000044: 31,2002           54070        MLOOP              TS       RUPTREG1                              
033754,000045: 
033755,000046: 31,2003           50000                           INDEX    A                                     #  LOOK AT TIMER.
033756,000047: 31,2004           11167                           CCS      MTIMER4                               
033757,000048: 31,2005           12011                           TCF      MCOUNT                                #  PNZ - ACTIVE AND COUNTING DOWN.
033758,000049: 31,2006           12107                           TCF      MDUE                                  #  +0 - MISSION PHASE DUE.
033759,000050: 31,2007           67755                           AD       ONE                                   #  NNZ - FREE BUT LOADED BY GROUND.
033760,000051: 31,2010           40000                           COM                                            #  -0 - FREE.
033761,000052: 31,2011           50070        MCOUNT             INDEX    RUPTREG1                              #  PLACE UPDATED TIMERS AND PHASE REGISTERS
033762,000053: 31,2012           55177                           TS       MTIMER4T                              #  INTO COPY BUFFER FOR RESTART PROTECTION.
033763,000054: 
033764,000055: 
033765,000056: 31,2013           50070                           INDEX    RUPTREG1                              
033766,000057: 31,2014           31173                           CA       MPHASE4                               
033767,000058: 31,2015           50070        MENTERED           INDEX    RUPTREG1                              
033768,000059: 31,2016           55203                           TS       MPHASE4T                              
033769,000060: 
033770,000061: 31,2017           10070                           CCS      RUPTREG1                              
033771,000062: 31,2020           12002                           TCF      MLOOP                                 
033772,000063: 
033773,000064: 31,2021           11213        MCHKST             CCS      STATECTR                              #  SEE IF POSSIBLY TIME FOR INTERNAL STATE
033774,000065: 31,2022           12041                           TCF      MSTATEOK                              #  VECTOR EXTRAPOLATION.
033775,000066: 
033776,000067: 31,2023           36301                           CAF      THREE                                 #  IF SO, DO UPDATE UNLESS WE ARE WITHIN 16
033777,000068: 31,2024           54070        MSTATECK           TS       RUPTREG1                              #  SECONDS OF THE INITIATION OF ANY MISSION
033778,000069: 31,2025           45361                           CS       LOW4                                  #  PHASE.
033779,000070: 31,2026           50070                           INDEX    RUPTREG1                              
033780,000071: 31,2027           71167                           MASK     MTIMER4                               
033781,000072: 31,2030           00006                           EXTEND                                         
033782,000073: 31,2031           12040                           BZF      MSTATEOK   -1                         #  BRANCH IF PHASE DUE WITHIN 16 SECS.
033783,000074: 
033784,000075: 31,2032           10070                           CCS      RUPTREG1                              
033785,000076: 31,2033           12024                           TCF      MSTATECK                              
033786,000077: 
033787,000078: 31,2034           35651                           CAF      PRIO5                                 
033788,000079: 
033789,000080: 31,2035           05534                           TC       FINDVAC                               #  TO DO THE INTEGRATION.
033790,000081: 31,2036  E4,1566                                  EBANK=   TDEC                                  
033791,000082: 31,2036           02216 16004                     2CADR    STATEINT                              
033792,000083: 

Page 749

033794,000085: 31,2040           35222                 -1        CAF      STATECRI                              
033795,000086: 31,2041           55213        MSTATEOK           TS       STATECTR                              
033796,000087: 
033797,000088: 31,2042           31210                           CA       NEWMTIME                              #  COPY FOR RESTART PROTECTION
033798,000089: 31,2043           55211                           TS       NEWTIMET                              
033799,000090: 
033800,000091: 31,2044           04147                           TC       PHASCHNG                              #  UPDATE RESTART
033801,000092: 31,2045           04013                           OCT      04013                                 
033802,000093: 
033803,000094: 31,2046           37757        REDO3.3            CAF      SEVEN                                 #  COPY NEW TIMERS AND PHASE REGISTERS.
033804,000095: 31,2047           54070        MCOPY              TS       RUPTREG1                              
033805,000096: 31,2050           50000                           INDEX    A                                     
033806,000097: 31,2051           31177                           CA       MTIMER4T                              
033807,000098: 31,2052           50070                           INDEX    RUPTREG1                              
033808,000099: 31,2053           55167                           TS       MTIMER4                               
033809,000100: 31,2054           10070                           CCS      RUPTREG1                              
033810,000101: 31,2055           12047                           TCF      MCOPY                                 
033811,000102: 
033812,000103: 31,2056           46301                           CS       THREE                                 #  SEE IF FURTHER MAINTENCE HAS BEEN
033813,000104: 
033814,000105: 31,2057           71212                           MASK     MINH                                  #  INHIBITED BY THE INITIATION OF A TIME-
033815,000106: 31,2060           10000                           CCS      A                                     #  CRITICAL MISSION PHASE.
033816,000107: 31,2061           12101                           TCF      MINHIBIT                              
033817,000108: 
033818,000109: 31,2062           32106                           CAF      1SEC                                  #  UPDATE T1 SETTING FOR NEXT UPDATE
033819,000110: 31,2063           27210                           ADS      NEWMTIME                              
033820,000111: 
033821,000112: 31,2064           04147                           TC       PHASCHNG                              
033822,000113: 31,2065           04013                           OCT      04013                                 #  IMMECIATE RESTART AT NEXT LOCATION
033823,000114: 
033824,000115: 31,2066           40025                           CS       TIME1                                 #  GET DT FOR NEXT SCHEDULING REQUEST.
033825,000116: 31,2067           61211                           AD       NEWTIMET                              
033826,000117: 
033827,000118: 31,2070           00006                           EXTEND                                         
033828,000119: 31,2071           62073                           BZMF     +2                                    #  CORRECT FOR CLOCK OVERFLOW.
033829,000120: 31,2072           12075                           TCF      +3                                    
033830,000121: 
033831,000122: 31,2073           67740                           AD       HALF                                  
033832,000123: 31,2074           67740                           AD       HALF                                  
033833,000124: 31,2075           05701                 +3        TC       WAITLIST                              
033834,000125: 31,2076     1167                                  EBANK=   MTIMER4                               
033835,000126: 31,2076           02000 62062                     2CADR    MMAINT                                
033836,000127: 
033837,000128: 
033838,000129: 31,2100           05745                           TC       TASKOVER                              
033839,000130: 
033840,000131: 31,2101           06045        MINHIBIT           TC       FLAG2DWN                              #  RESET TIMERS ENABLED FLAG.
033841,000132: 31,2102           00020                           OCT      20                                    
033842,000133: 
033843,000134: 31,2103           04147                           TC       PHASCHNG                              
033844,000135: 31,2104           00003                           OCT      00003                                 
033845,000136: 
033846,000137: 31,2105           15745                           TCF      TASKOVER                              
033847,000138: 

Page 750

033849,000140: 31,2106           00144        1SEC               DEC      100        B-14                       
033850,000141: 

Page 751

033852,000143:                                                                                                  #           THE FOLLOWING CODING DISPATCHES DUE MISSION PHASES VIA A TABLE OF EXECUTIVE PRIORITIES AND 2CADRS.
033853,000144: 
033854,000145: 31,2107           30070        MDUE               CA       RUPTREG1                              
033855,000146: 31,2110           55207                           TS       MDUETEMP                              #  COPY FOR RESTART PROTECTION
033856,000147: 
033857,000148: 31,2111           50070                           INDEX    RUPTREG1                              #  GET NUMBER OF NEW PHASE AND MP BY NUMBER
033858,000149: 
033859,000150: 31,2112           31173                           CA       MPHASE4                               #  OF TABLE ENTRIES PER PHASE TO GET ADDRES
033860,000151: 31,2113           00006                           EXTEND                                         #  OF TABLE ENTRY FOR THIS PHASE.
033861,000152: 31,2114           12431                           BZF      BADPHASE                              #  INACTIVE MPHASE HERE IS VERY BAD.
033862,000153: 31,2115           54765                           TS       PHASENUM                              #  HOLDS CURRENT MP NUMBER FOR DOWNLINK
033863,000154: 31,2116           00006                           EXTEND                                         
033864,000155: 31,2117           76301                           MP       THREE                                 
033865,000156: 31,2120           50001                           INDEX    L                                     
033866,000157: 31,2121           32354                           CA       MTABLE                                #  PRIO, INHIBIT/ENABLE INFO., ETC.
033867,000158: 31,2122           54071                           TS       RUPTREG2                              
033868,000159: 31,2123           77757                           MASK     SEVEN                                 #  HONOR INHIBIT/ENABLE FUNCTION.
033869,000160: 31,2124           70076                           MASK     FLAGWRD2                              
033870,000161: 31,2125           10000                           CCS      A                                     
033871,000162: 
033872,000163: 31,2126           12152                           TCF      MBYPASS                               
033873,000164: 
033874,000165: 31,2127           37752                           CAF      BIT4                                  #  SET MRETURN  IF COUNTERS ARE TO STOP.
033875,000166: 31,2130           70071                           MASK     RUPTREG2                              
033876,000167: 31,2131           27212                           ADS      MINH                                  
033877,000168: 
033878,000169: 31,2132           35676                           CAF      PRIO37                                
033879,000170: 31,2133           70071                           MASK     RUPTREG2                              
033880,000171: 31,2134           54063                           TS       NEWPRIO                               
033881,000172: 31,2135           00006                           EXTEND                                         
033882,000173: 
033883,000174: 31,2136           50001                           INDEX    L                                     #  PICK UP 2CADR AND DO FINDVAC.
033884,000175: 31,2137           32356                           DCA      MTABLE     +1                         
033885,000176: 31,2140           05544                           TC       SPVAC                                 
033886,000177: 
033887,000178: 31,2141           04127                           TC       2PHSCHNG                              
033888,000179: 31,2142           00032                           OCT      00032                                 #  2.3SPOT TO RESTART MISSION PHASE NOW DUE
033889,000180: 31,2143           04013                           OCT      04013                                 #  GROUP 3 RESTART FOR MISSIN SCHEDULER
033890,000181: 
033891,000182: 31,2144           31207                           CA       MDUETEMP                              
033892,000183: 31,2145           54070                           TS       RUPTREG1                              #  RUPTREG1 WAS DESTROYED BY 2PHSCHNG
033893,000184: 
033894,000185: 31,2146           35226                           CAF      PRIO30                                #  SET UP JOB TO TERMINATE ANY UPDATE
033895,000186: 
033896,000187: 31,2147           05523                           TC       NOVAC                                 #  POSSIBLY IN PROGRESS & RELEASE DISPLAY.
033897,000188: 31,2150     1167                                  EBANK=   MTIMER4                               #  PINBALL USES UNSWITCHED ERASABLE
033898,000189: 31,2150           02173 62062                     2CADR    UPDATKIL                              
033899,000190: 
033900,000191: 31,2152           47761        MBYPASS            CS       ZERO                                  
033901,000192: 31,2153           50070                           INDEX    RUPTREG1                              #  MAKE THIS TIMER/PHASE PAIR AVAILABLE.
033902,000193: 31,2154           55177                           TS       MTIMER4T                              
033903,000194: 31,2155           12015                           TCF      MENTERED                              #  JOINS MAIN CODING.
033904,000195: 

Page 752

033906,000197:                                                                                                  #  RESTART  ROUTIN E TO RESCHEDULE MISSION PHASE
033907,000198: 
033908,000199: 31,2156           51207        REDOMDUE           INDEX    MDUETEMP                              #  FIND PRIO AND 2CADR OF NEW MP
033909,000200: 31,2157           31173                           CA       MPHASE4                               #  IN TABLE.  MDUETEMP CONTAINS
033910,000201: 31,2160           00006                           EXTEND                                         #  THE PHASE REGISTER NUMBER OF THE
033911,000202: 31,2161           76301                           MP       THREE                                 #  MISSION PHASE DUE AT THIS TIME
033912,000203: 31,2162           50001                           INDEX    L                                     
033913,000204: 31,2163           32354                           CA       MTABLE                                
033914,000205: 31,2164           75676                           MASK     PRIO37                                
033915,000206: 31,2165           54063                           TS       NEWPRIO                               
033916,000207: 31,2166           00006                           EXTEND                                         
033917,000208: 31,2167           50001                           INDEX    L                                     
033918,000209: 
033919,000210: 31,2170           32356                           DCA      MTABLE     +1                         
033920,000211: 31,2171           05544                           TC       SPVAC                                 #  DO FINDVAC WITH 2CADR IN A +  L
033921,000212: 31,2172           15745                           TCF      TASKOVER                              
033922,000213: 
033923,000214: 
033924,000215: 
033925,000216:                                                                                                  #  DO A PSEUDO VERB 34 ENTER TO KILL AN UPDATE IN PROGRESS, AND TO RELEASE THE DSKY.
033926,000217: 
033927,000218: 31,2173           32414        UPDATKIL           CAF      34OCT                                 
033928,000219: 31,2174           54304                           TS       REQRET                                
033929,000220: 31,2175           05224                           TC       BANKCALL                              
033930,000221: 31,2176           12314                           CADR     UPDATVB    -1                         
033931,000222: 
033932,000223: 31,2177           05243                           TC       POSTJUMP                              
033933,000224: 31,2200           11333                           CADR     VBTERM                                #  GOES TO ENDOFJOB WHEN DONE
033934,000225: 

Page 753

033936,000227:                                                                                                  #           THE FOLLOWING SUBROUTINE MAY BE USED BY MISSION PROGRAMS TO SET MISSION PHASE/TIMER PAIRS TO INITIATE
033937,000228:                                                                                                  #  THE VARIOUS MISSION PHASES (SEE CHAPTER 4 OF THE GSOP).
033938,000229: 
033939,000230:                                                                                                  #           CALLING SEQUENCE IS AS FOLLOWS:
033940,000231: 
033941,000232:                                                                                                  #                                                   TC     MPENTRY         UNDER CONTROL OF EXEC OR RUPT.
033942,000233:                                                                                                  #                                                   DEC    INDEX           INDEX OF TIMER (1 TO 4).
033943,000234:                                                                                                  #                                                   DEC    PHASE           MISSION PHASE NUMBER.
033944,000235: 
033945,000236:                                                                                                  #                                                   ADRES  DT              DT = TIME (SECONDS) TO INITIATION.
033946,000237:                                                                                                  #                                                                          (EBANK MUST ALREADY BE SET.)
033947,000238: 
033948,000239:    5141                                           BLOCK    02                                    
033949,000240:    5141           00004        MPENTRY            INHINT                                         
033950,000241:    5142           50002                           INDEX    Q                                     #  MAKE INTERNAL INDEX.
033951,000242:    5143           40000                           CS       0                                     
033952,000243:    5144           67753                           AD       FOUR                                  
033953,000244:    5145           54070                           TS       RUPTREG1                              
033954,000245: 
033955,000246:    5146           50000                           INDEX    A                                     #  IF THIS MISSION PHASE REGISTER IS NOT
033956,000247:    5147           11173                           CCS      MPHASE4                               #  -0, IT HAS BEEN CHANGED BY THE GROUND,
033957,000248:    5150           15157                           TCF      MENTRYT                               #  SO LEAVE IT ALONE.
033958,000249:    5151           15157                           TCF      MENTRYT                               
033959,000250:    5152           15157                           TCF      MENTRYT                               
033960,000251: 
033961,000252:    5153           50002                           INDEX    Q                                     
033962,000253:    5154           30001                           CAF      1                                     
033963,000254:    5155           50070                           INDEX    RUPTREG1                              
033964,000255:    5156           55173                           TS       MPHASE4                               
033965,000256: 
033966,000257:    5157           50070        MENTRYT            INDEX    RUPTREG1                              #  IF THE TIMER IS -0, SET IT TO THE INPUT
033967,000258:    5160           11167                           CCS      MTIMER4                               #  VALUE, OTHERWISE, ASSUME IT HAS BEEN
033968,000259: 
033969,000260:    5161           67755                           AD       ONE                                   #  SET BY THE GROUND AND JUST FORCE IT POS.
033970,000261:    5162           15170                           TCF      MENTABS                               
033971,000262:    5163           15161                           TCF      -2                                    
033972,000263: 
033973,000264:    5164           50002                           INDEX    Q                                     
033974,000265:    5165           30002                           CAF      2                                     
033975,000266:    5166           50000                           INDEX    A                                     
033976,000267:    5167           30000                           CA       0                                     
033977,000268:    5170           50070        MENTABS            INDEX    RUPTREG1                              
033978,000269:    5171           55167                           TS       MTIMER4                               
033979,000270: 
033980,000271:    5172           36301                           CAF      THREE                                 #  MAKE UP RETURN SO COMMON ROUTINE CAN BE
033981,000272:    5173           60002                           AD       Q                                     #  USED TO INITATE TIMER COUNTING.
033982,000273:    5174           55221                 -1        TS       MRETURN                               
033983,000274: 

Page 754

033985,000276:                                                                                                  #  SUBROUTINE TO START MISSION TIMERS IF THEY ARE NOT GOING ALREADY.
033986,000277: 
033987,000278:    5175           30076        MSTART             CA       FLAGWRD2                              #  SEE IF TIMERS ENABLED ALREADY.
033988,000279:    5176           77751                           MASK     BIT5                                  
033989,000280:    5177           10000                           CCS      A                                     
033990,000281:    5200           15220                           TCF      MDONE                                 #  YES - RETURN.
033991,000282: 
033992,000283:    5201           04147                           TC       PHASCHNG                              #  UPDATE RESTART BEFORE SETTING FLAG.
033993,000284:    5202           05013                           OCT      05013                                 
033994,000285:    5203           77777                           OCT      77777                                 
033995,000286: 
033996,000287:    5204           06027                           TC       FLAG2UP                               #  SHOW TIMERS ENABLED.
033997,000288:    5205           00020                           OCT      20                                    
033998,000289: 
033999,000290: 
034000,000291:    5206           00004                           INHINT                                         
034001,000292: 
034002,000293:    5207           35223                           CAF      1SEC+1                                
034003,000294:    5210           60025                           AD       TIME1                                 
034004,000295:    5211           57210                           XCH      NEWMTIME                              
034005,000296: 
034006,000297:    5212           35222                           CAF      STATECRI                              #  INITIALIZE STATE VECTOR EXTRAPOLATION
034007,000298:    5213           55213                           TS       STATECTR                              #  TIMER.
034008,000299: 
034009,000300:    5214           37755                           CAF      ONE                                   
034010,000301: 
034011,000302:    5215           05701                           TC       WAITLIST                              
034012,000303:    5216     1167                                  EBANK=   MTIMER4                               
034013,000304:    5216           02000 62062                     2CADR    MMAINT                                #  START COUNTER MAINTENANCE.
034014,000305: 
034015,000306:    5220           00003        MDONE              RELINT                                         
034016,000307:    5221           01221                           TC       MRETURN                               
034017,000308: 
034018,000309:    5222           01033        STATECRI           DEC      539        B-14                       #  CALLS FOR INTEGRATION EVERY 539 SEC.
034019,000310:    5223           00145        1SEC+1             DEC      101        B-14                       
034020,000311: 

Page 755

034022,000313:                                                                                                  #  SUBROUTINE CALLS FOR VARIOUS UPDATE OPTIONS (SEE GSOP).  ENTER UNDER EXEC WITH INTERRUPT INHIBITED.
034023,000314: 
034024,000315: 31,2201                                           BANK     31                                    
034025,000316: 31,2201           02314        DOV70              TC       MTIMERUP                              #  VERB 70
034026,000317: 31,2202           12373                           TCF      ENDUP                                 
034027,000318: 
034028,000319: 31,2203           02314        DOV72              TC       MTIMERUP                              #  VERB 72
034029,000320: 31,2204           02245        DOV71              TC       MPHASEUP                              #  VERB 71
034030,000321: 31,2205           12373                           TCF      ENDUP                                 
034031,000322: 
034032,000323:                                                                                                  #     *** C ODING  TO BE INSERTED HERE TO CLEAR OUT ALL TIMER/PHASE PAIRS
034033,000324:                                                                                                  #         W HICH H AVE BEEN SET BY LGC, SINCE GROUND REQUEST WILL SUPERSEDE
034034,000325:                                                                                                  #           ALL PR EVIOUSLY SCHEDULED MPS EXCEPT THOSE SET BY GROUND ITSELF
034035,000326: 
034036,000327:                                                                                                  #  DOV74         EQUALS          FORGETIT
034037,000328: 31,2206           00003        ENDV73             RELINT                                         
034038,000329: 31,2207           12373        TCFENDUP           TCF      ENDUP                                 
034039,000330: 

Page 756

034041,000332:                                                                                                  #  INVERT INHIBIT/ENABLE SWITCH WHOSE INDEX IS IN UPINDEX (1 TO 3).  ENTER UNDER EXEC WITH INTERRUPT INHIBITED.
034042,000333: 
034043,000334: 
034044,000335: 31,2210           47754        DOV73              CS       TWO                                   
034045,000336: 31,2211           61216                           AD       UPINDEX                               
034046,000337: 31,2212           04312                           TC       MAGSUB                                #  SEE IF INDEX LEGIT.
034047,000338: 31,2213           77776                           DEC      -1         B-14                       
034048,000339: 31,2214           12375                           TCF      UPERROR                               
034049,000340: 
034050,000341: 31,2215           51216                           INDEX    UPINDEX                               
034051,000342: 31,2216           37752                           CAF      BIT3       -1                         #  BITS IN POSITIONS 3, 2, AND 1 OF
034052,000343: 31,2217           54001                           TS       L                                     #  FLAGWRD2 (SEE SWITCH ASSIGNMENTS).
034053,000344: 31,2220           00004                           INHINT                                         
034054,000345: 
034055,000346: 31,2221           30076                           CA       FLAGWRD2                              
034056,000347: 31,2222           00006                           EXTEND                                         
034057,000348: 31,2223           06001                           RXOR     L                                     
034058,000349: 31,2224           54076                           TS       FLAGWRD2                              
034059,000350: 31,2225           12206                           TCF      ENDV73                                
034060,000351: 
034061,000352:                                                                                                  #           THE FOLLOWING CODING ISSUES THE SINGLE LMP COMMAND FOUND IN UPINDEX PROVIDED THE TIMERS ARE ENABLED
034062,000353:                                                                                                  #  (NON TIME CRITICAL PHASE OF MISSION).
034063,000354: 
034064,000355: 31,2226           40076        DOV67              CS       FLAGWRD2                              
034065,000356: 31,2227           77751                           MASK     BIT5                                  
034066,000357: 31,2230           10000                           CCS      A                                     
034067,000358: 
034068,000359: 31,2231           12375                           TCF      UPERROR                               
034069,000360: 
034070,000361: 31,2232           47746                           CS       BIT8                                  #  COMMAND MUST BE BETWEEN 1 AND 255.
034071,000362: 31,2233           61216                           AD       UPINDEX                               
034072,000363: 31,2234           04312                           TC       MAGSUB                                
034073,000364: 31,2235           77600                           DEC      -127       B-14                       
034074,000365: 31,2236           12375                           TCF      UPERROR                               
034075,000366: 
034076,000367: 31,2237           32244                           CAF      TC1LMP                                
034077,000368: 31,2240           55215                           TS       UPINDEX    -1                         
034078,000369: 
034079,000370: 31,2241           32207                           CAF      TCFENDUP                              
034080,000371: 31,2242           55217                           TS       UPINDEX    +1                         
034081,000372: 31,2243           01215                           TC       UPINDEX    -1                         
034082,000373: 
034083,000374: 31,2244           05073        TC1LMP             TC       1LMP                                  #  FOR ERASABLE CALL.
034084,000375: 

Page 757

034086,000377:                                                                                                  #           THE FOLLOWING CODING UPDATES A MISSION PHASE NUMBER WHOSE INDEX IS IN UPINDEX TO THE VALUE FOUND
034087,000378:                                                                                                  #  IN UPPHASE. RETURN IS TO CALLER IF DATA OK, OR TO UPERROR IF DATA OUT OF RANGE.
034088,000379: 
034089,000380: 31,2245           30002        MPHASEUP           CA       Q                                     
034090,000381: 31,2246           02277                           TC       CHKUPDEX                              #  CHECK INDEX VALUE AND MAKE INTERNAL NDX.
034091,000382: 
034092,000383: 31,2247           11214                           CCS      UPPHASE                               #  CHECK ON SIZE OF PHASE.
034093,000384: 31,2250           12254                           TCF      +4                                    
034094,000385: 
034095,000386: 31,2251           12375                           TCF      UPERROR                               
034096,000387: 31,2252           12375                           TCF      UPERROR                               
034097,000388: 31,2253           12375                           TCF      UPERROR                               
034098,000389: 
034099,000390: 31,2254           04312                 +4        TC       MAGSUB                                
034100,000391: 31,2255           77756                           OCT      -21                                   #  ALLOW PHASES 1 - 18D ONLY.
034101,000392: 31,2256           12375                           TCF      UPERROR                               #  FOR BAD RETURN FROM MAGSUB
034102,000393: 31,2257           41214                           CS       UPPHASE                               #  CHECK LEGALITY OF UPPHASE
034103,000394: 31,2260           66276                           AD       SIX                                   
034104,000395: 31,2261           10000                           CCS      A                                     
034105,000396: 
034106,000397: 31,2262           12375                           TCF      UPERROR                               
034107,000398: 31,2263           72400        MPLEGAL            OCT      72400                                 #  BITS 15 - 1 = 1 FOR MP 7 - 21 LEGAL
034108,000399: 31,2264           12266                           TCF      +2                                    
034109,000400: 31,2265           12375                           TCF      UPERROR                               
034110,000401: 
034111,000402: 31,2266           50000                           INDEX    A                                     
034112,000403: 31,2267           37737                           CA       BIT15                                 
034113,000404: 31,2270           72263                           MASK     MPLEGAL                               
034114,000405: 31,2271           00006                           EXTEND                                         
034115,000406: 31,2272           12375                           BZF      UPERROR                               
034116,000407: 
034117,000408: 31,2273           31214                           CA       UPPHASE                               
034118,000409: 
034119,000410: 31,2274           50070                           INDEX    RUPTREG1                              
034120,000411: 31,2275           55173                           TS       MPHASE4                               
034121,000412: 31,2276           15220                           TCF      MDONE                                 #  RELINT & RETURN VIA MRETURN.
034122,000413: 
034123,000414:                                                                                                  #  MINOR SUBROUTINE TO CHECK MISSION TIMER/PHASE UPDATE INDEX AND LEAVE CORRESPONDING VALUE IN RUPTREG1.
034124,000415: 
034125,000416:                                                                                                  #  TO BE ENTERED WITH INTERRUPT INHIBITED:
034126,000417: 
034127,000418: 31,2277           55221        CHKUPDEX           TS       MRETURN                               #  CALLER'S RETURN ARRIVES IN A.
034128,000419: 31,2300           11216                           CCS      UPINDEX                               
034129,000420: 
034130,000421: 31,2301           12305                           TCF      +4                                    
034131,000422: 31,2302           12375                           TCF      UPERROR                               
034132,000423: 31,2303           12375                           TCF      UPERROR                               
034133,000424: 31,2304           12375                           TCF      UPERROR                               
034134,000425: 
034135,000426: 31,2305           75357                 +4        MASK     NEG3                                  
034136,000427: 31,2306           10000                           CCS      A                                     
034137,000428: 31,2307           12375                           TCF      UPERROR                               
034138,000429: 
034139,000430: 31,2310           41216                           CS       UPINDEX                               #  MAKE INTERNAL VALUE.

Page 758

034141,000432: 31,2311           67753                           AD       FOUR                                  
034142,000433: 31,2312           54070                           TS       RUPTREG1                              
034143,000434: 31,2313           00002                           TC       Q                                     
034144,000435: 

Page 759

034146,000437:                                                                                                  #           THE FOLLOWING CODING UPDATES THE MISSION TIMER WHOSE INDEX IS IN UPINDEX BY ADDING THE CONTENTS OF UPDT
034147,000438:                                                                                                  #  TO IT. OUTCOMES DEPEND ON WHETHER THE TIMER WAS COUNTING AT THE TIME, AND THE SIGN OF THE RESULT (SEE GSOP).
034148,000439: 
034149,000440: 31,2314           30002        MTIMERUP           CA       Q                                     #  GO TO COMMON SUBROUTINE TO SAVE RETURN
034150,000441: 31,2315           02277                           TC       CHKUPDEX                              #  AND CHECK INDEX.
034151,000442: 31,2316           50070                           INDEX    RUPTREG1                              #  SEE IF TIMER IS COUNTING NOW.
034152,000443: 
034153,000444: 31,2317           11167                           CCS      MTIMER4                               
034154,000445: 31,2320           12327                           TCF      TUPBUSY                               #  POS INDICATES IT IS.
034155,000446: 31,2321           12327                           TCF      TUPBUSY                               
034156,000447: 31,2322           12323                           NOOP                                           
034157,000448: 
034158,000449: 31,2323           31215                           CA       UPDT                                  #  IF NOT BUSY, DO ADD, MAKING NO CHANGE
034159,000450: 31,2324           50070                           INDEX    RUPTREG1                              #  IN THE ENABLE FLAG.
034160,000451: 31,2325           27167                           ADS      MTIMER4                               
034161,000452: 31,2326           15220                           TCF      MDONE                                 
034162,000453: 
034163,000454: 31,2327           11215        TUPBUSY            CCS      UPDT                                  #  IF TIMER COUNTING, SEE IF DT ZERO.
034164,000455: 31,2330           12337                           TCF      CTRAD                                 #  NZ - DO ADD.
034165,000456: 
034166,000457: 31,2331           12334                           TCF      CTRABS                                #  +0 - PHASE DUE NEXT MAINTENANCE CYCLE.
034167,000458: 31,2332           12337                           TCF      CTRAD                                 
034168,000459: 
034169,000460: 31,2333           47761                           CS       ZERO                                  #  IF -0, DISABLE TIMER.
034170,000461: 31,2334           50070        CTRABS             INDEX    RUPTREG1                              
034171,000462: 31,2335           55167                           TS       MTIMER4                               
034172,000463: 31,2336           15220                           TCF      MDONE                                 
034173,000464: 
034174,000465: 31,2337           31215        CTRAD              CA       UPDT                                  
034175,000466: 31,2340           50070                           INDEX    RUPTREG1                              
034176,000467: 
034177,000468: 31,2341           27167                           ADS      MTIMER4                               
034178,000469: 31,2342           10000                           CCS      A                                     #  IF RESULT NEGATIVE OR ZERO, PHASE DUE
034179,000470: 31,2343           15220                           TCF      MDONE                                 #  NEXT MAINTENANCE CYCLE.
034180,000471: 31,2344           15220                           TCF      MDONE                                 
034181,000472: 31,2345           37761                           CAF      ZERO                                  
034182,000473: 31,2346           12334                           TCF      CTRABS                                #  (THIS ALONE REVERTS -0 TO +0.)
034183,000474: 

Page 760

034185,000476:                                                                                                  #           THE FOLLOWING CODING IS THE SAME AS MTIMERUP BUT ACCEPTS DP GET IN UPGET (SEE GSOP).
034186,000477: 
034187,000478: 31,2347           06103        MGETUP             TC       INTPRET                               #  MAKE SURE THIS ENTERED WITH VAC AREA.
034188,000479: 
034189,000480: 31,2350           44234                           RTB      BDSU                                  #  TIME IN CS.
034190,000481: 31,2351           33521                                    LOADTIME                              
034191,000482: 31,2352           01220                                    UPGET                                 
034192,000483: 31,2353           54205                           DMP      SL                                    #  CONVERT TO SEC & MOVE TO MAJOR PART.
034193,000484: 31,2354           22400                                    1/100                                 
034194,000485: 31,2355           20217                                    14D                                   
034195,000486: 31,2356           50004                           BOVB     BMN                                   
034196,000487: 31,2357           62375                                    UPERROR                               
034197,000488: 
034198,000489: 31,2360           62374                                    UPERROR    -1                         #  (DOES AN EXIT.)
034199,000490: 
034200,000491: 31,2361           77776                           EXIT                                           
034201,000492: 
034202,000493: 31,2362           00004                           INHINT                                         
034203,000494: 31,2363           37751                           CA       BIT5                                  #  INSURE THAT MAINTENANCE IS STILL ENABLED
034204,000495: 31,2364           70076                           MASK     FLAGWRD2                              
034205,000496: 31,2365           00006                           EXTEND                                         
034206,000497: 31,2366           12375                           BZF      UPERROR                               
034207,000498: 
034208,000499: 31,2367           02277                           TC       CHKUPDEX                              
034209,000500: 31,2370           30144                           CA       MPAC                                  #  CONTAINS DT IN SECONDS.
034210,000501: 
034211,000502: 31,2371           50070                           INDEX    RUPTREG1                              
034212,000503: 31,2372           55167                           TS       MTIMER4                               #  INSERT DT DIRECTLY INTO TIMER.
034213,000504: 
034214,000505:                                                                                                  #           GENERAL EXIT LOCATION FOR SUCCESSFULLY COMPLETED UPDATE:
034215,000506: 
034216,000507: 31,2373           15605        ENDUP              TCF      ENDOFJOB                              #  (MORE TO BE ADDED?)
034217,000508: 
034218,000509:                                                                                                  #           EXIT FOR GENERAL UPDATE ERRORS (RANGE OF DATA, ETC.)
034219,000510: 
034220,000511: 31,2374           77776                 -1        EXIT                                           
034221,000512: 
034222,000513: 31,2375           04560        UPERROR            TC       FALTON                                
034223,000514: 31,2376           15605                           TCF      ENDOFJOB                              
034224,000515: 

The original listing reads simplye "E-2" here. A 1 has been added to conform to yaYUL's requirements.

034226,000517: 31,2377           00243 32703  1/100              2DEC     1          E-2                        
034227,000518: 

Page 761

034229,000520:                                                                                                  #           THE FOLLOWING TABLE SPECIFIES STARTING LOCATIONS AND PRIORITIES OF ALL 206 MISSION PHASES INITIATED BY
034230,000521:                                                                                                  #  THE MISSION TIMERS (S4B-LEM SEP AND BEYOND). IT ALSO CONTAINS INHIBIT/ENABLE INFORMATION, ETC. EACH ENTRY
034231,000522:                                                                                                  #  CONSISTS OF THREE WORDS. THE FIRST IS PACKED WITH SEVERAL PIECES OF INFORMATION, AND THE SECOND TWO CONTAIN THE
034232,000523:                                                                                                  #  2CADR OF THE LOCATION AT WHICH THE PHASE IS TO BEGIN. THE INTERPRETATION OF WORD 1 IS AS FOLLOWS:
034233,000524: 
034234,000525:                                                                                                  #           BIT15:         SPARE
034235,000526:                                                                                                  #           BITS 14-10:    JOB PRIORITY.
034236,000527:                                                                                                  #           BITS 9-5:      SPARE
034237,000528: 
034238,000529:                                                                                                  #           BIT4:          1 IF TIMERS TO BE DISABLED ON PHASE INITIATION.
034239,000530:                                                                                                  #           BIT3:          1 IF RCS TESTS (INHIBIT/ENABLE INFO).
034240,000531:                                                                                                  #           BIT2:                  1 IF DPS COLD SOAK
034241,000532:                                                                                                  #           BIT1:                  1 IF RCS COLD SOAK
034242,000533: 
034243,000534:                                                                                                  #  NOTE SPARES COULD BE USED FOR SWITCHING DOWNLISTS, ETC.
034244,000535: 
034245,000536:                                                                                                  #           PHASES 1 - 6 ARE NOT INCLUDED SINCE THEY ARE NOT INITIATED BY THE MISSION SCHEDULING ROUTINES.
034246,000537: 31,2401           20010        MTABLE1            OCT      20010                                 #  MP7
034247,000538: 31,2402  E4,1566                                  EBANK=   TDEC                                  
034248,000539: 
034249,000540: 31,2402           02467 52004                     2CADR    MP07JOB                               
034250,000541: 
034251,000542: 31,2404           20012                           OCT      20012                                 #  MP8
034252,000543: 
034253,000544: 31,2405  E3,1652                                  EBANK=   RATEINDX                              
034254,000545: 31,2405           02555 56003                     2CADR    MP8JOB                                
034255,000546: 
034256,000547: 31,2407           20010                           OCT      20010                                 #  MP9
034257,000548: 31,2410  E4,1566                                  EBANK=   TDEC                                  
034258,000549: 31,2410           02614 66064                     2CADR    MP9JOB                                
034259,000550: 
034260,000551: 31,2412           04725                           TC       CCSHOLE                               #  MP 10.  UNUSED SLOT.
034261,000552: 
034262,000553: 31,2413           04725                           TC       CCSHOLE                               
034263,000554: 31,2414           00034        34OCT              OCT      00034                                 
034264,000555: 
034265,000556: 31,2415           20010                           OCT      20010                                 #  MP11
034266,000557: 31,2416  E4,1566                                  EBANK=   TDEC                                  
034267,000558: 31,2416           02000 74064                     2CADR    MP11JOB                               
034268,000559: 
034269,000560: 31,2420           04725                           TC       CCSHOLE                               #  MP 12.  UNUSED SLOT.
034270,000561: 31,2421           04725                           TC       CCSHOLE                               
034271,000562: 31,2422           04725                           TC       CCSHOLE                               
034272,000563: 
034273,000564: 31,2423           20010                           OCT      20010                                 #  MP13
034274,000565: 31,2424  E4,1566                                  EBANK=   TDEC                                  
034275,000566: 31,2424           03071 56004                     2CADR    MP13JOB                               
034276,000567: 
034277,000568: 31,2426           04725                           TC       CCSHOLE                               #  MP 14.  UNUSED SLOT.
034278,000569: 31,2427           04725                           TC       CCSHOLE                               
034279,000570: 31,2430           04725                           TC       CCSHOLE                               
034280,000571: 
034281,000572: 31,2431  31,2354               MTABLE             EQUALS   MTABLE1    -21D                       #  MP 1-6 NOT ACTUALLY INCLUDED IN TABLE.
034282,000573: 

Page 762

034284,000575: 31,2431           04744        BADPHASE           TC       ALARM                                 #  ALARM WHEN MPHASE COMES DUE BUT MPHASE
034285,000576: 
034286,000577: 31,2432           00601                           OCT      00601                                 #  REGISTER IS ZERO (-0 MEANS INACTIVE).
034287,000578: 
034288,000579: 31,2433           35676                           CAF      PRIO37                                
034289,000580: 31,2434           05523                           TC       NOVAC                                 
034290,000581: 31,2435  E3,1400                                  EBANK=   LST1                                  
034291,000582: 31,2435           02000 16003                     2CADR    FORGETIT                              
034292,000583: 
034293,000584: 31,2437           05745                           TC       TASKOVER                              

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