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.

005449,000002:                                                                                                  ## Copyright:   Public domain.
005450,000003:                                                                                                  ## Filename:    IMU_MODE_SWITCHING_ROUTINES.agc
005451,000004:                                                                                                  ## Purpose:     A section of Sunburst revision 37, or Shepatin revision 0.
005452,000005:                                                                                                  ##              It is part of an early development version of the software
005453,000006:                                                                                                  ##              for Apollo Guidance Computer (AGC) on the unmanned Lunar
005454,000007:                                                                                                  ##              Module (LM) flight Apollo 5. Sunburst 37 was the program
005455,000008:                                                                                                  ##              upon which Don Eyles's offline development program Shepatin
005456,000009:                                                                                                  ##              was based; the listing herein transcribed was actually for
005457,000010:                                                                                                  ##              the equivalent revision 0 of Shepatin.
005458,000011:                                                                                                  ##              This file is intended to be a faithful transcription, except
005459,000012:                                                                                                  ##              that the code format has been changed to conform to the
005460,000013:                                                                                                  ##              requirements of the yaYUL assembler rather than the
005461,000014:                                                                                                  ##              original YUL assembler.
005462,000015:                                                                                                  ## Reference:   pp. 124-145
005463,000016:                                                                                                  ## Assembler:   yaYUL
005464,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
005465,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
005466,000019:                                                                                                  ## Mod history: 2017-05-24 MAS  Created from Sunburst 120.
005467,000020:                                                                                                  ##              2017-05-30 HG   Transcribed
005468,000021:                                                                                                  ##              2017-06-21 RSB  Proofed using octopus/ProoferComments.
005469,000022: 

Page 124

005471,000024:    4303                                           BLOCK    02                                    
005472,000025:    4303  E3,1455                                  EBANK=   COMMAND                               
005473,000026: 
005474,000027:                                                                                                  #           FIXED-FIXED ROUTINES.
005475,000028: 
005476,000029:    4303           37761        ZEROICDU           CAF      ZERO                                  #  ZERO ICDU COUNTERS.
005477,000030:    4304           54032                           TS       CDUX                                  
005478,000031:    4305           54033                           TS       CDUY                                  
005479,000032:    4306           54034                           TS       CDUZ                                  
005480,000033:    4307           00002                           TC       Q                                     
005481,000034: 
005482,000035:    4310           00620        4SECS              DEC      400        B-14                       
005483,000036:    4311           00454        3SECS              DEC      300        B-14                       
005484,000037: 

Page 125

005486,000039:                                                                                                  #           IMU ZEROING ROUTINE.
005487,000040: 
005488,000041: 13,2000                                           BANK     13                                    
005489,000042: 
005490,000043: 13,2000           00004        IMUZERO            INHINT                                         #  ROUTINE TO ZERO ICDUS.
005491,000044: 13,2001           40326                           CS       DSPTAB     +11D                       #  DONT ZERO CDUS IF IMU IN GIMBAL LOCK AND
005492,000045: 13,2002           73010                           MASK     BITS4&6                               #  COARSE ALIGN.
005493,000046: 13,2003           10000                           CCS      A                                     
005494,000047: 
005495,000048: 13,2004           12010                           TCF      IMUZEROA                              
005496,000049: 
005497,000050: 13,2005           04744                           TC       ALARM                                 #  IF SO.
005498,000051: 13,2006           00206                           OCT      206                                   
005499,000052: 
005500,000053: 13,2007           12723                           TCF      CAGETSTJ   +4                         
005501,000054: 
005502,000055: 13,2010           47746        IMUZEROA           CS       IMUSEFLG                              
005503,000056: 13,2011           70074                           MASK     STATE                                 #  PROGRAM IS USING THE IMU.
005504,000057: 13,2012           67746                           AD       IMUSEFLG                              
005505,000058: 13,2013           54074                           TS       STATE                                 
005506,000059: 
005507,000060: 13,2014           02712                           TC       CAGETSTQ                              #  IF IMU COMING UP, TURN-ON PROGRAM WILL
005508,000061: 13,2015           12043                           TCF      MODEEXIT                              #  DO ALL THE WORK.
005509,000062: 
005510,000063: 13,2016           43007                           CS       BITS3&4                               #  INHIBIT ICDUFAIL AND IMUFAIL (IN CASE WE
005511,000064: 13,2017           70365                           MASK     IMODES30                              #  JUST CAME OUT OF COARSE ALIGN).
005512,000065: 13,2020           63007                           AD       BITS3&4                               
005513,000066: 13,2021           54365                           TS       IMODES30                              
005514,000067: 
005515,000068: 13,2022           43010                           CS       BITS4&6                               #  SEND ZERO ENCODE WITH COARSE AND ERROR
005516,000069: 13,2023           00006                           EXTEND                                         #  COUNTER DISABLED.
005517,000070: 13,2024           03012                           WAND     12                                    
005518,000071: 
005519,000072: 13,2025           02323                           TC       NOATTOFF                              #  TURN OFF NO ATT LAMP.
005520,000073: 
005521,000074: 13,2026           37751                           CAF      BIT5                                  
005522,000075: 13,2027           00006                           EXTEND                                         
005523,000076: 13,2030           05012                           WOR      12                                    
005524,000077: 
005525,000078: 13,2031           37750                           CAF      BIT6                                  #  WAIT 320 MS TO GIVE AGS ADEQUATE TIME TO
005526,000079: 13,2032           05701                           TC       WAITLIST                              #  RECEIVE ITS PULSE TRAIN.
005527,000080: 13,2033  E3,1455                                  EBANK=   COMMAND                               
005528,000081: 13,2033           02045 26003                     2CADR    IMUZERO2                              
005529,000082: 
005530,000083: 13,2035           40365                           CS       IMODES30                              #  SEE IF IMU OPERATING AND ALARM IF NOT.
005531,000084: 13,2036           77745                           MASK     BIT9                                  
005532,000085: 13,2037           10000                           CCS      A                                     
005533,000086: 13,2040           12043                           TCF      MODEEXIT                              
005534,000087: 
005535,000088: 13,2041           04744                           TC       ALARM                                 
005536,000089: 13,2042           00210                           OCT      210                                   
005537,000090: 

Page 126

005539,000092: 13,2043           00003        MODEEXIT           RELINT                                         #  GENERAL MODE-SWITCHING EXIT.
005540,000093: 13,2044           15237                           TCF      SWRETURN                              
005541,000094: 

Page 127

005543,000096: 13,2045           02712        IMUZERO2           TC       CAGETSTQ                              #  POSSIBLY SWITCH TO TURN-ON PROGRAM.
005544,000097: 13,2046           15745                           TCF      TASKOVER                              
005545,000098: 
005546,000099: 13,2047           04303                           TC       ZEROICDU                              #  ZERO COUNTERS.
005547,000100: 13,2050           47751                           CS       BIT5                                  #  REMOVE ZERO DISCRETE.
005548,000101: 13,2051           00006                           EXTEND                                         
005549,000102: 13,2052           03012                           WAND     12                                    
005550,000103: 
005551,000104: 13,2053           34310                           CAF      4SECS                                 
005552,000105: 13,2054           05722                           TC       VARDELAY                              
005553,000106: 
005554,000107: 13,2055           02712        IMUZERO3           TC       CAGETSTQ                              
005555,000108: 13,2056           15745                           TCF      TASKOVER                              
005556,000109: 
005557,000110: 13,2057           43007                           CS       BITS3&4                               #  REMOVE IMUFAIL AND ICDUFAIL INHIBIT.
005558,000111: 13,2060           70365                           MASK     IMODES30                              
005559,000112: 13,2061           54365                           TS       IMODES30                              
005560,000113: 
005561,000114: 13,2062           05307                           TC       IBNKCALL                              #  SET ISS WARNING IF EITHER OF ABOVE ARE
005562,000115: 13,2063           24763                           CADR     SETISSW                               #  PRESENT.
005563,000116: 
005564,000117: 13,2064           12675                           TCF      ENDIMU                                
005565,000118: 

Page 128

005567,000120:                                                                                                  #           IMU COARSE ALIGN MODE.
005568,000121: 
005569,000122: 13,2065           00004        IMUCOARS           INHINT                                         
005570,000123: 13,2066           02231                           TC       SETCOARS                              
005571,000124: 
005572,000125: 13,2067           36276                           CAF      SIX                                   
005573,000126: 13,2070           05701                           TC       WAITLIST                              
005574,000127: 13,2071  E3,1455                                  EBANK=   COMMAND                               
005575,000128: 13,2071           02074 26003                     2CADR    COARS                                 
005576,000129: 
005577,000130: 13,2073           12043                           TCF      MODEEXIT                              
005578,000131: 
005579,000132: 13,2074           02705        COARS              TC       CAGETEST                              
005580,000133: 13,2075           37750                           CAF      BIT6                                  #  ENABLE ALL THREE ISS CDU ERROR COUNTERS
005581,000134: 13,2076           00006                           EXTEND                                         
005582,000135: 13,2077           05012                           WOR      CHAN12                                
005583,000136: 
005584,000137: 13,2100           37754                           CAF      TWO                                   #  SET CDU INDICATOR
005585,000138: 13,2101           55460        COARS1             TS       CDUIND                                
005586,000139: 
005587,000140: 13,2102           51460                           INDEX    CDUIND                                #  COMPUTE THETAD - THETAA IN 1:S
005588,000141: 13,2103           30400                           CA       THETAD                                #    COMPLEMENT FORM
005589,000142: 13,2104           00006                           EXTEND                                         
005590,000143: 13,2105           51460                           INDEX    CDUIND                                
005591,000144: 13,2106           20032                           MSU      CDUX                                  
005592,000145: 13,2107           00006                           EXTEND                                         
005593,000146: 
005594,000147: 13,2110           77741                           MP       BIT13                                 #  SHIFT RIGHT 2
005595,000148: 13,2111           56001                           XCH      L                                     #  ROUND
005596,000149: 13,2112           60000                           DOUBLE                                         
005597,000150: 13,2113           54061                           TS       ITEMP1                                
005598,000151: 13,2114           12116                           TCF      +2                                    
005599,000152: 13,2115           26001                           ADS      L                                     
005600,000153: 
005601,000154: 13,2116           51460                           INDEX    CDUIND                                #  DIFFERENCE TO BE COMPUTED
005602,000155: 13,2117           23455                           LXCH     COMMAND                               
005603,000156: 13,2120           11460                           CCS      CDUIND                                
005604,000157: 13,2121           02101                           TC       COARS1                                
005605,000158: 
005606,000159: 13,2122           37754                           CAF      TWO                                   #  MINIMUM OF 4 MS WAIT
005607,000160: 13,2123           05722                           TC       VARDELAY                              
005608,000161: 

Page 129

005610,000163: 13,2124           02705        COARS2             TC       CAGETEST                              #  DONT CONTINUE IF CAGED.
005611,000164: 13,2125           54061                           TS       ITEMP1                                #  SETS TO +0.
005612,000165: 13,2126           37754                           CAF      TWO                                   #  SET CDU INDICATOR
005613,000166: 13,2127           55460                 +3        TS       CDUIND                                
005614,000167: 
005615,000168: 13,2130           51460                           INDEX    CDUIND                                
005616,000169: 13,2131           11455                           CCS      COMMAND                               #  NUMBER OF PULSES REQUIRED
005617,000170: 13,2132           02136                           TC       COMPOS                                #  GREATER THAN MAX ALLOWED
005618,000171: 
005619,000172: 13,2133           02145                           TC       NEXTCDU    +1                         
005620,000173: 13,2134           02210                           TC       COMNEG                                
005621,000174: 13,2135           02145                           TC       NEXTCDU    +1                         
005622,000175: 
005623,000176: 13,2136           63013        COMPOS             AD       -COMMAX                               #  COMMAX = MAX NUMBER OF PULSES ALLOWED
005624,000177: 13,2137           00006                           EXTEND                                         #    MINUS ONE
005625,000178: 13,2140           62220                           BZMF     COMZERO                               
005626,000179: 13,2141           51460                           INDEX    CDUIND                                
005627,000180: 13,2142           55455                           TS       COMMAND                               #  REDUCE COMMAND BY MAX NUMBER OF PULSES
005628,000181: 13,2143           43014                           CS       -COMMAX-                              #    ALLOWED
005629,000182: 
005630,000183: 13,2144           24061        NEXTCDU            INCR     ITEMP1                                
005631,000184: 13,2145           51460                           INDEX    CDUIND                                
005632,000185: 13,2146           54050                           TS       CDUXCMD                               #  SET UP COMMAND REGISTER.
005633,000186: 
005634,000187: 13,2147           11460                           CCS      CDUIND                                
005635,000188: 13,2150           02127                           TC       COARS2     +3                         
005636,000189: 
005637,000190: 13,2151           10061                           CCS      ITEMP1                                #  SEE IF ANY PULSES TO GO OUT.
005638,000191: 13,2152           12224                           TCF      SENDPULS                              
005639,000192: 
005640,000193: 13,2153           05717                           TC       FIXDELAY                              #  WAIT FOR GIMBALS TO SETTLE.
005641,000194: 13,2154           00226                           DEC      150        B-14                       
005642,000195: 

Page 130

005644,000197: 13,2155           37754                           CAF      TWO                                   #  AT END OF COMMAND, CHECK TO SEE THAT
005645,000198: 13,2156           54061        CHKCORS            TS       ITEMP1                                #  GIMBALS ARE WITHIN 2 DEGREES OF THETAD.
005646,000199: 13,2157           50000                           INDEX    A                                     
005647,000200: 13,2160           30032                           CA       CDUX                                  
005648,000201: 13,2161           00006                           EXTEND                                         
005649,000202: 13,2162           50061                           INDEX    ITEMP1                                
005650,000203: 13,2163           20400                           MSU      THETAD                                
005651,000204: 13,2164           10000                           CCS      A                                     
005652,000205: 13,2165           12201                           TCF      COARSERR                              
005653,000206: 13,2166           12170                           TCF      CORSCHK2                              
005654,000207: 13,2167           12201                           TCF      COARSERR                              
005655,000208: 
005656,000209: 13,2170           10061        CORSCHK2           CCS      ITEMP1                                
005657,000210: 13,2171           12156                           TCF      CHKCORS                               
005658,000211: 
005659,000212: 13,2172           55455                           TS       GCOMP                                 #  ZERO GYRO COMPENSATION REGISTERS IN
005660,000213: 13,2173           55456                           TS       GCOMP      +1                         #  PREPARATION FOR COMPENSATION.
005661,000214: 13,2174           55457                           TS       GCOMP      +2                         
005662,000215: 13,2175           55460                           TS       GCOMP      +3                         
005663,000216: 13,2176           55461                           TS       GCOMP      +4                         
005664,000217: 13,2177           55462                           TS       GCOMP      +5                         
005665,000218: 
005666,000219: 13,2200           12675                           TCF      ENDIMU                                #  END OF COARSE ALIGNMENT.
005667,000220: 
005668,000221: 13,2201           62207        COARSERR           AD       COARSTOL                              #  2 DEGREES.
005669,000222: 13,2202           00006                           EXTEND                                         
005670,000223: 13,2203           62170                           BZMF     CORSCHK2                              
005671,000224: 
005672,000225: 13,2204           04744                           TC       ALARM                                 #  COARSE ALIGN ERROR.
005673,000226: 13,2205           00211                           OCT      211                                   
005674,000227: 
005675,000228: 13,2206           12703                           TCF      IMUBAD                                
005676,000229: 
005677,000230: 13,2207           77511        COARSTOL           DEC      -.01111                               #  2 DEGREES SCALED AT HALF-REVOLUTIONS.
005678,000231: 

Page 131

005680,000233: 13,2210           63013        COMNEG             AD       -COMMAX                               
005681,000234: 13,2211           00006                           EXTEND                                         
005682,000235: 13,2212           62220                           BZMF     COMZERO                               
005683,000236: 13,2213           40000                           COM                                            
005684,000237: 13,2214           51460                           INDEX    CDUIND                                
005685,000238: 13,2215           55455                           TS       COMMAND                               
005686,000239: 13,2216           33014                           CA       -COMMAX-                              
005687,000240: 13,2217           02144                           TC       NEXTCDU                               
005688,000241: 
005689,000242: 13,2220           37761        COMZERO            CAF      ZERO                                  
005690,000243: 13,2221           51460                           INDEX    CDUIND                                
005691,000244: 13,2222           57455                           XCH      COMMAND                               
005692,000245: 13,2223           02144                           TC       NEXTCDU                               
005693,000246: 
005694,000247: 13,2224           33012        SENDPULS           CAF      13,14,15                              
005695,000248: 13,2225           00006                           EXTEND                                         
005696,000249: 13,2226           05014                           WOR      CHAN14                                
005697,000250: 13,2227           33015                           CAF      600MS                                 
005698,000251: 13,2230           12123                           TCF      COARS2     -1                         #  AND THEN TO VARDELAY.
005699,000252: 
005700,000253: 13,2231           47750        SETCOARS           CS       BIT6                                  #  CLEAR ERROR COUNTER BEFORE MODE SWITCH.
005701,000254: 13,2232           00006                           EXTEND                                         
005702,000255: 13,2233           03012                           WAND     12                                    
005703,000256: 13,2234           37752                           CAF      BIT4                                  #  PUT ISS IN COARSE ALIGN.
005704,000257: 13,2235           00006                           EXTEND                                         
005705,000258: 13,2236           05012                           WOR      12                                    
005706,000259: 
005707,000260: 13,2237           42250                           CS       OCT40010                              #  TURN ON NO ATT LAMP.
005708,000261: 13,2240           70326                           MASK     DSPTAB     +11D                       
005709,000262: 13,2241           62250                           AD       OCT40010                              
005710,000263: 13,2242           54326                           TS       DSPTAB     +11D                       
005711,000264: 
005712,000265: 13,2243           47752                           CS       BIT4                                  #  INHIBIT IMU FAIL.
005713,000266: 13,2244           70365                           MASK     IMODES30                              
005714,000267: 13,2245           67752                           AD       BIT4                                  
005715,000268: 13,2246           54365                           TS       IMODES30                              
005716,000269: 
005717,000270: 13,2247           00002                           TC       Q                                     
005718,000271: 
005719,000272: 13,2250           40010        OCT40010           OCT      40010                                 
005720,000273: 

Page 132

005722,000275:                                                                                                  #           IMU FINE ALIGN MODE SWITCH.
005723,000276: 
005724,000277: 13,2251           00004        IMUFINE            INHINT                                         
005725,000278: 13,2252           02717                           TC       CAGETSTJ                              #  SEE IF IMU BEING CAGED.
005726,000279: 
005727,000280: 13,2253           43011                           CS       BITS4-6                               #  RESET ZERO, COARSE, AND ECTR ENABLE.
005728,000281: 13,2254           00006                           EXTEND                                         
005729,000282: 13,2255           03012                           WAND     12                                    
005730,000283: 
005731,000284: 13,2256           02323                           TC       NOATTOFF                              #  TURN OFF NO ATT LAMP.
005732,000285: 
005733,000286: 13,2257           37744                           CAF      BIT10                                 #  IMU FAIL WAS INHIBITED DURING THE
005734,000287: 13,2260           05701                           TC       WAITLIST                              #  PRESUMABLY PRECEDING COARSE ALIGN. LEAVE
005735,000288: 13,2261  E3,1455                                  EBANK=   COMMAND                               
005736,000289: 13,2261           02272 26003                     2CADR    IFAILOK                               #  IT ON FOR THE FIRST 5 SECS OF FINE ALIGN
005737,000290: 
005738,000291: 13,2263           33016                           CAF      90SEC                                 #  GYRO RE-CENTERING TIME.
005739,000292: 13,2264           05701                           TC       WAITLIST                              
005740,000293: 13,2265  E3,1455                                  EBANK=   COMMAND                               
005741,000294: 13,2265           02270 26003                     2CADR    IMUFINED                              
005742,000295: 
005743,000296: 13,2267           12043                           TCF      MODEEXIT                              
005744,000297: 
005745,000298: 13,2270           02705        IMUFINED           TC       CAGETEST                              #  SEE THAT NO ONE HAS CAGED THE IMU.
005746,000299: 13,2271           12675                           TCF      ENDIMU                                
005747,000300: 
005748,000301: 13,2272           02712        IFAILOK            TC       CAGETSTQ                              #  ENABLE IMU FIAL UNLESS IMU BEING CAGED.
005749,000302: 13,2273           15745                           TCF      TASKOVER                              #  IT IS.
005750,000303: 
005751,000304: 13,2274           37752                           CAF      BIT4                                  #  DONT RESET IMU FAIL INHIBIT IF SOMEONE
005752,000305: 13,2275           00006                           EXTEND                                         #  HAS GONE INTO COARSE ALIGN.
005753,000306: 13,2276           02012                           RAND     12                                    
005754,000307: 13,2277           10000                           CCS      A                                     
005755,000308: 13,2300           15745                           TCF      TASKOVER                              
005756,000309: 
005757,000310: 13,2301           47752                           CS       BIT4                                  
005758,000311: 13,2302           70365        PFAILOK2           MASK     IMODES30                              
005759,000312: 13,2303           54365                           TS       IMODES30                              
005760,000313: 13,2304           05307                           TC       IBNKCALL                              #  THE ISS WARNING LIGHT MAY COME ON NOW
005761,000314: 13,2305           24763                           CADR     SETISSW                               #  THAT THE INHIBIT HAS BEEN REMOVED.
005762,000315: 13,2306           15745                           TCF      TASKOVER                              
005763,000316: 
005764,000317: 13,2307           02712        PFAILOK            TC       CAGETSTQ                              #  ENABLE PIP FAIL PROG ALARM.
005765,000318: 13,2310           15745                           TCF      TASKOVER                              
005766,000319: 
005767,000320: 13,2311           47744                           CS       BIT10                                 #  MAKE PREVIOUS VALUE OF PIPA FAIL THE
005768,000321: 13,2312           70365                           MASK     IMODES30                              #  NO FAIL STATE SO THAT IF THE FAILURE
005769,000322: 13,2313           67744                           AD       BIT10                                 #  INDICATION IS ON NOW, IT WILL BE PICKED
005770,000323: 13,2314           54365                           TS       IMODES30                              #  UP (ROUTINE DETECTS ONLY CHANGES).
005771,000324: 

Page 133

005773,000326: 13,2315           47741                           CS       BIT13                                 #  PIPA FAIL BIT IS KEPT IN TWO PLACES FOR
005774,000327: 13,2316           70366                           MASK     IMODES33                              
005775,000328: 13,2317           67741                           AD       BIT13                                 
005776,000329: 13,2320           54366                           TS       IMODES33                              
005777,000330: 
005778,000331: 13,2321           47751                           CS       BIT5                                  
005779,000332: 13,2322           12302                           TCF      PFAILOK2                              
005780,000333: 
005781,000334: 13,2323           42250        NOATTOFF           CS       OCT40010                              #  TURN OFF NO ATT LAMP.
005782,000335: 13,2324           70326                           MASK     DSPTAB     +11D                       
005783,000336: 13,2325           67737                           AD       BIT15                                 
005784,000337: 13,2326           54326                           TS       DSPTAB     +11D                       
005785,000338: 
005786,000339: 13,2327           00002                           TC       Q                                     
005787,000340: 

Page 134

005789,000342:                                                                                                  #           ROUITNES TO INITIATE AND TERMINATE PROGRAM USE OF THE PIPAS. NO IMUSTALL REQUIRED IN EITHER CASE.
005790,000343: 
005791,000344: 13,2330           02712        PIPUSE             TC       CAGETSTQ                              #  DONT ENABLE PIPA FAIL IF IMU BEING CAGED
005792,000345: 13,2331           15237                           TCF      SWRETURN                              
005793,000346: 
005794,000347: 13,2332           00004                           INHINT                                         
005795,000348: 13,2333           37761                           CAF      ZERO                                  #  ZERO COUNTERS.
005796,000349: 13,2334           54037                           TS       PIPAX                                 
005797,000350: 13,2335           54040                           TS       PIPAY                                 
005798,000351: 13,2336           54041                           TS       PIPAZ                                 
005799,000352: 
005800,000353: 13,2337           47755                           CS       BIT1                                  #  IF PIPA FAILS FROM NOW ON (UNTIL
005801,000354: 13,2340           70365                           MASK     IMODES30                              #  PIPFREE), LIGHT ISS WARNING.
005802,000355: 13,2341           54365                           TS       IMODES30                              
005803,000356: 
005804,000357: 13,2342           05307        PIPFREE2           TC       IBNKCALL                              #  ISS WARNING MIGHT COME ON NOW.
005805,000358: 13,2343           24763                           CADR     SETISSW                               #  (OR GO OFF ON PIPFREE).
005806,000359: 
005807,000360: 13,2344           12043                           TCF      MODEEXIT                              
005808,000361: 
005809,000362: 13,2345           00004        PIPFREE            INHINT                                         #  PROGRAM DONE WITH PIPAS. DONT LIGHT
005810,000363: 13,2346           47755                           CS       BIT1                                  #  ISS WARNING.
005811,000364: 13,2347           70365                           MASK     IMODES30                              
005812,000365: 13,2350           67755                           AD       BIT1                                  
005813,000366: 13,2351           54365                           TS       IMODES30                              
005814,000367: 
005815,000368: 13,2352           77744                           MASK     BIT10                                 #  IF PIP FAIL ON, DO PROG ALSRM AND RESET
005816,000369: 13,2353           10000                           CCS      A                                     #  ISS WARNING.
005817,000370: 13,2354           12043                           TCF      MODEEXIT                              
005818,000371: 
005819,000372: 13,2355           04744                           TC       ALARM                                 
005820,000373: 13,2356           00212                           OCT      212                                   
005821,000374: 
005822,000375: 13,2357           00004                           INHINT                                         
005823,000376: 
005824,000377: 13,2360           12342                           TCF      PIPFREE2                              
005825,000378: 

Page 135

005827,000380:                                                                                                  #           THE FOLLOWING ROUTINE TORQUES THE IRIGS ACCORDING TO DOUBLE PRECISION INPUTS IN THE SIX REGISTERS
005828,000381:                                                                                                  #  BEGINNING AT THE ECADR ARRIVING IN A. THE MINIMUM SIZE OF ANY PULSE TRAIN IS 16 PULSES (.25 CDU COUNTS). THE
005829,000382:                                                                                                  #  UNSENT PORTION OF THE COMMAND IS LEFT INTACT IN THE INPUT COMMAND REGISTERS.
005830,000383: 
005831,000384: 13,2361  E3,1400                                  EBANK=   1400                                  #  VARIABLE, ACTUALLY.
005832,000385: 
005833,000386: 13,2361           54151        IMUPULSE           TS       MPAC       +5                         #  SAVE ARRIVING ECADR.
005834,000387: 13,2362           02717                           TC       CAGETSTJ                              #  DONT PROCEED IF IMU BEING CAGED.
005835,000388: 
005836,000389: 13,2363           10356                           CCS      LGYRO                                 #  SEE IF GYROS BUSY.
005837,000390: 13,2364           02426                           TC       GYROBUSY                              #  SLEEP.
005838,000391: 
005839,000392: 13,2365           54146                           TS       MPAC       +2                         
005840,000393: 13,2366           37750                           CAF      BIT6                                  #  ENABLE THE POWER SUPPLY.
005841,000394: 13,2367           00006                           EXTEND                                         
005842,000395: 13,2370           05014                           WOR      14                                    
005843,000396: 
005844,000397: 13,2371           37753                           CAF      FOUR                                  
005845,000398: 13,2372           00004        GWAKE2             INHINT                                         #  (IF A JOB WAS PUT TO SLEEP, THE POWER
005846,000399: 13,2373           05701                           TC       WAITLIST                              #  SUPPLY IS LEFT ON BY THE WAKING JOB).
005847,000400: 
005848,000401: 13,2374  E3,1455                                  EBANK=   COMMAND                               
005849,000402: 13,2374           02444 26003                     2CADR    STRTGYRO                              
005850,000403: 13,2376           30151                           CA       MPAC       +5                         #  SET UP EBANK, SAVING CALLER'S EBANK FOR
005851,000404: 13,2377           56003                           XCH      EBANK                                 #  RESTORATION ON RETURN.
005852,000405: 13,2400           56151                           XCH      MPAC       +5                         
005853,000406: 13,2401           54356                           TS       LGYRO                                 #  RESERVES GYROS.
005854,000407: 13,2402           74553                           MASK     LOW8                                  
005855,000408: 13,2403           54061                           TS       ITEMP1                                
005856,000409: 
005857,000410: 13,2404           37754                           CAF      TWO                                   #  FORCE SIGN AGREEMENT ON INPUTS.
005858,000411: 13,2405           54147        GYROAGRE           TS       MPAC       +3                         
005859,000412: 13,2406           60000                           DOUBLE                                         
005860,000413: 13,2407           60061                           AD       ITEMP1                                
005861,000414: 13,2410           54150                           TS       MPAC       +4                         
005862,000415: 13,2411           00006                           EXTEND                                         
005863,000416: 13,2412           50000                           INDEX    A                                     
005864,000417: 13,2413           31401                           DCA      1400                                  
005865,000418: 13,2414           52145                           DXCH     MPAC                                  
005866,000419: 13,2415           07320                           TC       TPAGREE                               
005867,000420: 13,2416           52145                           DXCH     MPAC                                  
005868,000421: 13,2417           50150                           INDEX    MPAC       +4                         
005869,000422: 13,2420           53401                           DXCH     1400                                  
005870,000423: 
005871,000424: 13,2421           10147                           CCS      MPAC       +3                         
005872,000425: 13,2422           12405                           TCF      GYROAGRE                              
005873,000426: 
005874,000427: 13,2423           30151                           CA       MPAC       +5                         #  RESTORE CALLER'S EBANK.
005875,000428: 13,2424           54003                           TS       EBANK                                 
005876,000429: 13,2425           12043                           TCF      MODEEXIT                              
005877,000430: 

Page 136

005879,000432:                                                                                                  #           ROUTINES TO ALLOW TORQUING BY ONLY ONE JOB AT A TIME.
005880,000433: 
005881,000434: 13,2426           00006        GYROBUSY           EXTEND                                         #  SAVE RETURN 2FCADR.
005882,000435: 13,2427           30124                           DCA      BUF2                                  
005883,000436: 13,2430           52145                           DXCH     MPAC                                  
005884,000437: 13,2431           32443        REGSLEEP           CAF      LGWAKE                                
005885,000438: 13,2432           15563                           TCF      JOBSLEEP                              
005886,000439: 
005887,000440: 13,2433           10356        GWAKE              CCS      LGYRO                                 #  WHEN AWAKENED, SEE IF GYROS STILL BUSY.
005888,000441: 13,2434           12431                           TCF      REGSLEEP                              #  IF SO, SLEEP SOME MORE.
005889,000442: 
005890,000443: 13,2435           54146                           TS       MPAC       +2                         
005891,000444: 13,2436           00006                           EXTEND                                         
005892,000445: 13,2437           30145                           DCA      MPAC                                  
005893,000446: 13,2440           52124                           DXCH     BUF2                                  #  RESTORE SWRETURN INFO.
005894,000447: 13,2441           37755                           CAF      ONE                                   
005895,000448: 13,2442           12372                           TCF      GWAKE2                                
005896,000449: 
005897,000450: 13,2443           26433        LGWAKE             CADR     GWAKE                                 
005898,000451: 

Page 137

005900,000453:                                                                                                  #           GYRO-TORQUING WAITLIST TASKS.
005901,000454: 
005902,000455: 13,2444           42672        STRTGYRO           CS       GDESELCT                              #  DE-SELECT LAST GYRO.
005903,000456: 13,2445           00006                           EXTEND                                         
005904,000457: 13,2446           03014                           WAND     14                                    
005905,000458: 
005906,000459: 13,2447           02705                           TC       CAGETEST                              
005907,000460: 
005908,000461: 13,2450           30356        STRTGYR2           CA       LGYRO                                 #  JUMP ON PHASE COUNTER IN BITS 13-14.
005909,000462: 13,2451           00006                           EXTEND                                         
005910,000463: 13,2452           77752                           MP       BIT4                                  
005911,000464: 13,2453           50000                           INDEX    A                                     
005912,000465: 13,2454           12455                           TCF      +1                                    
005913,000466: 13,2455           02504                           TC       GSELECT                               #  =0. DO Y GYRO.
005914,000467: 13,2456           00202                           OCT      00202                                 
005915,000468: 
005916,000469: 13,2457           02504                           TC       GSELECT                               #  =1. DO Z GYRO.
005917,000470: 13,2460           00302                           OCT      00302                                 
005918,000471: 
005919,000472: 13,2461           02502                           TC       GSELECT    -2                         #  =2. DO X GYRO.
005920,000473: 13,2462           00100                           OCT      00100                                 
005921,000474: 
005922,000475: 13,2463           37761                           CAF      ZERO                                  #  =3. DONE
005923,000476: 13,2464           54356                           TS       LGYRO                                 
005924,000477: 13,2465           32443                           CAF      LGWAKE                                #  WAKE A POSSIBLE SLEEPING JOB.
005925,000478: 13,2466           05567                           TC       JOBWAKE                               
005926,000479: 
005927,000480: 13,2467           37754                           CAF      BIT2                                  #  DONT RESET POWER SUPPLY IF BIT SET
005928,000481: 13,2470           70366                           MASK     IMODES33                              #  (ONLY DURING GYRO TORQUE SCALE FACTOR
005929,000482: 13,2471           10000                           CCS      A                                     #  TEST).
005930,000483: 13,2472           12501                           TCF      NORESET                               
005931,000484: 
005932,000485: 13,2473           10064                           CCS      LOCCTR                                #  IF A JOB WAS AWAKENED, DONT RESET GYRO
005933,000486: 13,2474           12501                           TCF      NORESET                               #  ENABLE.
005934,000487: 
005935,000488: 13,2475           12501                           TCF      NORESET                               
005936,000489: 
005937,000490: 13,2476           47750                           CS       BIT6                                  #  IF NO JOB AWAKENED, RESET GYRO ENABLE.
005938,000491: 13,2477           00006                           EXTEND                                         
005939,000492: 13,2500           03014                           WAND     14                                    
005940,000493: 
005941,000494: 13,2501           12270        NORESET            TCF      IMUFINED                              
005942,000495: 

Page 138

005944,000497: 13,2502           47753                 -2        CS       FOUR                                  #  SPECIAL ENTRY TO REGRESS LGYRO FOR X.
005945,000498: 13,2503           26356                           ADS      LGYRO                                 
005946,000499: 
005947,000500: 13,2504           50002        GSELECT            INDEX    Q                                     #  SELECT GYRO.
005948,000501: 13,2505           30000                           CAF      0                                     #  PACKED WORD CONTAINS GYRO SELECT BITS
005949,000502: 13,2506           54064                           TS       ITEMP4                                #  AND INCREMENT TO LGYRO.
005950,000503: 13,2507           77757                           MASK     SEVEN                                 
005951,000504: 13,2510           67741                           AD       BIT13                                 
005952,000505: 13,2511           26356                           ADS      LGYRO                                 
005953,000506: 13,2512           54003                           TS       EBANK                                 
005954,000507: 13,2513           74553                           MASK     LOW8                                  
005955,000508: 13,2514           54061                           TS       ITEMP1                                
005956,000509: 
005957,000510: 13,2515           47757                           CS       SEVEN                                 
005958,000511: 
005959,000512: 13,2516           70064                           MASK     ITEMP4                                
005960,000513: 13,2517           54064                           TS       ITEMP4                                
005961,000514: 
005962,000515: 13,2520           00006                           EXTEND                                         #  MOVE DP COMMAND TO RUPTREGS FOR TESTING.
005963,000516: 13,2521           50061                           INDEX    ITEMP1                                
005964,000517: 13,2522           31401                           DCA      1400                                  
005965,000518: 13,2523           52071                           DXCH     RUPTREG1                              
005966,000519: 
005967,000520: 13,2524           10070                           CCS      RUPTREG1                              
005968,000521: 13,2525           12540                           TCF      MAJ+                                  
005969,000522: 13,2526           12530                           TCF      +2                                    
005970,000523: 13,2527           12653                           TCF      MAJ-                                  
005971,000524: 
005972,000525: 13,2530           10071                           CCS      RUPTREG2                              
005973,000526: 13,2531           12535                           TCF      MIN+                                  
005974,000527: 13,2532           12450                           TCF      STRTGYR2                              
005975,000528: 13,2533           12650                           TCF      MIN-                                  
005976,000529: 13,2534           12450                           TCF      STRTGYR2                              
005977,000530: 

Page 139

005979,000532: 13,2535           62571        MIN+               AD       -GYROMIN                              #  SMALL POSITIVE COMMAND. SEE IF AT LEAST
005980,000533: 13,2536           00006                           EXTEND                                         #  16 GYRO PULSES.
005981,000534: 13,2537           62450                           BZMF     STRTGYR2                              
005982,000535: 
005983,000536: 13,2540           00006        MAJ+               EXTEND                                         #  DEFINITE POSITIVE OUTPUT.
005984,000537: 13,2541           32674                           DCA      GYROFRAC                              
005985,000538: 13,2542           20071                           DAS      RUPTREG1                              
005986,000539: 
005987,000540: 13,2543           30064                           CA       ITEMP4                                #  SELECT POSITIVE TORQUING FOR THIS GYRO.
005988,000541: 13,2544           00006                           EXTEND                                         
005989,000542: 13,2545           05014                           WOR      14                                    
005990,000543: 
005991,000544: 13,2546           36130                           CAF      LOW7                                  #  LEAVE NUMBER OF POSSIBLE 8192 AUGMENTS
005992,000545: 13,2547           70071                           MASK     RUPTREG2                              #  TO INITIAL COMMAND IN MAJOR PART OF LONG
005993,000546: 13,2550           56071                           XCH      RUPTREG2                              #  TERM STORAGE AND TRUNCATED FRACTION
005994,000547: 13,2551           00006        GMERGE             EXTEND                                         #  IN MINOR PART. THE MAJOR PART WILL BE
005995,000548: 13,2552           77746                           MP       BIT8                                  #  COUNTED DOWN TO ZERO IN THE COURSE OF
005996,000549: 13,2553           54062                           TS       ITEMP2                                #  PUTTING OUT THE ENTIRE COMMAND.
005997,000550: 13,2554           30070                           CA       RUPTREG1                              
005998,000551: 13,2555           00006                           EXTEND                                         
005999,000552: 
006000,000553: 13,2556           77745                           MP       BIT9                                  
006001,000554: 13,2557           54070                           TS       RUPTREG1                              
006002,000555: 13,2560           30001                           CA       L                                     
006003,000556: 13,2561           00006                           EXTEND                                         
006004,000557: 13,2562           77740                           MP       BIT14                                 
006005,000558: 13,2563           26062                           ADS      ITEMP2                                #  INITIAL COMMAND.
006006,000559: 
006007,000560: 13,2564           00006                           EXTEND                                         #  SEE IF MORE THAN ONE PULSE TRAIN NEEDED
006008,000561: 13,2565           30071                           DCA      RUPTREG1                              #  (MORE THAN 16383 PULSES).
006009,000562: 13,2566           67763                           AD       MINUS1                                
006010,000563: 13,2567           10000                           CCS      A                                     
006011,000564: 13,2570           12614                           TCF      LONGGYRO                              
006012,000565: 13,2571           77600        -GYROMIN           OCT      -177                                  #  MAY BE ADJUSTED TO SPECIFY MINIMUM CMD.
006013,000566: 
006014,000567: 13,2572           12576                           TCF      +4                                    
006015,000568: 
006016,000569: 13,2573           37740                           CAF      BIT14                                 
006017,000570: 13,2574           26062                           ADS      ITEMP2                                
006018,000571: 13,2575           37761                           CAF      ZERO                                  
006019,000572: 
006020,000573: 13,2576           50061                 +4        INDEX    ITEMP1                                
006021,000574: 13,2577           53401                           DXCH     1400                                  
006022,000575: 

Page 140

006024,000577: 13,2600           30062                           CA       ITEMP2                                #  ENTIRE COMMAND.
006025,000578: 13,2601           54047        LASTSEG            TS       GYROCMD                               
006026,000579: 
006027,000580: 13,2602           00006                           EXTEND                                         
006028,000581: 13,2603           77744                           MP       BIT10                                 #  WAITLIST DT
006029,000582: 13,2604           66301                           AD       THREE                                 #  TRUNCATION AND PHASE UNCERTAINTIES.
006030,000583: 13,2605           05701                           TC       WAITLIST                              
006031,000584: 13,2606  E3,1455                                  EBANK=   COMMAND                               
006032,000585: 13,2606           02444 26003                     2CADR    STRTGYRO                              
006033,000586: 13,2610           37744        GYROEXIT           CAF      BIT10                                 #  TURN ON GYRO ACTIVITY TO START TRAIN.
006034,000587: 13,2611           00006                           EXTEND                                         
006035,000588: 13,2612           05014                           WOR      14                                    
006036,000589: 13,2613           15745                           TCF      TASKOVER                              
006037,000590: 
006038,000591: 13,2614           50061        LONGGYRO           INDEX    ITEMP1                                
006039,000592: 13,2615           53401                           DXCH     1400                                  #  INITIAL COMMAND OUT PLUS N AUGMENTS OF
006040,000593: 13,2616           37740                           CAF      BIT14                                 #  8192. INITIAL COMMAND IS AT LEAST 8192.
006041,000594: 13,2617           60062                           AD       ITEMP2                                
006042,000595: 13,2620           54047                           TS       GYROCMD                               
006043,000596: 
006044,000597: 13,2621           00006        AUG3               EXTEND                                         #  GET WAITLIST DT TO TIME WHEN TRAIN IS
006045,000598: 13,2622           77744                           MP       BIT10                                 #  ALMOST OUT.
006046,000599: 13,2623           65357                           AD       NEG3                                  
006047,000600: 13,2624           05701                           TC       WAITLIST                              
006048,000601: 13,2625  E3,1455                                  EBANK=   COMMAND                               
006049,000602: 
006050,000603: 13,2625           02630 26003                     2CADR    8192AUG                               
006051,000604: 13,2627           12610                           TCF      GYROEXIT                              
006052,000605: 
006053,000606: 13,2630           02705        8192AUG            TC       CAGETEST                              
006054,000607: 
006055,000608: 13,2631           30356                           CA       LGYRO                                 #  ADD 8192 PULSES TO GYROCMD
006056,000609: 13,2632           54003                           TS       EBANK                                 
006057,000610: 13,2633           74553                           MASK     LOW8                                  
006058,000611: 13,2634           54061                           TS       ITEMP1                                
006059,000612: 
006060,000613: 13,2635           50061                           INDEX    ITEMP1                                #  SEE IF THIS IS THE LAST AUG.
006061,000614: 13,2636           11400                           CCS      1400                                  
006062,000615: 13,2637           12643                           TCF      AUG2                                  #  MORE TO COME.
006063,000616: 
006064,000617: 13,2640           37740                           CAF      BIT14                                 
006065,000618: 13,2641           26047                           ADS      GYROCMD                               
006066,000619: 13,2642           12602                           TCF      LASTSEG    +1                         
006067,000620: 
006068,000621: 13,2643           50061        AUG2               INDEX    ITEMP1                                
006069,000622: 13,2644           55400                           TS       1400                                  
006070,000623: 13,2645           37740                           CAF      BIT14                                 
006071,000624: 13,2646           26047                           ADS      GYROCMD                               
006072,000625: 
006073,000626: 13,2647           12621                           TCF      AUG3                                  #  COMPUTE DT.
006074,000627: 

Page 141

006076,000629: 13,2650           62571        MIN-               AD       -GYROMIN                              #  POSSIBLE NEGATIVE OUTPUT.
006077,000630: 13,2651           00006                           EXTEND                                         
006078,000631: 13,2652           62450                           BZMF     STRTGYR2                              
006079,000632: 
006080,000633: 13,2653           00006        MAJ-               EXTEND                                         #  DEFINITE NEGATIVE OUTPUT.
006081,000634: 13,2654           42674                           DCS      GYROFRAC                              
006082,000635: 13,2655           20071                           DAS      RUPTREG1                              
006083,000636: 
006084,000637: 13,2656           30064                           CA       ITEMP4                                #  SELECT NEGATIVE TORQUING FOR THIS GYRO.
006085,000638: 13,2657           67745                           AD       BIT9                                  
006086,000639: 13,2660           00006                           EXTEND                                         
006087,000640: 13,2661           05014                           WOR      14                                    
006088,000641: 
006089,000642: 13,2662           40070                           CS       RUPTREG1                              #  SET UP RUPTREGS TO FALL INTO GMERGE.
006090,000643: 13,2663           54070                           TS       RUPTREG1                              #  ALL NUMBERS PUT INTO GYROCMD ARE
006091,000644: 13,2664           40071                           CS       RUPTREG2                              #  POSITIVE - BIT9 OF CHAN 14 DETERMINES
006092,000645: 13,2665           76130                           MASK     LOW7                                  #  THE SIGN OF THE COMMAND.
006093,000646: 13,2666           40000                           COM                                            
006094,000647: 13,2667           56071                           XCH      RUPTREG2                              
006095,000648: 13,2670           40000                           COM                                            
006096,000649: 13,2671           12551                           TCF      GMERGE                                
006097,000650: 
006098,000651: 13,2672           01700        GDESELCT           OCT      1700                                  #  TURN OFF SELECT AND ACTIVITY BITS.
006099,000652: 
006100,000653: 13,2673           00000 00034  GYROFRAC           2DEC     .215       B-21                       
006101,000654: 

Page 142

006103,000656:                                                                                                  #           IMU MODE SWITCHING ROUTINES COME HERE WHEN ACTION COMPLETE.
006104,000657: 
006105,000658: 13,2675           00006        ENDIMU             EXTEND                                         #  MODE IS BAD IF CAGE HAS OCCURED OR IF
006106,000659: 13,2676           00011                           READ     11                                    #  ISS WARNING IS ON.
006107,000660: 13,2677           77755                           MASK     BIT1                                  
006108,000661: 13,2700           10000                           CCS      A                                     
006109,000662: 13,2701           12703                           TCF      IMUBAD                                
006110,000663: 
006111,000664: 13,2702           12731        IMUGOOD            TCF      GOODEND                               #  WITH C(A) = 0.
006112,000665: 
006113,000666: 13,2703           37761        IMUBAD             CAF      ZERO                                  
006114,000667: 13,2704           12726                           TCF      BADEND                                
006115,000668: 
006116,000669: 13,2705           37750        CAGETEST           CAF      BIT6                                  #  SUBROUTINE TO TERMINATE IMU MODE
006117,000670: 
006118,000671: 13,2706           70365                           MASK     IMODES30                              #  SWITCH IF IMU HAS BEEN CAGED.
006119,000672: 13,2707           10000                           CCS      A                                     
006120,000673: 13,2710           12703                           TCF      IMUBAD                                #  DIRECTLY.
006121,000674: 13,2711           00002                           TC       Q                                     #  WITH C(A) = +0.
006122,000675: 
006123,000676: 13,2712           40365        CAGETSTQ           CS       IMODES30                              #  SKIP IF IMU NOT BEING CAGED.
006124,000677: 13,2713           77750                           MASK     BIT6                                  
006125,000678: 13,2714           10000                           CCS      A                                     
006126,000679: 13,2715           24002                           INCR     Q                                     
006127,000680: 13,2716           00002                           TC       Q                                     
006128,000681: 
006129,000682: 13,2717           40365        CAGETSTJ           CS       IMODES30                              #  IF DURING MODE SWITCH INITIALIZATION
006130,000683: 13,2720           77750                           MASK     BIT6                                  #  IT IS FOUND THAT THE IMU IS BEING CAGED,
006131,000684: 13,2721           10000                           CCS      A                                     #  SET IMUCADR TO -0 TO INDICATE OPERATION
006132,000685: 13,2722           00002                           TC       Q                                     #  COMPLETE BUT FAILED. RETURN IMMEDIATELY
006133,000686: 
006134,000687: 13,2723           47761                           CS       ZERO                                  #  TO SWRETURN.
006135,000688: 13,2724           54367                           TS       IMUCADR                               
006136,000689: 13,2725           12043                           TCF      MODEEXIT                              
006137,000690: 

Page 143

006139,000692:                                                                                                  #           GENERALIZED MODE SWITCHING TERMINATION. ENTER AT GOODEND FOR SUCCESSFUL COMPLETION OF AN I/O OPERATION
006140,000693:                                                                                                  #  OR AT BADEND FOR AN UNSUCCESSFUL ONE.  C(A) OR ARRIVAL =0 FOR IMU, 1 FOR AOT, 2 FOR RADARS, & 3 FOR ATT MANU.
006141,000694: 
006142,000695: 13,2726           54071        BADEND             TS       RUPTREG2                              #  DEVICE INDEX.
006143,000696: 13,2727           47761                           CS       ZERO                                  #  FOR FAILURE.
006144,000697: 13,2730           12733                           TCF      GOODEND    +2                         
006145,000698: 
006146,000699: 13,2731           54071        GOODEND            TS       RUPTREG2                              
006147,000700: 13,2732           47755                           CS       ONE                                   #  FOR SUCCESS.
006148,000701: 
006149,000702: 13,2733           54072                           TS       RUPTREG3                              
006150,000703: 13,2734           50071                           INDEX    RUPTREG2                              #  SEE IF USING PROGRAM ASLEEP.
006151,000704: 13,2735           10367                           CCS      MODECADR                              
006152,000705: 13,2736           12740                           TCF      +2                                    #  YES - WAKE IT UP.
006153,000706: 13,2737           12750                           TCF      ENDMODE                               #  IF 0, PROGRAM NOT IN YET.
006154,000707: 
006155,000708: 13,2740           37761                           CAF      ZERO                                  #  WAKE SLEEPING PROGRAM.
006156,000709: 13,2741           50071                           INDEX    RUPTREG2                              
006157,000710: 13,2742           56367                           XCH      MODECADR                              
006158,000711: 
006159,000712: 13,2743           05567                           TC       JOBWAKE                               
006160,000713: 
006161,000714: 13,2744           40072                           CS       RUPTREG3                              #  ADVANCE LOC IF SUCCESSFUL.
006162,000715: 13,2745           50064                           INDEX    LOCCTR                                
006163,000716: 13,2746           26154                           ADS      LOC                                   
006164,000717: 
006165,000718: 13,2747           15745                           TCF      TASKOVER                              
006166,000719: 
006167,000720: 13,2750           30072        ENDMODE            CA       RUPTREG3                              #  -0 INDICATES OPERATION COMPLETE BUT
006168,000721: 13,2751           50071                           INDEX    RUPTREG2                              #  UNSUCCESSFUL - -1 INDICATES COMPLETE AND
006169,000722: 13,2752           54367                           TS       MODECADR                              #  SUCCESSFUL.
006170,000723: 13,2753           15745                           TCF      TASKOVER                              
006171,000724: 

Page 144

006173,000726:                                                                                                  #           GENERAL STALLING ROUTINE. USING PROGRAMS COME HERE TO WAIT FOR I/O COMPLETION.
006174,000727: 
006175,000728: 13,2754           36301        ATTSTALL           CAF      THREE                                 #  ATTITUDE MANEUVER STALL
006176,000729: 13,2755           12763                           TCF      STALL                                 
006177,000730: 
006178,000731: 13,2756           37754        RADSTALL           CAF      TWO                                   #  RR AND LR STALL.
006179,000732: 13,2757           12763                           TCF      STALL                                 
006180,000733: 
006181,000734: 13,2760           37755        AOTSTALL           CAF      ONE                                   #  AOT.
006182,000735: 13,2761           02763                           TC       STALL                                 
006183,000736: 
006184,000737: 13,2762  13,2760               OPTSTALL           EQUALS   AOTSTALL                              
006185,000738: 
006186,000739: 13,2762           37761        IMUSTALL           CAF      ZERO                                  #  IMU.
006187,000740: 
006188,000741: 13,2763           00004        STALL              INHINT                                         
006189,000742: 13,2764           54071                           TS       RUPTREG2                              #  SAVE DEVICE INDEX.
006190,000743: 13,2765           50000                           INDEX    A                                     #  SEE IF OPERATION COMPLETE.
006191,000744: 13,2766           10367                           CCS      MODECADR                              
006192,000745: 13,2767           13005                           TCF      MODABORT                              #  ALLOWABLE STATES ARE +0, -1, AND -0.
006193,000746: 13,2770           13001                           TCF      MODESLP                               #  OPERATION INCOMPLETE.
006194,000747: 13,2771           12775                           TCF      MODEGOOD                              #  COMPLETE AND GOOD IF = -1.
006195,000748: 
006196,000749: 13,2772           50071        MG2                INDEX    RUPTREG2                              #  COMPLETE AND FAILED IF -0.  RESET TO +0.
006197,000750: 13,2773           54367                           TS       MODECADR                              #  RETURN TO CALLER.
006198,000751: 13,2774           12043                           TCF      MODEEXIT                              
006199,000752: 
006200,000753: 13,2775           10000        MODEGOOD           CCS      A                                     #  MAKE SURE INITIAL STATE -1.
006201,000754: 13,2776           13005                           TCF      MODABORT                              
006202,000755: 
006203,000756: 13,2777           24123                           INCR     BUF2                                  #  IF SO, INCREMENT RETURN ADDRESS AND
006204,000757: 13,3000           12772                           TCF      MG2                                   #  RETURN IMMEDIATELY, SETTING CADR = +0.
006205,000758: 
006206,000759: 13,3001           05253        MODESLP            TC       MAKECADR                              #  CALL FROM SWITCHABLE FIXED ONLY.
006207,000760: 13,3002           50071                           INDEX    RUPTREG2                              
006208,000761: 13,3003           54367                           TS       MODECADR                              
006209,000762: 13,3004           15563                           TCF      JOBSLEEP                              
006210,000763: 
006211,000764: 13,3005           06000        MODABORT           TC       ABORT                                 #  TWO PROGRAMS USING SAME DEVICE.
006212,000765: 13,3006           01210                           OCT      1210                                  
006213,000766: 

Page 145

006215,000768:                                                                                                  #  CONSTANTS FOR MODE SWITCHING ROUTINES
006216,000769: 
006217,000770: 13,3007           00014        BITS3&4            OCT      14                                    
006218,000771: 13,3010           00050        BITS4&6            OCT      00050                                 
006219,000772: 13,3011           00070        BITS4-6            OCT      00070                                 
006220,000773: 13,3012     7746               IMUSEFLG           EQUALS   BIT8                                  #  INTERPRETER SWITCH 7.
006221,000774: 13,3012           70000        13,14,15           OCT      70000                                 
006222,000775: 
006223,000776: 13,3013           77500        -COMMAX            DEC      -191       B-14                       
006224,000777: 13,3014           77477        -COMMAX-           DEC      -192       B-14                       
006225,000778: 13,3015           00074        600MS              DEC      60         B-14                       
006226,000779: 13,3016     4311               3SECSM             EQUALS   3SECS                                 
006227,000780: 13,3016           21450        90SEC              DEC      9000       B-14                       

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