Source Code

These source-code files were transcribed from scans made from Don Eyles's personal copy of BURST120 (SUNBURST 120). They were scanned at archive.org's Boston facility, and the scanning was sponsored by Mike Stewart. The code was transcribed from these scans by a team of volunteers who are referenced in the program comments. Comments from the original source code are in ALL-CAPS, whereas comments added later in transcription are in Mixed-Case. In some cases, where similar code blocks exist in previously-transcribed AGC programs (primarily Luminary 99, from Apollo 11) those code blocks were used as a starting point and then corrected to agree with the BURST120 scans. The full scans are available at the Virtual AGC project's collection at archive.org, while more-convenient reduced-size (but reduced-quality) images are available at the main Virtual AGC website. Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository. Notations on the program listing read, in part:

	YUL SYSTEM FOR AGC: REVISION 0 OF PROGRAM BURST120 
	BY NASA 2021106-031 DEC 7, 1967

	THIS LISTING IS A COPY OF A VERSION OF THE PROGRAM INTENDED 
	FOR USE IN THE ON-BOARD PRIMARY GUIDANCE COMPUTER IN THE 
	UNMANNED FLIGHT OF APOLLO LUNAR MODULE 1 --- THE AS206 MISSION.
Note that the date is the date of the printout, not the date of the program revision.

005812,000002:                                                                                                  ## Copyright:   Public domain.
005813,000003:                                                                                                  ## Filename:    IMU_MODE_SWITCHING_ROUTINES.agc
005814,000004:                                                                                                  ## Purpose:     A module for revision 0 of BURST120 (Sunburst).
005815,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
005816,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 5.
005817,000007:                                                                                                  ## Assembler:   yaYUL
005818,000008:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
005819,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
005820,000010:                                                                                                  ## Mod history: 2016-09-30 RSB  Created draft version.
005821,000011:                                                                                                  ##              2016-10-05 RSB  Completed transcription.
005822,000012:                                                                                                  ##              2016-10-30 MAS  Corrected MODEXIT->MODEEXIT.
005823,000013:                                                                                                  ##              2016-11-01 RSB  Typos.
005824,000014:                                                                                                  ##              2016-12-03 RSB  Fixed a bunch of comment errors with
005825,000015:                                                                                                  ##                              octopus/ProoferComments, but the process
005826,000016:                                                                                                  ##                              isn't complete yet because of a handful of
005827,000017:                                                                                                  ##                              pages that don't work well.
005828,000018:                                                                                                  ##              2016-12-05 RSB  Comment-proofing pass with octopus/ProoferComments
005829,000019:                                                                                                  ##                              completed; fixes made.
005830,000020:                                                                                                  ##              2017-03-15 RSB  Comment-text fixes identified in 6-way
005831,000021:                                                                                                  ##                              side-by-side diff of Sunburst 120 and Luminary 
005832,000022:                                                                                                  ##                              69/99/116/131/210.
005833,000023: 

Page 137

005835,000025:    4314                                           BLOCK    02                                    
005836,000026:    4314  E3,1455                                  EBANK=   COMMAND                               
005837,000027: 
005838,000028:                                                                                                  #  FIXED-FIXED ROUTINES.
005839,000029: 
005840,000030:    4314           37767        ZEROICDU           CAF      ZERO                                  #  ZERO ICDU COUNTERS.
005841,000031:    4315           54032                           TS       CDUX                                  
005842,000032:    4316           54033                           TS       CDUY                                  
005843,000033:    4317           54034                           TS       CDUZ                                  
005844,000034:    4320           00002                           TC       Q                                     
005845,000035: 
005846,000036:    4321           00620        4SECS              DEC      400        B-14                       
005847,000037:    4322           00454        3SECS              DEC      300        B-14                       
005848,000038: 
005849,000039:    4323     7753               SPSCODE            =        BIT9                                  
005850,000040: 

Page 138

005852,000042:                                                                                                  #  IMU ZEROING ROUTINE.
005853,000043: 
005854,000044: 13,2000                                           BANK     13                                    
005855,000045: 
005856,000046: 13,2000           00004        IMUZERO            INHINT                                         #  ROUTINE TO ZERO ICDUS.
005857,000047: 13,2001           40326                           CS       DSPTAB     +11D                       #  DONT ZERO CDUS IF IMU IN GIMBAL LOCK AND
005858,000048: 13,2002           72777                           MASK     BITS4&6                               #  COARSE ALIGN.
005859,000049: 13,2003           10000                           CCS      A                                     
005860,000050: 13,2004           12010                           TCF      IMUZEROA                              
005861,000051: 
005862,000052: 13,2005           04755                           TC       ALARM                                 #  IF SO.
005863,000053: 13,2006           00206                           OCT      206                                   
005864,000054: 
005865,000055: 13,2007           12712                           TCF      CAGETSTJ   +4                         
005866,000056: 
005867,000057: 13,2010           47754        IMUZEROA           CS       IMUSEFLG                              
005868,000058: 13,2011           70074                           MASK     STATE                                 #  PROGRAM IS USING THE IMU.
005869,000059: 13,2012           67754                           AD       IMUSEFLG                              
005870,000060: 13,2013           54074                           TS       STATE                                 
005871,000061: 
005872,000062: 13,2014           02701                           TC       CAGETSTQ                              #  IF IMU COMING UP, TURN-ON PROGRAM WILL
005873,000063: 13,2015           12043                           TCF      MODEEXIT                              #  DO ALL THE WORK.
005874,000064: 
005875,000065: 13,2016           42776                           CS       BITS3&4                               #  INHIBIT ICDUFAIL AND IMUFAIL (IN CASE WE
005876,000066: 13,2017           70365                           MASK     IMODES30                              #  JUST CAME OUT OF COARSE ALIGN).
005877,000067: 13,2020           62776                           AD       BITS3&4                               
005878,000068: 13,2021           54365                           TS       IMODES30                              
005879,000069: 
005880,000070: 13,2022           42777                           CS       BITS4&6                               #  SEND ZERO ENCODE WITH COARSE AND ERROR
005881,000071: 13,2023           00006                           EXTEND                                         #  COUNTER DISABLED.
005882,000072: 13,2024           03012                           WAND     12                                    
005883,000073: 
005884,000074: 13,2025           02324                           TC       NOATTOFF                              #  TURN OFF NO ATT LAMP.
005885,000075: 
005886,000076: 13,2026           37757                           CAF      BIT5                                  
005887,000077: 13,2027           00006                           EXTEND                                         
005888,000078: 13,2030           05012                           WOR      12                                    
005889,000079: 
005890,000080: 13,2031           37756                           CAF      BIT6                                  #  WAIT 320 MS TO GIVE AGS ADEQUATE TIME TO
005891,000081: 13,2032           05663                           TC       WAITLIST                              #  RECEIVE ITS PULSE TRAIN.
005892,000082: 13,2033  E3,1455                                  EBANK=   COMMAND                               
005893,000083: 13,2033           02045 26063                     2CADR    IMUZERO2                              
005894,000084: 
005895,000085: 13,2035           40365                           CS       IMODES30                              #  SEE IF IMU OPERATING AND ALARM IF NOT.
005896,000086: 13,2036           77753                           MASK     BIT9                                  
005897,000087: 13,2037           10000                           CCS      A                                     
005898,000088: 13,2040           12043                           TCF      MODEEXIT                              
005899,000089: 
005900,000090: 13,2041           04755                           TC       ALARM                                 
005901,000091: 13,2042           00210                           OCT      210                                   
005902,000092: 

Page 139

005904,000094: 13,2043           00003        MODEEXIT           RELINT                                         #  GENERAL MODE-SWITCHING EXIT.
005905,000095: 13,2044           15221                           TCF      SWRETURN                              
005906,000096: 

Page 140

005908,000098: 13,2045           02701        IMUZERO2           TC       CAGETSTQ                              #  POSSIBLY SWITCH TO TURN-ON PROGRAM.
005909,000099: 13,2046           15727                           TCF      TASKOVER                              
005910,000100: 
005911,000101: 13,2047           04314                           TC       ZEROICDU                              #  ZERO COUNTERS.
005912,000102: 13,2050           47757                           CS       BIT5                                  #  REMOVE ZERO DISCRETE.
005913,000103: 13,2051           00006                           EXTEND                                         
005914,000104: 13,2052           03012                           WAND     12                                    
005915,000105: 
005916,000106: 13,2053           34321                           CAF      4SECS                                 
005917,000107: 13,2054           05704                           TC       VARDELAY                              
005918,000108: 
005919,000109: 13,2055           02701        IMUZERO3           TC       CAGETSTQ                              
005920,000110: 13,2056           15727                           TCF      TASKOVER                              
005921,000111: 
005922,000112: 13,2057           42776                           CS       BITS3&4                               #  REMOVE IMUFAIL AND ICDUFAIL INHIBIT.
005923,000113: 13,2060           70365                           MASK     IMODES30                              
005924,000114: 13,2061           54365                           TS       IMODES30                              
005925,000115: 
005926,000116: 13,2062           05270                           TC       IBNKCALL                              #  SET ISS WARNING IF EITHER OF ABOVE ARE
005927,000117: 13,2063           24753                           CADR     SETISSW                               #  PRESENT.
005928,000118: 
005929,000119: 13,2064           12664                           TCF      ENDIMU                                
005930,000120: 

Page 141

005932,000122:                                                                                                  #  IMU COARSE ALIGN MODE.
005933,000123: 
005934,000124: 13,2065           00004        IMUCOARS           INHINT                                         
005935,000125: 13,2066           02232                           TC       SETCOARS                              
005936,000126: 
005937,000127: 13,2067           36306                           CAF      SIX                                   
005938,000128: 13,2070           05663                           TC       WAITLIST                              
005939,000129: 13,2071  E3,1455                                  EBANK=   COMMAND                               
005940,000130: 13,2071           02074 26063                     2CADR    COARS                                 
005941,000131: 
005942,000132: 13,2073           12043                           TCF      MODEEXIT                              
005943,000133: 
005944,000134: 13,2074           02674        COARS              TC       CAGETEST                              
005945,000135: 13,2075           37756                           CAF      BIT6                                  #  ENABLE ALL THREE ISS CDU ERROR COUNTERS
005946,000136: 13,2076           00006                           EXTEND                                         
005947,000137: 13,2077           05012                           WOR      CHAN12                                
005948,000138: 
005949,000139: 13,2100           37762                           CAF      TWO                                   #  SET CDU INDICATOR
005950,000140: 13,2101           55460        COARS1             TS       CDUIND                                

At first glance, it appears to say "1;S" in the following line of the printout, but it is rather smudged, and since every other AGC version says "1:S" and matches in other respects as well, I assume that "1:S" is what it really says — RSB 2017.

005954,000144: 13,2102           51460                           INDEX    CDUIND                                #  COMPUTE THETAD - THETAA IN 1:S
005955,000145: 13,2103           30400                           CA       THETAD                                #    COMPLEMENT FORM
005956,000146: 13,2104           00006                           EXTEND                                         
005957,000147: 13,2105           51460                           INDEX    CDUIND                                
005958,000148: 13,2106           20032                           MSU      CDUX                                  
005959,000149: 13,2107           00006                           EXTEND                                         
005960,000150: 13,2110           77747                           MP       BIT13                                 #  SHIFT RIGHT 2
005961,000151: 13,2111           56001                           XCH      L                                     #  ROUND
005962,000152: 13,2112           60000                           DOUBLE                                         
005963,000153: 13,2113           54061                           TS       ITEMP1                                
005964,000154: 13,2114           12116                           TCF      +2                                    
005965,000155: 13,2115           26001                           ADS      L                                     
005966,000156: 
005967,000157: 13,2116           51460                           INDEX    CDUIND                                #  DIFFERENCE TO BE COMPUTED
005968,000158: 13,2117           23455                           LXCH     COMMAND                               
005969,000159: 13,2120           11460                           CCS      CDUIND                                
005970,000160: 13,2121           02101                           TC       COARS1                                
005971,000161: 
005972,000162: 13,2122           37762                           CAF      TWO                                   #  MINIMUM OF 4 MS WAIT
005973,000163: 13,2123           05704                           TC       VARDELAY                              
005974,000164: 

Page 142

005976,000166: 13,2124           02674        COARS2             TC       CAGETEST                              #  DONT CONTINUE IF CAGED.
005977,000167: 13,2125           54061                           TS       ITEMP1                                #  SETS TO +0.
005978,000168: 13,2126           37762                           CAF      TWO                                   #  SET CDU INDICATOR
005979,000169: 13,2127           55460                 +3        TS       CDUIND                                
005980,000170: 
005981,000171: 13,2130           51460                           INDEX    CDUIND                                
005982,000172: 13,2131           11455                           CCS      COMMAND                               #  NUMBER OF PULSES REQUIRED
005983,000173: 13,2132           02136                           TC       COMPOS                                #  GREATER THAN MAX ALLOWED
005984,000174: 13,2133           02145                           TC       NEXTCDU    +1                         
005985,000175: 13,2134           02211                           TC       COMNEG                                
005986,000176: 13,2135           02145                           TC       NEXTCDU    +1                         
005987,000177: 
005988,000178: 13,2136           63002        COMPOS             AD       -COMMAX                               #  COMMAX = MAX NUMBER OF PULSES ALLOWED
005989,000179: 13,2137           00006                           EXTEND                                         #    MINUS ONE
005990,000180: 13,2140           62221                           BZMF     COMZERO                               
005991,000181: 13,2141           51460                           INDEX    CDUIND                                
005992,000182: 13,2142           55455                           TS       COMMAND                               #  REDUCE COMMAND BY MAX NUMBER OF PULSES
005993,000183: 13,2143           43003                           CS       -COMMAX-                              #    ALLOWED
005994,000184: 
005995,000185: 13,2144           24061        NEXTCDU            INCR     ITEMP1                                
005996,000186: 13,2145           67770                           AD       NEG0                                  #  PREVENT +0 IN OUTPUT COUNTER
005997,000187: 13,2146           51460                           INDEX    CDUIND                                
005998,000188: 13,2147           54050                           TS       CDUXCMD                               #  SET UP COMMAND REGISTER.
005999,000189: 
006000,000190: 13,2150           11460                           CCS      CDUIND                                
006001,000191: 13,2151           02127                           TC       COARS2     +3                         
006002,000192: 
006003,000193: 13,2152           10061                           CCS      ITEMP1                                #  SEE IF ANY PULSES TO GO OUT.
006004,000194: 13,2153           12225                           TCF      SENDPULS                              
006005,000195: 
006006,000196: 13,2154           05701                           TC       FIXDELAY                              #  WAIT FOR GIMBALS TO SETTLE.
006007,000197: 13,2155           00226                           DEC      150        B-14                       
006008,000198: 

Page 143

006010,000200: 13,2156           37762                           CAF      TWO                                   #  AT END OF COMMAND, CHECK TO SEE THAT
006011,000201: 13,2157           54061        CHKCORS            TS       ITEMP1                                #  GIMBALS ARE WITHIN 2 DEGREES OF THETAD.
006012,000202: 13,2160           50000                           INDEX    A                                     
006013,000203: 13,2161           30032                           CA       CDUX                                  
006014,000204: 13,2162           00006                           EXTEND                                         
006015,000205: 13,2163           50061                           INDEX    ITEMP1                                
006016,000206: 13,2164           20400                           MSU      THETAD                                
006017,000207: 13,2165           10000                           CCS      A                                     
006018,000208: 13,2166           12202                           TCF      COARSERR                              
006019,000209: 13,2167           12171                           TCF      CORSCHK2                              
006020,000210: 13,2170           12202                           TCF      COARSERR                              
006021,000211: 
006022,000212: 13,2171           10061        CORSCHK2           CCS      ITEMP1                                
006023,000213: 13,2172           12157                           TCF      CHKCORS                               
006024,000214: 13,2173           55455                           TS       GCOMP                                 #  ZERO GYRO COMPENSATION REGISTERS IN
006025,000215: 13,2174           55456                           TS       GCOMP      +1                         #  PREPARATION FOR COMPENSATION.
006026,000216: 13,2175           55457                           TS       GCOMP      +2                         
006027,000217: 13,2176           55460                           TS       GCOMP      +3                         
006028,000218: 13,2177           55461                           TS       GCOMP      +4                         
006029,000219: 13,2200           55462                           TS       GCOMP      +5                         
006030,000220: 
006031,000221: 13,2201           12664                           TCF      ENDIMU                                #  END OF COARSE ALIGNMENT.
006032,000222: 
006033,000223: 13,2202           62210        COARSERR           AD       COARSTOL                              #  2 DEGREES.
006034,000224: 13,2203           00006                           EXTEND                                         
006035,000225: 13,2204           62171                           BZMF     CORSCHK2                              
006036,000226: 
006037,000227: 13,2205           04755                           TC       ALARM                                 #  COARSE ALIGN ERROR.
006038,000228: 13,2206           00211                           OCT      211                                   
006039,000229: 
006040,000230: 13,2207           12672                           TCF      IMUBAD                                
006041,000231: 
006042,000232: 13,2210           77511        COARSTOL           DEC      -.01111                               #  2 DEGREES SCALED AT HALF-REVOLUTIONS.
006043,000233: 

Page 144

006045,000235: 13,2211           63002        COMNEG             AD       -COMMAX                               
006046,000236: 13,2212           00006                           EXTEND                                         
006047,000237: 13,2213           62221                           BZMF     COMZERO                               
006048,000238: 13,2214           40000                           COM                                            
006049,000239: 13,2215           51460                           INDEX    CDUIND                                
006050,000240: 13,2216           55455                           TS       COMMAND                               
006051,000241: 13,2217           33003                           CA       -COMMAX-                              
006052,000242: 13,2220           02144                           TC       NEXTCDU                               
006053,000243: 
006054,000244: 13,2221           37767        COMZERO            CAF      ZERO                                  
006055,000245: 13,2222           51460                           INDEX    CDUIND                                
006056,000246: 13,2223           57455                           XCH      COMMAND                               
006057,000247: 13,2224           02144                           TC       NEXTCDU                               
006058,000248: 
006059,000249: 13,2225           33001        SENDPULS           CAF      13,14,15                              
006060,000250: 13,2226           00006                           EXTEND                                         
006061,000251: 13,2227           05014                           WOR      CHAN14                                
006062,000252: 13,2230           33004                           CAF      600MS                                 
006063,000253: 13,2231           12123                           TCF      COARS2     -1                         #  AND THEN TO VARDELAY.
006064,000254: 13,2232           47756        SETCOARS           CS       BIT6                                  #  CLEAR ERROR COUNTER BEFORE MODE SWITCH.
006065,000255: 13,2233           00006                           EXTEND                                         
006066,000256: 13,2234           03012                           WAND     12                                    
006067,000257: 13,2235           37760                           CAF      BIT4                                  #  PUT ISS IN COARSE ALIGN.
006068,000258: 13,2236           00006                           EXTEND                                         
006069,000259: 13,2237           05012                           WOR      12                                    
006070,000260: 
006071,000261: 13,2240           42251                           CS       OCT40010                              #  TURN ON NO ATT LAMP.
006072,000262: 13,2241           70326                           MASK     DSPTAB     +11D                       
006073,000263: 13,2242           62251                           AD       OCT40010                              
006074,000264: 13,2243           54326                           TS       DSPTAB     +11D                       
006075,000265: 
006076,000266: 13,2244           47760                           CS       BIT4                                  #  INHIBIT IMU FAIL.
006077,000267: 13,2245           70365                           MASK     IMODES30                              
006078,000268: 13,2246           67760                           AD       BIT4                                  
006079,000269: 13,2247           54365                           TS       IMODES30                              
006080,000270: 
006081,000271: 13,2250           00002                           TC       Q                                     
006082,000272: 
006083,000273: 13,2251           40010        OCT40010           OCT      40010                                 
006084,000274: 

Page 145

006086,000276:                                                                                                  #  IMU FINE ALIGN MODE SWITCH.
006087,000277: 
006088,000278: 13,2252           00004        IMUFINE            INHINT                                         
006089,000279: 13,2253           02706                           TC       CAGETSTJ                              #  SEE IF IMU BEING CAGED.
006090,000280: 
006091,000281: 13,2254           43000                           CS       BITS4-6                               #  RESET ZERO, COARSE, AND ECTR ENABLE.
006092,000282: 13,2255           00006                           EXTEND                                         
006093,000283: 13,2256           03012                           WAND     12                                    
006094,000284: 
006095,000285: 13,2257           02324                           TC       NOATTOFF                              #  TURN OFF NO ATT LAMP.
006096,000286: 
006097,000287: 13,2260           37752                           CAF      BIT10                                 #  IMU FAIL WAS INHIBITED DURING THE
006098,000288: 13,2261           05663                           TC       WAITLIST                              #  PRESUMABLY PRECEDING COARSE ALIGN.  LEAVE
006099,000289: 13,2262  E3,1455                                  EBANK=   COMMAND                               
006100,000290: 13,2262           02273 26063                     2CADR    IFAILOK                               #  IT ON FOR THE FIRST 5 SECS OF FINE ALIGN
006101,000291: 
006102,000292: 13,2264           34321                           CAF      4SECS                                 #  GYRO RE-CENTERING TIME.
006103,000293: 13,2265           05663                           TC       WAITLIST                              
006104,000294: 13,2266  E3,1455                                  EBANK=   COMMAND                               
006105,000295: 13,2266           02271 26063                     2CADR    IMUFINED                              
006106,000296: 
006107,000297: 13,2270           12043                           TCF      MODEEXIT                              
006108,000298: 
006109,000299: 13,2271           02674        IMUFINED           TC       CAGETEST                              #  SEE THAT NO ONE HAS CAGED THE IMU.
006110,000300: 13,2272           12664                           TCF      ENDIMU                                
006111,000301: 
006112,000302: 13,2273           02701        IFAILOK            TC       CAGETSTQ                              #  ENABLE IMU FIAL UNLESS IMU BEING CAGED.
006113,000303: 13,2274           15727                           TCF      TASKOVER                              #  IT IS.
006114,000304: 
006115,000305: 13,2275           37760                           CAF      BIT4                                  #  DONT RESET IMU FAIL INHIBIT IF SOMEONE
006116,000306: 13,2276           00006                           EXTEND                                         #  HAS GONE INTO COARSE ALIGN.
006117,000307: 13,2277           02012                           RAND     12                                    
006118,000308: 13,2300           10000                           CCS      A                                     
006119,000309: 13,2301           15727                           TCF      TASKOVER                              
006120,000310: 
006121,000311: 13,2302           47760                           CS       BIT4                                  
006122,000312: 13,2303           70365        PFAILOK2           MASK     IMODES30                              
006123,000313: 13,2304           54365                           TS       IMODES30                              
006124,000314: 13,2305           05270                           TC       IBNKCALL                              #  THE ISS WARNING LIGHT MAY COME ON NOW
006125,000315: 13,2306           24753                           CADR     SETISSW                               #  THAT THE INHIBIT HAS BEEN REMOVED.
006126,000316: 13,2307           15727                           TCF      TASKOVER                              
006127,000317: 
006128,000318: 13,2310           02701        PFAILOK            TC       CAGETSTQ                              #  ENABLE PIP FAIL PROG ALARM.
006129,000319: 13,2311           15727                           TCF      TASKOVER                              
006130,000320: 
006131,000321: 13,2312           47752                           CS       BIT10                                 #  MAKE PREVIOUS VALUE OF PIPA FAIL THE
006132,000322: 13,2313           70365                           MASK     IMODES30                              #  NO FAIL STATE SO THAT IF THE FAILURE
006133,000323: 13,2314           67752                           AD       BIT10                                 #  INDICATION IS ON NOW, IT WILL BE PICKED
006134,000324: 13,2315           54365                           TS       IMODES30                              #  UP (ROUTINE DETECTS ONLY CHANGES).
006135,000325: 

Page 146

006137,000327: 13,2316           47747                           CS       BIT13                                 #  PIPA FAIL BIT IS KEPT IN TWO PLACES FOR
006138,000328: 13,2317           70366                           MASK     IMODES33                              
006139,000329: 13,2320           67747                           AD       BIT13                                 
006140,000330: 13,2321           54366                           TS       IMODES33                              
006141,000331: 
006142,000332: 13,2322           47757                           CS       BIT5                                  
006143,000333: 13,2323           12303                           TCF      PFAILOK2                              
006144,000334: 
006145,000335: 13,2324           42251        NOATTOFF           CS       OCT40010                              #  TURN OFF NO ATT LAMP.
006146,000336: 13,2325           70326                           MASK     DSPTAB     +11D                       
006147,000337: 13,2326           67745                           AD       BIT15                                 
006148,000338: 13,2327           54326                           TS       DSPTAB     +11D                       
006149,000339: 13,2330           00002                           TC       Q                                     
006150,000340: 

Page 147

006152,000342:                                                                                                  #  ROUITNES TO INITIATE AND TERMINATE PROGRAM USE OF THE PIPAS.  NO IMUSTALL REQUIRED IN EITHER CASE.
006153,000343: 
006154,000344: 13,2331           02701        PIPUSE             TC       CAGETSTQ                              #  DONT ENABLE PIPA FAIL IF IMU BEING CAGED
006155,000345: 13,2332           15221                           TCF      SWRETURN                              
006156,000346: 
006157,000347: 13,2333           00004                           INHINT                                         
006158,000348: 13,2334           37767                           CAF      ZERO                                  #  ZERO COUNTERS.
006159,000349: 13,2335           54037                           TS       PIPAX                                 
006160,000350: 13,2336           54040                           TS       PIPAY                                 
006161,000351: 13,2337           54041                           TS       PIPAZ                                 
006162,000352: 
006163,000353: 13,2340           47763                           CS       BIT1                                  #  IF PIPA FAILS FROM NOW ON (UNTIL
006164,000354: 13,2341           70365                           MASK     IMODES30                              #  PIPFREE), LIGHT ISS WARNING.
006165,000355: 13,2342           54365                           TS       IMODES30                              
006166,000356: 
006167,000357: 13,2343           05270        PIPFREE2           TC       IBNKCALL                              #  ISS WARNING MIGHT COME ON NOW.
006168,000358: 13,2344           24753                           CADR     SETISSW                               #  (OR GO OFF ON PIPFREE).
006169,000359: 
006170,000360: 13,2345           12043                           TCF      MODEEXIT                              
006171,000361: 
006172,000362: 13,2346           00004        PIPFREE            INHINT                                         #  PROGRAM DONE WITH PIPAS.  DONT LIGHT
006173,000363: 13,2347           47763                           CS       BIT1                                  #  ISS WARNING.
006174,000364: 13,2350           70365                           MASK     IMODES30                              
006175,000365: 13,2351           67763                           AD       BIT1                                  
006176,000366: 13,2352           54365                           TS       IMODES30                              
006177,000367: 
006178,000368: 13,2353           77752                           MASK     BIT10                                 #  IF PIP FAIL ON, DO PROG ALSRM AND RESET
006179,000369: 13,2354           10000                           CCS      A                                     #  ISS WARNING.
006180,000370: 13,2355           12043                           TCF      MODEEXIT                              
006181,000371: 
006182,000372: 13,2356           04755                           TC       ALARM                                 
006183,000373: 13,2357           00212                           OCT      212                                   
006184,000374: 
006185,000375: 13,2360           00004                           INHINT                                         
006186,000376: 
006187,000377: 13,2361           12343                           TCF      PIPFREE2                              
006188,000378: 

Page 148

006190,000380:                                                                                                  #           THE FOLLOWING ROUTINE TORQUES THE IRIGS ACCORDING TO DOUBLE PRECISION INPUTS IN THE SIX REGISTERS
006191,000381:                                                                                                  #  BEGINNING AT THE ECADR ARRIVING IN A. THE MINIMUM SIZE OF ANY PULSE TRAIN TO THE GYROS IS 1 PULSE.  THE
006192,000382:                                                                                                  #  UNSENT PORTION OF THE COMMAND IS LEFT INTACT IN THE INPUT COMMAND REGISTERS.
006193,000383: 
006194,000384: 13,2362  E3,1400                                  EBANK=   1400                                  #  VARIABLE, ACTUALLY.
006195,000385: 
006196,000386: 13,2362           54151        IMUPULSE           TS       MPAC       +5                         #  SAVE ARRIVING ECADR.
006197,000387: 13,2363           02706                           TC       CAGETSTJ                              #  DONT PROCEED IF IMU BEING CAGED.
006198,000388: 
006199,000389: 13,2364           10356                           CCS      LGYRO                                 #  SEE IF GYROS BUSY.
006200,000390: 13,2365           02427                           TC       GYROBUSY                              #  SLEEP.
006201,000391: 
006202,000392: 13,2366           54146                           TS       MPAC       +2                         
006203,000393: 13,2367           37756                           CAF      BIT6                                  #  ENABLE THE POWER SUPPLY.
006204,000394: 13,2370           00006                           EXTEND                                         
006205,000395: 13,2371           05014                           WOR      14                                    
006206,000396: 
006207,000397: 13,2372           37761                           CAF      FOUR                                  
006208,000398: 13,2373           00004        GWAKE2             INHINT                                         
006209,000399: 13,2374           05663                           TC       WAITLIST                              #  (IF A JOB WAS PUT TO SLEEP, THE POWER
006210,000400: 13,2375  E3,1455                                  EBANK=   COMMAND                               #  SUPPLY IS LEFT ON BY THE WAKING JOB).
006211,000401: 13,2375           02445 26063                     2CADR    STRTGYRO                              
006212,000402: 
006213,000403: 13,2377           30151                           CA       MPAC       +5                         #  SET UP EBANK, SAVING CALLER'S EBANK FOR
006214,000404: 13,2400           56003                           XCH      EBANK                                 #  RESTORATION ON RETURN.
006215,000405: 13,2401           56151                           XCH      MPAC       +5                         
006216,000406: 13,2402           54356                           TS       LGYRO                                 #  RESERVES GYROS.
006217,000407: 13,2403           74564                           MASK     LOW8                                  
006218,000408: 13,2404           54061                           TS       ITEMP1                                
006219,000409: 
006220,000410: 13,2405           37762                           CAF      TWO                                   #  FORCE SIGN AGREEMENT ON INPUTS.
006221,000411: 13,2406           54147        GYROAGRE           TS       MPAC       +3                         
006222,000412: 13,2407           60000                           DOUBLE                                         
006223,000413: 13,2410           60061                           AD       ITEMP1                                
006224,000414: 13,2411           54150                           TS       MPAC       +4                         
006225,000415: 13,2412           00006                           EXTEND                                         
006226,000416: 13,2413           50000                           INDEX    A                                     
006227,000417: 13,2414           31401                           DCA      1400                                  
006228,000418: 13,2415           52145                           DXCH     MPAC                                  
006229,000419: 13,2416           07327                           TC       TPAGREE                               
006230,000420: 13,2417           52145                           DXCH     MPAC                                  
006231,000421: 13,2420           50150                           INDEX    MPAC       +4                         
006232,000422: 13,2421           53401                           DXCH     1400                                  
006233,000423: 
006234,000424: 13,2422           10147                           CCS      MPAC       +3                         
006235,000425: 13,2423           12406                           TCF      GYROAGRE                              
006236,000426: 
006237,000427: 13,2424           30151                           CA       MPAC       +5                         #  RESTORE CALLER'S EBANK.
006238,000428: 13,2425           54003                           TS       EBANK                                 
006239,000429: 13,2426           12043                           TCF      MODEEXIT                              
006240,000430: 

Page 149

006242,000432:                                                                                                  #  ROUTINES TO ALLOW TORQUING BY ONLY ONE JOB AT A TIME.
006243,000433: 
006244,000434: 13,2427           00006        GYROBUSY           EXTEND                                         #  SAVE RETURN 2FCADR.
006245,000435: 13,2430           30124                           DCA      BUF2                                  
006246,000436: 13,2431           52145                           DXCH     MPAC                                  
006247,000437: 13,2432           32444        REGSLEEP           CAF      LGWAKE                                
006248,000438: 13,2433           15545                           TCF      JOBSLEEP                              
006249,000439: 
006250,000440: 13,2434           10356        GWAKE              CCS      LGYRO                                 #  WHEN AWAKENED, SEE IF GYROS STILL BUSY.
006251,000441: 13,2435           12432                           TCF      REGSLEEP                              #  IF SO, SLEEP SOME MORE.
006252,000442: 
006253,000443: 13,2436           54146                           TS       MPAC       +2                         
006254,000444: 13,2437           00006                           EXTEND                                         
006255,000445: 13,2440           30145                           DCA      MPAC                                  
006256,000446: 13,2441           52124                           DXCH     BUF2                                  #  RESTORE SWRETURN INFO.
006257,000447: 13,2442           37763                           CAF      ONE                                   
006258,000448: 13,2443           12373                           TCF      GWAKE2                                
006259,000449: 
006260,000450: 13,2444           26434        LGWAKE             CADR     GWAKE                                 
006261,000451: 

Page 150

006263,000453:                                                                                                  #  GYRO-TORQUING WAITLIST TASKS.
006264,000454: 
006265,000455: 13,2445           42661        STRTGYRO           CS       GDESELCT                              #  DE-SELECT LAST GYRO.
006266,000456: 13,2446           00006                           EXTEND                                         
006267,000457: 13,2447           03014                           WAND     14                                    
006268,000458: 
006269,000459: 13,2450           02674                           TC       CAGETEST                              
006270,000460: 
006271,000461: 13,2451           30356        STRTGYR2           CA       LGYRO                                 #  JUMP ON PHASE COUNTER IN BITS 13-14.
006272,000462: 13,2452           00006                           EXTEND                                         
006273,000463: 13,2453           77760                           MP       BIT4                                  
006274,000464: 13,2454           50000                           INDEX    A                                     
006275,000465: 13,2455           12456                           TCF      +1                                    
006276,000466: 13,2456           02473                           TC       GSELECT                               #  =0.  DO Y GYRO.
006277,000467: 13,2457           00202                           OCT      00202                                 
006278,000468: 
006279,000469: 13,2460           02473                           TC       GSELECT                               #  =1.  DO Z GYRO.
006280,000470: 13,2461           00302                           OCT      00302                                 
006281,000471: 
006282,000472: 13,2462           02471                           TC       GSELECT    -2                         #  =2.  DO X GYRO.
006283,000473: 13,2463           00100                           OCT      00100                                 
006284,000474: 
006285,000475: 13,2464           37767                           CAF      ZERO                                  #  =3.  DONE
006286,000476: 13,2465           54356                           TS       LGYRO                                 
006287,000477: 13,2466           32444                           CAF      LGWAKE                                #  WAKE A POSSIBLE SLEEPING JOB.
006288,000478: 13,2467           05551                           TC       JOBWAKE                               
006289,000479: 
006290,000480: 13,2470           12271        NORESET            TCF      IMUFINED                              #  DO NOT RESET THE POWER SUPPLY

Page 151

006292,000482: 13,2471           47761                 -2        CS       FOUR                                  #  SPECIAL ENTRY TO REGRESS LGYRO FOR X.
006293,000483: 13,2472           26356                           ADS      LGYRO                                 
006294,000484: 
006295,000485: 13,2473           50002        GSELECT            INDEX    Q                                     #  SELECT GYRO.
006296,000486: 13,2474           30000                           CAF      0                                     #  PACKED WORD CONTAINS GYRO SELECT BITS
006297,000487: 13,2475           54064                           TS       ITEMP4                                #  AND INCREMENT TO LGYRO.
006298,000488: 13,2476           77765                           MASK     SEVEN                                 
006299,000489: 13,2477           67747                           AD       BIT13                                 
006300,000490: 13,2500           26356                           ADS      LGYRO                                 
006301,000491: 13,2501           54003                           TS       EBANK                                 
006302,000492: 13,2502           74564                           MASK     LOW8                                  
006303,000493: 13,2503           54061                           TS       ITEMP1                                
006304,000494: 
006305,000495: 13,2504           47765                           CS       SEVEN                                 
006306,000496: 13,2505           70064                           MASK     ITEMP4                                
006307,000497: 13,2506           54064                           TS       ITEMP4                                
006308,000498: 
006309,000499: 13,2507           00006                           EXTEND                                         #  MOVE DP COMMAND TO RUPTREGS FOR TESTING.
006310,000500: 13,2510           50061                           INDEX    ITEMP1                                
006311,000501: 13,2511           31401                           DCA      1400                                  
006312,000502: 13,2512           52071                           DXCH     RUPTREG1                              
006313,000503: 
006314,000504: 13,2513           10070                           CCS      RUPTREG1                              
006315,000505: 13,2514           12527                           TCF      MAJ+                                  
006316,000506: 13,2515           12517                           TCF      +2                                    
006317,000507: 13,2516           12642                           TCF      MAJ-                                  
006318,000508: 
006319,000509: 13,2517           10071                           CCS      RUPTREG2                              
006320,000510: 13,2520           12524                           TCF      MIN+                                  
006321,000511: 13,2521           12451                           TCF      STRTGYR2                              
006322,000512: 13,2522           12637                           TCF      MIN-                                  
006323,000513: 13,2523           12451                           TCF      STRTGYR2                              
006324,000514: 

Page 152

006326,000516: 13,2524           62560        MIN+               AD       -GYROMIN                              #  SMALL POSITIVE COMMAND.  SEE IF AT LEAST
006327,000517: 13,2525           00006                           EXTEND                                         #  1 GYRO PULSE.
006328,000518: 13,2526           62451                           BZMF     STRTGYR2                              
006329,000519: 
006330,000520: 13,2527           00006        MAJ+               EXTEND                                         #  DEFINITE POSITIVE OUTPUT.
006331,000521: 13,2530           32663                           DCA      GYROFRAC                              
006332,000522: 13,2531           20071                           DAS      RUPTREG1                              
006333,000523: 
006334,000524: 13,2532           30064                           CA       ITEMP4                                #  SELECT POSITIVE TORQUING FOR THIS GYRO.
006335,000525: 13,2533           00006                           EXTEND                                         
006336,000526: 13,2534           05014                           WOR      14                                    
006337,000527: 
006338,000528: 13,2535           35342                           CAF      LOW7                                  #  LEAVE NUMBER OF POSSIBLE 8192 AUGMENTS
006339,000529: 13,2536           70071                           MASK     RUPTREG2                              #  TO INITIAL COMMAND IN MAJOR PART OF LONG
006340,000530: 13,2537           56071                           XCH      RUPTREG2                              #  TERM STORAGE AND TRUNCATED FRACTION
006341,000531: 13,2540           00006        GMERGE             EXTEND                                         #  IN MINOR PART.  THE MAJOR PART WILL BE
006342,000532: 13,2541           77754                           MP       BIT8                                  #  COUNTED DOWN TO ZERO IN THE COURSE OF
006343,000533: 13,2542           54062                           TS       ITEMP2                                #  PUTTING OUT THE ENTIRE COMMAND.
006344,000534: 13,2543           30070                           CA       RUPTREG1                              
006345,000535: 13,2544           00006                           EXTEND                                         
006346,000536: 13,2545           77753                           MP       BIT9                                  
006347,000537: 13,2546           54070                           TS       RUPTREG1                              
006348,000538: 13,2547           30001                           CA       L                                     
006349,000539: 13,2550           00006                           EXTEND                                         
006350,000540: 13,2551           77746                           MP       BIT14                                 
006351,000541: 13,2552           26062                           ADS      ITEMP2                                #  INITIAL COMMAND.
006352,000542: 
006353,000543: 13,2553           00006                           EXTEND                                         #  SEE IF MORE THAN ONE PULSE TRAIN NEEDED
006354,000544: 13,2554           30071                           DCA      RUPTREG1                              #  (MORE THAN 16383 PULSES).
006355,000545: 13,2555           67771                           AD       MINUS1                                
006356,000546: 13,2556           10000                           CCS      A                                     
006357,000547: 13,2557           12603                           TCF      LONGGYRO                              
006358,000548: 13,2560           77600        -GYROMIN           OCT      -177                                  #  MAY BE ADJUSTED TO SPECIFY MINIMUM CMD.
006359,000549: 
006360,000550: 13,2561           12565                           TCF      +4                                    
006361,000551: 
006362,000552: 13,2562           37746                           CAF      BIT14                                 
006363,000553: 13,2563           26062                           ADS      ITEMP2                                
006364,000554: 13,2564           37767                           CAF      ZERO                                  
006365,000555: 
006366,000556: 13,2565           50061                 +4        INDEX    ITEMP1                                
006367,000557: 13,2566           53401                           DXCH     1400                                  

Page 153

006369,000559: 13,2567           30062                           CA       ITEMP2                                #  ENTIRE COMMAND.
006370,000560: 13,2570           54047        LASTSEG            TS       GYROCMD                               
006371,000561: 13,2571           00006                           EXTEND                                         
006372,000562: 13,2572           77752                           MP       BIT10                                 #  WAITLIST DT
006373,000563: 13,2573           66311                           AD       THREE                                 #  TRUNCATION AND PHASE UNCERTAINTIES.
006374,000564: 13,2574           05663                           TC       WAITLIST                              
006375,000565: 13,2575  E3,1455                                  EBANK=   COMMAND                               
006376,000566: 13,2575           02445 26063                     2CADR    STRTGYRO                              
006377,000567: 
006378,000568: 13,2577           37752        GYROEXIT           CAF      BIT10                                 #  TURN ON GYRO ACTIVITY TO START TRAIN.
006379,000569: 13,2600           00006                           EXTEND                                         
006380,000570: 13,2601           05014                           WOR      14                                    
006381,000571: 13,2602           15727                           TCF      TASKOVER                              
006382,000572: 
006383,000573: 13,2603           50061        LONGGYRO           INDEX    ITEMP1                                
006384,000574: 13,2604           53401                           DXCH     1400                                  #  INITIAL COMMAND OUT PLUS N AUGMENTS OF
006385,000575: 13,2605           37746                           CAF      BIT14                                 #  8192.  INITIAL COMMAND IS AT LEAST 8192.
006386,000576: 13,2606           60062                           AD       ITEMP2                                
006387,000577: 13,2607           54047                           TS       GYROCMD                               
006388,000578: 
006389,000579: 13,2610           00006        AUG3               EXTEND                                         #  GET WAITLIST DT TO TIME WHEN TRAIN IS
006390,000580: 13,2611           77752                           MP       BIT10                                 #  ALMOST OUT.
006391,000581: 13,2612           65340                           AD       NEG3                                  
006392,000582: 13,2613           05663                           TC       WAITLIST                              
006393,000583: 13,2614  E3,1455                                  EBANK=   COMMAND                               
006394,000584: 13,2614           02617 26063                     2CADR    8192AUG                               
006395,000585: 
006396,000586: 13,2616           12577                           TCF      GYROEXIT                              
006397,000587: 
006398,000588: 13,2617           02674        8192AUG            TC       CAGETEST                              
006399,000589: 
006400,000590: 13,2620           30356                           CA       LGYRO                                 #  ADD 8192 PULSES TO GYROCMD
006401,000591: 13,2621           54003                           TS       EBANK                                 
006402,000592: 13,2622           74564                           MASK     LOW8                                  
006403,000593: 13,2623           54061                           TS       ITEMP1                                
006404,000594: 
006405,000595: 13,2624           50061                           INDEX    ITEMP1                                #  SEE IF THIS IS THE LAST AUG.
006406,000596: 13,2625           11400                           CCS      1400                                  
006407,000597: 13,2626           12632                           TCF      AUG2                                  #  MORE TO COME.
006408,000598: 
006409,000599: 13,2627           37746                           CAF      BIT14                                 
006410,000600: 13,2630           26047                           ADS      GYROCMD                               
006411,000601: 13,2631           12571                           TCF      LASTSEG    +1                         
006412,000602: 
006413,000603: 13,2632           50061        AUG2               INDEX    ITEMP1                                
006414,000604: 13,2633           55400                           TS       1400                                  
006415,000605: 13,2634           37746                           CAF      BIT14                                 
006416,000606: 13,2635           26047                           ADS      GYROCMD                               
006417,000607: 13,2636           12610                           TCF      AUG3                                  #  COMPUTE DT.
006418,000608: 

Page 154

006420,000610: 13,2637           62560        MIN-               AD       -GYROMIN                              #  POSSIBLE NEGATIVE OUTPUT.
006421,000611: 13,2640           00006                           EXTEND                                         
006422,000612: 13,2641           62451                           BZMF     STRTGYR2                              
006423,000613: 
006424,000614: 13,2642           00006        MAJ-               EXTEND                                         #  DEFINITE NEGATIVE OUTPUT.
006425,000615: 13,2643           42663                           DCS      GYROFRAC                              
006426,000616: 13,2644           20071                           DAS      RUPTREG1                              
006427,000617: 
006428,000618: 13,2645           30064                           CA       ITEMP4                                #  SELECT NEGATIVE TORQUING FOR THIS GYRO.
006429,000619: 13,2646           67753                           AD       BIT9                                  
006430,000620: 13,2647           00006                           EXTEND                                         
006431,000621: 13,2650           05014                           WOR      14                                    
006432,000622: 
006433,000623: 13,2651           40070                           CS       RUPTREG1                              #  SET UP RUPTREGS TO FALL INTO GMERGE.
006434,000624: 13,2652           54070                           TS       RUPTREG1                              #  ALL NUMBERS PUT INTO GYROCMD ARE
006435,000625: 13,2653           40071                           CS       RUPTREG2                              #  POSITIVE - BIT9 OF CHAN 14 DETERMINES
006436,000626: 13,2654           75342                           MASK     LOW7                                  #  THE SIGN OF THE COMMAND.
006437,000627: 13,2655           40000                           COM                                            
006438,000628: 13,2656           56071                           XCH      RUPTREG2                              
006439,000629: 13,2657           40000                           COM                                            
006440,000630: 13,2660           12540                           TCF      GMERGE                                
006441,000631: 
006442,000632: 13,2661           01700        GDESELCT           OCT      1700                                  #  TURN OFF SELECT AND ACTIVITY BITS.
006443,000633: 
006444,000634: 13,2662           00000 00034  GYROFRAC           2DEC     .215       B-21                       
006445,000635: 

Page 155

006447,000637:                                                                                                  #  IMU MODE SWITCHING ROUTINES COME HERE WHEN ACTION COMPLETE.
006448,000638: 
006449,000639: 13,2664           00006        ENDIMU             EXTEND                                         #  MODE IS BAD IF CAGE HAS OCCURED OR IF
006450,000640: 13,2665           00011                           READ     11                                    #  ISS WARNING IS ON.
006451,000641: 13,2666           77763                           MASK     BIT1                                  
006452,000642: 13,2667           10000                           CCS      A                                     
006453,000643: 13,2670           12672                           TCF      IMUBAD                                
006454,000644: 
006455,000645: 13,2671           12720        IMUGOOD            TCF      GOODEND                               #  WITH C(A) = 0.
006456,000646: 
006457,000647: 13,2672           37767        IMUBAD             CAF      ZERO                                  
006458,000648: 13,2673           12715                           TCF      BADEND                                
006459,000649: 
006460,000650: 13,2674           37756        CAGETEST           CAF      BIT6                                  #  SUBROUTINE TO TERMINATE IMU MODE
006461,000651: 13,2675           70365                           MASK     IMODES30                              #  SWITCH IF IMU HAS BEEN CAGED.
006462,000652: 13,2676           10000                           CCS      A                                     
006463,000653: 13,2677           12672                           TCF      IMUBAD                                #  DIRECTLY.
006464,000654: 13,2700           00002                           TC       Q                                     #  WITH C(A) = +0.
006465,000655: 
006466,000656: 13,2701           40365        CAGETSTQ           CS       IMODES30                              #  SKIP IF IMU NOT BEING CAGED.
006467,000657: 13,2702           77756                           MASK     BIT6                                  
006468,000658: 13,2703           10000                           CCS      A                                     
006469,000659: 13,2704           24002                           INCR     Q                                     
006470,000660: 13,2705           00002                           TC       Q                                     
006471,000661: 
006472,000662: 13,2706           40365        CAGETSTJ           CS       IMODES30                              #  IF DURING MODE SWITCH INITIALIZATION
006473,000663: 13,2707           77756                           MASK     BIT6                                  #  IT IS FOUND THAT THE IMU IS BEING CAGED,
006474,000664: 13,2710           10000                           CCS      A                                     #  SET IMUCADR TO -0 TO INDICATE OPERATION
006475,000665: 13,2711           00002                           TC       Q                                     #  COMPLETE BUT FAILED.  RETURN IMMEDIATELY
006476,000666: 
006477,000667: 13,2712           47767                           CS       ZERO                                  #  TO SWRETURN.
006478,000668: 13,2713           54367                           TS       IMUCADR                               
006479,000669: 13,2714           12043                           TCF      MODEEXIT                              
006480,000670: 

Page 156

006482,000672:                                                                                                  #           GENERALIZED MODE SWITCHING TERMINATION. ENTER AT GOODEND FOR SUCCESSFUL COMPLETION OF AN I/O OPERATION
006483,000673:                                                                                                  #  OR AT BADEND FOR AN UNSUCCESSFUL ONE.  C(A) OR ARRIVAL =0 FOR IMU, 1 FOR AOT, 2 FOR RADARS, & 3 FOR ATT MANU.
006484,000674: 
006485,000675: 13,2715           54071        BADEND             TS       RUPTREG2                              #  DEVICE INDEX.
006486,000676: 13,2716           47767                           CS       ZERO                                  #  FOR FAILURE.
006487,000677: 13,2717           12722                           TCF      GOODEND    +2                         
006488,000678: 
006489,000679: 13,2720           54071        GOODEND            TS       RUPTREG2                              
006490,000680: 13,2721           47763                           CS       ONE                                   #  FOR SUCCESS.
006491,000681: 
006492,000682: 13,2722           54072                           TS       RUPTREG3                              
006493,000683: 13,2723           50071                           INDEX    RUPTREG2                              #  SEE IF USING PROGRAM ASLEEP.
006494,000684: 13,2724           10367                           CCS      MODECADR                              
006495,000685: 13,2725           12727                           TCF      +2                                    #  YES - WAKE IT UP.
006496,000686: 13,2726           12737                           TCF      ENDMODE                               #  IF 0, PROGRAM NOT IN YET.
006497,000687: 
006498,000688: 13,2727           37767                           CAF      ZERO                                  #  WAKE SLEEPING PROGRAM.
006499,000689: 13,2730           50071                           INDEX    RUPTREG2                              
006500,000690: 13,2731           56367                           XCH      MODECADR                              
006501,000691: 13,2732           05551                           TC       JOBWAKE                               
006502,000692: 
006503,000693: 13,2733           40072                           CS       RUPTREG3                              #  ADVANCE LOC IF SUCCESSFUL.
006504,000694: 13,2734           50064                           INDEX    LOCCTR                                
006505,000695: 13,2735           26154                           ADS      LOC                                   
006506,000696: 
006507,000697: 13,2736           15727                           TCF      TASKOVER                              
006508,000698: 
006509,000699: 13,2737           30072        ENDMODE            CA       RUPTREG3                              #  -0 INDICATES OPERATION COMPLETE BUT
006510,000700: 13,2740           50071                 +1        INDEX    RUPTREG2                              #  UNSUCCESSFUL - -1 INDICATES COMPLETE AND
006511,000701: 13,2741           54367                           TS       MODECADR                              #  SUCCESSFUL.
006512,000702: 13,2742           15727                           TCF      TASKOVER                              
006513,000703: 

Page 157

006515,000705:                                                                                                  #  GENERAL STALLING ROUTINE. USING PROGRAMS COME HERE TO WAIT FOR I/O COMPLETION.
006516,000706: 
006517,000707: 13,2743           36311        ATTSTALL           CAF      THREE                                 #  ATTITUDE MANEUVER STALL
006518,000708: 13,2744           12752                           TCF      STALL                                 
006519,000709: 
006520,000710: 13,2745           37762        RADSTALL           CAF      TWO                                   #  RR AND LR STALL.
006521,000711: 13,2746           12752                           TCF      STALL                                 
006522,000712: 
006523,000713: 13,2747           37763        AOTSTALL           CAF      ONE                                   #  AOT.
006524,000714: 13,2750           02752                           TC       STALL                                 
006525,000715: 
006526,000716: 13,2751  13,2747               OPTSTALL           EQUALS   AOTSTALL                              
006527,000717: 
006528,000718: 13,2751           37767        IMUSTALL           CAF      ZERO                                  #  IMU.
006529,000719: 
006530,000720: 13,2752           00004        STALL              INHINT                                         
006531,000721: 13,2753           54071                           TS       RUPTREG2                              #  SAVE DEVICE INDEX.
006532,000722: 13,2754           50000                           INDEX    A                                     #  SEE IF OPERATION COMPLETE.
006533,000723: 13,2755           10367                           CCS      MODECADR                              
006534,000724: 13,2756           12774                           TCF      MODABORT                              #  ALLOWABLE STATES ARE +0, -1, AND -0.
006535,000725: 13,2757           12770                           TCF      MODESLP                               #  OPERATION INCOMPLETE.
006536,000726: 13,2760           12764                           TCF      MODEGOOD                              #  COMPLETE AND GOOD IF = -1.
006537,000727: 
006538,000728: 13,2761           50071        MG2                INDEX    RUPTREG2                              #  COMPLETE AND FAILED IF -0.  RESET TO +0.
006539,000729: 13,2762           54367                           TS       MODECADR                              #  RETURN TO CALLER.
006540,000730: 13,2763           12043                           TCF      MODEEXIT                              
006541,000731: 
006542,000732: 13,2764           10000        MODEGOOD           CCS      A                                     #  MAKE SURE INITIAL STATE -1.
006543,000733: 13,2765           12774                           TCF      MODABORT                              
006544,000734: 
006545,000735: 13,2766           24123                           INCR     BUF2                                  #  IF SO, INCREMENT RETURN ADDRESS AND
006546,000736: 13,2767           12761                           TCF      MG2                                   #  RETURN IMMEDIATELY, SETTING CADR = +0.
006547,000737: 
006548,000738: 13,2770           05235        MODESLP            TC       MAKECADR                              #  CALL FROM SWITCHABLE FIXED ONLY.
006549,000739: 13,2771           50071                           INDEX    RUPTREG2                              
006550,000740: 13,2772           54367                           TS       MODECADR                              
006551,000741: 13,2773           15545                           TCF      JOBSLEEP                              
006552,000742: 
006553,000743: 13,2774           06000        MODABORT           TC       ABORT                                 #  TWO PROGRAMS USING SAME DEVICE.
006554,000744: 13,2775           01210                           OCT      1210                                  
006555,000745: 

Page 158

006557,000747:                                                                                                  #  CONSTANTS FOR MODE SWITCHING ROUTINES
006558,000748: 
006559,000749: 13,2776           00014        BITS3&4            OCT      14                                    
006560,000750: 13,2777           00050        BITS4&6            OCT      00050                                 
006561,000751: 13,3000           00070        BITS4-6            OCT      00070                                 
006562,000752: 13,3001     7754               IMUSEFLG           EQUALS   BIT8                                  #  INTERPRETER SWITCH 7.
006563,000753: 13,3001           70000        13,14,15           OCT      70000                                 
006564,000754: 
006565,000755: 13,3002           77500        -COMMAX            DEC      -191       B-14                       
006566,000756: 13,3003           77477        -COMMAX-           DEC      -192       B-14                       
006567,000757: 13,3004           00074        600MS              DEC      60         B-14                       
006568,000758: 13,3005     4322               3SECSM             EQUALS   3SECS                                 

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