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.

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

Page 124

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

Page 125

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

Page 126

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

Page 127

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

Page 128

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

Page 129

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

Page 130

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

Page 131

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

Page 132

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

Page 133

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

Page 134

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

Page 135

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

Page 136

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

Page 137

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

Page 138

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

Page 139

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

Page 140

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

Page 141

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

Page 142

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

Page 143

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

Page 144

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

Page 145

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

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