Source Code

These source-code files were from the printout at the MIT Museum, with many thanks to Deborah Douglas, the Museum's Curator of Science and Technology, for releasing it to us. The printout was digitally photographed by Paul Fjeld. A team of volunteers transcribed the source code manually from these images or, where appropriate, modified already-transcribed but similar source Colossus 249 (Apollo 9) source code to agree with the images from the printout. 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:

	GAP:  ASSEMBLE REVISION 055 OF AGC PROGRAM COMANCHE BY NASA 2021113-051
	10:28 APR.  1,1969
Note that the date is the date of the printout, not the date of the program revision.

061961,000002:                                                                                                  ## Copyright:   Public domain.
061962,000003:                                                                                                  ## Filename:    IMU_MODE_SWITCHING_ROUTINES.agc
061963,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus 2A, AKA Comanche 055.
061964,000005:                                                                                                  ##              It is part of the source code for the Command Module's (CM)
061965,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 11.
061966,000007:                                                                                                  ## Assembler:   yaYUL
061967,000008:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
061968,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo.
061969,000010:                                                                                                  ## Pages:       1420-1448
061970,000011:                                                                                                  ## Mod history: 2009-05-10 SN   (Sergio Navarro).  Started adapting from 
061971,000012:                                                                                                  ##                              the Colossus249/ file of the same name, 
061972,000013:                                                                                                  ##                              using Comanche055 page images.
061973,000014:                                                                                                  ##              2010-08-20 JL   Fixed page number comment (p1447).
061974,000015:                                                                                                  ##                              Fixed some pseudo-label indents.
061975,000016:                                                                                                  ##              2016-12-10 RSB  All of the GOTOPOOH's should have been
061976,000017:                                                                                                  ##                              GOTOPOOH, and I've changed them back.
061977,000018:                                                                                                  ##              2016-12-22 RSB  Proofed comment text using octopus/ProoferComments
061978,000019:                                                                                                  ##                              and corrected the errors found.
061979,000020:                                                                                                  ##              2017-03-15 RSB  Comment-text fixes identified in 6-way
061980,000021:                                                                                                  ##                              side-by-side diff of Sunburst 120 and Luminary 
061981,000022:                                                                                                  ##                              69/99/116/131/210.
061982,000023: 
061983,000024:                                                                                                  ## This source code has been transcribed or otherwise adapted from digitized
061984,000025:                                                                                                  ## images of a hardcopy from the MIT Museum.  The digitization was performed
061985,000026:                                                                                                  ## by Paul Fjeld, and arranged for by Deborah Douglas of the Museum.  Many
061986,000027:                                                                                                  ## thanks to both.  The images (with suitable reduction in storage size and
061987,000028:                                                                                                  ## consequent reduction in image quality as well) are available online at
061988,000029:                                                                                                  ## www.ibiblio.org/apollo.  If for some reason you find that the images are
061989,000030:                                                                                                  ## illegible, contact me at info@sandroid.org about getting access to the
061990,000031:                                                                                                  ## (much) higher-quality images which Paul actually created.
061991,000032:                                                                                                  ##
061992,000033:                                                                                                  ## Notations on the hardcopy document read, in part:
061993,000034:                                                                                                  ##
061994,000035:                                                                                                  ##    Assemble revision 055 of AGC program Comanche by NASA
061995,000036:                                                                                                  ##    2021113-051.  10:28 APR. 1, 1969 
061996,000037:                                                                                                  ##
061997,000038:                                                                                                  ##    This AGC program shall also be referred to as
061998,000039:                                                                                                  ##            Colossus 2A
061999,000040: 

Page 1420

062001,000042:    5521                                           BLOCK    02                                    
062002,000043:    4000                                           SETLOC   FFTAG3                                
062003,000044:    4000                                           BANK                                           
062004,000045: 
062005,000046:    5521  E3,1471                                  EBANK=   COMMAND                               
062006,000047: 
062007,000048:                                                                                                  #  FIXED-FIXED ROUTINES.
062008,000049: 
062009,000050:    5521                                           COUNT    02/IMODE                              
062010,000051: 
062011,000052:    5521           35021        ZEROICDU           CAF      ZERO                                  #  ZERO ICDU COUNTERS.
062012,000053:    5522           54032                           TS       CDUX                                  
062013,000054:    5523           54033                           TS       CDUY                                  
062014,000055:    5524           54034                           TS       CDUZ                                  
062015,000056:    5525           00002                           TC       Q                                     
062016,000057: 
062017,000058:    5526     5007               SPSCODE            =        BIT9                                  
062018,000059: 

Page 1421

062020,000061:                                                                                                  #  IMU ZEROING ROUTINE.
062021,000062: 
062022,000063: 11,3776                                           BANK     11                                    
062023,000064: 07,2000                                           SETLOC   MODESW                                
062024,000065: 07,2000                                           BANK                                           
062025,000066: 
062026,000067: 07,2577                                           COUNT    07/IMODE                              
062027,000068: 
062028,000069: 07,2577           00004        IMUZERO            INHINT                                         #  ROUTINE TO ZERO ICDUS.
062029,000070: 07,2600           41036                           CS       DSPTAB     +11D                       #  DONT ZERO CDUS IF IMU IN GIMBAL LOCK AND
062030,000071: 07,2601           75033                           MASK     BITS4&6                               #  COARSE ALIGN (GIMBAL RUNAWAY PROTECTION)
062031,000072: 07,2602           10000                           CCS      A                                     
062032,000073: 07,2603           12607                           TCF      IMUZEROA                              
062033,000074: 
062034,000075: 07,2604           05650                           TC       ALARM                                 #  IF SO.
062035,000076: 07,2605           00206                           OCT      00206                                 
062036,000077: 
062037,000078: 07,2606           13542                           TCF      CAGETSTJ   +4                         #  IMMEDIATE FAILURE.
062038,000079: 
062039,000080: 07,2607           03536        IMUZEROA           TC       CAGETSTJ                              
062040,000081: 
062041,000082:                                                                                                  #  DO ALL THE WORK.
062042,000083: 
062043,000084: 07,2610           41321                           CS       IMODES33                              #  DISABLE DAP AUTO AND HOLD MODES
062044,000085: 07,2611           75035                           MASK     SUPER011                              #        BIT5 FOR GROUND
062045,000086: 07,2612           27321                           ADS      IMODES33                              
062046,000087: 
062047,000088: 07,2613           41320                           CS       IMODES30                              #  INHIBIT ICDUFAIL AND IMUFAIL (IN CASE WE
062048,000089: 07,2614           75771                           MASK     BITS3&4                               #  JUST CAME OUT OF COARSE ALIGN).
062049,000090: 07,2615           27320                           ADS      IMODES30                              
062050,000091: 
062051,000092: 07,2616           45033                           CS       BITS4&6                               #  SEND ZERO ENCODE WITH COARSE AND ERROR
062052,000093: 07,2617           00006                           EXTEND                                         #  COUNTER DISABLED.
062053,000094: 07,2620           03012                           WAND     CHAN12                                
062054,000095: 
062055,000096: 07,2621           03151                           TC       NOATTOFF                              #  TURN OFF NO ATT LAMP.
062056,000097: 
062057,000098: 07,2622           35013                           CAF      BIT5                                  
062058,000099: 07,2623           00006                           EXTEND                                         
062059,000100: 07,2624           05012                           WOR      CHAN12                                
062060,000101: 
062061,000102: 07,2625           05521                           TC       ZEROICDU                              
062062,000103: 07,2626           35012                           CAF      BIT6                                  #  WAIT 320 MS TO GIVE AGS ADEQUATE TIME TO
062063,000104: 07,2627           05245                           TC       WAITLIST                              #  RECEIVE ITS PULSE TRAIN.
062064,000105: 07,2630  E3,1474                                  EBANK=   CDUIND                                
062065,000106: 07,2630           02642 16063                     2CADR    IMUZERO2                              
062066,000107: 
062067,000108: 07,2632           41320                           CS       IMODES30                              #  SEE IF IMU OPERATING AND ALARM IF NOT.
062068,000109: 07,2633           75007                           MASK     BIT9                                  
062069,000110: 07,2634           10000                           CCS      A                                     
062070,000111: 07,2635           12640                           TCF      MODEEXIT                              

Page 1422

062072,000113: 07,2636           05650                           TC       ALARM                                 
062073,000114: 07,2637           00210                           OCT      210                                   
062074,000115: 
062075,000116: 07,2640           00003        MODEEXIT           RELINT                                         #  GENERAL MODE-SWITCHING EXIT.
062076,000117: 07,2641           14675                           TCF      SWRETURN                              
062077,000118: 
062078,000119: 07,2642           03524        IMUZERO2           TC       CAGETEST                              
062079,000120: 07,2643           05521                           TC       ZEROICDU                              #  ZERO CDUX, CDUY, CDUZ
062080,000121: 
062081,000122: 07,2644           45013                           CS       BIT5                                  #  REMOVE ZERO DISCRETE.
062082,000123: 07,2645           00006                           EXTEND                                         
062083,000124: 07,2646           03012                           WAND     CHAN12                                
062084,000125: 
062085,000126: 07,2647           35005                           CAF      BIT11                                 #  WAIT 10 SECS FOR CTRS TO FIND GIMBALS
062086,000127: 07,2650           05272                           TC       VARDELAY                              
062087,000128: 
062088,000129: 07,2651           03524        IMUZERO3           TC       CAGETEST                              
062089,000130: 07,2652           45771                           CS       BITS3&4                               #  REMOVE IMUFAIL AND ICDUFAIL INHIBIT.
062090,000131: 07,2653           71320                           MASK     IMODES30                              
062091,000132: 07,2654           55320                           TS       IMODES30                              
062092,000133: 
062093,000134: 07,2655           45035                           CS       SUPER011                              #  ENABLE DAP AUTO AND HOLD MODES
062094,000135: 07,2656           71321                           MASK     IMODES33                              #        BIT5 FOR GROUND
062095,000136: 07,2657           55321                           TS       IMODES33                              
062096,000137: 
062097,000138: 07,2660           04740                           TC       IBNKCALL                              #  SET ISS WARNING IF EITHER OF ABOVE ARE
062098,000139: 07,2661           14665                           CADR     SETISSW                               #  PRESENT.
062099,000140: 
062100,000141: 07,2662           13514                           TCF      ENDIMU                                
062101,000142: 

Page 1423

062103,000144:                                                                                                  #  IMU COARSE ALIGN MODE.
062104,000145: 
062105,000146: 07,2663           00004        IMUCOARS           INHINT                                         
062106,000147: 07,2664           03536                           TC       CAGETSTJ                              
062107,000148: 07,2665           03027                           TC       SETCOARS                              
062108,000149: 
062109,000150: 07,2666           36211                           CAF      SIX                                   
062110,000151: 07,2667           05245                           TC       WAITLIST                              
062111,000152: 07,2670  E3,1474                                  EBANK=   CDUIND                                
062112,000153: 07,2670           02673 16063                     2CADR    COARS                                 
062113,000154: 
062114,000155: 07,2672           12640                           TCF      MODEEXIT                              
062115,000156: 
062116,000157: 07,2673           03524        COARS              TC       CAGETEST                              
062117,000158: 07,2674           35012                           CAF      BIT6                                  #  ENABLE ALL THREE ISS CDU ERROR COUNTERS
062118,000159: 07,2675           00006                           EXTEND                                         
062119,000160: 07,2676           05012                           WOR      CHAN12                                
062120,000161: 
062121,000162: 07,2677           35016                           CAF      TWO                                   #  SET CDU INDICATOR
062122,000163: 07,2700           55474        COARS1             TS       CDUIND                                
062123,000164: 
062124,000165: 07,2701           51474                           INDEX    CDUIND                                #  COMPUTE THETAD - THETAA IN 1:S
062125,000166: 07,2702           31155                           CA       THETAD                                #        COMPLEMENT FORM
062126,000167: 07,2703           00006                           EXTEND                                         
062127,000168: 07,2704           51474                           INDEX    CDUIND                                
062128,000169: 07,2705           20032                           MSU      CDUX                                  
062129,000170: 07,2706           00006                           EXTEND                                         
062130,000171: 07,2707           75003                           MP       BIT13                                 #  SHIFT RIGHT 2
062131,000172: 07,2710           56001                           XCH      L                                     #  ROUND
062132,000173: 07,2711           60000                           DOUBLE                                         
062133,000174: 07,2712           54061                           TS       ITEMP1                                
062134,000175: 07,2713           12715                           TCF      +2                                    
062135,000176: 07,2714           26001                           ADS      L                                     
062136,000177: 
062137,000178: 07,2715           51474                           INDEX    CDUIND                                #  DIFFERENCE TO BE COMPUTED
062138,000179: 07,2716           23471                           LXCH     COMMAND                               
062139,000180: 07,2717           11474                           CCS      CDUIND                                
062140,000181: 07,2720           02700                           TC       COARS1                                
062141,000182: 
062142,000183: 07,2721           35016                           CAF      TWO                                   #  MINIMUM OF 4 MS WAIT
062143,000184: 07,2722           05272                           TC       VARDELAY                              
062144,000185: 

Page 1424

062146,000187: 07,2723           03524        COARS2             TC       CAGETEST                              #  DONT CONTINUE IF CAGED.
062147,000188: 07,2724           54061                           TS       ITEMP1                                #  SETS TO +0.
062148,000189: 07,2725           35016                           CAF      TWO                                   #  SET CDU INDICATOR
062149,000190: 07,2726           55474                 +3        TS       CDUIND                                
062150,000191: 
062151,000192: 07,2727           51474                           INDEX    CDUIND                                
062152,000193: 07,2730           11471                           CCS      COMMAND                               #  NUMBER OF PULSES REQUIRED
062153,000194: 07,2731           02735                           TC       COMPOS                                #  GREATER THAN MAX ALLOWED
062154,000195: 07,2732           02744                           TC       NEXTCDU    +1                         
062155,000196: 07,2733           03002                           TC       COMNEG                                
062156,000197: 07,2734           02744                           TC       NEXTCDU    +1                         
062157,000198: 
062158,000199: 07,2735           63624        COMPOS             AD       -COMMAX                               #  COMMAX = MAX NUMBER OF PULSES ALLOWED
062159,000200: 07,2736           00006                           EXTEND                                         #        MINUS ONE
062160,000201: 07,2737           63012                           BZMF     COMZERO                               
062161,000202: 07,2740           51474                           INDEX    CDUIND                                
062162,000203: 07,2741           55471                           TS       COMMAND                               #  REDUCE COMMAND BY MAX NUMBER OF PULSES
062163,000204: 07,2742           43625                           CS       -COMMAX-                              #        ALLOWED
062164,000205: 
062165,000206: 07,2743           24061        NEXTCDU            INCR     ITEMP1                                
062166,000207: 07,2744           65020                           AD       NEG0                                  
062167,000208: 07,2745           51474                           INDEX    CDUIND                                
062168,000209: 07,2746           54050                           TS       CDUXCMD                               #  SET UP COMMAND REGISTER.
062169,000210: 
062170,000211: 07,2747           11474                           CCS      CDUIND                                
062171,000212: 07,2750           02726                           TC       COARS2     +3                         
062172,000213: 
062173,000214: 07,2751           10061                           CCS      ITEMP1                                #  SEE IF ANY PULSES TO GO OUT.
062174,000215: 07,2752           13016                           TCF      SENDPULS                              
062175,000216: 
062176,000217: 07,2753           05267                           TC       FIXDELAY                              #  WAIT FOR GIMBALS TO SETTLE.
062177,000218: 07,2754           00226                           DEC      150        B-14                       
062178,000219: 
062179,000220: 07,2755           35016                           CAF      TWO                                   #  AT END OF COMMAND, CHECK TO SEE THAT
062180,000221: 07,2756           54061        CHKCORS            TS       ITEMP1                                #  GIMBALS ARE WITHIN 2 DEGREES OF THETAD.
062181,000222: 07,2757           50000                           INDEX    A                                     
062182,000223: 07,2760           30032                           CA       CDUX                                  
062183,000224: 07,2761           00006                           EXTEND                                         
062184,000225: 07,2762           50061                           INDEX    ITEMP1                                
062185,000226: 07,2763           21155                           MSU      THETAD                                
062186,000227: 07,2764           10000                           CCS      A                                     
062187,000228: 07,2765           12773                           TCF      COARSERR                              
062188,000229: 07,2766           12770                           TCF      CORSCHK2                              
062189,000230: 07,2767           12773                           TCF      COARSERR                              
062190,000231: 

Page 1425

062192,000233: 07,2770           10061        CORSCHK2           CCS      ITEMP1                                
062193,000234: 07,2771           12756                           TCF      CHKCORS                               
062194,000235: 07,2772           13514                           TCF      ENDIMU                                #  END OF COARSE ALIGNMENT.
062195,000236: 
062196,000237: 07,2773           63001        COARSERR           AD       COARSTOL                              #  2 DEGREES.
062197,000238: 07,2774           00006                           EXTEND                                         
062198,000239: 07,2775           62770                           BZMF     CORSCHK2                              
062199,000240: 
062200,000241: 07,2776           05650                           TC       ALARM                                 #  COARSE ALIGN ERROR.
062201,000242: 07,2777           00211                           OCT      211                                   
062202,000243: 
062203,000244: 07,3000           13522                           TCF      IMUBAD                                
062204,000245: 
062205,000246: 07,3001           77511        COARSTOL           DEC      -.01111                               #  2 DEGREES SCALED AT HALF-REVOLUTIONS
062206,000247: 
062207,000248: 07,3002           63624        COMNEG             AD       -COMMAX                               
062208,000249: 07,3003           00006                           EXTEND                                         
062209,000250: 07,3004           63012                           BZMF     COMZERO                               
062210,000251: 07,3005           40000                           COM                                            
062211,000252: 07,3006           51474                           INDEX    CDUIND                                
062212,000253: 07,3007           55471                           TS       COMMAND                               
062213,000254: 07,3010           33625                           CA       -COMMAX-                              
062214,000255: 07,3011           02743                           TC       NEXTCDU                               
062215,000256: 
062216,000257: 07,3012           35021        COMZERO            CAF      ZERO                                  
062217,000258: 07,3013           51474                           INDEX    CDUIND                                
062218,000259: 07,3014           57471                           XCH      COMMAND                               
062219,000260: 07,3015           02743                           TC       NEXTCDU                               
062220,000261: 
062221,000262: 07,3016           37707        SENDPULS           CAF      13,14,15                              
062222,000263: 07,3017           00006                           EXTEND                                         
062223,000264: 07,3020           05014                           WOR      CHAN14                                
062224,000265: 07,3021           33626                           CAF      600MS                                 
062225,000266: 07,3022           12722                           TCF      COARS2     -1                         #  THEN TO VARDELAY
062226,000267: 
062227,000268: 07,3023           35012        CA+ECE             CAF      BIT6                                  #  ENABLE ALL THREE ISS CDU ERROR COUNTERS
062228,000269: 07,3024           00006                           EXTEND                                         
062229,000270: 07,3025           05012                           WOR      CHAN12                                
062230,000271: 07,3026           05324                           TC       TASKOVER                              
062231,000272: 

Page 1426

062233,000274: 07,3027           35014        SETCOARS           CAF      BIT4                                  #  BYPASS IF ALREADY IN COARSE ALIGN
062234,000275: 07,3030           00006                           EXTEND                                         
062235,000276: 07,3031           02012                           RAND     CHAN12                                
062236,000277: 07,3032           10000                           CCS      A                                     
062237,000278: 07,3033           00002                           TC       Q                                     
062238,000279: 
062239,000280: 07,3034           45012                           CS       BIT6                                  #  CLEAR ISS ERROR COUNTERS
062240,000281: 07,3035           00006                           EXTEND                                         
062241,000282: 07,3036           03012                           WAND     CHAN12                                
062242,000283: 
062243,000284: 07,3037           45006                           CS       BIT10                                 #  KNOCK DOWN GYRO ACTIVITY
062244,000285: 07,3040           00006                           EXTEND                                         
062245,000286: 07,3041           03014                           WAND     CHAN14                                
062246,000287: 07,3042           45021                           CS       ZERO                                  
062247,000288: 07,3043           54047                           TS       GYROCMD                               
062248,000289: 
062249,000290: 07,3044           35014                           CAF      BIT4                                  #  PUT ISS IN COARSE ALIGN
062250,000291: 07,3045           00006                           EXTEND                                         
062251,000292: 07,3046           05012                           WOR      CHAN12                                
062252,000293: 
062253,000294: 07,3047           41036                           CS       DSPTAB     +11D                       #  TURN ON NO ATT LAMP
062254,000295: 07,3050           73072                           MASK     OCT40010                              
062255,000296: 07,3051           27036                           ADS      DSPTAB     +11D                       
062256,000297: 
062257,000298: 07,3052           41321                           CS       IMODES33                              #  DISABLE DAP AUTO AND HOLD MODES
062258,000299: 07,3053           75012                           MASK     BIT6                                  
062259,000300: 07,3054           27321                           ADS      IMODES33                              
062260,000301: 
062261,000302: 07,3055           41320                           CS       IMODES30                              #  DISABLE IMUFAIL
062262,000303: 07,3056           75014                           MASK     BIT4                                  
062263,000304: 07,3057           27320                           ADS      IMODES30                              
062264,000305: 
062265,000306: 07,3060           45013        RNDREFDR           CS       BIT5                                  #  KNOCK DOWN TRACK FLAG
062266,000307: 07,3061           70075                           MASK     FLAGWRD1                              
062267,000308: 07,3062           54075                           TS       FLAGWRD1                              
062268,000309: 
062269,000310: 07,3063           45001                           CS       BIT15                                 #  KNOCK DOWN DRIFT FLAG
062270,000311: 07,3064           70076                           MASK     FLAGWRD2                              
062271,000312: 07,3065           54076                           TS       FLAGWRD2                              
062272,000313: 
062273,000314: 07,3066           45003                           CS       BIT13                                 #  KNOCK DOWN REFSMMAT FLAG
062274,000315: 07,3067           70077                           MASK     FLAGWRD3                              
062275,000316: 07,3070           54077                           TS       FLAGWRD3                              
062276,000317: 
062277,000318: 07,3071           00002                           TC       Q                                     
062278,000319: 
062279,000320: 07,3072           40010        OCT40010           OCT      40010                                 
062280,000321: 

Page 1427

062282,000323:                                                                                                  #  IMU FINE ALIGN MODE SWITCH.
062283,000324: 
062284,000325: 07,3073           00004        IMUFINE            INHINT                                         
062285,000326: 07,3074           03536                           TC       CAGETSTJ                              #  SEE IF IMU BEING CAGED.
062286,000327: 
062287,000328: 07,3075           45027                           CS       BITS4-5                               #  RESET ZERO AND COARSE
062288,000329: 07,3076           00006                           EXTEND                                         
062289,000330: 07,3077           03012                           WAND     CHAN12                                
062290,000331: 
062291,000332: 07,3100           45012                           CS       BIT6                                  #  INSURE DAP AUTO AND HOLD MODES ENABLED
062292,000333: 07,3101           71321                           MASK     IMODES33                              
062293,000334: 07,3102           55321                           TS       IMODES33                              
062294,000335: 
062295,000336: 07,3103           03151                           TC       NOATTOFF                              
062296,000337: 
062297,000338: 07,3104           35006                           CAF      BIT10                                 #  IMU FAIL WAS INHIBITED DURING THE
062298,000339: 07,3105           05245                           TC       WAITLIST                              #  PRESUMABLY PRECEDING COARSE ALIGN.  LEAVE
062299,000340: 07,3106  E3,1474                                  EBANK=   CDUIND                                
062300,000341: 07,3106           03117 16063                     2CADR    IFAILOK                               #  IT ON FOR THE FIRST 5 SECS OF FINE ALIGN
062301,000342: 
062302,000343: 07,3110           35042                           CAF      2SECS                                 
062303,000344: 07,3111           05245                           TC       WAITLIST                              
062304,000345: 07,3112  E3,1474                                  EBANK=   CDUIND                                
062305,000346: 07,3112           03115 16063                     2CADR    IMUFINED                              
062306,000347: 
062307,000348: 07,3114           12640                           TCF      MODEEXIT                              
062308,000349: 
062309,000350: 07,3115           03524        IMUFINED           TC       CAGETEST                              #  SEE THAT NO ONE HAS CAGED THE IMU.
062310,000351: 07,3116           13514                           TCF      ENDIMU                                
062311,000352: 

Page 1428

062313,000354: 07,3117           03531        IFAILOK            TC       CAGETSTQ                              #  ENABLE IMU FIAL UNLESS IMU BEING CAGED.
062314,000355: 07,3120           15324                           TCF      TASKOVER                              #  IT IS.
062315,000356: 
062316,000357: 07,3121           35014                           CAF      BIT4                                  #  DONT RESET IMU FAIL INHIBIT IF SOMEONE
062317,000358: 07,3122           00006                           EXTEND                                         #  HAS GONE INTO COARSE ALIGN.
062318,000359: 07,3123           02012                           RAND     CHAN12                                
062319,000360: 07,3124           10000                           CCS      A                                     
062320,000361: 07,3125           15324                           TCF      TASKOVER                              
062321,000362: 
062322,000363: 07,3126           41320                           CS       IMODES30                              #  RESET IMUFAIL.
062323,000364: 07,3127           75003                           MASK     BIT13                                 
062324,000365: 07,3130           27320                           ADS      IMODES30                              
062325,000366: 07,3131           45014                           CS       BIT4                                  
062326,000367: 07,3132           71320        PFAILOK2           MASK     IMODES30                              
062327,000368: 07,3133           55320                           TS       IMODES30                              
062328,000369: 07,3134           04740                           TC       IBNKCALL                              #  THE ISS WARNING LIGHT MAY COME ON NOW
062329,000370: 07,3135           14665                           CADR     SETISSW                               #  THAT THE INHIBIT HAS BEEN REMOVED.
062330,000371: 07,3136           15324                           TCF      TASKOVER                              
062331,000372: 
062332,000373: 07,3137           03531        PFAILOK            TC       CAGETSTQ                              #  ENABLE PIP FAIL PROG ALARM.
062333,000374: 07,3140           15324                           TCF      TASKOVER                              
062334,000375: 
062335,000376: 07,3141           41320                           CS       IMODES30                              #  RESET IMU AND PIPA FAIL BITS.
062336,000377: 07,3142           75006                           MASK     BIT10                                 
062337,000378: 07,3143           27320                           ADS      IMODES30                              
062338,000379: 
062339,000380: 07,3144           41321                           CS       IMODES33                              
062340,000381: 07,3145           75003                           MASK     BIT13                                 
062341,000382: 07,3146           27321                           ADS      IMODES33                              
062342,000383: 
062343,000384: 07,3147           45013                           CS       BIT5                                  
062344,000385: 07,3150           13132                           TCF      PFAILOK2                              
062345,000386: 
062346,000387: 07,3151           43072        NOATTOFF           CS       OCT40010                              #  SUBROUTINE TO TURN OFF NO ATT LAMP.
062347,000388: 07,3152           71036                           MASK     DSPTAB     +11D                       
062348,000389: 07,3153           65001                           AD       BIT15                                 
062349,000390: 07,3154           55036                           TS       DSPTAB     +11D                       
062350,000391: 07,3155           00002                           TC       Q                                     
062351,000392: 

Page 1429

062353,000394:                                                                                                  #  ROUITNES TO INITIATE AND TERMINATE PROGRAM USE OF THE PIPAS.  NO IMUSTALL REQUIRED IN EITHER CASE.
062354,000395: 
062355,000396: 07,3156           45021        PIPUSE             CS       ZERO                                  
062356,000397: 07,3157           54037                           TS       PIPAX                                 
062357,000398: 07,3160           54040                           TS       PIPAY                                 
062358,000399: 07,3161           54041                           TS       PIPAZ                                 
062359,000400: 
062360,000401: 07,3162           03531        PIPUSE1            TC       CAGETSTQ                              #  DO NOT ENABLE PIPA FAIL IF IMU IS CAGED
062361,000402: 07,3163           14675                           TCF      SWRETURN                              
062362,000403: 
062363,000404: 07,3164           00004                           INHINT                                         
062364,000405: 07,3165           45017                           CS       BIT1                                  #  IF PIPA FAILS FROM NOW ON (UNTIL
062365,000406: 07,3166           71320                           MASK     IMODES30                              #  PIPFREE), LIGHT ISS WARNING.
062366,000407: 07,3167           55320                           TS       IMODES30                              
062367,000408: 
062368,000409: 07,3170           04740        PIPFREE2           TC       IBNKCALL                              #  ISS WARNING MIGHT COME ON NOW.
062369,000410: 07,3171           14665                           CADR     SETISSW                               #  (OR GO OFF ON PIPFREE).
062370,000411: 
062371,000412: 07,3172           12640                           TCF      MODEEXIT                              
062372,000413: 
062373,000414: 07,3173           00004        PIPFREE            INHINT                                         #  PROGRAM DONE WITH PIPAS.  DONT LIGHT
062374,000415: 07,3174           41320                           CS       IMODES30                              #  ISS WARNING.
062375,000416: 07,3175           75017                           MASK     BIT1                                  
062376,000417: 07,3176           27320                           ADS      IMODES30                              
062377,000418: 
062378,000419: 07,3177           75006                           MASK     BIT10                                 #  IF PIP FAIL ON, DO PROG ALSRM AND RESET
062379,000420: 07,3200           10000                           CCS      A                                     #  ISS WARNING.
062380,000421: 07,3201           12640                           TCF      MODEEXIT                              
062381,000422: 
062382,000423: 07,3202           05650                           TC       ALARM                                 
062383,000424: 07,3203           00212                           OCT      212                                   
062384,000425: 
062385,000426: 07,3204           00004                           INHINT                                         
062386,000427: 
062387,000428: 07,3205           13170                           TCF      PIPFREE2                              
062388,000429: 

Page 1430

062390,000431:                                                                                                  #  THE FOLLOWING ROUTINE TORQUES THE IRIGS ACCORDING TO DOUBLE PRECISION INPUTS IN THE SIX REGISTERS
062391,000432:                                                                                                  #  BEGINNING AT THE ECADR ARRIVING IN A.  THE MINIMUM SIZE OF ANY PULSE TRAIN IS 16 PULSES (.25 CDU COUNTS).  THE
062392,000433:                                                                                                  #  UNSENT PORTION OF THE COMMAND IS LEFT INTACT IN THE INPUT COMMAND REGISTERS.
062393,000434: 
062394,000435: 07,3206  E3,1400                                  EBANK=   1400                                  #  VARIABLE, ACTUALLY.
062395,000436: 
062396,000437: 07,3206           54161        IMUPULSE           TS       MPAC       +5                         #  SAVE ARRIVING ECADR.
062397,000438: 07,3207           03536                           TC       CAGETSTJ                              #  DONT PROCEED IF IMU BEING CAGED.
062398,000439: 
062399,000440: 07,3210           11304                           CCS      LGYRO                                 #  SEE IF GYROS BUSY.
062400,000441: 07,3211           03252                           TC       GYROBUSY                              #  SLEEP.
062401,000442: 
062402,000443: 07,3212           54156                           TS       MPAC       +2                         
062403,000444: 07,3213           35012                           CAF      BIT6                                  #  ENABLE THE POWER SUPPLY.
062404,000445: 07,3214           00006                           EXTEND                                         
062405,000446: 07,3215           05014                           WOR      CHAN14                                
062406,000447: 
062407,000448: 07,3216           35015                           CAF      FOUR                                  
062408,000449: 07,3217           05245        GWAKE2             TC       WAITLIST                              #  (IF A JOB WAS PUT TO SLEEP, THE POWER
062409,000450: 07,3220  E3,1474                                  EBANK=   CDUIND                                #  SUPPLY IS LEFT ON BY THE WAKING JOB).
062410,000451: 07,3220           03270 16063                     2CADR    STRTGYRO                              
062411,000452: 
062412,000453: 07,3222           30161                           CA       MPAC       +5                         #  SET UP EBANK, SAVING CALLER'S EBANK FOR
062413,000454: 07,3223           56003                           XCH      EBANK                                 #  RESTORATION ON RETURN.
062414,000455: 07,3224           56161                           XCH      MPAC       +5                         
062415,000456: 07,3225           55304                           TS       LGYRO                                 #  RESERVES GYROS.
062416,000457: 07,3226           74373                           MASK     LOW8                                  
062417,000458: 07,3227           54061                           TS       ITEMP1                                
062418,000459: 
062419,000460: 07,3230           35016                           CAF      TWO                                   #  FORCE SIGN AGREEMENT ON INPUTS.
062420,000461: 07,3231           54157        GYROAGRE           TS       MPAC       +3                         
062421,000462: 07,3232           60000                           DOUBLE                                         
062422,000463: 07,3233           60061                           AD       ITEMP1                                
062423,000464: 07,3234           54160                           TS       MPAC       +4                         
062424,000465: 07,3235           00006                           EXTEND                                         
062425,000466: 07,3236           50000                           INDEX    A                                     
062426,000467: 07,3237           31401                           DCA      1400                                  
062427,000468: 07,3240           52155                           DXCH     MPAC                                  
062428,000469: 07,3241           07226                           TC       TPAGREE                               
062429,000470: 07,3242           52155                           DXCH     MPAC                                  
062430,000471: 07,3243           50160                           INDEX    MPAC       +4                         
062431,000472: 07,3244           53401                           DXCH     1400                                  
062432,000473: 
062433,000474: 07,3245           10157                           CCS      MPAC       +3                         
062434,000475: 07,3246           13231                           TCF      GYROAGRE                              
062435,000476: 
062436,000477: 07,3247           30161                           CA       MPAC       +5                         #  RESTORE CALLER'S EBANK.
062437,000478: 07,3250           54003                           TS       EBANK                                 
062438,000479: 07,3251           12640                           TCF      MODEEXIT                              
062439,000480: 

Page 1431

062441,000482:                                                                                                  #  ROUTINES TO ALLOW TORQUING BY ONLY ONE JOB AT A TIME.
062442,000483: 
062443,000484: 07,3252           00006        GYROBUSY           EXTEND                                         #  SAVE RETURN 2FCADR.
062444,000485: 07,3253           30134                           DCA      BUF2                                  
062445,000486: 07,3254           52155                           DXCH     MPAC                                  
062446,000487: 07,3255           33267        REGSLEEP           CAF      LGWAKE                                
062447,000488: 07,3256           15175                           TCF      JOBSLEEP                              
062448,000489: 
062449,000490: 07,3257           11304        GWAKE              CCS      LGYRO                                 #  WHEN AWAKENED, SEE IF GYROS STILL BUSY.
062450,000491: 07,3260           13255                           TCF      REGSLEEP                              #  IF SO, SLEEP SOME MORE.
062451,000492: 
062452,000493: 07,3261           54156                           TS       MPAC       +2                         
062453,000494: 07,3262           00006                           EXTEND                                         
062454,000495: 07,3263           30155                           DCA      MPAC                                  
062455,000496: 07,3264           52134                           DXCH     BUF2                                  #  RESTORE SWRETURN INFO.
062456,000497: 07,3265           35017                           CAF      ONE                                   
062457,000498: 07,3266           13217                           TCF      GWAKE2                                
062458,000499: 
062459,000500: 07,3267           17257        LGWAKE             CADR     GWAKE                                 
062460,000501: 

Page 1432

062462,000503:                                                                                                  #  GYRO-TORQUING WAITLIST TASKS.
062463,000504: 
062464,000505: 07,3270           43511        STRTGYRO           CS       GDESELCT                              #  DE-SELECT LAST GYRO.
062465,000506: 07,3271           00006                           EXTEND                                         
062466,000507: 07,3272           03014                           WAND     CHAN14                                
062467,000508: 
062468,000509: 07,3273           03524                           TC       CAGETEST                              
062469,000510: 
062470,000511: 07,3274           31304        STRTGYR2           CA       LGYRO                                 #  JUMP ON PHASE COUNTER IN BITS 13-14.
062471,000512: 07,3275           00006                           EXTEND                                         
062472,000513: 07,3276           75014                           MP       BIT4                                  
062473,000514: 07,3277           50000                           INDEX    A                                     
062474,000515: 07,3300           13301                           TCF      +1                                    
062475,000516: 07,3301           03316                           TC       GSELECT                               #  =0.  DO Y GYRO.
062476,000517: 07,3302           00202                           OCT      00202                                 
062477,000518: 
062478,000519: 07,3303           03316                           TC       GSELECT                               #  =1.  DO Z GYRO.
062479,000520: 07,3304           00302                           OCT      00302                                 
062480,000521: 
062481,000522: 07,3305           03314                           TC       GSELECT    -2                         #  =2.  DO X GYRO.
062482,000523: 07,3306           00100                           OCT      00100                                 
062483,000524: 
062484,000525: 07,3307           35021                           CAF      ZERO                                  #  =3.  DONE
062485,000526: 07,3310           55304                           TS       LGYRO                                 
062486,000527: 07,3311           33267                           CAF      LGWAKE                                #  WAKE A POSSIBLE SLEEPING JOB.
062487,000528: 07,3312           05201                           TC       JOBWAKE                               
062488,000529: 
062489,000530: 07,3313           13115        NORESET            TCF      IMUFINED                              #  DO NOT RESET POWER SUPPLY

Page 1433

062491,000532: 07,3314           45015                 -2        CS       FOUR                                  #  SPECIAL ENTRY TO REGRESS LGYRO FOR X.
062492,000533: 07,3315           27304                           ADS      LGYRO                                 
062493,000534: 
062494,000535: 07,3316           50002        GSELECT            INDEX    Q                                     #  SELECT GYRO.
062495,000536: 07,3317           30000                           CAF      0                                     #  PACKED WORD CONTAINS GYRO SELECT BITS
062496,000537: 07,3320           54064                           TS       ITEMP4                                #  AND INCREMENT TO LGYRO.
062497,000538: 07,3321           75023                           MASK     SEVEN                                 
062498,000539: 07,3322           65003                           AD       BIT13                                 
062499,000540: 07,3323           27304                           ADS      LGYRO                                 
062500,000541: 07,3324           54003                           TS       EBANK                                 
062501,000542: 07,3325           74373                           MASK     LOW8                                  
062502,000543: 07,3326           54061                           TS       ITEMP1                                
062503,000544: 
062504,000545: 07,3327           45023                           CS       SEVEN                                 
062505,000546: 07,3330           70064                           MASK     ITEMP4                                
062506,000547: 07,3331           54064                           TS       ITEMP4                                
062507,000548: 
062508,000549: 07,3332           00006                           EXTEND                                         #  MOVE DP COMMAND TO RUPTREGS FOR TESTING.
062509,000550: 07,3333           50061                           INDEX    ITEMP1                                
062510,000551: 07,3334           31401                           DCA      1400                                  
062511,000552: 07,3335           52071                           DXCH     RUPTREG1                              
062512,000553: 
062513,000554: 07,3336           10070                           CCS      RUPTREG1                              
062514,000555: 07,3337           13352                           TCF      MAJ+                                  
062515,000556: 07,3340           13342                           TCF      +2                                    
062516,000557: 07,3341           13472                           TCF      MAJ-                                  
062517,000558: 
062518,000559: 07,3342           10071                           CCS      RUPTREG2                              
062519,000560: 07,3343           13347                           TCF      MIN+                                  
062520,000561: 07,3344           13274                           TCF      STRTGYR2                              
062521,000562: 07,3345           13467                           TCF      MIN-                                  
062522,000563: 07,3346           13274                           TCF      STRTGYR2                              
062523,000564: 

Page 1434

062525,000566: 07,3347           63403        MIN+               AD       -GYROMIN                              #  SMALL POSITIVE COMMAND.  SEE IF AT LEAST
062526,000567: 07,3350           00006                           EXTEND                                         #  16 GYRO PULSES.
062527,000568: 07,3351           63274                           BZMF     STRTGYR2                              
062528,000569: 
062529,000570: 07,3352           00006        MAJ+               EXTEND                                         #  DEFINITE POSITIVE OUTPUT.
062530,000571: 07,3353           33513                           DCA      GYROFRAC                              
062531,000572: 07,3354           20071                           DAS      RUPTREG1                              
062532,000573: 
062533,000574: 07,3355           30064                           CA       ITEMP4                                #  SELECT POSITIVE TORQUING FOR THIS GYRO.
062534,000575: 07,3356           00006                           EXTEND                                         
062535,000576: 07,3357           05014                           WOR      CHAN14                                
062536,000577: 
062537,000578: 07,3360           36043                           CAF      LOW7                                  #  LEAVE NUMBER OF POSSIBLE 8192 AUGMENTS
062538,000579: 07,3361           70071                           MASK     RUPTREG2                              #  TO INITIAL COMMAND IN MAJOR PART OF LONG
062539,000580: 07,3362           56071                           XCH      RUPTREG2                              #  TERM STORAGE AND TRUNCATED FRACTION
062540,000581: 07,3363           00006        GMERGE             EXTEND                                         #  IN MINOR PART.  THE MAJOR PART WILL BE
062541,000582: 07,3364           75010                           MP       BIT8                                  #  COUNTED DOWN TO ZERO IN THE COURSE OF
062542,000583: 07,3365           54062                           TS       ITEMP2                                #  PUTTING OUT THE ENTIRE COMMAND.
062543,000584: 07,3366           30070                           CA       RUPTREG1                              
062544,000585: 07,3367           00006                           EXTEND                                         
062545,000586: 07,3370           75007                           MP       BIT9                                  
062546,000587: 07,3371           54070                           TS       RUPTREG1                              
062547,000588: 07,3372           30001                           CA       L                                     
062548,000589: 07,3373           00006                           EXTEND                                         
062549,000590: 07,3374           75002                           MP       BIT14                                 
062550,000591: 07,3375           26062                           ADS      ITEMP2                                #  INITIAL COMMAND.
062551,000592: 
062552,000593: 07,3376           00006                           EXTEND                                         #  SEE IF MORE THAN ONE PULSE TRAIN NEEDED
062553,000594: 07,3377           30071                           DCA      RUPTREG1                              #  (MORE THAN 16383 PULSES).
062554,000595: 07,3400           67716                           AD       MINUS1                                
062555,000596: 07,3401           10000                           CCS      A                                     
062556,000597: 07,3402           13426                           TCF      LONGGYRO                              
062557,000598: 07,3403           77601        -GYROMIN           OCT      -176                                  #  MAY BE ADJUSTED TO SPECIFY MINIMUM CMD
062558,000599: 07,3404           13410                           TCF      +4                                    
062559,000600: 
062560,000601: 07,3405           35002                           CAF      BIT14                                 
062561,000602: 07,3406           26062                           ADS      ITEMP2                                
062562,000603: 07,3407           35021                           CAF      ZERO                                  
062563,000604: 
062564,000605: 07,3410           50061                 +4        INDEX    ITEMP1                                
062565,000606: 07,3411           53401                           DXCH     1400                                  

Page 1435

062567,000608: 07,3412           30062                           CA       ITEMP2                                #  ENTIRE COMMAND.
062568,000609: 07,3413           54047        LASTSEG            TS       GYROCMD                               
062569,000610: 07,3414           00006                           EXTEND                                         
062570,000611: 07,3415           75006                           MP       BIT10                                 #  WAITLIST DT
062571,000612: 07,3416           66214                           AD       THREE                                 #  TRUNCATION AND PHASE UNCERTAINTIES.
062572,000613: 07,3417           05245                           TC       WAITLIST                              
062573,000614: 07,3420  E3,1474                                  EBANK=   CDUIND                                
062574,000615: 07,3420           03270 16063                     2CADR    STRTGYRO                              
062575,000616: 
062576,000617: 07,3422           35006        GYROEXIT           CAF      BIT10                                 
062577,000618: 07,3423           00006                           EXTEND                                         
062578,000619: 07,3424           05014                           WOR      CHAN14                                
062579,000620: 07,3425           15324                           TCF      TASKOVER                              
062580,000621: 
062581,000622: 07,3426           50061        LONGGYRO           INDEX    ITEMP1                                
062582,000623: 07,3427           53401                           DXCH     1400                                  #  INITIAL COMMAND OUT PLUS N AUGMENTS OF
062583,000624: 07,3430           35002                           CAF      BIT14                                 #  8192.  INITIAL COMMAND IS AT LEAST 8192.
062584,000625: 07,3431           60062                           AD       ITEMP2                                
062585,000626: 07,3432           54047                           TS       GYROCMD                               
062586,000627: 
062587,000628: 07,3433           00006        AUG3               EXTEND                                         #  GET WAITLIST DT TO TIME WHEN TRAIN IS
062588,000629: 07,3434           75006                           MP       BIT10                                 #  ALMOST OUT.
062589,000630: 07,3435           67714                           AD       NEG3                                  
062590,000631: 07,3436           05245                           TC       WAITLIST                              
062591,000632: 07,3437  E3,1474                                  EBANK=   CDUIND                                
062592,000633: 07,3437           03442 16063                     2CADR    8192AUG                               
062593,000634: 
062594,000635: 07,3441           13422                           TCF      GYROEXIT                              
062595,000636: 
062596,000637: 07,3442           03524        8192AUG            TC       CAGETEST                              
062597,000638: 
062598,000639: 07,3443           35014                           CAF      BIT4                                  
062599,000640: 07,3444           00006                           EXTEND                                         
062600,000641: 07,3445           02012                           RAND     CHAN12                                
062601,000642: 07,3446           10000                           CCS      A                                     
062602,000643: 07,3447           13522                           TCF      IMUBAD                                
062603,000644: 07,3450           31304                           CA       LGYRO                                 #  ADD 8192 PULSES TO GYROCMD
062604,000645: 07,3451           54003                           TS       EBANK                                 
062605,000646: 07,3452           74373                           MASK     LOW8                                  
062606,000647: 07,3453           54061                           TS       ITEMP1                                
062607,000648: 
062608,000649: 07,3454           50061                           INDEX    ITEMP1                                #  SEE IF THIS IS THE LAST AUG.
062609,000650: 07,3455           11400                           CCS      1400                                  
062610,000651: 07,3456           13462                           TCF      AUG2                                  #  MORE TO COME.
062611,000652: 
062612,000653: 07,3457           35002                           CAF      BIT14                                 
062613,000654: 07,3460           26047                           ADS      GYROCMD                               
062614,000655: 07,3461           13414                           TCF      LASTSEG    +1                         
062615,000656: 

Page 1436

062617,000658: 07,3462           50061        AUG2               INDEX    ITEMP1                                
062618,000659: 07,3463           55400                           TS       1400                                  
062619,000660: 07,3464           35002                           CAF      BIT14                                 
062620,000661: 07,3465           26047                           ADS      GYROCMD                               
062621,000662: 07,3466           13433                           TCF      AUG3                                  #  COMPUTE DT.
062622,000663: 

Page 1437

062624,000665: 07,3467           63403        MIN-               AD       -GYROMIN                              #  POSSIBLE NEGATIVE OUTPUT.
062625,000666: 07,3470           00006                           EXTEND                                         
062626,000667: 07,3471           63274                           BZMF     STRTGYR2                              
062627,000668: 
062628,000669: 07,3472           00006        MAJ-               EXTEND                                         #  DEFINITE NEGATIVE OUTPUT.
062629,000670: 07,3473           43513                           DCS      GYROFRAC                              
062630,000671: 07,3474           20071                           DAS      RUPTREG1                              
062631,000672: 
062632,000673: 07,3475           30064                           CA       ITEMP4                                #  SELECT NEGATIVE TORQUING FOR THIS GYRO.
062633,000674: 07,3476           65007                           AD       BIT9                                  
062634,000675: 07,3477           00006                           EXTEND                                         
062635,000676: 07,3500           05014                           WOR      CHAN14                                
062636,000677: 
062637,000678: 07,3501           40070                           CS       RUPTREG1                              #  SET UP RUPTREGS TO FALL INTO GMERGE.
062638,000679: 07,3502           54070                           TS       RUPTREG1                              #  ALL NUMBERS PUT INTO GYROCMD ARE
062639,000680: 07,3503           40071                           CS       RUPTREG2                              #  POSITIVE - BIT9 OF CHAN 14 DETERMINES
062640,000681: 07,3504           76043                           MASK     LOW7                                  #  THE SIGN OF THE COMMAND.
062641,000682: 07,3505           40000                           COM                                            
062642,000683: 07,3506           56071                           XCH      RUPTREG2                              
062643,000684: 07,3507           40000                           COM                                            
062644,000685: 07,3510           13363                           TCF      GMERGE                                
062645,000686: 
062646,000687: 07,3511           01700        GDESELCT           OCT      1700                                  #  TURN OFF SELECT AND ACTIVITY BITS.
062647,000688: 
062648,000689: 07,3512           00000 00034  GYROFRAC           2DEC     .215       B-21                       
062649,000690: 

Page 1438

062651,000692:                                                                                                  #  IMU MODE SWITCHING ROUTINES COME HERE WHEN ACTION COMPLETE.
062652,000693: 
062653,000694: 07,3514           00006        ENDIMU             EXTEND                                         #  MODE IS BAD IF CAGE HAS OCCURED OR IF
062654,000695: 07,3515           00011                           READ     DSALMOUT                              #  ISS WARNING IS ON.
062655,000696: 07,3516           75017                           MASK     BIT1                                  
062656,000697: 07,3517           10000                           CCS      A                                     
062657,000698: 07,3520           13522                           TCF      IMUBAD                                
062658,000699: 
062659,000700: 07,3521           13550        IMUGOOD            TCF      GOODEND                               #  WITH C(A) = 0.
062660,000701: 
062661,000702: 07,3522           35021        IMUBAD             CAF      ZERO                                  
062662,000703: 07,3523           13545                           TCF      BADEND                                
062663,000704: 
062664,000705: 07,3524           35012        CAGETEST           CAF      BIT6                                  #  SUBROUTINE TO TERMINATE IMU MODE
062665,000706: 07,3525           71320                           MASK     IMODES30                              #  SWITCH IF IMU HAS BEEN CAGED.
062666,000707: 07,3526           10000                           CCS      A                                     
062667,000708: 07,3527           13522                           TCF      IMUBAD                                #  DIRECTLY.
062668,000709: 07,3530           00002                           TC       Q                                     #  WITH C(A) = +0.
062669,000710: 
062670,000711: 07,3531           41320        CAGETSTQ           CS       IMODES30                              #  SKIP IF IMU NOT BEING CAGED.
062671,000712: 07,3532           75012                           MASK     BIT6                                  
062672,000713: 07,3533           10000                           CCS      A                                     
062673,000714: 07,3534           24002                           INCR     Q                                     
062674,000715: 07,3535           00002                           TC       Q                                     
062675,000716: 
062676,000717: 07,3536           41320        CAGETSTJ           CS       IMODES30                              #  IF DURING MODE SWITCH INITIALIZATION
062677,000718: 07,3537           75012                           MASK     BIT6                                  #  IT IS FOUND THAT THE IMU IS BEING CAGED,
062678,000719: 07,3540           10000                           CCS      A                                     #  SET IMUCADR TO -0 TO INDICATE OPERATION
062679,000720: 07,3541           00002                           TC       Q                                     #  COMPLETE BUT FAILED.  RETURN IMMEDIATELY
062680,000721: 07,3542           45021                           CS       ZERO                                  #  TO SWRETURN.
062681,000722: 07,3543           55322                           TS       IMUCADR                               
062682,000723: 07,3544           12640                           TCF      MODEEXIT                              
062683,000724: 

Page 1439

062685,000726:                                                                                                  #  GENERALIZED MODE SWITCHING TERMINATION.  ENTER AT GOODEND FOR SUCCESSFUL COMPLETION OF AN I/O OPERATION
062686,000727:                                                                                                  #  OR AT BADEND FOR AN UNSUCCESSFUL ONE.  C(A) OR ARRIVAL =0 FOR IMU, 1 FOR OPTICS.
062687,000728: 
062688,000729: 07,3545           54071        BADEND             TS       RUPTREG2                              #  DEVICE INDEX.
062689,000730: 07,3546           45021                           CS       ZERO                                  #  FOR FAILURE.
062690,000731: 07,3547           13552                           TCF      GOODEND    +2                         
062691,000732: 
062692,000733: 07,3550           54071        GOODEND            TS       RUPTREG2                              
062693,000734: 07,3551           45017                           CS       ONE                                   #  FOR SUCCESS.
062694,000735: 
062695,000736: 07,3552           54072                           TS       RUPTREG3                              
062696,000737: 07,3553           50071                           INDEX    RUPTREG2                              #  SEE IF USING PROGRAM ASLEEP.
062697,000738: 07,3554           11322                           CCS      MODECADR                              
062698,000739: 07,3555           13557                           TCF      +2                                    #  YES - WAKE IT UP.
062699,000740: 07,3556           13567                           TCF      ENDMODE                               #  IF 0, PROGRAM NOT IN YET.
062700,000741: 
062701,000742: 07,3557           35021                           CAF      ZERO                                  #  WAKE SLEEPING PROGRAM.
062702,000743: 07,3560           50071                           INDEX    RUPTREG2                              
062703,000744: 07,3561           57322                           XCH      MODECADR                              
062704,000745: 07,3562           05201                           TC       JOBWAKE                               
062705,000746: 
062706,000747: 07,3563           40072                           CS       RUPTREG3                              #  ADVANCE LOC IF SUCCESSFUL.
062707,000748: 07,3564           50064                           INDEX    LOCCTR                                
062708,000749: 07,3565           26164                           ADS      LOC                                   
062709,000750: 
062710,000751: 07,3566           15324                           TCF      TASKOVER                              
062711,000752: 
062712,000753: 07,3567           30072        ENDMODE            CA       RUPTREG3                              #  -0 INDICATES OPERATION COMPLETE BUT
062713,000754: 07,3570           50071                           INDEX    RUPTREG2                              #  UNSUCCESSFUL - -1 INDICATES COMPLETE AND
062714,000755: 07,3571           55322                           TS       MODECADR                              #  SUCCESSFUL.
062715,000756: 07,3572           15324                           TCF      TASKOVER                              
062716,000757: 

Page 1440

062718,000759:                                                                                                  #  GENERAL STALLING ROUTINE.  USING PROGRAMS COME HERE TO WAIT FOR I/O COMPLETION.
062719,000760: 
062720,000761:                                                                                                  #  PROGRAM DESCRIPTION                           DATE - 21 FEB 1967
062721,000762:                                                                                                  #                                                LOG SECTION IMU MODE SWITCHING
062722,000763:                                                                                                  #  MOD BY - R. MELANSON TO ADD DOCUMENTATION     ASSEMBLY SUNDISK REV. 82
062723,000764: 
062724,000765:                                                                                                  #  FUNCTIONAL DESCRIPTION -
062725,000766:                                                                                                  #        TO DELAY FURTHER EXECUTION OF THE CALLING ROUTINE UNTIL ITS SELECTED
062726,000767:                                                                                                  #        I/O FUNCTION IS COMPLETE.  THE FOLLOWING CHECKS ON THE CALLING ROUTINE:S
062727,000768:                                                                                                  #        MODECADR ARE MADE AND ACTED UPON.
062728,000769:                                                                                                  #        1) +0 INDICATES INCOMPLETE I/O OPERATION.  CALLING ROUTINE IS PUT TO
062729,000770:                                                                                                  #           SLEEP.
062730,000771:                                                                                                  #        2) -1 INDICATES COMPLETED I/O OPERATION.  STALL BYPASSES JOBSLEEP
062731,000772:                                                                                                  #           CALL AND RETURNS TO CALLING ROUTINE AT L+3
062732,000773:                                                                                                  #        3) -0 INDICATES COMPLETED I/O WITH FAILURE.  STALL CLEARS MODECADR
062733,000774:                                                                                                  #           AND RETURNS TO CALLING ROUTINE AT L+2.
062734,000775:                                                                                                  #        4) VALUE GREATER THAN 0 INDICATES TWO ROUTINES CALLING FOR USE OF
062735,000776:                                                                                                  #           SAME DEVICE.  STALL EXITS TO ABORT WHICH EXECUTES A PROGRAM
062736,000777:                                                                                                  #           RESTART WHICH IN TURN CLEARS ALL MODECADR REGISTERS.
062737,000778: 
062738,000779:                                                                                                  #  CALLING SEQUENCE -
062739,000780:                                                                                                  #        L       TC      BANKCALL
062740,000781:                                                                                                  #        L+1     CADR    (ONE OF 5 STALL ADDRESSES  I.E. IMUSTALL, OPTSTALL, RADSTALL,
062741,000782:                                                                                                  #                        AOTSTALL, OR ATTSTALL)
062742,000783: 
062743,000784:                                                                                                  #  NORMAL-EXIT MODE -
062744,000785:                                                                                                  #        TCF JOBSLEEP    OR      TCF MODEXIT
062745,000786: 
062746,000787:                                                                                                  #  ALARM OR ABORT EXIT MODE -
062747,000788:                                                                                                  #        TC      ABORT
062748,000789: 
062749,000790:                                                                                                  #  OUTPUT -
062750,000791:                                                                                                  #        MODECADR=CADR   IF JOBSLEEP
062751,000792:                                                                                                  #        MODECADR=+0     IF I/O COMPLETE
062752,000793:                                                                                                  #        BUF2=L+3        IF I/O COMPLETE AND GOOD.
062753,000794:                                                                                                  #        BUF2=L+2        IF I/O COMPLETE BUT FAILED.
062754,000795: 
062755,000796:                                                                                                  #  ERASABLE INITIALIZATION -
062756,000797:                                                                                                  #        BUF2 CONTAINS RETURN ADDRESS PLUS 1,(L+2)
062757,000798:                                                                                                  #        BUF2+1 CONTAINS FBANK VALUE OF CALLING ROUTINE.
062758,000799:                                                                                                  #        MODECADR OF CALLING ROUTINE CONTAINS +0,-1,-0 OR CADR RETURN ADDRESS.
062759,000800: 
062760,000801:                                                                                                  #  DEBRIS -
062761,000802:                                                                                                  #        RUPTREG2 AND CALLING ROUTINE MODECADR.
062762,000803: 
062763,000804: 07,3573           35017        AOTSTALL           CAF      ONE                                   #  AOT.
062764,000805: 07,3574           03600                           TC       STALL                                 
062765,000806: 
062766,000807: 07,3575           35016        RADSTALL           CAF      TWO                                   
062767,000808: 07,3576           13600                           TCF      STALL                                 
062768,000809: 

Page 1441

062770,000811: 07,3577  07,3573               OPTSTALL           EQUALS   AOTSTALL                              
062771,000812: 
062772,000813: 07,3577           35021        IMUSTALL           CAF      ZERO                                  #  IMU.
062773,000814: 
062774,000815: 07,3600           00004        STALL              INHINT                                         
062775,000816: 07,3601           54071                           TS       RUPTREG2                              #  SAVE DEVICE INDEX.
062776,000817: 07,3602           50000                           INDEX    A                                     #  SEE IF OPERATION COMPLETE.
062777,000818: 07,3603           11322                           CCS      MODECADR                              
062778,000819: 07,3604           13622                           TCF      MODABORT                              #  ALLOWABLE STATES ARE +0, -1, AND -0.
062779,000820: 07,3605           13616                           TCF      MODESLP                               #  OPERATION INCOMPLETE.
062780,000821: 07,3606           13612                           TCF      MODEGOOD                              #  COMPLETE AND GOOD IF = -1.
062781,000822: 
062782,000823: 07,3607           50071        MG2                INDEX    RUPTREG2                              #  COMPLETE AND FAILED IF -0.  RESET TO +0.
062783,000824: 07,3610           55322                           TS       MODECADR                              #  RETURN TO CALLER.
062784,000825: 07,3611           12640                           TCF      MODEEXIT                              
062785,000826: 
062786,000827: 07,3612           10000        MODEGOOD           CCS      A                                     #  MAKE SURE INITIAL STATE -1.
062787,000828: 07,3613           13622                           TCF      MODABORT                              
062788,000829: 
062789,000830: 07,3614           24133                           INCR     BUF2                                  #  IF SO, INCREMENT RETURN ADDRESS AND
062790,000831: 07,3615           13607                           TCF      MG2                                   #  RETURN IMMEDIATELY, SETTING CADR = +0.
062791,000832: 
062792,000833: 07,3616           04711        MODESLP            TC       MAKECADR                              #  CALL FROM SWITCHABLE FIXED ONLY.
062793,000834: 07,3617           50071                           INDEX    RUPTREG2                              
062794,000835: 07,3620           55322                           TS       MODECADR                              
062795,000836: 07,3621           15175                           TCF      JOBSLEEP                              
062796,000837: 
062797,000838: 07,3622           05721        MODABORT           TC       POODOO                                #  TWO PROGRAMS USING SAME DEVICE.
062798,000839: 07,3623           01210                           OCT      1210                                  
062799,000840: 

Page 1442

062801,000842:                                                                                                  #  CONSTANTS FOR MODE SWITCHING ROUTINES
062802,000843: 
062803,000844: 07,3624     5771               BITS3&4            =        OCT14                                 
062804,000845: 07,3624     5033               BITS4&6            =        OCT50                                 
062805,000846: 07,3624     5027               BITS4-5            EQUALS   BITS4&5                               
062806,000847: 07,3624     5010               IMUSEFLG           EQUALS   BIT8                                  #  INTERPRETER SWITCH 7.
062807,000848: 07,3624           77500        -COMMAX            DEC      -191       B-14                       
062808,000849: 07,3625           77477        -COMMAX-           DEC      -192       B-14                       
062809,000850: 07,3626           00074        600MS              DEC      60         B-14                       
062810,000851: 07,3627  07,3073               IMUFIN20           =        IMUFINE                               
062811,000852: 07,3627           31325        GOMANUR            CA       ATTCADR                               #  IS KALCMANU FREE
062812,000853: 07,3630           00006                           EXTEND                                         
062813,000854: 07,3631           13634                           BZF      +3                                    
062814,000855: 07,3632           05721                           TC       POODOO                                #  NO
062815,000856: 07,3633           01210                           OCT      1210                                  #  2 TRYING TO USE SAME DEVICE
062816,000857: 
062817,000858: 07,3634           00006                 +3        EXTEND                                         
062818,000859: 07,3635           30134                           DCA      BUF2                                  
062819,000860: 07,3636           53326                           DXCH     ATTCADR                               #  SAVE FINAL RETURN FOR KALCMAN3
062820,000861: 
062821,000862: 07,3637           30006                           CA       BBANK                                 
062822,000863: 07,3640           75023                           MASK     SEVEN                                 
062823,000864: 07,3641           27326                           ADS      ATTCADR    +1                         
062824,000865: 
062825,000866: 07,3642           30167                           CA       PRIORITY                              
062826,000867: 07,3643           77674                           MASK     PRIO37                                
062827,000868: 07,3644           55327                           TS       ATTPRIO                               #  SAVE USERS PRIO
062828,000869: 
062829,000870: 07,3645           33651                           CAF      KALEBCON                              #  SET EBANK FOR KALCMAN3
062830,000871: 07,3646           54003                           TS       EBANK                                 
062831,000872: 07,3647           04701                           TC       POSTJUMP                              
062832,000873: 07,3650           44000                           CADR     KALCMAN3                              
062833,000874: 07,3651           03261        KALEBCON           ECADR    BCDU                                  
062834,000875: 

Page 1443

062836,000877:                                                                                                  #  PROGRAM DESCRIPTION
062837,000878:                                                                                                  #  IMU STATUS CHECK ROUTINE R02 (SUBROUTINE UTILITY)
062838,000879:                                                                                                  #  MOD NO - 1
062839,000880:                                                                                                  #  MOD BY - N.BRODEUR
062840,000881: 
062841,000882:                                                                                                  #  FUNCTIONAL DESCRIPTION
062842,000883:                                                                                                  #        TO CHECK WHETHER IMU IS ON AND IF ON WHETHER IT IS ALIGNED TO AN
062843,000884:                                                                                                  #        ORIENTATION KNOWN BY THE CMC.  TO REQUEST SELECTION OF THE APPROPRIATE
062844,000885:                                                                                                  #        PROGRAM IF THE IMU IS OFF OR NOT ALIGNED TO AN ORIENTATION KNOWN BY THE
062845,000886:                                                                                                  #        CMC.  CALLED THROUGH BANKCALL
062846,000887: 
062847,000888:                                                                                                  #  CALLING SEQUENCE -
062848,000889:                                                                                                  #        L       TC      BANKCALL
062849,000890:                                                                                                  #        L+1     CADR    R02BOTH
062850,000891: 
062851,000892:                                                                                                  #  SUBROUTINES CALLED
062852,000893:                                                                                                  #        VARALARM
062853,000894:                                                                                                  #        FLAGUP
062854,000895: 
062855,000896:                                                                                                  #  NORMAL EXIT MODES
062856,000897:                                                                                                  #        AT L+2 OF CALLING SEQUENCE
062857,000898: 
062858,000899:                                                                                                  #  ALARM OR ABORT EXIT MODES
062859,000900:                                                                                                  #        GOTOPOOH, WITH ALARM
062860,000901: 
062861,000902:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED
062862,000903:                                                                                                  #        NONE
062863,000904: 
062864,000905:                                                                                                  #  DEBRIS
062865,000906:                                                                                                  #        CENTRALS - A,Q,L
062866,000907: 
062867,000908: 34,3763                                           BANK     34                                    
062868,000909: 07,2000                                           SETLOC   R02                                   
062869,000910: 07,2000                                           BANK                                           
062870,000911: 07,3652                                           COUNT    04/R02                                #  COUNT*
062871,000912: 
062872,000913: 07,3652           00063        DEC51              DEC      51         B-14                       
062873,000914: 07,3653           35003        R02BOTH            CAF      BIT13                                 
062874,000915: 07,3654           70077                           MASK     STATE      +3                         #  REFSMFLG
062875,000916: 07,3655           10000                           CCS      A                                     
062876,000917: 07,3656           03667                           TC       R02ZERO                               #  ZERO IMUS
062877,000918: 
062878,000919: 07,3657           31320                           CA       IMODES30                              
062879,000920: 07,3660           75007                           MASK     BIT9                                  #  IS ISS INITIALIZED
062880,000921: 07,3661           00006                           EXTEND                                         
062881,000922: 07,3662           13664                           BZF      +2                                    
062882,000923: 07,3663           45014                           CS       BIT4                                  #  SEND IMU ALARM CODE 210
062883,000924: 07,3664           63672                           AD       OCT220                                #  SEND REFSMM ALARM
062884,000925: 07,3665           05764                           TC       VARALARM                              
062885,000926: 
062886,000927: 07,3666           04106                           TC       GOTOPOOH                              
062887,000928: 

Page 1444

062889,000930: 07,3667           05546        R02ZERO            TC       UPFLAG                                
062890,000931: 07,3670           00007                           ADRES    IMUSE                                 
062891,000932: 07,3671           14675                           TCF      SWRETURN                              
062892,000933: 07,3672           00220        OCT220             OCT      220                                   
062893,000934: 

Page 1445

062895,000936:                                                                                                  #  PROGRAM DESCRIPTION   P06             10FEB67
062896,000937: 
062897,000938:                                                                                                  #  TRANSFER THE ISS/CMC FROM THE OPERATE TO THE STANDBY CONDITION.
062898,000939: 
062899,000940:                                                                                                  #  THE NORMAL CONDITION OF READINESS OF THE GNCS WHEN NOT IN USE IS STANDBY.  IN THIS CONDITION THE IMU
062900,000941:                                                                                                  #  HEATER POWER IS ON.  THE IMU OPERATE POWER IS OFF.  THE COMPUTER POWER IS ON.  THE OPTICS POWER IS OFF.  THE
062901,000942:                                                                                                  #  CMC STANDBY ON THE MAIN AND LEB DISKYS IS ON.
062902,000943: 
062903,000944:                                                                                                  #  CALLING SEQUENCE:
062904,000945:                                                                                                  #        ASTRONAUT REQUEST THROUGH DSKY  V37E 06E.
062905,000946: 
062906,000947:                                                                                                  #  SUBROUTINES CALLED:
062907,000948:                                                                                                  #        GOPERF1
062908,000949:                                                                                                  #        BANKCALL
062909,000950:                                                                                                  #        FLAGDOWN
062910,000951: 

Page 1446

062912,000953:                                                                                                  #  PRESTAND PREPARES FOR STANDBY BY SNAPSHOTTING THE SCALER AND TIME1 TIME2
062913,000954:                                                                                                  #  THE LOW 5 BITS OF THE SCALER ARE INSPECTED TO INSURE COMPATABILITY
062914,000955:                                                                                                  #  BETWEEN THE SCALER READING AND THE TIME1 TIME2 READING.
062915,000956: 
062916,000957: 26,2000                                           SETLOC   P05P06                                
062917,000958: 26,2000                                           BANK                                           
062918,000959: 
062919,000960: 26,3660     1150                                  EBANK=   TIME2SAV                              
062920,000961: 26,3660                                           COUNT*   $$/P06                                
062921,000962: 
062922,000963: 26,3660           05546        P06                TC       UPFLAG                                #  SET NODOV37 BIT
062923,000964: 26,3661           00054                           ADRES    NODOFLAG                              
062924,000965: 
062925,000966: 26,3662           00004        PRESTAND           INHINT                                         
062926,000967: 26,3663           00006                           EXTEND                                         
062927,000968: 26,3664           30025                           DCA      TIME2                                 #  SNAPSHOT TIME1 TIME2
062928,000969: 26,3665           53151                           DXCH     TIME2SAV                              
062929,000970: 26,3666           03717                           TC       SCALPREP                              
062930,000971: 26,3667           03662                           TC       PRESTAND                              #  T1,T2,SCALER NOT COMPATIBLE
062931,000972: 26,3670           52155                           DXCH     MPAC                                  #  T1,T2 AND SCALER OK
062932,000973: 26,3671           53153                           DXCH     SCALSAVE                              #  STORE SCALER
062933,000974: 26,3672           00004                           INHINT                                         
062934,000975: 26,3673           04662                           TC       BANKCALL                              
062935,000976: 26,3674           17060                           CADR     RNDREFDR                              #  REFSMM, DRIFT, TRACK FLAGS DOWN
062936,000977: 
062937,000978: 26,3675           05560                           TC       DOWNFLAG                              
062938,000979: 26,3676           00007                           ADRES    IMUSE                                 #  IMUSE DOWN
062939,000980: 26,3677           05560                           TC       DOWNFLAG                              
062940,000981: 26,3700           00010                           ADRES    RNDVZFLG                              #  RNDVZFLG DOWN
062941,000982: 
062942,000983: 26,3701           35005                           CAF      BIT11                                 
062943,000984: 26,3702           00006                           EXTEND                                         
062944,000985: 26,3703           05013                           WOR      CHAN13                                #  SET STANDBY ENABLE BIT
062945,000986: 
062946,000987: 26,3704           05412                           TC       PHASCHNG                              #  SET RESTART TO POSTAND WHEN STANDBY
062947,000988: 26,3705           07024                           OCT      07024                                 #        RECOVERS
062948,000989: 26,3706           20000                           OCT      20000                                 
062949,000990: 26,3707     1152                                  EBANK=   SCALSAVE                              
062950,000991: 26,3707           03737 54062                     2CADR    POSTAND                               
062951,000992: 
062952,000993: 26,3711           35036                           CAF      OCT62                                 
062953,000994: 26,3712           04662                           TC       BANKCALL                              
062954,000995: 26,3713           21045                           CADR     GOPERF1                               
062955,000996: 26,3714           13711                           TCF      -3                                    
062956,000997: 26,3715           13711                           TCF      -4                                    
062957,000998: 26,3716           13711                           TCF      -5                                    
062958,000999: 
062959,001000: 26,3717     5036               OCT62              EQUALS   .5SEC                                 #  DEC 50 = OCT 62
062960,001001: 
062961,001002:                                                                                                  #  THE LOW 5 BITS OF THE SCALER READS 10000 FOR THE FIRST INTERVAL AFTER A

Page 1447

062963,001004:                                                                                                  #  T1 INCREMENT.  IF SCALPREP DETECTS THIS INTERVAL THE T1,T2 AND SCALER
062964,001005:                                                                                                  #  DATA ARE NOT COMPATABLE AND RETURN IS TO L+1 FOR ANOTHER READING OF THE
062965,001006:                                                                                                  #  DATA.  OTHERWISE, THE RETURN IS TO L+2 TO PROCEED.  ROUTINE ALSO PREPARES
062966,001007:                                                                                                  #  THE SCALER READING FOR COMPUTATION OF THE INCREMENT TO UPDATE T1T2.  (THE
062967,001008:                                                                                                  #  10 MS BIT (BIT 6) OF THE SCALER IS INCREMENTED 5 MS OUT OF PHASE FROM
062968,001009:                                                                                                  #  T1.) ADDITION OF 5 MS (BIT 5) TO THE SCALER READING HAS THE EFFECT OF
062969,001010:                                                                                                  #  ADJUSTING BIT 6 IN THE SCALER TO BE IN PHASE WITH BIT 1 OF T1.  THE LOW 5
062970,001011:                                                                                                  #  BITS OF THE SCALER READING ARE THEN SET TO ZERO, TO TRUNCATE THE SCALER
062971,001012:                                                                                                  #  DATA TO 10 MS.  RESULTS ARE STORED IN MPAC, +1.
062972,001013: 
062973,001014: 26,3717           00006        SCALPREP           EXTEND                                         
062974,001015: 26,3720           22156                           QXCH     MPAC       +2                         
062975,001016: 26,3721           04554                           TC       FINETIME   +1                         
062976,001017: 26,3722           00003                           RELINT                                         
062977,001018: 26,3723           52155                           DXCH     MPAC                                  
062978,001019: 26,3724           35013                           CA       BIT5                                  #  ADD 5 MS TO THE SCALER READING.
062979,001020: 26,3725           54001                           TS       L                                     
062980,001021: 26,3726           35021                           CA       ZERO                                  
062981,001022: 26,3727           20155                           DAS      MPAC                                  
062982,001023: 26,3730           44362                           CS       LOW5                                  #  SET LOW 5 BITS OF (SCALER+5MS) TO ZERO
062983,001024: 26,3731           70155                           MASK     MPAC       +1                         #  AND STORE RESULTS IN MPAC,+1.
062984,001025: 26,3732           56155                           XCH      MPAC       +1                         
062985,001026: 26,3733           74362                           MASK     LOW5                                  #  TEST LOW 5 BITS OF SCALER FOR THE FIRST
062986,001027:                                                                                                  #  INTERVAL AFTER THE T1 INCREMENT
062987,001028:                                                                                                  #  (NOW = 00000, SINCE BIT 5 ADDED).
062988,001029: 26,3734           10000                           CCS      A                                     #  IS IT 1ST INTERVAL AFTER T1 INCREMENT
062989,001030: 26,3735           24156                           INCR     MPAC       +2                         #  NO
062990,001031: 26,3736           00156                           TC       MPAC       +2                         #  YES
062991,001032: 
062992,001033:                                                                                                  #  POSTAND RECOVERS TIME AFTER STANDBY.  THE SCALER IS SNAPSHOTTED AND THE
062993,001034:                                                                                                  #  TIME1 TIME2 COUNTER IS SET TO ZERO.  THE LOW 5 BITS OF THE SCALER ARE
062994,001035:                                                                                                  #  INSPECTED TO INSURE COMPATABILITY BETWEEN THE SCALER READING AND THE
062995,001036:                                                                                                  #  CLEARING OF THE TIME COUNTER.  IT THEN COMPUTES THE DIFFERENCE IN SCALER
062996,001037:                                                                                                  #  VALUES (IN DP) AND ADDS THIS TO THE PREVIOUSLY SNAPSHOTTED VALUES OF
062997,001038:                                                                                                  #  TIME1 TIME2 AND PLACES THIS NEW TIME INTO THE TIME1 TIME2 COUNTER.
062998,001039: 
062999,001040: 26,3737                                           COUNT*   $$/P05                                
063000,001041: 
063001,001042: 26,3737           45005        POSTAND            CS       BIT11                                 #  RECOVER TIME AFTER STANDBY.
063002,001043: 26,3740           00006                           EXTEND                                         
063003,001044: 26,3741           03013                           WAND     CHAN13                                #  CLEAR STANDBY ENABLE BIT
063004,001045: 26,3742           00004                           INHINT                                         
063005,001046: 26,3743           35021                           CA       ZERO                                  
063006,001047: 26,3744           54001                           TS       L                                     
063007,001048: 26,3745           52025                           DXCH     TIME2                                 #  CLEAR TIME1 TIME2
063008,001049: 26,3746           03717                           TC       SCALPREP                              #  STORE SCALER IN MPAC, MPAC+1
063009,001050: 26,3747           03742                           TC       POSTAND    +3                         #  T1,T2,SCALER NOT COMPATIBLE
063010,001051: 26,3750           00006                           EXTEND                                         #  T1,T2 AND SCALER OK
063011,001052: 26,3751           41153                           DCS      SCALSAVE                              
063012,001053: 26,3752           20155                           DAS      MPAC                                  #  FORM DP DIFFERENCE OF POSTSTANDBY SCALER

Page 1448

063014,001055: 26,3753           35006                           CAF      BIT10                                 #  MINUS PRESTANDBY SCALER AND SHIFT RIGHT
063015,001056: 26,3754           07256                           TC       SHORTMP                               #  5 TO ALIGN BITS WITH TIME1 TIME2.
063016,001057: 26,3755           35021                           CAF      ZERO                                  
063017,001058: 26,3756           54156                           TS       MPAC       +2                         #  NEEDED FOR TP AGREE
063018,001059: 26,3757           07226                           TC       TPAGREE                               #  MAKE DP DIFF AGREE
063019,001060: 26,3760           10154                           CCS      MPAC                                  
063020,001061: 26,3761           03766                           TC       POSTCOM                               #  IF DP DIFF NET +, NO SCALER OVERFLOW
063021,001062: 26,3762           03766                           TC       POSTCOM                               #  BETWEEN PRE AND POST STANDBY.
063022,001063: 26,3763           03764                           TC       +1                                    #  IF DP DIFF NET -, SCALER OVERFLOWED.  ADD
063023,001064: 26,3764           35006                           CAF      BIT10                                 #  BIT 10 TO HIGH DIFF TO CORRECT.
063024,001065: 26,3765           26154                           ADS      MPAC                                  
063025,001066: 26,3766           00006        POSTCOM            EXTEND                                         #  C(MPAC,+1) IS MAGNITUDE OF DELTA SCALER.
063026,001067: 26,3767           31151                           DCA      TIME2SAV                              #  PRESTANDBY TIME1 TIME2
063027,001068: 26,3770           20155                           DAS      MPAC                                  
063028,001069: 26,3771           07226                           TC       TPAGREE                               #  FORCE SIGN AGREEMENT
063029,001070: 26,3772           52155                           DXCH     MPAC                                  #  UPDATED VALUE FOR T1,T2.
063030,001071: 26,3773           20025                           DAS      TIME2                                 #  LOAD UPDATED VALUE INTO T1,T2, WITH
063031,001072: 26,3774           05560                           TC       DOWNFLAG                              #  CLEAR NODOFLAG
063032,001073: 26,3775           00054                           ADRES    NODOFLAG                              
063033,001074: 
063034,001075: 26,3776           04106                           TC       GOTOPOOH                              
063035,001076: 
063036,001077: 
063037,001078: 

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