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.

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

Page 1420

061984,000042:    5521                                           BLOCK    02                                    
061985,000043:    4000                                           SETLOC   FFTAG3                                
061986,000044:    4000                                           BANK                                           
061987,000045: 
061988,000046:    5521  E3,1471                                  EBANK=   COMMAND                               
061989,000047: 
061990,000048:                                                                                                  #  FIXED-FIXED ROUTINES.
061991,000049: 
061992,000050:    5521                                           COUNT    02/IMODE                              
061993,000051: 
061994,000052:    5521           35021        ZEROICDU           CAF      ZERO                                  #  ZERO ICDU COUNTERS.
061995,000053:    5522           54032                           TS       CDUX                                  
061996,000054:    5523           54033                           TS       CDUY                                  
061997,000055:    5524           54034                           TS       CDUZ                                  
061998,000056:    5525           00002                           TC       Q                                     
061999,000057: 
062000,000058:    5526     5007               SPSCODE            =        BIT9                                  
062001,000059: 

Page 1421

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

Page 1422

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

Page 1423

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

Page 1424

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

Page 1425

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

Page 1426

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

Page 1427

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

Page 1428

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

Page 1429

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

Page 1430

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

Page 1431

062424,000482:                                                                                                  #  ROUTINES TO ALLOW TORQUING BY ONLY ONE JOB AT A TIME.
062425,000483: 
062426,000484: 07,3252           00006        GYROBUSY           EXTEND                                         #  SAVE RETURN 2FCADR.
062427,000485: 07,3253           30134                           DCA      BUF2                                  
062428,000486: 07,3254           52155                           DXCH     MPAC                                  
062429,000487: 07,3255           33267        REGSLEEP           CAF      LGWAKE                                
062430,000488: 07,3256           15175                           TCF      JOBSLEEP                              
062431,000489: 
062432,000490: 07,3257           11304        GWAKE              CCS      LGYRO                                 #  WHEN AWAKENED, SEE IF GYROS STILL BUSY.
062433,000491: 07,3260           13255                           TCF      REGSLEEP                              #  IF SO, SLEEP SOME MORE.
062434,000492: 
062435,000493: 07,3261           54156                           TS       MPAC       +2                         
062436,000494: 07,3262           00006                           EXTEND                                         
062437,000495: 07,3263           30155                           DCA      MPAC                                  
062438,000496: 07,3264           52134                           DXCH     BUF2                                  #  RESTORE SWRETURN INFO.
062439,000497: 07,3265           35017                           CAF      ONE                                   
062440,000498: 07,3266           13217                           TCF      GWAKE2                                
062441,000499: 
062442,000500: 07,3267           17257        LGWAKE             CADR     GWAKE                                 
062443,000501: 

Page 1432

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

Page 1433

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

Page 1434

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

Page 1435

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

Page 1436

062600,000658: 07,3462           50061        AUG2               INDEX    ITEMP1                                
062601,000659: 07,3463           55400                           TS       1400                                  
062602,000660: 07,3464           35002                           CAF      BIT14                                 
062603,000661: 07,3465           26047                           ADS      GYROCMD                               
062604,000662: 07,3466           13433                           TCF      AUG3                                  #  COMPUTE DT.
062605,000663: 

Page 1437

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

Page 1438

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

Page 1439

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

Page 1440

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

Page 1441

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

Page 1442

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

Page 1443

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

Page 1444

062872,000930: 07,3667           05546        R02ZERO            TC       UPFLAG                                
062873,000931: 07,3670           00007                           ADRES    IMUSE                                 
062874,000932: 07,3671           14675                           TCF      SWRETURN                              
062875,000933: 07,3672           00220        OCT220             OCT      220                                   
062876,000934: 

Page 1445

062878,000936:                                                                                                  #  PROGRAM DESCRIPTION   P06             10FEB67
062879,000937: 
062880,000938:                                                                                                  #  TRANSFER THE ISS/CMC FROM THE OPERATE TO THE STANDBY CONDITION.
062881,000939: 
062882,000940:                                                                                                  #  THE NORMAL CONDITION OF READINESS OF THE GNCS WHEN NOT IN USE IS STANDBY.  IN THIS CONDITION THE IMU
062883,000941:                                                                                                  #  HEATER POWER IS ON.  THE IMU OPERATE POWER IS OFF.  THE COMPUTER POWER IS ON.  THE OPTICS POWER IS OFF.  THE
062884,000942:                                                                                                  #  CMC STANDBY ON THE MAIN AND LEB DISKYS IS ON.
062885,000943: 
062886,000944:                                                                                                  #  CALLING SEQUENCE:
062887,000945:                                                                                                  #        ASTRONAUT REQUEST THROUGH DSKY  V37E 06E.
062888,000946: 
062889,000947:                                                                                                  #  SUBROUTINES CALLED:
062890,000948:                                                                                                  #        GOPERF1
062891,000949:                                                                                                  #        BANKCALL
062892,000950:                                                                                                  #        FLAGDOWN
062893,000951: 

Page 1446

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

Page 1447

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

Page 1448

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

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