Source Code

This is the source-code for the Apollo 9 Command Module's Guidance Computer. These files were derived originally from the scan from MIT's Dibner Institute's now-discontinued website titled "History of Recent Science and Technology", which in turn was originally created by Gary Neff, though his high-quality scans were unfortunately reduced in legibility when presented online. The markings on the front of the printout imply that it was the original AGC developer Norm Brodeur's copy. A scan by Ron Burkey has superceded it, made from a more-legible copy from the collection of original AGC developer Fred Martin. The source code was transcribed from those images by Ron Burkey. Note that the page images presented online are of reduced quality, and that higher-quality images are available. Report any conversion errors or legibility problems in page images to info@sandroid.org. Notations on the program listing read, in part:

	ASSEMBLE REVISION 249 OF AGC PROGRAM COLOSSUS BY NASA 2021111-041
	20'35 OCT. 28,1968
Note that the date is the date of the printout, not the date of the program revision.

060865,000002:                                                                                                  ## Copyright:   Public domain.
060866,000003:                                                                                                  ## Filename:    IMU_MODE_SWITCHING_ROUTINES.agc
060867,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus, build 249.
060868,000005:                                                                                                  ##              It is part of the source code for the Command Module's (CM)
060869,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 9.
060870,000007:                                                                                                  ## Assembler:   yaYUL
060871,000008:                                                                                                  ## Reference:   Starts on p. 1388
060872,000009:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
060873,000010:                                                                                                  ## Website:     www.ibiblio.org/apollo.
060874,000011:                                                                                                  ## Mod history: 08/30/04   RSB  Adapted from corresponding Luminary131 file.
060875,000012:                                                                                                  ##              2010-10-24 JL   Indentation fixes.
060876,000013:                                                                                                  ##              2010-10-24 JL   Fixed page number.
060877,000014:                                                                                                  ##              2011-05-07 JL   Removed workaround.
060878,000015:                                                                                                  ##              2017-01-06 RSB  Page numbers now agree with those on the
060879,000016:                                                                                                  ##                              original hardcopy, as opposed to the PDF page
060880,000017:                                                                                                  ##                              numbers in 1701.pdf.
060881,000018:                                                                                                  ##              2017-01-14 RSB  Cross-diff'd comment text (not whitespace)
060882,000019:                                                                                                  ##                              vs the already-proofed corresponding Colossus
060883,000020:                                                                                                  ##                              237 and Comanche 55 source-code files
060884,000021:                                                                                                  ##                              and corrected errors found.
060885,000022:                                                                                                  ##              2017-03-15 RSB  Comment-text fixes identified in 6-way
060886,000023:                                                                                                  ##                              side-by-side diff of Sunburst 120 and Luminary 
060887,000024:                                                                                                  ##                              69/99/116/131/210.
060888,000025: 
060889,000026:                                                                                                  ## The contents of the "Colossus249" files, in general, are transcribed 
060890,000027:                                                                                                  ## from a scanned copy of the program listing.  Notations on this
060891,000028:                                                                                                  ## document read, in part:
060892,000029:                                                                                                  ##
060893,000030:                                                                                                  ##      Assemble revision 249 of AGC program Colossus by NASA
060894,000031:                                                                                                  ##      2021111-041.  October 28, 1968.  
060895,000032:                                                                                                  ##
060896,000033:                                                                                                  ##      This AGC program shall also be referred to as
060897,000034:                                                                                                  ##                              Colossus 1A
060898,000035:                                                                                                  ##
060899,000036:                                                                                                  ##      Prepared by
060900,000037:                                                                                                  ##                      Massachusetts Institute of Technology
060901,000038:                                                                                                  ##                      75 Cambridge Parkway
060902,000039:                                                                                                  ##                      Cambridge, Massachusetts
060903,000040:                                                                                                  ##      under NASA contract NAS 9-4065.
060904,000041:                                                                                                  ##
060905,000042:                                                                                                  ## Refer directly to the online document mentioned above for further information.
060906,000043:                                                                                                  ## Please report any errors (relative to the scanned pages) to info@sandroid.org.
060907,000044:                                                                                                  ##
060908,000045:                                                                                                  ## In some cases, where the source code for Luminary 131 overlaps that of 
060909,000046:                                                                                                  ## Colossus 249, this code is instead copied from the corresponding Luminary 131
060910,000047:                                                                                                  ## source file, and then is proofed to incorporate any changes.
060911,000048: 

Page 1388

060913,000050:    5410                                           BLOCK    02                                    
060914,000051:    4000                                           SETLOC   FFTAG3                                
060915,000052:    4000                                           BANK                                           
060916,000053: 
060917,000054:    5410  E3,1471                                  EBANK=   COMMAND                               
060918,000055: 
060919,000056:                                                                                                  #  FIXED-FIXED ROUTINES.
060920,000057: 
060921,000058:    5410                                           COUNT    02/IMODE                              
060922,000059: 
060923,000060:    5410           34714        ZEROICDU           CAF      ZERO                                  #  ZERO ICDU COUNTERS.
060924,000061:    5411           54032                           TS       CDUX                                  
060925,000062:    5412           54033                           TS       CDUY                                  
060926,000063:    5413           54034                           TS       CDUZ                                  
060927,000064:    5414           00002                           TC       Q                                     
060928,000065: 
060929,000066:    5415     4702               SPSCODE            =        BIT9                                  
060930,000067: 

Page 1389

060932,000069:                                                                                                  #  IMU ZEROING ROUTINE.
060933,000070: 
060934,000071: 11,3721                                           BANK     11                                    
060935,000072: 07,2000                                           SETLOC   MODESW                                
060936,000073: 07,2000                                           BANK                                           
060937,000074: 
060938,000075: 07,2516                                           COUNT    07/IMODE                              
060939,000076: 
060940,000077: 07,2516           00004        IMUZERO            INHINT                                         #  ROUTINE TO ZERO ICDUS.
060941,000078: 07,2517           41036                           CS       DSPTAB     +11D                       #  DONT ZERO CDUS IF IMU IN GIMBAL LOCK AND
060942,000079: 07,2520           74726                           MASK     BITS4&6                               #  COARSE ALIGN (GIMBAL RUNAWAY PROTECTION)
060943,000080: 07,2521           10000                           CCS      A                                     
060944,000081: 07,2522           12526                           TCF      IMUZEROA                              
060945,000082: 
060946,000083: 07,2523           05537                           TC       ALARM                                 #  IF SO.
060947,000084: 07,2524           00206                           OCT      00206                                 
060948,000085: 
060949,000086: 07,2525           13461                           TCF      CAGETSTJ   +4                         #  IMMEDIATE FAILURE.
060950,000087: 
060951,000088: 07,2526           03455        IMUZEROA           TC       CAGETSTJ                              
060952,000089: 
060953,000090:                                                                                                  #  DO ALL THE WORK.
060954,000091: 
060955,000092: 07,2527           41321                           CS       IMODES33                              #  DISABLE DAP AUTO AND HOLD MODES
060956,000093: 07,2530           74730                           MASK     SUPER011                              #        BIT5 FOR GROUND
060957,000094: 07,2531           27321                           ADS      IMODES33                              
060958,000095: 
060959,000096: 07,2532           41320                           CS       IMODES30                              #  INHIBIT ICDUFAIL AND IMUFAIL (IN CASE WE
060960,000097: 07,2533           75656                           MASK     BITS3&4                               #  JUST CAME OUT OF COARSE ALIGN).
060961,000098: 07,2534           27320                           ADS      IMODES30                              
060962,000099: 
060963,000100: 07,2535           44726                           CS       BITS4&6                               #  SEND ZERO ENCODE WITH COARSE AND ERROR
060964,000101: 07,2536           00006                           EXTEND                                         #  COUNTER DISABLED.
060965,000102: 07,2537           03012                           WAND     CHAN12                                
060966,000103: 
060967,000104: 07,2540           03070                           TC       NOATTOFF                              #  TURN OFF NO ATT LAMP.
060968,000105: 
060969,000106: 07,2541           34706                           CAF      BIT5                                  
060970,000107: 07,2542           00006                           EXTEND                                         
060971,000108: 07,2543           05012                           WOR      CHAN12                                
060972,000109: 
060973,000110: 07,2544           05410                           TC       ZEROICDU                              
060974,000111: 07,2545           34705                           CAF      BIT6                                  #  WAIT 320 MS TO GIVE AGS ADEQUATE TIME TO
060975,000112: 07,2546           05140                           TC       WAITLIST                              #  RECEIVE ITS PULSE TRAIN.
060976,000113: 07,2547  E3,1474                                  EBANK=   CDUIND                                
060977,000114: 07,2547           02561 16103                     2CADR    IMUZERO2                              
060978,000115: 
060979,000116: 07,2551           41320                           CS       IMODES30                              #  SEE IF IMU OPERATING AND ALARM IF NOT.
060980,000117: 07,2552           74702                           MASK     BIT9                                  
060981,000118: 07,2553           10000                           CCS      A                                     
060982,000119: 07,2554           12557                           TCF      MODEEXIT                              

Page 1390

060984,000121: 07,2555           05537                           TC       ALARM                                 
060985,000122: 07,2556           00210                           OCT      210                                   
060986,000123: 
060987,000124: 07,2557           00003        MODEEXIT           RELINT                                         #  GENERAL MODE-SWITCHING EXIT.
060988,000125: 07,2560           14570                           TCF      SWRETURN                              
060989,000126: 
060990,000127: 07,2561           03443        IMUZERO2           TC       CAGETEST                              
060991,000128: 07,2562           05410                           TC       ZEROICDU                              #  ZERO CDUX, CDUY, CDUZ
060992,000129: 
060993,000130: 07,2563           44706                           CS       BIT5                                  #  REMOVE ZERO DISCRETE.
060994,000131: 07,2564           00006                           EXTEND                                         
060995,000132: 07,2565           03012                           WAND     CHAN12                                
060996,000133: 
060997,000134: 07,2566           34700                           CAF      BIT11                                 #  WAIT 10 SECS FOR CTRS TO FIND GIMBALS
060998,000135: 07,2567           05161                           TC       VARDELAY                              
060999,000136: 
061000,000137: 07,2570           03443        IMUZERO3           TC       CAGETEST                              
061001,000138: 07,2571           45656                           CS       BITS3&4                               #  REMOVE IMUFAIL AND ICDUFAIL INHIBIT.
061002,000139: 07,2572           71320                           MASK     IMODES30                              
061003,000140: 07,2573           55320                           TS       IMODES30                              
061004,000141: 
061005,000142: 07,2574           44730                           CS       SUPER011                              #  ENABLE DAP AUTO AND HOLD MODES
061006,000143: 07,2575           71321                           MASK     IMODES33                              #        BIT5 FOR GROUND
061007,000144: 07,2576           55321                           TS       IMODES33                              
061008,000145: 
061009,000146: 07,2577           04633                           TC       IBNKCALL                              #  SET ISS WARNING IF EITHER OF ABOVE ARE
061010,000147: 07,2600           14665                           CADR     SETISSW                               #  PRESENT.
061011,000148: 
061012,000149: 07,2601           13433                           TCF      ENDIMU                                
061013,000150: 

Page 1391

061015,000152:                                                                                                  #  IMU COARSE ALIGN MODE.
061016,000153: 
061017,000154: 07,2602           00004        IMUCOARS           INHINT                                         
061018,000155: 07,2603           03455                           TC       CAGETSTJ                              
061019,000156: 07,2604           02746                           TC       SETCOARS                              
061020,000157: 
061021,000158: 07,2605           36211                           CAF      SIX                                   
061022,000159: 07,2606           05140                           TC       WAITLIST                              
061023,000160: 07,2607  E3,1474                                  EBANK=   CDUIND                                
061024,000161: 07,2607           02612 16103                     2CADR    COARS                                 
061025,000162: 
061026,000163: 07,2611           12557                           TCF      MODEEXIT                              
061027,000164: 
061028,000165: 07,2612           03443        COARS              TC       CAGETEST                              
061029,000166: 07,2613           34705                           CAF      BIT6                                  #  ENABLE ALL THREE ISS CDU ERROR COUNTERS
061030,000167: 07,2614           00006                           EXTEND                                         
061031,000168: 07,2615           05012                           WOR      CHAN12                                
061032,000169: 
061033,000170: 07,2616           34711                           CAF      TWO                                   #  SET CDU INDICATOR
061034,000171: 07,2617           55474        COARS1             TS       CDUIND                                
061035,000172: 
061036,000173: 07,2620           51474                           INDEX    CDUIND                                #  COMPUTE THETAD - THETAA IN 1:S
061037,000174: 07,2621           31155                           CA       THETAD                                #        COMPLEMENT FORM
061038,000175: 07,2622           00006                           EXTEND                                         
061039,000176: 07,2623           51474                           INDEX    CDUIND                                
061040,000177: 07,2624           20032                           MSU      CDUX                                  
061041,000178: 07,2625           00006                           EXTEND                                         
061042,000179: 07,2626           74676                           MP       BIT13                                 #  SHIFT RIGHT 2
061043,000180: 07,2627           56001                           XCH      L                                     #  ROUND
061044,000181: 07,2630           60000                           DOUBLE                                         
061045,000182: 07,2631           54061                           TS       ITEMP1                                
061046,000183: 07,2632           12634                           TCF      +2                                    
061047,000184: 07,2633           26001                           ADS      L                                     
061048,000185: 
061049,000186: 07,2634           51474                           INDEX    CDUIND                                #  DIFFERENCE TO BE COMPUTED
061050,000187: 07,2635           23471                           LXCH     COMMAND                               
061051,000188: 07,2636           11474                           CCS      CDUIND                                
061052,000189: 07,2637           02617                           TC       COARS1                                
061053,000190: 
061054,000191: 07,2640           34711                           CAF      TWO                                   #  MINIMUM OF 4 MS WAIT
061055,000192: 07,2641           05161                           TC       VARDELAY                              
061056,000193: 

Page 1392

061058,000195: 07,2642           03443        COARS2             TC       CAGETEST                              #  DONT CONTINUE IF CAGED.
061059,000196: 07,2643           54061                           TS       ITEMP1                                #  SETS TO +0.
061060,000197: 07,2644           34711                           CAF      TWO                                   #  SET CDU INDICATOR
061061,000198: 07,2645           55474                 +3        TS       CDUIND                                
061062,000199: 
061063,000200: 07,2646           51474                           INDEX    CDUIND                                
061064,000201: 07,2647           11471                           CCS      COMMAND                               #  NUMBER OF PULSES REQUIRED
061065,000202: 07,2650           02654                           TC       COMPOS                                #  GREATER THAN MAX ALLOWED
061066,000203: 07,2651           02663                           TC       NEXTCDU    +1                         
061067,000204: 07,2652           02721                           TC       COMNEG                                
061068,000205: 07,2653           02663                           TC       NEXTCDU    +1                         
061069,000206: 
061070,000207: 07,2654           63544        COMPOS             AD       -COMMAX                               #  COMMAX = MAX NUMBER OF PULSES ALLOWED
061071,000208: 07,2655           00006                           EXTEND                                         #        MINUS ONE
061072,000209: 07,2656           62731                           BZMF     COMZERO                               
061073,000210: 07,2657           51474                           INDEX    CDUIND                                
061074,000211: 07,2660           55471                           TS       COMMAND                               #  REDUCE COMMAND BY MAX NUMBER OF PULSES
061075,000212: 07,2661           43545                           CS       -COMMAX-                              #        ALLOWED
061076,000213: 
061077,000214: 07,2662           24061        NEXTCDU            INCR     ITEMP1                                
061078,000215: 07,2663           64713                           AD       NEG0                                  
061079,000216: 07,2664           51474                           INDEX    CDUIND                                
061080,000217: 07,2665           54050                           TS       CDUXCMD                               #  SET UP COMMAND REGISTER.
061081,000218: 
061082,000219: 07,2666           11474                           CCS      CDUIND                                
061083,000220: 07,2667           02645                           TC       COARS2     +3                         
061084,000221: 
061085,000222: 07,2670           10061                           CCS      ITEMP1                                #  SEE IF ANY PULSES TO GO OUT.
061086,000223: 07,2671           12735                           TCF      SENDPULS                              
061087,000224: 
061088,000225: 07,2672           05156                           TC       FIXDELAY                              #  WAIT FOR GIMBALS TO SETTLE.
061089,000226: 07,2673           00226                           DEC      150        B-14                       
061090,000227: 
061091,000228: 07,2674           34711                           CAF      TWO                                   #  AT END OF COMMAND, CHECK TO SEE THAT
061092,000229: 07,2675           54061        CHKCORS            TS       ITEMP1                                #  GIMBALS ARE WITHIN 2 DEGREES OF THETAD.
061093,000230: 07,2676           50000                           INDEX    A                                     
061094,000231: 07,2677           30032                           CA       CDUX                                  
061095,000232: 07,2700           00006                           EXTEND                                         
061096,000233: 07,2701           50061                           INDEX    ITEMP1                                
061097,000234: 07,2702           21155                           MSU      THETAD                                
061098,000235: 07,2703           10000                           CCS      A                                     
061099,000236: 07,2704           12712                           TCF      COARSERR                              
061100,000237: 07,2705           12707                           TCF      CORSCHK2                              
061101,000238: 07,2706           12712                           TCF      COARSERR                              
061102,000239: 

Page 1393

061104,000241: 07,2707           10061        CORSCHK2           CCS      ITEMP1                                
061105,000242: 07,2710           12675                           TCF      CHKCORS                               
061106,000243: 07,2711           13433                           TCF      ENDIMU                                #  END OF COARSE ALIGNMENT.
061107,000244: 
061108,000245: 07,2712           62720        COARSERR           AD       COARSTOL                              #  2 DEGREES.
061109,000246: 07,2713           00006                           EXTEND                                         
061110,000247: 07,2714           62707                           BZMF     CORSCHK2                              
061111,000248: 
061112,000249: 07,2715           05537                           TC       ALARM                                 #  COARSE ALIGN ERROR.
061113,000250: 07,2716           00211                           OCT      211                                   
061114,000251: 
061115,000252: 07,2717           13441                           TCF      IMUBAD                                
061116,000253: 
061117,000254: 07,2720           77511        COARSTOL           DEC      -.01111                               #  2 DEGREES SCALED AT HALF-REVOLUTIONS
061118,000255: 
061119,000256: 07,2721           63544        COMNEG             AD       -COMMAX                               
061120,000257: 07,2722           00006                           EXTEND                                         
061121,000258: 07,2723           62731                           BZMF     COMZERO                               
061122,000259: 07,2724           40000                           COM                                            
061123,000260: 07,2725           51474                           INDEX    CDUIND                                
061124,000261: 07,2726           55471                           TS       COMMAND                               
061125,000262: 07,2727           33545                           CA       -COMMAX-                              
061126,000263: 07,2730           02662                           TC       NEXTCDU                               
061127,000264: 
061128,000265: 07,2731           34714        COMZERO            CAF      ZERO                                  
061129,000266: 07,2732           51474                           INDEX    CDUIND                                
061130,000267: 07,2733           57471                           XCH      COMMAND                               
061131,000268: 07,2734           02662                           TC       NEXTCDU                               
061132,000269: 
061133,000270: 07,2735           37707        SENDPULS           CAF      13,14,15                              
061134,000271: 07,2736           00006                           EXTEND                                         
061135,000272: 07,2737           05014                           WOR      CHAN14                                
061136,000273: 07,2740           33546                           CAF      600MS                                 
061137,000274: 07,2741           12641                           TCF      COARS2     -1                         #  THEN TO VARDELAY
061138,000275: 
061139,000276: 07,2742           34705        CA+ECE             CAF      BIT6                                  #  ENABLE ALL THREE ISS CDU ERROR COUNTERS
061140,000277: 07,2743           00006                           EXTEND                                         
061141,000278: 07,2744           05012                           WOR      CHAN12                                
061142,000279: 07,2745           05213                           TC       TASKOVER                              
061143,000280: 

Page 1394

061145,000282: 07,2746           34707        SETCOARS           CAF      BIT4                                  #  BYPASS IF ALREADY IN COARSE ALIGN
061146,000283: 07,2747           00006                           EXTEND                                         
061147,000284: 07,2750           02012                           RAND     CHAN12                                
061148,000285: 07,2751           10000                           CCS      A                                     
061149,000286: 07,2752           00002                           TC       Q                                     
061150,000287: 
061151,000288: 07,2753           44705                           CS       BIT6                                  #  CLEAR ISS ERROR COUNTERS
061152,000289: 07,2754           00006                           EXTEND                                         
061153,000290: 07,2755           03012                           WAND     CHAN12                                
061154,000291: 
061155,000292: 07,2756           44701                           CS       BIT10                                 #  KNOCK DOWN GYRO ACTIVITY
061156,000293: 07,2757           00006                           EXTEND                                         
061157,000294: 07,2760           03014                           WAND     CHAN14                                
061158,000295: 07,2761           44714                           CS       ZERO                                  
061159,000296: 07,2762           54047                           TS       GYROCMD                               
061160,000297: 
061161,000298: 07,2763           34707                           CAF      BIT4                                  #  PUT ISS IN COARSE ALIGN
061162,000299: 07,2764           00006                           EXTEND                                         
061163,000300: 07,2765           05012                           WOR      CHAN12                                
061164,000301: 
061165,000302: 07,2766           41036                           CS       DSPTAB     +11D                       #  TURN ON NO ATT LAMP
061166,000303: 07,2767           73011                           MASK     OCT40010                              
061167,000304: 07,2770           27036                           ADS      DSPTAB     +11D                       
061168,000305: 
061169,000306: 07,2771           41321                           CS       IMODES33                              #  DISABLE DAP AUTO AND HOLD MODES
061170,000307: 07,2772           74705                           MASK     BIT6                                  
061171,000308: 07,2773           27321                           ADS      IMODES33                              
061172,000309: 
061173,000310: 07,2774           41320                           CS       IMODES30                              #  DISABLE IMUFAIL
061174,000311: 07,2775           74707                           MASK     BIT4                                  
061175,000312: 07,2776           27320                           ADS      IMODES30                              
061176,000313: 
061177,000314: 07,2777           44706        RNDREFDR           CS       BIT5                                  #  KNOCK DOWN TRACK FLAG
061178,000315: 07,3000           70075                           MASK     FLAGWRD1                              
061179,000316: 07,3001           54075                           TS       FLAGWRD1                              
061180,000317: 
061181,000318: 07,3002           44674                           CS       BIT15                                 #  KNOCK DOWN DRIFT FLAG
061182,000319: 07,3003           70076                           MASK     FLAGWRD2                              
061183,000320: 07,3004           54076                           TS       FLAGWRD2                              
061184,000321: 
061185,000322: 07,3005           44676                           CS       BIT13                                 #  KNOCK DOWN REFSMMAT FLAG
061186,000323: 07,3006           70077                           MASK     FLAGWRD3                              
061187,000324: 07,3007           54077                           TS       FLAGWRD3                              
061188,000325: 
061189,000326: 07,3010           00002                           TC       Q                                     
061190,000327: 
061191,000328: 07,3011           40010        OCT40010           OCT      40010                                 
061192,000329: 

Page 1395

061194,000331:                                                                                                  #  IMU FINE ALIGN MODE SWITCH.
061195,000332: 
061196,000333: 07,3012           00004        IMUFINE            INHINT                                         
061197,000334: 07,3013           03455                           TC       CAGETSTJ                              #  SEE IF IMU BEING CAGED.
061198,000335: 
061199,000336: 07,3014           43543                           CS       BITS4-5                               #  RESET ZERO AND COARSE
061200,000337: 07,3015           00006                           EXTEND                                         
061201,000338: 07,3016           03012                           WAND     CHAN12                                
061202,000339: 
061203,000340: 07,3017           44705                           CS       BIT6                                  #  INSURE DAP AUTO AND HOLD MODES ENABLED
061204,000341: 07,3020           71321                           MASK     IMODES33                              
061205,000342: 07,3021           55321                           TS       IMODES33                              
061206,000343: 
061207,000344: 07,3022           03070                           TC       NOATTOFF                              
061208,000345: 
061209,000346: 07,3023           34701                           CAF      BIT10                                 #  IMU FAIL WAS INHIBITED DURING THE
061210,000347: 07,3024           05140                           TC       WAITLIST                              #  PRESUMABLY PRECEDING COARSE ALIGN.  LEAVE
061211,000348: 07,3025  E3,1474                                  EBANK=   CDUIND                                
061212,000349: 07,3025           03036 16103                     2CADR    IFAILOK                               #  IT ON FOR THE FIRST 5 SECS OF FINE ALIGN
061213,000350: 
061214,000351: 07,3027           34735                           CAF      2SECS                                 
061215,000352: 07,3030           05140                           TC       WAITLIST                              
061216,000353: 07,3031  E3,1474                                  EBANK=   CDUIND                                
061217,000354: 07,3031           03034 16103                     2CADR    IMUFINED                              
061218,000355: 
061219,000356: 07,3033           12557                           TCF      MODEEXIT                              
061220,000357: 
061221,000358: 07,3034           03443        IMUFINED           TC       CAGETEST                              #  SEE THAT NO ONE HAS CAGED THE IMU.
061222,000359: 07,3035           13433                           TCF      ENDIMU                                
061223,000360: 

Page 1396

061225,000362: 07,3036           03450        IFAILOK            TC       CAGETSTQ                              #  ENABLE IMU FIAL UNLESS IMU BEING CAGED.
061226,000363: 07,3037           15213                           TCF      TASKOVER                              #  IT IS.
061227,000364: 
061228,000365: 07,3040           34707                           CAF      BIT4                                  #  DONT RESET IMU FAIL INHIBIT IF SOMEONE
061229,000366: 07,3041           00006                           EXTEND                                         #  HAS GONE INTO COARSE ALIGN.
061230,000367: 07,3042           02012                           RAND     CHAN12                                
061231,000368: 07,3043           10000                           CCS      A                                     
061232,000369: 07,3044           15213                           TCF      TASKOVER                              
061233,000370: 
061234,000371: 07,3045           41320                           CS       IMODES30                              #  RESET IMUFAIL.
061235,000372: 07,3046           74676                           MASK     BIT13                                 
061236,000373: 07,3047           27320                           ADS      IMODES30                              
061237,000374: 07,3050           44707                           CS       BIT4                                  
061238,000375: 07,3051           71320        PFAILOK2           MASK     IMODES30                              
061239,000376: 07,3052           55320                           TS       IMODES30                              
061240,000377: 07,3053           04633                           TC       IBNKCALL                              #  THE ISS WARNING LIGHT MAY COME ON NOW
061241,000378: 07,3054           14665                           CADR     SETISSW                               #  THAT THE INHIBIT HAS BEEN REMOVED.
061242,000379: 07,3055           15213                           TCF      TASKOVER                              
061243,000380: 
061244,000381: 07,3056           03450        PFAILOK            TC       CAGETSTQ                              #  ENABLE PIP FAIL PROG ALARM.
061245,000382: 07,3057           15213                           TCF      TASKOVER                              
061246,000383: 
061247,000384: 07,3060           41320                           CS       IMODES30                              #  RESET IMU AND PIPA FAIL BITS.
061248,000385: 07,3061           74701                           MASK     BIT10                                 
061249,000386: 07,3062           27320                           ADS      IMODES30                              
061250,000387: 
061251,000388: 07,3063           41321                           CS       IMODES33                              
061252,000389: 07,3064           74676                           MASK     BIT13                                 
061253,000390: 07,3065           27321                           ADS      IMODES33                              
061254,000391: 
061255,000392: 07,3066           44706                           CS       BIT5                                  
061256,000393: 07,3067           13051                           TCF      PFAILOK2                              
061257,000394: 
061258,000395: 07,3070           43011        NOATTOFF           CS       OCT40010                              #  SUBROUTINE TO TURN OFF NO ATT LAMP.
061259,000396: 07,3071           71036                           MASK     DSPTAB     +11D                       
061260,000397: 07,3072           64674                           AD       BIT15                                 
061261,000398: 07,3073           55036                           TS       DSPTAB     +11D                       
061262,000399: 07,3074           00002                           TC       Q                                     
061263,000400: 

Page 1397

061265,000402:                                                                                                  #  ROUITNES TO INITIATE AND TERMINATE PROGRAM USE OF THE PIPAS.  NO IMUSTALL REQUIRED IN EITHER CASE.
061266,000403: 
061267,000404: 07,3075           44714        PIPUSE             CS       ZERO                                  
061268,000405: 07,3076           54037                           TS       PIPAX                                 
061269,000406: 07,3077           54040                           TS       PIPAY                                 
061270,000407: 07,3100           54041                           TS       PIPAZ                                 
061271,000408: 
061272,000409: 07,3101           03450        PIPUSE1            TC       CAGETSTQ                              #  DO NOT ENABLE PIPA FAIL IF IMU IS CAGED
061273,000410: 07,3102           14570                           TCF      SWRETURN                              
061274,000411: 
061275,000412: 07,3103           00004                           INHINT                                         
061276,000413: 07,3104           44712                           CS       BIT1                                  #  IF PIPA FAILS FROM NOW ON (UNTIL
061277,000414: 07,3105           71320                           MASK     IMODES30                              #  PIPFREE), LIGHT ISS WARNING.
061278,000415: 07,3106           55320                           TS       IMODES30                              
061279,000416: 
061280,000417: 07,3107           04633        PIPFREE2           TC       IBNKCALL                              #  ISS WARNING MIGHT COME ON NOW.
061281,000418: 07,3110           14665                           CADR     SETISSW                               #  (OR GO OFF ON PIPFREE).
061282,000419: 
061283,000420: 07,3111           12557                           TCF      MODEEXIT                              
061284,000421: 
061285,000422: 07,3112           00004        PIPFREE            INHINT                                         #  PROGRAM DONE WITH PIPAS.  DONT LIGHT
061286,000423: 07,3113           41320                           CS       IMODES30                              #  ISS WARNING.
061287,000424: 07,3114           74712                           MASK     BIT1                                  
061288,000425: 07,3115           27320                           ADS      IMODES30                              
061289,000426: 
061290,000427: 07,3116           74701                           MASK     BIT10                                 #  IF PIP FAIL ON, DO PROG ALSRM AND RESET
061291,000428: 07,3117           10000                           CCS      A                                     #  ISS WARNING.
061292,000429: 07,3120           12557                           TCF      MODEEXIT                              
061293,000430: 
061294,000431: 07,3121           05537                           TC       ALARM                                 
061295,000432: 07,3122           00212                           OCT      212                                   
061296,000433: 
061297,000434: 07,3123           00004                           INHINT                                         
061298,000435: 
061299,000436: 07,3124           13107                           TCF      PIPFREE2                              
061300,000437: 

Page 1398

061302,000439:                                                                                                  #  THE FOLLOWING ROUTINE TORQUES THE IRIGS ACCORDING TO DOUBLE PRECISION INPUTS IN THE SIX REGISTERS
061303,000440:                                                                                                  #  BEGINNING AT THE ECADR ARRIVING IN A.  THE MINIMUM SIZE OF ANY PULSE TRAIN IS 16 PULSES (.25 CDU COUNTS).  THE
061304,000441:                                                                                                  #  UNSENT PORTION OF THE COMMAND IS LEFT INTACT IN THE INPUT COMMAND REGISTERS.
061305,000442: 
061306,000443: 07,3125  E3,1400                                  EBANK=   1400                                  #  VARIABLE, ACTUALLY.
061307,000444: 
061308,000445: 07,3125           54161        IMUPULSE           TS       MPAC       +5                         #  SAVE ARRIVING ECADR.
061309,000446: 07,3126           03455                           TC       CAGETSTJ                              #  DONT PROCEED IF IMU BEING CAGED.
061310,000447: 
061311,000448: 07,3127           11304                           CCS      LGYRO                                 #  SEE IF GYROS BUSY.
061312,000449: 07,3130           03171                           TC       GYROBUSY                              #  SLEEP.
061313,000450: 
061314,000451: 07,3131           54156                           TS       MPAC       +2                         
061315,000452: 07,3132           34705                           CAF      BIT6                                  #  ENABLE THE POWER SUPPLY.
061316,000453: 07,3133           00006                           EXTEND                                         
061317,000454: 07,3134           05014                           WOR      CHAN14                                
061318,000455: 
061319,000456: 07,3135           34710                           CAF      FOUR                                  
061320,000457: 07,3136           05140        GWAKE2             TC       WAITLIST                              #  (IF A JOB WAS PUT TO SLEEP, THE POWER
061321,000458: 07,3137  E3,1474                                  EBANK=   CDUIND                                #  SUPPLY IS LEFT ON BY THE WAKING JOB).
061322,000459: 07,3137           03207 16103                     2CADR    STRTGYRO                              
061323,000460: 
061324,000461: 07,3141           30161                           CA       MPAC       +5                         #  SET UP EBANK, SAVING CALLER'S EBANK FOR
061325,000462: 07,3142           56003                           XCH      EBANK                                 #  RESTORATION ON RETURN.
061326,000463: 07,3143           56161                           XCH      MPAC       +5                         
061327,000464: 07,3144           55304                           TS       LGYRO                                 #  RESERVES GYROS.
061328,000465: 07,3145           74373                           MASK     LOW8                                  
061329,000466: 07,3146           54061                           TS       ITEMP1                                
061330,000467: 
061331,000468: 07,3147           34711                           CAF      TWO                                   #  FORCE SIGN AGREEMENT ON INPUTS.
061332,000469: 07,3150           54157        GYROAGRE           TS       MPAC       +3                         
061333,000470: 07,3151           60000                           DOUBLE                                         
061334,000471: 07,3152           60061                           AD       ITEMP1                                
061335,000472: 07,3153           54160                           TS       MPAC       +4                         
061336,000473: 07,3154           00006                           EXTEND                                         
061337,000474: 07,3155           50000                           INDEX    A                                     
061338,000475: 07,3156           31401                           DCA      1400                                  
061339,000476: 07,3157           52155                           DXCH     MPAC                                  
061340,000477: 07,3160           07226                           TC       TPAGREE                               
061341,000478: 07,3161           52155                           DXCH     MPAC                                  
061342,000479: 07,3162           50160                           INDEX    MPAC       +4                         
061343,000480: 07,3163           53401                           DXCH     1400                                  
061344,000481: 
061345,000482: 07,3164           10157                           CCS      MPAC       +3                         
061346,000483: 07,3165           13150                           TCF      GYROAGRE                              
061347,000484: 
061348,000485: 07,3166           30161                           CA       MPAC       +5                         #  RESTORE CALLER'S EBANK.
061349,000486: 07,3167           54003                           TS       EBANK                                 
061350,000487: 07,3170           12557                           TCF      MODEEXIT                              
061351,000488: 

Page 1399

061353,000490:                                                                                                  #  ROUTINES TO ALLOW TORQUING BY ONLY ONE JOB AT A TIME.
061354,000491: 
061355,000492: 07,3171           00006        GYROBUSY           EXTEND                                         #  SAVE RETURN 2FCADR.
061356,000493: 07,3172           30134                           DCA      BUF2                                  
061357,000494: 07,3173           52155                           DXCH     MPAC                                  
061358,000495: 07,3174           33206        REGSLEEP           CAF      LGWAKE                                
061359,000496: 07,3175           15070                           TCF      JOBSLEEP                              
061360,000497: 
061361,000498: 07,3176           11304        GWAKE              CCS      LGYRO                                 #  WHEN AWAKENED, SEE IF GYROS STILL BUSY.
061362,000499: 07,3177           13174                           TCF      REGSLEEP                              #  IF SO, SLEEP SOME MORE.
061363,000500: 
061364,000501: 07,3200           54156                           TS       MPAC       +2                         
061365,000502: 07,3201           00006                           EXTEND                                         
061366,000503: 07,3202           30155                           DCA      MPAC                                  
061367,000504: 07,3203           52134                           DXCH     BUF2                                  #  RESTORE SWRETURN INFO.
061368,000505: 07,3204           34712                           CAF      ONE                                   
061369,000506: 07,3205           13136                           TCF      GWAKE2                                
061370,000507: 
061371,000508: 07,3206           17176        LGWAKE             CADR     GWAKE                                 
061372,000509: 

Page 1400

061374,000511:                                                                                                  #  GYRO-TORQUING WAITLIST TASKS.
061375,000512: 
061376,000513: 07,3207           43430        STRTGYRO           CS       GDESELCT                              #  DE-SELECT LAST GYRO.
061377,000514: 07,3210           00006                           EXTEND                                         
061378,000515: 07,3211           03014                           WAND     CHAN14                                
061379,000516: 
061380,000517: 07,3212           03443                           TC       CAGETEST                              
061381,000518: 
061382,000519: 07,3213           31304        STRTGYR2           CA       LGYRO                                 #  JUMP ON PHASE COUNTER IN BITS 13-14.
061383,000520: 07,3214           00006                           EXTEND                                         
061384,000521: 07,3215           74707                           MP       BIT4                                  
061385,000522: 07,3216           50000                           INDEX    A                                     
061386,000523: 07,3217           13220                           TCF      +1                                    
061387,000524: 07,3220           03235                           TC       GSELECT                               #  =0.  DO Y GYRO.
061388,000525: 07,3221           00202                           OCT      00202                                 
061389,000526: 
061390,000527: 07,3222           03235                           TC       GSELECT                               #  =1.  DO Z GYRO.
061391,000528: 07,3223           00302                           OCT      00302                                 
061392,000529: 
061393,000530: 07,3224           03233                           TC       GSELECT    -2                         #  =2.  DO X GYRO.
061394,000531: 07,3225           00100                           OCT      00100                                 
061395,000532: 
061396,000533: 07,3226           34714                           CAF      ZERO                                  #  =3.  DONE
061397,000534: 07,3227           55304                           TS       LGYRO                                 
061398,000535: 07,3230           33206                           CAF      LGWAKE                                #  WAKE A POSSIBLE SLEEPING JOB.
061399,000536: 07,3231           05074                           TC       JOBWAKE                               
061400,000537: 
061401,000538: 07,3232           13034        NORESET            TCF      IMUFINED                              #  DO NOT RESET POWER SUPPLY

Page 1401

061403,000540: 07,3233           44710                 -2        CS       FOUR                                  #  SPECIAL ENTRY TO REGRESS LGYRO FOR X.
061404,000541: 07,3234           27304                           ADS      LGYRO                                 
061405,000542: 
061406,000543: 07,3235           50002        GSELECT            INDEX    Q                                     #  SELECT GYRO.
061407,000544: 07,3236           30000                           CAF      0                                     #  PACKED WORD CONTAINS GYRO SELECT BITS
061408,000545: 07,3237           54064                           TS       ITEMP4                                #  AND INCREMENT TO LGYRO.
061409,000546: 07,3240           74716                           MASK     SEVEN                                 
061410,000547: 07,3241           64676                           AD       BIT13                                 
061411,000548: 07,3242           27304                           ADS      LGYRO                                 
061412,000549: 07,3243           54003                           TS       EBANK                                 
061413,000550: 07,3244           74373                           MASK     LOW8                                  
061414,000551: 07,3245           54061                           TS       ITEMP1                                
061415,000552: 
061416,000553: 07,3246           44716                           CS       SEVEN                                 
061417,000554: 07,3247           70064                           MASK     ITEMP4                                
061418,000555: 07,3250           54064                           TS       ITEMP4                                
061419,000556: 
061420,000557: 07,3251           00006                           EXTEND                                         #  MOVE DP COMMAND TO RUPTREGS FOR TESTING.
061421,000558: 07,3252           50061                           INDEX    ITEMP1                                
061422,000559: 07,3253           31401                           DCA      1400                                  
061423,000560: 07,3254           52071                           DXCH     RUPTREG1                              
061424,000561: 
061425,000562: 07,3255           10070                           CCS      RUPTREG1                              
061426,000563: 07,3256           13271                           TCF      MAJ+                                  
061427,000564: 07,3257           13261                           TCF      +2                                    
061428,000565: 07,3260           13411                           TCF      MAJ-                                  
061429,000566: 
061430,000567: 07,3261           10071                           CCS      RUPTREG2                              
061431,000568: 07,3262           13266                           TCF      MIN+                                  
061432,000569: 07,3263           13213                           TCF      STRTGYR2                              
061433,000570: 07,3264           13406                           TCF      MIN-                                  
061434,000571: 07,3265           13213                           TCF      STRTGYR2                              
061435,000572: 

Page 1402

061437,000574: 07,3266           63322        MIN+               AD       -GYROMIN                              #  SMALL POSITIVE COMMAND.  SEE IF AT LEAST
061438,000575: 07,3267           00006                           EXTEND                                         #  16 GYRO PULSES.
061439,000576: 07,3270           63213                           BZMF     STRTGYR2                              
061440,000577: 
061441,000578: 07,3271           00006        MAJ+               EXTEND                                         #  DEFINITE POSITIVE OUTPUT.
061442,000579: 07,3272           33432                           DCA      GYROFRAC                              
061443,000580: 07,3273           20071                           DAS      RUPTREG1                              
061444,000581: 
061445,000582: 07,3274           30064                           CA       ITEMP4                                #  SELECT POSITIVE TORQUING FOR THIS GYRO.
061446,000583: 07,3275           00006                           EXTEND                                         
061447,000584: 07,3276           05014                           WOR      CHAN14                                
061448,000585: 
061449,000586: 07,3277           36043                           CAF      LOW7                                  #  LEAVE NUMBER OF POSSIBLE 8192 AUGMENTS
061450,000587: 07,3300           70071                           MASK     RUPTREG2                              #  TO INITIAL COMMAND IN MAJOR PART OF LONG
061451,000588: 07,3301           56071                           XCH      RUPTREG2                              #  TERM STORAGE AND TRUNCATED FRACTION
061452,000589: 07,3302           00006        GMERGE             EXTEND                                         #  IN MINOR PART.  THE MAJOR PART WILL BE
061453,000590: 07,3303           74703                           MP       BIT8                                  #  COUNTED DOWN TO ZERO IN THE COURSE OF
061454,000591: 07,3304           54062                           TS       ITEMP2                                #  PUTTING OUT THE ENTIRE COMMAND.
061455,000592: 07,3305           30070                           CA       RUPTREG1                              
061456,000593: 07,3306           00006                           EXTEND                                         
061457,000594: 07,3307           74702                           MP       BIT9                                  
061458,000595: 07,3310           54070                           TS       RUPTREG1                              
061459,000596: 07,3311           30001                           CA       L                                     
061460,000597: 07,3312           00006                           EXTEND                                         
061461,000598: 07,3313           74675                           MP       BIT14                                 
061462,000599: 07,3314           26062                           ADS      ITEMP2                                #  INITIAL COMMAND.
061463,000600: 
061464,000601: 07,3315           00006                           EXTEND                                         #  SEE IF MORE THAN ONE PULSE TRAIN NEEDED
061465,000602: 07,3316           30071                           DCA      RUPTREG1                              #  (MORE THAN 16383 PULSES).
061466,000603: 07,3317           67716                           AD       MINUS1                                
061467,000604: 07,3320           10000                           CCS      A                                     
061468,000605: 07,3321           13345                           TCF      LONGGYRO                              
061469,000606: 07,3322           77601        -GYROMIN           OCT      -176                                  #  MAY BE ADJUSTED TO SPECIFY MINIMUM CMD
061470,000607: 07,3323           13327                           TCF      +4                                    
061471,000608: 
061472,000609: 07,3324           34675                           CAF      BIT14                                 
061473,000610: 07,3325           26062                           ADS      ITEMP2                                
061474,000611: 07,3326           34714                           CAF      ZERO                                  
061475,000612: 
061476,000613: 07,3327           50061                 +4        INDEX    ITEMP1                                
061477,000614: 07,3330           53401                           DXCH     1400                                  

Page 1403

061479,000616: 07,3331           30062                           CA       ITEMP2                                #  ENTIRE COMMAND.
061480,000617: 07,3332           54047        LASTSEG            TS       GYROCMD                               
061481,000618: 07,3333           00006                           EXTEND                                         
061482,000619: 07,3334           74701                           MP       BIT10                                 #  WAITLIST DT
061483,000620: 07,3335           66214                           AD       THREE                                 #  TRUNCATION AND PHASE UNCERTAINTIES.
061484,000621: 07,3336           05140                           TC       WAITLIST                              
061485,000622: 07,3337  E3,1474                                  EBANK=   CDUIND                                
061486,000623: 07,3337           03207 16103                     2CADR    STRTGYRO                              
061487,000624: 
061488,000625: 07,3341           34701        GYROEXIT           CAF      BIT10                                 
061489,000626: 07,3342           00006                           EXTEND                                         
061490,000627: 07,3343           05014                           WOR      CHAN14                                
061491,000628: 07,3344           15213                           TCF      TASKOVER                              
061492,000629: 
061493,000630: 07,3345           50061        LONGGYRO           INDEX    ITEMP1                                
061494,000631: 07,3346           53401                           DXCH     1400                                  #  INITIAL COMMAND OUT PLUS N AUGMENTS OF
061495,000632: 07,3347           34675                           CAF      BIT14                                 #  8192.  INITIAL COMMAND IS AT LEAST 8192.
061496,000633: 07,3350           60062                           AD       ITEMP2                                
061497,000634: 07,3351           54047                           TS       GYROCMD                               
061498,000635: 
061499,000636: 07,3352           00006        AUG3               EXTEND                                         #  GET WAITLIST DT TO TIME WHEN TRAIN IS
061500,000637: 07,3353           74701                           MP       BIT10                                 #  ALMOST OUT.
061501,000638: 07,3354           67714                           AD       NEG3                                  
061502,000639: 07,3355           05140                           TC       WAITLIST                              
061503,000640: 07,3356  E3,1474                                  EBANK=   CDUIND                                
061504,000641: 07,3356           03361 16103                     2CADR    8192AUG                               
061505,000642: 
061506,000643: 07,3360           13341                           TCF      GYROEXIT                              
061507,000644: 
061508,000645: 07,3361           03443        8192AUG            TC       CAGETEST                              
061509,000646: 
061510,000647: 07,3362           34707                           CAF      BIT4                                  
061511,000648: 07,3363           00006                           EXTEND                                         
061512,000649: 07,3364           02012                           RAND     CHAN12                                
061513,000650: 07,3365           10000                           CCS      A                                     
061514,000651: 07,3366           13441                           TCF      IMUBAD                                
061515,000652: 07,3367           31304                           CA       LGYRO                                 #  ADD 8192 PULSES TO GYROCMD
061516,000653: 07,3370           54003                           TS       EBANK                                 
061517,000654: 07,3371           74373                           MASK     LOW8                                  
061518,000655: 07,3372           54061                           TS       ITEMP1                                
061519,000656: 
061520,000657: 07,3373           50061                           INDEX    ITEMP1                                #  SEE IF THIS IS THE LAST AUG.
061521,000658: 07,3374           11400                           CCS      1400                                  
061522,000659: 07,3375           13401                           TCF      AUG2                                  #  MORE TO COME.
061523,000660: 
061524,000661: 07,3376           34675                           CAF      BIT14                                 
061525,000662: 07,3377           26047                           ADS      GYROCMD                               
061526,000663: 07,3400           13333                           TCF      LASTSEG    +1                         
061527,000664: 

Page 1404

061529,000666: 07,3401           50061        AUG2               INDEX    ITEMP1                                
061530,000667: 07,3402           55400                           TS       1400                                  
061531,000668: 07,3403           34675                           CAF      BIT14                                 
061532,000669: 07,3404           26047                           ADS      GYROCMD                               
061533,000670: 07,3405           13352                           TCF      AUG3                                  #  COMPUTE DT.
061534,000671: 

Page 1405

061536,000673: 07,3406           63322        MIN-               AD       -GYROMIN                              #  POSSIBLE NEGATIVE OUTPUT.
061537,000674: 07,3407           00006                           EXTEND                                         
061538,000675: 07,3410           63213                           BZMF     STRTGYR2                              
061539,000676: 
061540,000677: 07,3411           00006        MAJ-               EXTEND                                         #  DEFINITE NEGATIVE OUTPUT.
061541,000678: 07,3412           43432                           DCS      GYROFRAC                              
061542,000679: 07,3413           20071                           DAS      RUPTREG1                              
061543,000680: 
061544,000681: 07,3414           30064                           CA       ITEMP4                                #  SELECT NEGATIVE TORQUING FOR THIS GYRO.
061545,000682: 07,3415           64702                           AD       BIT9                                  
061546,000683: 07,3416           00006                           EXTEND                                         
061547,000684: 07,3417           05014                           WOR      CHAN14                                
061548,000685: 
061549,000686: 07,3420           40070                           CS       RUPTREG1                              #  SET UP RUPTREGS TO FALL INTO GMERGE.
061550,000687: 07,3421           54070                           TS       RUPTREG1                              #  ALL NUMBERS PUT INTO GYROCMD ARE
061551,000688: 07,3422           40071                           CS       RUPTREG2                              #  POSITIVE - BIT9 OF CHAN 14 DETERMINES
061552,000689: 07,3423           76043                           MASK     LOW7                                  #  THE SIGN OF THE COMMAND.
061553,000690: 07,3424           40000                           COM                                            
061554,000691: 07,3425           56071                           XCH      RUPTREG2                              
061555,000692: 07,3426           40000                           COM                                            
061556,000693: 07,3427           13302                           TCF      GMERGE                                
061557,000694: 
061558,000695: 07,3430           01700        GDESELCT           OCT      1700                                  #  TURN OFF SELECT AND ACTIVITY BITS.
061559,000696: 
061560,000697: 07,3431           00000 00034  GYROFRAC           2DEC     .215       B-21                       
061561,000698: 

Page 1406

061563,000700:                                                                                                  #  IMU MODE SWITCHING ROUTINES COME HERE WHEN ACTION COMPLETE.
061564,000701: 
061565,000702: 07,3433           00006        ENDIMU             EXTEND                                         #  MODE IS BAD IF CAGE HAS OCCURED OR IF
061566,000703: 07,3434           00011                           READ     DSALMOUT                              #  ISS WARNING IS ON.
061567,000704: 07,3435           74712                           MASK     BIT1                                  
061568,000705: 07,3436           10000                           CCS      A                                     
061569,000706: 07,3437           13441                           TCF      IMUBAD                                
061570,000707: 
061571,000708: 07,3440           13467        IMUGOOD            TCF      GOODEND                               #  WITH C(A) = 0.
061572,000709: 
061573,000710: 07,3441           34714        IMUBAD             CAF      ZERO                                  
061574,000711: 07,3442           13464                           TCF      BADEND                                
061575,000712: 
061576,000713: 07,3443           34705        CAGETEST           CAF      BIT6                                  #  SUBROUTINE TO TERMINATE IMU MODE
061577,000714: 07,3444           71320                           MASK     IMODES30                              #  SWITCH IF IMU HAS BEEN CAGED.
061578,000715: 07,3445           10000                           CCS      A                                     
061579,000716: 07,3446           13441                           TCF      IMUBAD                                #  DIRECTLY.
061580,000717: 07,3447           00002                           TC       Q                                     #  WITH C(A) = +0.
061581,000718: 
061582,000719: 07,3450           41320        CAGETSTQ           CS       IMODES30                              #  SKIP IF IMU NOT BEING CAGED.
061583,000720: 07,3451           74705                           MASK     BIT6                                  
061584,000721: 07,3452           10000                           CCS      A                                     
061585,000722: 07,3453           24002                           INCR     Q                                     
061586,000723: 07,3454           00002                           TC       Q                                     
061587,000724: 
061588,000725: 07,3455           41320        CAGETSTJ           CS       IMODES30                              #  IF DURING MODE SWITCH INITIALIZATION
061589,000726: 07,3456           74705                           MASK     BIT6                                  #  IT IS FOUND THAT THE IMU IS BEING CAGED,
061590,000727: 07,3457           10000                           CCS      A                                     #  SET IMUCADR TO -0 TO INDICATE OPERATION
061591,000728: 07,3460           00002                           TC       Q                                     #  COMPLETE BUT FAILED.  RETURN IMMEDIATELY
061592,000729: 07,3461           44714                           CS       ZERO                                  #  TO SWRETURN.
061593,000730: 07,3462           55322                           TS       IMUCADR                               
061594,000731: 07,3463           12557                           TCF      MODEEXIT                              
061595,000732: 

Page 1407

061597,000734:                                                                                                  #  GENERALIZED MODE SWITCHING TERMINATION.  ENTER AT GOODEND FOR SUCCESSFUL COMPLETION OF AN I/O OPERATION
061598,000735:                                                                                                  #  OR AT BADEND FOR AN UNSUCCESSFUL ONE.  C(A) OR ARRIVAL =0 FOR IMU, 1 FOR OPTICS.
061599,000736: 
061600,000737: 07,3464           54071        BADEND             TS       RUPTREG2                              #  DEVICE INDEX.
061601,000738: 07,3465           44714                           CS       ZERO                                  #  FOR FAILURE.
061602,000739: 07,3466           13471                           TCF      GOODEND    +2                         
061603,000740: 
061604,000741: 07,3467           54071        GOODEND            TS       RUPTREG2                              
061605,000742: 07,3470           44712                           CS       ONE                                   #  FOR SUCCESS.
061606,000743: 
061607,000744: 07,3471           54072                           TS       RUPTREG3                              
061608,000745: 07,3472           50071                           INDEX    RUPTREG2                              #  SEE IF USING PROGRAM ASLEEP.
061609,000746: 07,3473           11322                           CCS      MODECADR                              
061610,000747: 07,3474           13476                           TCF      +2                                    #  YES - WAKE IT UP.
061611,000748: 07,3475           13506                           TCF      ENDMODE                               #  IF 0, PROGRAM NOT IN YET.
061612,000749: 
061613,000750: 07,3476           34714                           CAF      ZERO                                  #  WAKE SLEEPING PROGRAM.
061614,000751: 07,3477           50071                           INDEX    RUPTREG2                              
061615,000752: 07,3500           57322                           XCH      MODECADR                              
061616,000753: 07,3501           05074                           TC       JOBWAKE                               
061617,000754: 
061618,000755: 07,3502           40072                           CS       RUPTREG3                              #  ADVANCE LOC IF SUCCESSFUL.
061619,000756: 07,3503           50064                           INDEX    LOCCTR                                
061620,000757: 07,3504           26164                           ADS      LOC                                   
061621,000758: 
061622,000759: 07,3505           15213                           TCF      TASKOVER                              
061623,000760: 
061624,000761: 07,3506           30072        ENDMODE            CA       RUPTREG3                              #  -0 INDICATES OPERATION COMPLETE BUT
061625,000762: 07,3507           50071                           INDEX    RUPTREG2                              #  UNSUCCESSFUL - -1 INDICATES COMPLETE AND
061626,000763: 07,3510           55322                           TS       MODECADR                              #  SUCCESSFUL.
061627,000764: 07,3511           15213                           TCF      TASKOVER                              
061628,000765: 

Page 1408

061630,000767:                                                                                                  #  GENERAL STALLING ROUTINE.  USING PROGRAMS COME HERE TO WAIT FOR I/O COMPLETION.
061631,000768: 
061632,000769:                                                                                                  #  PROGRAM DESCRIPTION                           DATE - 21 FEB 1967
061633,000770:                                                                                                  #                                                LOG SECTION IMU MODE SWITCHING
061634,000771:                                                                                                  #  MOD BY - R. MELANSON TO ADD DOCUMENTATION     ASSEMBLY SUNDISK REV. 82
061635,000772: 
061636,000773:                                                                                                  #  FUNCTIONAL DESCRIPTION -
061637,000774:                                                                                                  #        TO DELAY FURTHER EXECUTION OF THE CALLING ROUTINE UNTIL ITS SELECTED
061638,000775:                                                                                                  #        I/O FUNCTION IS COMPLETE.  THE FOLLOWING CHECKS ON THE CALLING ROUTINE:S
061639,000776:                                                                                                  #        MODECADR ARE MADE AND ACTED UPON.
061640,000777:                                                                                                  #        1) +0 INDICATES INCOMPLETE I/O OPERATION.  CALLING ROUTINE IS PUT TO
061641,000778:                                                                                                  #           SLEEP.
061642,000779:                                                                                                  #        2) -1 INDICATES COMPLETED I/O OPERATION.  STALL BYPASSES JOBSLEEP
061643,000780:                                                                                                  #           CALL AND RETURNS TO CALLING ROUTINE AT L+3
061644,000781:                                                                                                  #        3) -0 INDICATES COMPLETED I/O WITH FAILURE.  STALL CLEARS MODECADR
061645,000782:                                                                                                  #           AND RETURNS TO CALLING ROUTINE AT L+2.
061646,000783:                                                                                                  #        4) VALUE GREATER THAN 0 INDICATES TWO ROUTINES CALLING FOR USE OF
061647,000784:                                                                                                  #           SAME DEVICE.  STALL EXITS TO ABORT WHICH EXECUTES A PROGRAM
061648,000785:                                                                                                  #           RESTART WHICH IN TURN CLEARS ALL MODECADR REGISTERS.
061649,000786: 
061650,000787:                                                                                                  #  CALLING SEQUENCE -
061651,000788:                                                                                                  #        L       TC      BANKCALL
061652,000789:                                                                                                  #        L+1     CADR    (ONE OF 5 STALL ADDRESSES  I.E. IMUSTALL, OPTSTALL, RADSTALL,
061653,000790:                                                                                                  #                        AOTSTALL, OR ATTSTALL)
061654,000791: 
061655,000792:                                                                                                  #  NORMAL-EXIT MODE -
061656,000793:                                                                                                  #        TCF JOBSLEEP    OR      TCF MODEXIT
061657,000794: 
061658,000795:                                                                                                  #  ALARM OR ABORT EXIT MODE -
061659,000796:                                                                                                  #        TC      ABORT
061660,000797: 
061661,000798:                                                                                                  #  OUTPUT -
061662,000799:                                                                                                  #        MODECADR=CADR   IF JOBSLEEP
061663,000800:                                                                                                  #        MODECADR=+0     IF I/O COMPLETE
061664,000801:                                                                                                  #        BUF2=L+3        IF I/O COMPLETE AND GOOD.
061665,000802:                                                                                                  #        BUF2=L+2        IF I/O COMPLETE BUT FAILED.
061666,000803: 
061667,000804:                                                                                                  #  ERASABLE INITIALIZATION -
061668,000805:                                                                                                  #        BUF2 CONTAINS RETURN ADDRESS PLUS 1,(L+2)
061669,000806:                                                                                                  #        BUF2+1 CONTAINS FBANK VALUE OF CALLING ROUTINE.
061670,000807:                                                                                                  #        MODECADR OF CALLING ROUTINE CONTAINS +0,-1,-0 OR CADR RETURN ADDRESS.
061671,000808: 
061672,000809:                                                                                                  #  DEBRIS -
061673,000810:                                                                                                  #        RUPTREG2 AND CALLING ROUTINE MODECADR.
061674,000811: 
061675,000812: 07,3512           34712        AOTSTALL           CAF      ONE                                   #  AOT.
061676,000813: 07,3513           03517                           TC       STALL                                 
061677,000814: 
061678,000815: 07,3514           34711        RADSTALL           CAF      TWO                                   
061679,000816: 07,3515           13517                           TCF      STALL                                 
061680,000817: 

Page 1409

061682,000819: 07,3516  07,3512               OPTSTALL           EQUALS   AOTSTALL                              
061683,000820: 
061684,000821: 07,3516           34714        IMUSTALL           CAF      ZERO                                  #  IMU.
061685,000822: 
061686,000823: 07,3517           00004        STALL              INHINT                                         
061687,000824: 07,3520           54071                           TS       RUPTREG2                              #  SAVE DEVICE INDEX.
061688,000825: 07,3521           50000                           INDEX    A                                     #  SEE IF OPERATION COMPLETE.
061689,000826: 07,3522           11322                           CCS      MODECADR                              
061690,000827: 07,3523           13541                           TCF      MODABORT                              #  ALLOWABLE STATES ARE +0, -1, AND -0.
061691,000828: 07,3524           13535                           TCF      MODESLP                               #  OPERATION INCOMPLETE.
061692,000829: 07,3525           13531                           TCF      MODEGOOD                              #  COMPLETE AND GOOD IF = -1.
061693,000830: 
061694,000831: 07,3526           50071        MG2                INDEX    RUPTREG2                              #  COMPLETE AND FAILED IF -0.  RESET TO +0.
061695,000832: 07,3527           55322                           TS       MODECADR                              #  RETURN TO CALLER.
061696,000833: 07,3530           12557                           TCF      MODEEXIT                              
061697,000834: 
061698,000835: 07,3531           10000        MODEGOOD           CCS      A                                     #  MAKE SURE INITIAL STATE -1.
061699,000836: 07,3532           13541                           TCF      MODABORT                              
061700,000837: 
061701,000838: 07,3533           24133                           INCR     BUF2                                  #  IF SO, INCREMENT RETURN ADDRESS AND
061702,000839: 07,3534           13526                           TCF      MG2                                   #  RETURN IMMEDIATELY, SETTING CADR = +0.
061703,000840: 
061704,000841: 07,3535           04604        MODESLP            TC       MAKECADR                              #  CALL FROM SWITCHABLE FIXED ONLY.
061705,000842: 07,3536           50071                           INDEX    RUPTREG2                              
061706,000843: 07,3537           55322                           TS       MODECADR                              
061707,000844: 07,3540           15070                           TCF      JOBSLEEP                              
061708,000845: 
061709,000846: 07,3541           05622        MODABORT           TC       POODOO                                #  TWO PROGRAMS USING SAME DEVICE.
061710,000847: 07,3542           01210                           OCT      1210                                  
061711,000848: 

Page 1410

061713,000850:                                                                                                  #  CONSTANTS FOR MODE SWITCHING ROUTINES
061714,000851: 
061715,000852: 07,3543     5656               BITS3&4            =        OCT14                                 
061716,000853: 07,3543     4726               BITS4&6            =        OCT50                                 
061717,000854: 07,3543           00030        BITS4-5            OCT      00030                                 
061718,000855: 07,3544     4703               IMUSEFLG           EQUALS   BIT8                                  #  INTERPRETER SWITCH 7.
061719,000856: 07,3544           77500        -COMMAX            DEC      -191       B-14                       
061720,000857: 07,3545           77477        -COMMAX-           DEC      -192       B-14                       
061721,000858: 07,3546           00074        600MS              DEC      60         B-14                       
061722,000859: 07,3547  07,3012               IMUFIN20           =        IMUFINE                               
061723,000860: 07,3547           31325        GOMANUR            CA       ATTCADR                               #  IS KALCMANU FREE
061724,000861: 07,3550           00006                           EXTEND                                         
061725,000862: 07,3551           13554                           BZF      +3                                    
061726,000863: 07,3552           05622                           TC       POODOO                                #  NO
061727,000864: 07,3553           01210                           OCT      1210                                  #  2 TRYING TO USE SAME DEVICE
061728,000865: 
061729,000866: 07,3554           00006                 +3        EXTEND                                         
061730,000867: 07,3555           30134                           DCA      BUF2                                  
061731,000868: 07,3556           53326                           DXCH     ATTCADR                               #  SAVE FINAL RETURN FOR KALCMAN3
061732,000869: 
061733,000870: 07,3557           30006                           CA       BBANK                                 
061734,000871: 07,3560           74716                           MASK     SEVEN                                 
061735,000872: 07,3561           27326                           ADS      ATTCADR    +1                         
061736,000873: 
061737,000874: 07,3562           30167                           CA       PRIORITY                              
061738,000875: 07,3563           77674                           MASK     PRIO37                                
061739,000876: 07,3564           55327                           TS       ATTPRIO                               #  SAVE USERS PRIO
061740,000877: 
061741,000878: 07,3565           33571                           CAF      KALEBCON                              #  SET EBANK FOR KALCMAN3
061742,000879: 07,3566           54003                           TS       EBANK                                 
061743,000880: 07,3567           04574                           TC       POSTJUMP                              
061744,000881: 07,3570           44000                           CADR     KALCMAN3                              
061745,000882: 07,3571           03261        KALEBCON           ECADR    BCDU                                  
061746,000883: 

Page 1411

061748,000885:                                                                                                  #  PROGRAM DESCRIPTION
061749,000886:                                                                                                  #  IMU STATUS CHECK ROUTINE R02 (SUBROUTINE UTILITY)
061750,000887:                                                                                                  #  MOD NO - 1
061751,000888:                                                                                                  #  MOD BY - N.BRODEUR
061752,000889: 
061753,000890:                                                                                                  #  FUNCTIONAL DESCRIPTION
061754,000891:                                                                                                  #        TO CHECK WHETHER IMU IS ON AND IF ON WHETHER IT IS ALIGNED TO AN
061755,000892:                                                                                                  #        ORIENTATION KNOWN BY THE CMC.  TO REQUEST SELECTION OF THE APPROPRIATE
061756,000893:                                                                                                  #        PROGRAM IF THE IMU IS OFF OR NOT ALIGNED TO AN ORIENTATION KNOWN BY THE
061757,000894:                                                                                                  #        CMC.  CALLED THROUGH BANKCALL
061758,000895: 
061759,000896:                                                                                                  #  CALLING SEQUENCE -
061760,000897:                                                                                                  #        L       TC      BANKCALL
061761,000898:                                                                                                  #        L+1     CADR    R02BOTH
061762,000899: 
061763,000900:                                                                                                  #  SUBROUTINES CALLED
061764,000901:                                                                                                  #        VARALARM
061765,000902:                                                                                                  #        FLAGUP
061766,000903: 
061767,000904:                                                                                                  #  NORMAL EXIT MODES
061768,000905:                                                                                                  #        AT L+2 OF CALLING SEQUENCE
061769,000906: 
061770,000907:                                                                                                  #  ALARM OR ABORT EXIT MODES
061771,000908:                                                                                                  #        GOTOPOOH, WITH ALARM
061772,000909: 
061773,000910:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED
061774,000911:                                                                                                  #        NONE
061775,000912: 
061776,000913:                                                                                                  #  DEBRIS
061777,000914:                                                                                                  #        CENTRALS-A,Q,L
061778,000915: 
061779,000916: 34,3775                                           BANK     34                                    
061780,000917: 07,2000                                           SETLOC   R02                                   
061781,000918: 07,2000                                           BANK                                           
061782,000919: 07,3572                                           COUNT    04/R02                                #  COUNT*
061783,000920: 
061784,000921: 07,3572           00063        DEC51              DEC      51         B-14                       
061785,000922: 07,3573           34676        R02BOTH            CAF      BIT13                                 
061786,000923: 07,3574           70077                           MASK     STATE      +3                         #  REFSMFLG
061787,000924: 07,3575           10000                           CCS      A                                     
061788,000925: 07,3576           03607                           TC       R02ZERO                               #  ZERO IMUS
061789,000926: 
061790,000927: 07,3577           31320                           CA       IMODES30                              
061791,000928: 07,3600           74702                           MASK     BIT9                                  #  IS ISS INITIALIZED
061792,000929: 07,3601           00006                           EXTEND                                         
061793,000930: 07,3602           13604                           BZF      +2                                    
061794,000931: 07,3603           44707                           CS       BIT4                                  #  SEND IMU ALARM CODE 210
061795,000932: 07,3604           63612                           AD       OCT220                                #  SEND REFSMM ALARM
061796,000933: 07,3605           05651                           TC       VARALARM                              
061797,000934: 
061798,000935: 07,3606           04106                           TC       GOTOPOOH                              
061799,000936: 

Page 1412

061801,000938: 07,3607           05435        R02ZERO            TC       UPFLAG                                
061802,000939: 07,3610           00007                           ADRES    IMUSE                                 
061803,000940: 07,3611           14570                           TCF      SWRETURN                              
061804,000941: 07,3612           00220        OCT220             OCT      220                                   
061805,000942: 

Page 1413

061807,000944:                                                                                                  #  PROGRAM DESCRIPTION   P06             10FEB67
061808,000945: 
061809,000946:                                                                                                  #  TRANSFER THE ISS/CMC FROM THE OPERATE TO THE STANDBY CONDITION.
061810,000947: 
061811,000948:                                                                                                  #  THE NORMAL CONDITION OF READINESS OF THE GNCS WHEN NOT IN USE IS STANDBY.  IN THIS CONDITION THE IMU
061812,000949:                                                                                                  #  HEATER POWER IS ON.  THE IMU OPERATE POWER IS OFF.  THE COMPUTER POWER IS ON.  THE OPTICS POWER IS OFF.  THE
061813,000950:                                                                                                  #  CMC STANDBY ON THE MAIN AND LEB DISKYS IS ON.
061814,000951: 
061815,000952:                                                                                                  #  CALLING SEQUENCE:
061816,000953:                                                                                                  #        ASTRONAUT REQUEST THROUGH DSKY  V37E 06E.
061817,000954: 
061818,000955:                                                                                                  #  SUBROUTINES CALLED:
061819,000956:                                                                                                  #        GOPERF1
061820,000957:                                                                                                  #        BANKCALL
061821,000958:                                                                                                  #        FLAGDOWN
061822,000959: 

Page 1414

061824,000961:                                                                                                  #  PRESTAND PREPARES FOR STANDBY BY SNAPSHOTTING THE SCALER AND TIME1 TIME2
061825,000962:                                                                                                  #  THE LOW 5 BITS OF THE SCALER ARE INSPECTED TO INSURE COMPATABILITY
061826,000963:                                                                                                  #  BETWEEN THE SCALER READING AND THE TIME1 TIME2 READING.
061827,000964: 
061828,000965: 26,2000                                           SETLOC   P05P06                                
061829,000966: 26,2000                                           BANK                                           
061830,000967: 
061831,000968: 26,3655     1150                                  EBANK=   TIME2SAV                              
061832,000969: 26,3655                                           COUNT*   $$/P06                                
061833,000970: 
061834,000971: 26,3655           05435        P06                TC       UPFLAG                                #  SET NODOV37 BIT
061835,000972: 26,3656           00054                           ADRES    NODOFLAG                              
061836,000973: 
061837,000974: 26,3657           00004        PRESTAND           INHINT                                         
061838,000975: 26,3660           00006                           EXTEND                                         
061839,000976: 26,3661           30025                           DCA      TIME2                                 #  SNAPSHOT TIME1 TIME2
061840,000977: 26,3662           53151                           DXCH     TIME2SAV                              
061841,000978: 26,3663           03714                           TC       SCALPREP                              
061842,000979: 26,3664           03657                           TC       PRESTAND                              #  T1,T2,SCALER NOT COMPATIBLE
061843,000980: 26,3665           52155                           DXCH     MPAC                                  #  T1,T2 AND SCALER OK
061844,000981: 26,3666           53153                           DXCH     SCALSAVE                              #  STORE SCALER
061845,000982: 26,3667           00004                           INHINT                                         
061846,000983: 26,3670           04555                           TC       BANKCALL                              
061847,000984: 26,3671           16777                           CADR     RNDREFDR                              #  REFSMM, DRIFT, TRACK FLAGS DOWN
061848,000985: 
061849,000986: 26,3672           05447                           TC       DOWNFLAG                              
061850,000987: 26,3673           00007                           ADRES    IMUSE                                 #  IMUSE DOWN
061851,000988: 26,3674           05447                           TC       DOWNFLAG                              
061852,000989: 26,3675           00010                           ADRES    RNDVZFLG                              #  RNDVZFLG DOWN
061853,000990: 
061854,000991: 26,3676           34700                           CAF      BIT11                                 
061855,000992: 26,3677           00006                           EXTEND                                         
061856,000993: 26,3700           05013                           WOR      CHAN13                                #  SET STANDBY ENABLE BIT
061857,000994: 
061858,000995: 26,3701           05301                           TC       PHASCHNG                              #  SET RESTART TO POSTAND WHEN STANDBY
061859,000996: 26,3702           07024                           OCT      07024                                 #        RECOVERS
061860,000997: 26,3703           20000                           OCT      20000                                 
061861,000998: 26,3704     1152                                  EBANK=   SCALSAVE                              
061862,000999: 26,3704           03734 54102                     2CADR    POSTAND                               
061863,001000: 
061864,001001: 26,3706           34731                           CAF      OCT62                                 
061865,001002: 26,3707           04555                           TC       BANKCALL                              
061866,001003: 26,3710           20751                           CADR     GOPERF1                               
061867,001004: 26,3711           13706                           TCF      -3                                    
061868,001005: 26,3712           13706                           TCF      -4                                    
061869,001006: 26,3713           13706                           TCF      -5                                    
061870,001007: 
061871,001008: 26,3714     4731               OCT62              EQUALS   .5SEC                                 #  DEC 50 = OCT 62
061872,001009: 
061873,001010:                                                                                                  #  THE LOW 5 BITS OF THE SCALER READS 10000 FOR THE FIRST INTERVAL AFTER A

Page 1415

061875,001012:                                                                                                  #  T1 INCREMENT.  IF SCALPREP DETECTS THIS INTERVAL THE T1,T2 AND SCALER
061876,001013:                                                                                                  #  DATA ARE NOT COMPATABLE AND RETURN IS TO L+1 FOR ANOTHER READING OF THE
061877,001014:                                                                                                  #  DATA.  OTHERWISE, THE RETURN IS TO L+2 TO PROCEED.  ROUTINE ALSO PREPARES
061878,001015:                                                                                                  #  THE SCALER READING FOR COMPUTATION OF THE INCREMENT TO UPDATE T1T2.  (THE
061879,001016:                                                                                                  #  10 MS BIT (BIT 6) OF THE SCALER IS INCREMENTED 5 MS OUT OF PHASE FROM
061880,001017:                                                                                                  #  T1.) ADDITION OF 5 MS (BIT 5) TO THE SCALER READING HAS THE EFFECT OF
061881,001018:                                                                                                  #  ADJUSTING BIT 6 IN THE SCALER TO BE IN PHASE WITH BIT 1 OF T1.  THE LOW 5
061882,001019:                                                                                                  #  BITS OF THE SCALER READING ARE THEN SET TO ZERO, TO TRUNCATE THE SCALER
061883,001020:                                                                                                  #  DATA TO 10 MS.  RESULTS ARE STORED IN MPAC, +1.
061884,001021: 
061885,001022: 26,3714           00006        SCALPREP           EXTEND                                         
061886,001023: 26,3715           22156                           QXCH     MPAC       +2                         
061887,001024: 26,3716           04527                           TC       FINETIME   +1                         
061888,001025: 26,3717           00003                           RELINT                                         
061889,001026: 26,3720           52155                           DXCH     MPAC                                  
061890,001027: 26,3721           34706                           CA       BIT5                                  #  ADD 5 MS TO THE SCALER READING.
061891,001028: 26,3722           54001                           TS       L                                     
061892,001029: 26,3723           34714                           CA       ZERO                                  
061893,001030: 26,3724           20155                           DAS      MPAC                                  
061894,001031: 26,3725           44362                           CS       LOW5                                  #  SET LOW 5 BITS OF (SCALER+5MS) TO ZERO
061895,001032: 26,3726           70155                           MASK     MPAC       +1                         #  AND STORE RESULTS IN MPAC,+1.
061896,001033: 26,3727           56155                           XCH      MPAC       +1                         
061897,001034: 26,3730           74362                           MASK     LOW5                                  #  TEST LOW 5 BITS OF SCALER FOR THE FIRST
061898,001035:                                                                                                  #  INTERVAL AFTER THE T1 INCREMENT
061899,001036:                                                                                                  #  (NOW = 00000, SINCE BIT 5 ADDED).
061900,001037: 26,3731           10000                           CCS      A                                     #  IS IT 1ST INTERVAL AFTER T1 INCREMENT
061901,001038: 26,3732           24156                           INCR     MPAC       +2                         #  NO
061902,001039: 26,3733           00156                           TC       MPAC       +2                         #  YES
061903,001040: 
061904,001041:                                                                                                  #  POSTAND RECOVERS TIME AFTER STANDBY.  THE SCALER IS SNAPSHOTTED AND THE
061905,001042:                                                                                                  #  TIME1 TIME2 COUNTER IS SET TO ZERO.  THE LOW 5 BITS OF THE SCALER ARE
061906,001043:                                                                                                  #  INSPECTED TO INSURE COMPATABILITY BETWEEN THE SCALER READING AND THE
061907,001044:                                                                                                  #  CLEARING OF THE TIME COUNTER.  IT THEN COMPUTES THE DIFFERENCE IN SCALER
061908,001045:                                                                                                  #  VALUES (IN DP) AND ADDS THIS TO THE PREVIOUSLY SNAPSHOTTED VALUES OF
061909,001046:                                                                                                  #  TIME1 TIME2 AND PLACES THIS NEW TIME INTO THE TIME1 TIME2 COUNTER.
061910,001047: 
061911,001048: 26,3734                                           COUNT*   $$/P05                                
061912,001049: 
061913,001050: 26,3734           44700        POSTAND            CS       BIT11                                 #  RECOVER TIME AFTER STANDBY.
061914,001051: 26,3735           00006                           EXTEND                                         
061915,001052: 26,3736           03013                           WAND     CHAN13                                #  CLEAR STANDBY ENABLE BIT
061916,001053: 26,3737           00004                           INHINT                                         
061917,001054: 26,3740           34714                           CA       ZERO                                  
061918,001055: 26,3741           54001                           TS       L                                     
061919,001056: 26,3742           52025                           DXCH     TIME2                                 #  CLEAR TIME1 TIME2
061920,001057: 26,3743           03714                           TC       SCALPREP                              #  STORE SCALER IN MPAC, MPAC+1
061921,001058: 26,3744           03737                           TC       POSTAND    +3                         #  T1,T2,SCALER NOT COMPATIBLE
061922,001059: 26,3745           00006                           EXTEND                                         #  T1,T2 AND SCALER OK
061923,001060: 26,3746           41153                           DCS      SCALSAVE                              
061924,001061: 26,3747           20155                           DAS      MPAC                                  #  FORM DP DIFFERENCE OF POSTSTANDBY SCALER

Page 1416

061926,001063: 26,3750           34701                           CAF      BIT10                                 #  MINUS PRESTANDBY SCALER AND SHIFT RIGHT
061927,001064: 26,3751           07256                           TC       SHORTMP                               #  5 TO ALIGN BITS WITH TIME1 TIME2.
061928,001065: 26,3752           34714                           CAF      ZERO                                  
061929,001066: 26,3753           54156                           TS       MPAC       +2                         #  NEEDED FOR TP AGREE
061930,001067: 26,3754           07226                           TC       TPAGREE                               #  MAKE DP DIFF AGREE
061931,001068: 26,3755           10154                           CCS      MPAC                                  
061932,001069: 26,3756           03763                           TC       POSTCOM                               #  IF DP DIFF NET +, NO SCALER OVERFLOW
061933,001070: 26,3757           03763                           TC       POSTCOM                               #  BETWEEN PRE AND POST STANDBY.
061934,001071: 26,3760           03761                           TC       +1                                    #  IF DP DIFF NET -, SCALER OVERFLOWED.  ADD
061935,001072: 26,3761           34701                           CAF      BIT10                                 #  BIT 10 TO HIGH DIFF TO CORRECT.
061936,001073: 26,3762           26154                           ADS      MPAC                                  
061937,001074: 26,3763           00006        POSTCOM            EXTEND                                         #  C(MPAC,+1) IS MAGNITUDE OF DELTA SCALER.
061938,001075: 26,3764           31151                           DCA      TIME2SAV                              #  PRESTANDBY TIME1 TIME2
061939,001076: 26,3765           20155                           DAS      MPAC                                  
061940,001077: 26,3766           07226                           TC       TPAGREE                               #  FORCE SIGN AGREEMENT
061941,001078: 26,3767           52155                           DXCH     MPAC                                  #  UPDATED VALUE FOR T1,T2.
061942,001079: 26,3770           20025                           DAS      TIME2                                 #  LOAD UPDATED VALUE INTO T1,T2, WITH
061943,001080: 26,3771           05447                           TC       DOWNFLAG                              #  CLEAR NODOFLAG
061944,001081: 26,3772           00054                           ADRES    NODOFLAG                              
061945,001082: 
061946,001083: 26,3773           04106                           TC       GOTOPOOH                              
061947,001084: 
061948,001085: 
061949,001086: 

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