Source Code

These source-code files were derived from scans of the Colossus 237 (Apollo 8 Command Module) program listing from the private collection of original AGC developer Fred Martin. Scanning was by Ron Burkey. Pre-existing Colossus 249 (Apollo 9 CM) source files were used as a template, and changes between Colossus 249 and Colossus 237 were manually transcribed by a team of volunteers. Note that the page images presented online are of reduced quality, and that additional 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 237 OF AGC PROGRAM COLOSSUS 
	BY NASA 2021111-031  1:17 AUG. 24, 1968
Note that the date is the date of the printout, not the date of the program revision.

058885,000002:                                                                                                  ## Copyright:   Public domain.
058886,000003:                                                                                                  ## Filename:    IMU_MODE_SWITCHING_ROUTINES.agc
058887,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus build 237.
058888,000005:                                                                                                  ##              This is for the Command Module's (CM) Apollo Guidance
058889,000006:                                                                                                  ##              Computer (AGC), for Apollo 8.
058890,000007:                                                                                                  ## Assembler:   yaYUL
058891,000008:                                                                                                  ## Contact:     Jim Lawton <jim DOT lawton AT gmail DOT com>
058892,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
058893,000010:                                                                                                  ## Page Scans:  www.ibiblio.org/apollo/ScansForConversion/Colossus237/
058894,000011:                                                                                                  ## Mod history: 2011-04-17 JL   Adapted from corresponding Colossus 249 file.
058895,000012:                                                                                                  ##              2016-11-02 RSB  Typo (offset-reference +3 was not indented).
058896,000013:                                                                                                  ##              2017-01-01 RSB  Proofed comment text using octopus/ProoferComments,
058897,000014:                                                                                                  ##                              and fixed errors found.
058898,000015:                                                                                                  ##              2017-01-14 RSB  Fixed comment-text errors located whilst diff'ing
058899,000016:                                                                                                  ##                              against Colossus 249.
058900,000017:                                                                                                  ##              2017-03-15 RSB  Comment-text fixes identified in 6-way
058901,000018:                                                                                                  ##                              side-by-side diff of Sunburst 120 and Luminary 
058902,000019:                                                                                                  ##                              69/99/116/131/210.
058903,000020: 

Page 1384

058905,000022:    5410                                           BLOCK    02                                    
058906,000023:    4000                                           SETLOC   FFTAG3                                
058907,000024:    4000                                           BANK                                           
058908,000025: 
058909,000026:    5410  E3,1471                                  EBANK=   COMMAND                               
058910,000027: 
058911,000028:                                                                                                  #           FIXED-FIXED ROUTINES.
058912,000029: 
058913,000030:    5410                                           COUNT    02/IMODE                              
058914,000031: 
058915,000032:    5410           34714        ZEROICDU           CAF      ZERO                                  #  ZERO ICDU COUNTERS.
058916,000033:    5411           54032                           TS       CDUX                                  
058917,000034:    5412           54033                           TS       CDUY                                  
058918,000035:    5413           54034                           TS       CDUZ                                  
058919,000036:    5414           00002                           TC       Q                                     
058920,000037: 
058921,000038:    5415     4702               SPSCODE            =        BIT9                                  
058922,000039: 

Page 1385

058924,000041:                                                                                                  #  IMU ZEROING ROUTINE.
058925,000042: 
058926,000043: 11,3721                                           BANK     11                                    
058927,000044: 07,2000                                           SETLOC   MODESW                                
058928,000045: 07,2000                                           BANK                                           
058929,000046: 
058930,000047: 07,2516                                           COUNT    07/IMODE                              
058931,000048: 
058932,000049: 07,2516           00004        IMUZERO            INHINT                                         #  ROUTINE TO ZERO ICDUS.
058933,000050: 07,2517           41036                           CS       DSPTAB     +11D                       #  DONT ZERO CDUS IF IMU IN GIMBAL LOCK AND
058934,000051: 07,2520           74726                           MASK     BITS4&6                               #  COARSE ALIGN (GIMBAL RUNAWAY PROTECTION)
058935,000052: 07,2521           10000                           CCS      A                                     
058936,000053: 07,2522           12526                           TCF      IMUZEROA                              
058937,000054: 
058938,000055: 07,2523           05537                           TC       ALARM                                 #  IF SO.
058939,000056: 07,2524           00206                           OCT      00206                                 
058940,000057: 
058941,000058: 07,2525           13461                           TCF      CAGETSTJ   +4                         #  IMMEDIATE FAILURE.
058942,000059: 
058943,000060: 07,2526           03455        IMUZEROA           TC       CAGETSTJ                              
058944,000061:                                                                                                  #                                  DO ALL THE WORK.
058945,000062: 07,2527           41321                           CS       IMODES33                              #  DISABLE DAP AUTO AND HOLD MODES
058946,000063: 07,2530           74730                           MASK     SUPER011                              #      BIT5 FOR GROUND
058947,000064: 07,2531           27321                           ADS      IMODES33                              
058948,000065: 
058949,000066: 07,2532           41320                           CS       IMODES30                              #  INHIBIT ICDUFAIL AND IMUFAIL (IN CASE WE
058950,000067: 07,2533           75660                           MASK     BITS3&4                               #  JUST CAME OUT OF COARSE ALIGN).
058951,000068: 07,2534           27320                           ADS      IMODES30                              
058952,000069: 
058953,000070: 07,2535           44726                           CS       BITS4&6                               #  SEND ZERO ENCODE WITH COARSE AND ERROR
058954,000071: 07,2536           00006                           EXTEND                                         #  COUNTER DISABLED.
058955,000072: 07,2537           03012                           WAND     CHAN12                                
058956,000073: 
058957,000074: 07,2540           03070                           TC       NOATTOFF                              #  TURN OFF NO ATT LAMP.
058958,000075: 
058959,000076: 07,2541           34706                           CAF      BIT5                                  
058960,000077: 07,2542           00006                           EXTEND                                         
058961,000078: 07,2543           05012                           WOR      CHAN12                                
058962,000079: 
058963,000080: 07,2544           05410                           TC       ZEROICDU                              
058964,000081: 07,2545           34705                           CAF      BIT6                                  #  WAIT 320 MS TO GIVE AGS ADEQUATE TIME TO
058965,000082: 07,2546           05140                           TC       WAITLIST                              #  RECEIVE ITS PULSE TRAIN.
058966,000083: 07,2547  E3,1474                                  EBANK=   CDUIND                                
058967,000084: 07,2547           02561 16103                     2CADR    IMUZERO2                              
058968,000085: 
058969,000086: 07,2551           41320                           CS       IMODES30                              #  SEE IF IMU OPERATING AND ALARM IF NOT.
058970,000087: 07,2552           74702                           MASK     BIT9                                  
058971,000088: 07,2553           10000                           CCS      A                                     
058972,000089: 07,2554           12557                           TCF      MODEEXIT                              

Page 1386

058974,000091: 07,2555           05537                           TC       ALARM                                 
058975,000092: 07,2556           00210                           OCT      210                                   
058976,000093: 
058977,000094: 07,2557           00003        MODEEXIT           RELINT                                         #  GENERAL MODE-SWITCHING EXIT.
058978,000095: 07,2560           14570                           TCF      SWRETURN                              
058979,000096: 
058980,000097: 
058981,000098: 07,2561           03455        IMUZERO2           TC       CAGETSTJ                              #  POSSIBLY SWITCH TO TURN-ON PROGRAM
058982,000099: 07,2562           05410                           TC       ZEROICDU                              #  ZERO CDUX, CDUY, CDUZ
058983,000100: 
058984,000101: 07,2563           44706                           CS       BIT5                                  #  REMOVE ZERO DISCRETE.
058985,000102: 07,2564           00006                           EXTEND                                         
058986,000103: 07,2565           03012                           WAND     CHAN12                                
058987,000104: 
058988,000105: 07,2566           34700                           CAF      BIT11                                 #  WAIT 10 SECS FOR CTRS TO FIND GIMBALS
058989,000106: 07,2567           05161                           TC       VARDELAY                              
058990,000107: 
058991,000108: 07,2570           03455        IMUZERO3           TC       CAGETSTJ                              
058992,000109: 07,2571           45660                           CS       BITS3&4                               #  REMOVE IMUFAIL AND ICDUFAIL INHIBIT.
058993,000110: 07,2572           71320                           MASK     IMODES30                              
058994,000111: 07,2573           55320                           TS       IMODES30                              
058995,000112: 
058996,000113: 07,2574           44730                           CS       SUPER011                              #  ENABLE DAP AUTO AND HOLD MODES
058997,000114: 07,2575           71321                           MASK     IMODES33                              #      BIT5 FOR GROUND
058998,000115: 07,2576           55321                           TS       IMODES33                              
058999,000116: 
059000,000117: 07,2577           04633                           TC       IBNKCALL                              #  SET ISS WARNING IF EITHER OF ABOVE ARE
059001,000118: 07,2600           14665                           CADR     SETISSW                               #  PRESENT.
059002,000119: 
059003,000120: 07,2601           13433                           TCF      ENDIMU                                
059004,000121: 

Page 1387

059006,000123:                                                                                                  #           IMU COARSE ALIGN MODE.
059007,000124: 
059008,000125: 07,2602           00004        IMUCOARS           INHINT                                         
059009,000126: 07,2603           03455                           TC       CAGETSTJ                              
059010,000127: 07,2604           02746                           TC       SETCOARS                              
059011,000128: 
059012,000129: 07,2605           36211                           CAF      SIX                                   
059013,000130: 07,2606           05140                           TC       WAITLIST                              
059014,000131: 07,2607  E3,1474                                  EBANK=   CDUIND                                
059015,000132: 07,2607           02612 16103                     2CADR    COARS                                 
059016,000133: 
059017,000134: 07,2611           12557                           TCF      MODEEXIT                              
059018,000135: 
059019,000136: 07,2612           03443        COARS              TC       CAGETEST                              
059020,000137: 07,2613           34705                           CAF      BIT6                                  #  ENABLE ALL THREE ISS CDU ERROR COUNTERS
059021,000138: 07,2614           00006                           EXTEND                                         
059022,000139: 07,2615           05012                           WOR      CHAN12                                
059023,000140: 
059024,000141: 07,2616           34711                           CAF      TWO                                   #  SET CDU INDICATOR
059025,000142: 07,2617           55474        COARS1             TS       CDUIND                                
059026,000143: 
059027,000144: 07,2620           51474                           INDEX    CDUIND                                #  COMPUTE THETAD - THETAA IN 1:S
059028,000145: 07,2621           31155                           CA       THETAD                                #    COMPLEMENT FORM
059029,000146: 07,2622           00006                           EXTEND                                         
059030,000147: 07,2623           51474                           INDEX    CDUIND                                
059031,000148: 07,2624           20032                           MSU      CDUX                                  
059032,000149: 07,2625           00006                           EXTEND                                         
059033,000150: 07,2626           74676                           MP       BIT13                                 #  SHIFT RIGHT 2
059034,000151: 07,2627           56001                           XCH      L                                     #  ROUND
059035,000152: 07,2630           60000                           DOUBLE                                         
059036,000153: 07,2631           54061                           TS       ITEMP1                                
059037,000154: 07,2632           12634                           TCF      +2                                    
059038,000155: 07,2633           26001                           ADS      L                                     
059039,000156: 
059040,000157: 07,2634           51474                           INDEX    CDUIND                                #  DIFFERENCE TO BE COMPUTED
059041,000158: 07,2635           23471                           LXCH     COMMAND                               
059042,000159: 07,2636           11474                           CCS      CDUIND                                
059043,000160: 07,2637           02617                           TC       COARS1                                
059044,000161: 
059045,000162: 07,2640           34711                           CAF      TWO                                   #  MINIMUM OF 4 MS WAIT
059046,000163: 07,2641           05161                           TC       VARDELAY                              
059047,000164: 

Page 1388

059049,000166: 07,2642           03443        COARS2             TC       CAGETEST                              #  DONT CONTINUE IF CAGED.
059050,000167: 07,2643           54061                           TS       ITEMP1                                #  SETS TO +0.
059051,000168: 07,2644           34711                           CAF      TWO                                   #  SET CDU INDICATOR
059052,000169: 07,2645           55474                 +3        TS       CDUIND                                
059053,000170: 
059054,000171: 07,2646           51474                           INDEX    CDUIND                                
059055,000172: 07,2647           11471                           CCS      COMMAND                               #  NUMBER OF PULSES REQUIRED
059056,000173: 07,2650           02654                           TC       COMPOS                                #  GREATER THAN MAX ALLOWED
059057,000174: 07,2651           02663                           TC       NEXTCDU    +1                         
059058,000175: 07,2652           02721                           TC       COMNEG                                
059059,000176: 07,2653           02663                           TC       NEXTCDU    +1                         
059060,000177: 
059061,000178: 07,2654           63544        COMPOS             AD       -COMMAX                               #  COMMAX = MAX NUMBER OF PULSES ALLOWED
059062,000179: 07,2655           00006                           EXTEND                                         #    MINUS ONE
059063,000180: 07,2656           62731                           BZMF     COMZERO                               
059064,000181: 07,2657           51474                           INDEX    CDUIND                                
059065,000182: 07,2660           55471                           TS       COMMAND                               #  REDUCE COMMAND BY MAX NUMBER OF PULSES
059066,000183: 07,2661           43545                           CS       -COMMAX-                              #    ALLOWED
059067,000184: 
059068,000185: 07,2662           24061        NEXTCDU            INCR     ITEMP1                                
059069,000186: 07,2663           64713                           AD       NEG0                                  
059070,000187: 07,2664           51474                           INDEX    CDUIND                                
059071,000188: 07,2665           54050                           TS       CDUXCMD                               #  SET UP COMMAND REGISTER.
059072,000189: 
059073,000190: 07,2666           11474                           CCS      CDUIND                                
059074,000191: 07,2667           02645                           TC       COARS2     +3                         
059075,000192: 
059076,000193: 07,2670           10061                           CCS      ITEMP1                                #  SEE IF ANY PULSES TO GO OUT.
059077,000194: 07,2671           12735                           TCF      SENDPULS                              
059078,000195: 
059079,000196: 07,2672           05156                           TC       FIXDELAY                              #  WAIT FOR GIMBALS TO SETTLE.
059080,000197: 07,2673           00226                           DEC      150        B-14                       
059081,000198: 
059082,000199: 
059083,000200: 07,2674           34711                           CAF      TWO                                   #  AT END OF COMMAND, CHECK TO SEE THAT
059084,000201: 07,2675           54061        CHKCORS            TS       ITEMP1                                #  GIMBALS ARE WITHIN 2 DEGREES OF THETAD.
059085,000202: 07,2676           50000                           INDEX    A                                     
059086,000203: 07,2677           30032                           CA       CDUX                                  
059087,000204: 07,2700           00006                           EXTEND                                         
059088,000205: 07,2701           50061                           INDEX    ITEMP1                                
059089,000206: 07,2702           21155                           MSU      THETAD                                
059090,000207: 07,2703           10000                           CCS      A                                     
059091,000208: 07,2704           12712                           TCF      COARSERR                              
059092,000209: 07,2705           12707                           TCF      CORSCHK2                              
059093,000210: 07,2706           12712                           TCF      COARSERR                              
059094,000211: 

Page 1389

059096,000213: 07,2707           10061        CORSCHK2           CCS      ITEMP1                                
059097,000214: 07,2710           12675                           TCF      CHKCORS                               
059098,000215: 07,2711           13433                           TCF      ENDIMU                                #  END OF COARSE ALIGNMENT.
059099,000216: 
059100,000217: 07,2712           62720        COARSERR           AD       COARSTOL                              #  2 DEGREES.
059101,000218: 07,2713           00006                           EXTEND                                         
059102,000219: 07,2714           62707                           BZMF     CORSCHK2                              
059103,000220: 
059104,000221: 07,2715           05537                           TC       ALARM                                 #  COARSE ALIGN ERROR.
059105,000222: 07,2716           00211                           OCT      211                                   
059106,000223: 
059107,000224: 07,2717           13441                           TCF      IMUBAD                                
059108,000225: 
059109,000226: 07,2720           77511        COARSTOL           DEC      -.01111                               #  2 DEGREES SCALED AT HALF-REVOLUTIONS
059110,000227: 
059111,000228: 
059112,000229: 07,2721           63544        COMNEG             AD       -COMMAX                               
059113,000230: 07,2722           00006                           EXTEND                                         
059114,000231: 07,2723           62731                           BZMF     COMZERO                               
059115,000232: 07,2724           40000                           COM                                            
059116,000233: 07,2725           51474                           INDEX    CDUIND                                
059117,000234: 07,2726           55471                           TS       COMMAND                               
059118,000235: 07,2727           33545                           CA       -COMMAX-                              
059119,000236: 07,2730           02662                           TC       NEXTCDU                               
059120,000237: 
059121,000238: 07,2731           34714        COMZERO            CAF      ZERO                                  
059122,000239: 07,2732           51474                           INDEX    CDUIND                                
059123,000240: 07,2733           57471                           XCH      COMMAND                               
059124,000241: 07,2734           02662                           TC       NEXTCDU                               
059125,000242: 
059126,000243: 07,2735           37707        SENDPULS           CAF      13,14,15                              
059127,000244: 07,2736           00006                           EXTEND                                         
059128,000245: 07,2737           05014                           WOR      CHAN14                                
059129,000246: 07,2740           33546                           CAF      600MS                                 
059130,000247: 07,2741           12641                           TCF      COARS2     -1                         #  THEN TO VARDELAY
059131,000248: 
059132,000249: 07,2742           34705        CA+ECE             CAF      BIT6                                  #  ENABLE ALL THREE ISS CDU ERROR COUNTERS
059133,000250: 07,2743           00006                           EXTEND                                         
059134,000251: 07,2744           05012                           WOR      CHAN12                                
059135,000252: 07,2745           05213                           TC       TASKOVER                              
059136,000253: 

Page 1390

059138,000255: 07,2746           34707        SETCOARS           CAF      BIT4                                  #  BYPASS IF ALREADY IN COARSE ALIGN
059139,000256: 07,2747           00006                           EXTEND                                         
059140,000257: 07,2750           02012                           RAND     CHAN12                                
059141,000258: 07,2751           10000                           CCS      A                                     
059142,000259: 07,2752           00002                           TC       Q                                     
059143,000260: 
059144,000261: 07,2753           44705                           CS       BIT6                                  #  CLEAR ISS ERROR COUNTERS
059145,000262: 07,2754           00006                           EXTEND                                         
059146,000263: 07,2755           03012                           WAND     CHAN12                                
059147,000264: 
059148,000265: 07,2756           44701                           CS       BIT10                                 #  KNOCK DOWN GYRO ACTIVITY
059149,000266: 07,2757           00006                           EXTEND                                         
059150,000267: 07,2760           03014                           WAND     CHAN14                                
059151,000268: 07,2761           44714                           CS       ZERO                                  
059152,000269: 07,2762           54047                           TS       GYROCMD                               
059153,000270: 
059154,000271: 07,2763           34707                           CAF      BIT4                                  #  PUT ISS IN COARSE ALIGN
059155,000272: 07,2764           00006                           EXTEND                                         
059156,000273: 07,2765           05012                           WOR      CHAN12                                
059157,000274: 
059158,000275: 07,2766           41036                           CS       DSPTAB     +11D                       #  TURN ON NO ATT LAMP
059159,000276: 07,2767           73011                           MASK     OCT40010                              
059160,000277: 07,2770           27036                           ADS      DSPTAB     +11D                       
059161,000278: 
059162,000279: 07,2771           41321                           CS       IMODES33                              #  DISABLE DAP AUTO AND HOLD MODES
059163,000280: 07,2772           74705                           MASK     BIT6                                  
059164,000281: 07,2773           27321                           ADS      IMODES33                              
059165,000282: 
059166,000283: 07,2774           41320                           CS       IMODES30                              #  DISABLE IMUFAIL
059167,000284: 07,2775           74707                           MASK     BIT4                                  
059168,000285: 07,2776           27320                           ADS      IMODES30                              
059169,000286: 
059170,000287: 07,2777           44706        RNDREFDR           CS       BIT5                                  #  KNOCK DOWN TRACK FLAG
059171,000288: 07,3000           70075                           MASK     FLAGWRD1                              
059172,000289: 07,3001           54075                           TS       FLAGWRD1                              
059173,000290: 
059174,000291: 07,3002           44674                           CS       BIT15                                 #  KNOCK DOWN DRIFT FLAG
059175,000292: 07,3003           70076                           MASK     FLAGWRD2                              
059176,000293: 07,3004           54076                           TS       FLAGWRD2                              
059177,000294: 
059178,000295: 07,3005           44676                           CS       BIT13                                 #  KNOCK DOWN REFSMMAT FLAG
059179,000296: 07,3006           70077                           MASK     FLAGWRD3                              
059180,000297: 07,3007           54077                           TS       FLAGWRD3                              
059181,000298: 
059182,000299: 07,3010           00002                           TC       Q                                     
059183,000300: 
059184,000301: 07,3011           40010        OCT40010           OCT      40010                                 
059185,000302: 

Page 1391

059187,000304:                                                                                                  #           IMU FINE ALIGN MODE SWITCH.
059188,000305: 
059189,000306: 07,3012           00004        IMUFINE            INHINT                                         
059190,000307: 07,3013           03455                           TC       CAGETSTJ                              #  SEE IF IMU BEING CAGED.
059191,000308: 
059192,000309: 07,3014           43543                           CS       BITS4-5                               #  RESET ZERO AND COARSE
059193,000310: 07,3015           00006                           EXTEND                                         
059194,000311: 07,3016           03012                           WAND     CHAN12                                
059195,000312: 
059196,000313: 07,3017           44705                           CS       BIT6                                  #  INSURE DAP AUTO AND HOLD MODES ENABLED
059197,000314: 07,3020           71321                           MASK     IMODES33                              
059198,000315: 07,3021           55321                           TS       IMODES33                              
059199,000316: 
059200,000317: 07,3022           03070                           TC       NOATTOFF                              
059201,000318: 
059202,000319: 07,3023           34701                           CAF      BIT10                                 #  IMU FAIL WAS INHIBITED DURING THE
059203,000320: 07,3024           05140                           TC       WAITLIST                              #  PRESUMABLY PRECEDING COARSE ALIGN. LEAVE
059204,000321: 07,3025  E3,1474                                  EBANK=   CDUIND                                
059205,000322: 07,3025           03036 16103                     2CADR    IFAILOK                               #  IT ON FOR THE FIRST 5 SECS OF FINE ALIGN
059206,000323: 
059207,000324: 07,3027           34735                           CAF      2SECS                                 
059208,000325: 07,3030           05140                           TC       WAITLIST                              
059209,000326: 07,3031  E3,1474                                  EBANK=   CDUIND                                
059210,000327: 07,3031           03034 16103                     2CADR    IMUFINED                              
059211,000328: 
059212,000329: 07,3033           12557                           TCF      MODEEXIT                              
059213,000330: 
059214,000331: 07,3034           03443        IMUFINED           TC       CAGETEST                              #  SEE THAT NO ONE HAS CAGED THE IMU.
059215,000332: 07,3035           13433                           TCF      ENDIMU                                
059216,000333: 

Page 1392

059218,000335: 07,3036           03450        IFAILOK            TC       CAGETSTQ                              #  ENABLE IMU FIAL UNLESS IMU BEING CAGED.
059219,000336: 07,3037           15213                           TCF      TASKOVER                              #  IT IS.
059220,000337: 
059221,000338: 07,3040           34707                           CAF      BIT4                                  #  DONT RESET IMU FAIL INHIBIT IF SOMEONE
059222,000339: 07,3041           00006                           EXTEND                                         #  HAS GONE INTO COARSE ALIGN.
059223,000340: 07,3042           02012                           RAND     CHAN12                                
059224,000341: 07,3043           10000                           CCS      A                                     
059225,000342: 07,3044           15213                           TCF      TASKOVER                              
059226,000343: 
059227,000344: 07,3045           41320                           CS       IMODES30                              #  RESET IMUFAIL.
059228,000345: 07,3046           74676                           MASK     BIT13                                 
059229,000346: 07,3047           27320                           ADS      IMODES30                              
059230,000347: 07,3050           44707                           CS       BIT4                                  
059231,000348: 07,3051           71320        PFAILOK2           MASK     IMODES30                              
059232,000349: 07,3052           55320                           TS       IMODES30                              
059233,000350: 07,3053           04633                           TC       IBNKCALL                              #  THE ISS WARNING LIGHT MAY COME ON NOW
059234,000351: 07,3054           14665                           CADR     SETISSW                               #  THAT THE INHIBIT HAS BEEN REMOVED.
059235,000352: 07,3055           15213                           TCF      TASKOVER                              
059236,000353: 
059237,000354: 07,3056           03450        PFAILOK            TC       CAGETSTQ                              #  ENABLE PIP FAIL PROG ALARM.
059238,000355: 07,3057           15213                           TCF      TASKOVER                              
059239,000356: 
059240,000357: 07,3060           41320                           CS       IMODES30                              #  RESET IMU AND PIPA FAIL BITS.
059241,000358: 07,3061           74701                           MASK     BIT10                                 
059242,000359: 07,3062           27320                           ADS      IMODES30                              
059243,000360: 
059244,000361: 07,3063           41321                           CS       IMODES33                              
059245,000362: 07,3064           74676                           MASK     BIT13                                 
059246,000363: 07,3065           27321                           ADS      IMODES33                              
059247,000364: 
059248,000365: 07,3066           44706                           CS       BIT5                                  
059249,000366: 07,3067           13051                           TCF      PFAILOK2                              
059250,000367: 
059251,000368: 07,3070           43011        NOATTOFF           CS       OCT40010                              #  SUBROUTINE TO TURN OFF NO ATT LAMP.
059252,000369: 07,3071           71036                           MASK     DSPTAB     +11D                       
059253,000370: 07,3072           64674                           AD       BIT15                                 
059254,000371: 07,3073           55036                           TS       DSPTAB     +11D                       
059255,000372: 07,3074           00002                           TC       Q                                     
059256,000373: 

Page 1393

059258,000375:                                                                                                  #           ROUITNES TO INITIATE AND TERMINATE PROGRAM USE OF THE PIPAS. NO IMUSTALL REQUIRED IN EITHER CASE.
059259,000376: 
059260,000377: 07,3075           44714        PIPUSE             CS       ZERO                                  
059261,000378: 07,3076           54037                           TS       PIPAX                                 
059262,000379: 07,3077           54040                           TS       PIPAY                                 
059263,000380: 07,3100           54041                           TS       PIPAZ                                 
059264,000381: 
059265,000382: 07,3101           03450        PIPUSE1            TC       CAGETSTQ                              #  DO NOT ENABLE PIPA FAIL IF IMU IS CAGED
059266,000383: 07,3102           14570                           TCF      SWRETURN                              
059267,000384: 
059268,000385: 07,3103           00004                           INHINT                                         
059269,000386: 07,3104           44712                           CS       BIT1                                  #  IF PIPA FAILS FROM NOW ON (UNTIL
059270,000387: 07,3105           71320                           MASK     IMODES30                              #  PIPFREE), LIGHT ISS WARNING.
059271,000388: 07,3106           55320                           TS       IMODES30                              
059272,000389: 
059273,000390: 07,3107           04633        PIPFREE2           TC       IBNKCALL                              #  ISS WARNING MIGHT COME ON NOW.
059274,000391: 07,3110           14665                           CADR     SETISSW                               #  (OR GO OFF ON PIPFREE).
059275,000392: 
059276,000393: 07,3111           12557                           TCF      MODEEXIT                              
059277,000394: 
059278,000395: 07,3112           00004        PIPFREE            INHINT                                         #  PROGRAM DONE WITH PIPAS.  DONT LIGHT
059279,000396: 07,3113           41320                           CS       IMODES30                              #  ISS WARNING.
059280,000397: 07,3114           74712                           MASK     BIT1                                  
059281,000398: 07,3115           27320                           ADS      IMODES30                              
059282,000399: 
059283,000400: 07,3116           74701                           MASK     BIT10                                 #  IF PIP FAIL ON, DO PROG ALSRM AND RESET
059284,000401: 07,3117           10000                           CCS      A                                     #  ISS WARNING.
059285,000402: 07,3120           12557                           TCF      MODEEXIT                              
059286,000403: 
059287,000404: 07,3121           05537                           TC       ALARM                                 
059288,000405: 07,3122           00212                           OCT      212                                   
059289,000406: 
059290,000407: 07,3123           00004                           INHINT                                         
059291,000408: 
059292,000409: 07,3124           13107                           TCF      PIPFREE2                              
059293,000410: 

Page 1394

059295,000412:                                                                                                  #           THE FOLLOWING ROUTINE TORQUES THE IRIGS ACCORDING TO DOUBLE PRECISION INPUTS IN THE SIX REGISTERS
059296,000413:                                                                                                  #  BEGINNING AT THE ECADR ARRIVING IN A. THE MINIMUM SIZE OF ANY PULSE TRAIN IS 16 PULSES (.25 CDU COUNTS). THE
059297,000414:                                                                                                  #  UNSENT PORTION OF THE COMMAND IS LEFT INTACT IN THE INPUT COMMAND REGISTERS.
059298,000415: 
059299,000416: 07,3125  E3,1400                                  EBANK=   1400                                  #  VARIABLE, ACTUALLY.
059300,000417: 
059301,000418: 07,3125           54161        IMUPULSE           TS       MPAC       +5                         #  SAVE ARRIVING ECADR.
059302,000419: 07,3126           03455                           TC       CAGETSTJ                              #  DONT PROCEED IF IMU BEING CAGED.
059303,000420: 
059304,000421: 07,3127           11304                           CCS      LGYRO                                 #  SEE IF GYROS BUSY.
059305,000422: 07,3130           03171                           TC       GYROBUSY                              #  SLEEP.
059306,000423: 
059307,000424: 07,3131           54156                           TS       MPAC       +2                         
059308,000425: 07,3132           34705                           CAF      BIT6                                  #  ENABLE THE POWER SUPPLY.
059309,000426: 07,3133           00006                           EXTEND                                         
059310,000427: 07,3134           05014                           WOR      CHAN14                                
059311,000428: 
059312,000429: 07,3135           34710                           CAF      FOUR                                  
059313,000430: 07,3136           05140        GWAKE2             TC       WAITLIST                              #  (IF A JOB WAS PUT TO SLEEP, THE POWER
059314,000431: 07,3137  E3,1474                                  EBANK=   CDUIND                                #  SUPPLY IS LEFT ON BY THE WAKING JOB).
059315,000432: 07,3137           03207 16103                     2CADR    STRTGYRO                              
059316,000433: 
059317,000434: 07,3141           30161                           CA       MPAC       +5                         #  SET UP EBANK, SAVING CALLER'S EBANK FOR
059318,000435: 07,3142           56003                           XCH      EBANK                                 #  RESTORATION ON RETURN.
059319,000436: 07,3143           56161                           XCH      MPAC       +5                         
059320,000437: 07,3144           55304                           TS       LGYRO                                 #  RESERVES GYROS.
059321,000438: 07,3145           74373                           MASK     LOW8                                  
059322,000439: 07,3146           54061                           TS       ITEMP1                                
059323,000440: 
059324,000441: 07,3147           34711                           CAF      TWO                                   #  FORCE SIGN AGREEMENT ON INPUTS.
059325,000442: 07,3150           54157        GYROAGRE           TS       MPAC       +3                         
059326,000443: 07,3151           60000                           DOUBLE                                         
059327,000444: 07,3152           60061                           AD       ITEMP1                                
059328,000445: 07,3153           54160                           TS       MPAC       +4                         
059329,000446: 07,3154           00006                           EXTEND                                         
059330,000447: 07,3155           50000                           INDEX    A                                     
059331,000448: 07,3156           31401                           DCA      1400                                  
059332,000449: 07,3157           52155                           DXCH     MPAC                                  
059333,000450: 07,3160           07226                           TC       TPAGREE                               
059334,000451: 07,3161           52155                           DXCH     MPAC                                  
059335,000452: 07,3162           50160                           INDEX    MPAC       +4                         
059336,000453: 07,3163           53401                           DXCH     1400                                  
059337,000454: 
059338,000455: 07,3164           10157                           CCS      MPAC       +3                         
059339,000456: 07,3165           13150                           TCF      GYROAGRE                              
059340,000457: 
059341,000458: 07,3166           30161                           CA       MPAC       +5                         #  RESTORE CALLER'S EBANK.
059342,000459: 07,3167           54003                           TS       EBANK                                 
059343,000460: 07,3170           12557                           TCF      MODEEXIT                              

Page 1395

059345,000462:                                                                                                  #           ROUTINES TO ALLOW TORQUING BY ONLY ONE JOB AT A TIME.
059346,000463: 
059347,000464: 07,3171           00006        GYROBUSY           EXTEND                                         #  SAVE RETURN 2FCADR.
059348,000465: 07,3172           30134                           DCA      BUF2                                  
059349,000466: 07,3173           52155                           DXCH     MPAC                                  
059350,000467: 07,3174           33206        REGSLEEP           CAF      LGWAKE                                
059351,000468: 07,3175           15070                           TCF      JOBSLEEP                              
059352,000469: 
059353,000470: 07,3176           11304        GWAKE              CCS      LGYRO                                 #  WHEN AWAKENED, SEE IF GYROS STILL BUSY.
059354,000471: 07,3177           13174                           TCF      REGSLEEP                              #  IF SO, SLEEP SOME MORE.
059355,000472: 
059356,000473: 07,3200           54156                           TS       MPAC       +2                         
059357,000474: 07,3201           00006                           EXTEND                                         
059358,000475: 07,3202           30155                           DCA      MPAC                                  
059359,000476: 07,3203           52134                           DXCH     BUF2                                  #  RESTORE SWRETURN INFO.
059360,000477: 07,3204           34712                           CAF      ONE                                   
059361,000478: 07,3205           13136                           TCF      GWAKE2                                
059362,000479: 
059363,000480: 07,3206           17176        LGWAKE             CADR     GWAKE                                 
059364,000481: 

Page 1396

059366,000483:                                                                                                  #           GYRO-TORQUING WAITLIST TASKS.
059367,000484: 
059368,000485: 07,3207           43430        STRTGYRO           CS       GDESELCT                              #  DE-SELECT LAST GYRO.
059369,000486: 07,3210           00006                           EXTEND                                         
059370,000487: 07,3211           03014                           WAND     CHAN14                                
059371,000488: 
059372,000489: 07,3212           03443                           TC       CAGETEST                              
059373,000490: 
059374,000491: 07,3213           31304        STRTGYR2           CA       LGYRO                                 #  JUMP ON PHASE COUNTER IN BITS 13-14.
059375,000492: 07,3214           00006                           EXTEND                                         
059376,000493: 07,3215           74707                           MP       BIT4                                  
059377,000494: 07,3216           50000                           INDEX    A                                     
059378,000495: 07,3217           13220                           TCF      +1                                    
059379,000496: 07,3220           03235                           TC       GSELECT                               #  =0. DO Y GYRO.
059380,000497: 07,3221           00202                           OCT      00202                                 
059381,000498: 
059382,000499: 07,3222           03235                           TC       GSELECT                               #  =1. DO Z GYRO.
059383,000500: 07,3223           00302                           OCT      00302                                 
059384,000501: 
059385,000502: 07,3224           03233                           TC       GSELECT    -2                         #  =2. DO X GYRO.
059386,000503: 07,3225           00100                           OCT      00100                                 
059387,000504: 
059388,000505: 07,3226           34714                           CAF      ZERO                                  #  =3. DONE
059389,000506: 07,3227           55304                           TS       LGYRO                                 
059390,000507: 07,3230           33206                           CAF      LGWAKE                                #  WAKE A POSSIBLE SLEEPING JOB.
059391,000508: 07,3231           05074                           TC       JOBWAKE                               
059392,000509: 
059393,000510: 07,3232           13034        NORESET            TCF      IMUFINED                              #  DO NOT RESET POWER SUPPLY
059394,000511: 

Page 1397

059396,000513: 07,3233           44710                 -2        CS       FOUR                                  #  SPECIAL ENTRY TO REGRESS LGYRO FOR X.
059397,000514: 07,3234           27304                           ADS      LGYRO                                 
059398,000515: 
059399,000516: 07,3235           50002        GSELECT            INDEX    Q                                     #  SELECT GYRO.
059400,000517: 07,3236           30000                           CAF      0                                     #  PACKED WORD CONTAINS GYRO SELECT BITS
059401,000518: 07,3237           54064                           TS       ITEMP4                                #  AND INCREMENT TO LGYRO.
059402,000519: 07,3240           74716                           MASK     SEVEN                                 
059403,000520: 07,3241           64676                           AD       BIT13                                 
059404,000521: 07,3242           27304                           ADS      LGYRO                                 
059405,000522: 07,3243           54003                           TS       EBANK                                 
059406,000523: 07,3244           74373                           MASK     LOW8                                  
059407,000524: 07,3245           54061                           TS       ITEMP1                                
059408,000525: 
059409,000526: 07,3246           44716                           CS       SEVEN                                 
059410,000527: 07,3247           70064                           MASK     ITEMP4                                
059411,000528: 07,3250           54064                           TS       ITEMP4                                
059412,000529: 
059413,000530: 07,3251           00006                           EXTEND                                         #  MOVE DP COMMAND TO RUPTREGS FOR TESTING.
059414,000531: 07,3252           50061                           INDEX    ITEMP1                                
059415,000532: 07,3253           31401                           DCA      1400                                  
059416,000533: 07,3254           52071                           DXCH     RUPTREG1                              
059417,000534: 
059418,000535: 07,3255           10070                           CCS      RUPTREG1                              
059419,000536: 07,3256           13271                           TCF      MAJ+                                  
059420,000537: 07,3257           13261                           TCF      +2                                    
059421,000538: 07,3260           13411                           TCF      MAJ-                                  
059422,000539: 
059423,000540: 07,3261           10071                           CCS      RUPTREG2                              
059424,000541: 07,3262           13266                           TCF      MIN+                                  
059425,000542: 07,3263           13213                           TCF      STRTGYR2                              
059426,000543: 07,3264           13406                           TCF      MIN-                                  
059427,000544: 07,3265           13213                           TCF      STRTGYR2                              
059428,000545: 

Page 1398

059430,000547: 07,3266           63322        MIN+               AD       -GYROMIN                              #  SMALL POSITIVE COMMAND. SEE IF AT LEAST
059431,000548: 07,3267           00006                           EXTEND                                         #  16 GYRO PULSES.
059432,000549: 07,3270           63213                           BZMF     STRTGYR2                              
059433,000550: 
059434,000551: 07,3271           00006        MAJ+               EXTEND                                         #  DEFINITE POSITIVE OUTPUT.
059435,000552: 07,3272           33432                           DCA      GYROFRAC                              
059436,000553: 07,3273           20071                           DAS      RUPTREG1                              
059437,000554: 
059438,000555: 07,3274           30064                           CA       ITEMP4                                #  SELECT POSITIVE TORQUING FOR THIS GYRO.
059439,000556: 07,3275           00006                           EXTEND                                         
059440,000557: 07,3276           05014                           WOR      CHAN14                                
059441,000558: 
059442,000559: 07,3277           36043                           CAF      LOW7                                  #  LEAVE NUMBER OF POSSIBLE 8192 AUGMENTS
059443,000560: 07,3300           70071                           MASK     RUPTREG2                              #  TO INITIAL COMMAND IN MAJOR PART OF LONG
059444,000561: 07,3301           56071                           XCH      RUPTREG2                              #  TERM STORAGE AND TRUNCATED FRACTION
059445,000562: 07,3302           00006        GMERGE             EXTEND                                         #  IN MINOR PART. THE MAJOR PART WILL BE
059446,000563: 07,3303           74703                           MP       BIT8                                  #  COUNTED DOWN TO ZERO IN THE COURSE OF
059447,000564: 07,3304           54062                           TS       ITEMP2                                #  PUTTING OUT THE ENTIRE COMMAND.
059448,000565: 07,3305           30070                           CA       RUPTREG1                              
059449,000566: 07,3306           00006                           EXTEND                                         
059450,000567: 07,3307           74702                           MP       BIT9                                  
059451,000568: 07,3310           54070                           TS       RUPTREG1                              
059452,000569: 07,3311           30001                           CA       L                                     
059453,000570: 07,3312           00006                           EXTEND                                         
059454,000571: 07,3313           74675                           MP       BIT14                                 
059455,000572: 07,3314           26062                           ADS      ITEMP2                                #  INITIAL COMMAND.
059456,000573: 
059457,000574: 07,3315           00006                           EXTEND                                         #  SEE IF MORE THAN ONE PULSE TRAIN NEEDED
059458,000575: 07,3316           30071                           DCA      RUPTREG1                              #  (MORE THAN 16383 PULSES).
059459,000576: 07,3317           67716                           AD       MINUS1                                
059460,000577: 07,3320           10000                           CCS      A                                     
059461,000578: 07,3321           13345                           TCF      LONGGYRO                              
059462,000579: 07,3322           77601        -GYROMIN           OCT      -176                                  #  MAY BE ADJUSTED TO SPECIFY MINIMUM CMD
059463,000580: 07,3323           13327                           TCF      +4                                    
059464,000581: 
059465,000582: 07,3324           34675                           CAF      BIT14                                 
059466,000583: 07,3325           26062                           ADS      ITEMP2                                
059467,000584: 07,3326           34714                           CAF      ZERO                                  
059468,000585: 
059469,000586: 07,3327           50061                 +4        INDEX    ITEMP1                                
059470,000587: 07,3330           53401                           DXCH     1400                                  
059471,000588: 

Page 1399

059473,000590: 07,3331           30062                           CA       ITEMP2                                #  ENTIRE COMMAND.
059474,000591: 07,3332           54047        LASTSEG            TS       GYROCMD                               
059475,000592: 07,3333           00006                           EXTEND                                         
059476,000593: 07,3334           74701                           MP       BIT10                                 #  WAITLIST DT
059477,000594: 07,3335           66214                           AD       THREE                                 #  TRUNCATION AND PHASE UNCERTAINTIES.
059478,000595: 07,3336           05140                           TC       WAITLIST                              
059479,000596: 07,3337  E3,1474                                  EBANK=   CDUIND                                
059480,000597: 07,3337           03207 16103                     2CADR    STRTGYRO                              
059481,000598: 
059482,000599: 07,3341           34701        GYROEXIT           CAF      BIT10                                 
059483,000600: 07,3342           00006                           EXTEND                                         
059484,000601: 07,3343           05014                           WOR      CHAN14                                
059485,000602: 07,3344           15213                           TCF      TASKOVER                              
059486,000603: 
059487,000604: 07,3345           50061        LONGGYRO           INDEX    ITEMP1                                
059488,000605: 07,3346           53401                           DXCH     1400                                  #  INITIAL COMMAND OUT PLUS N AUGMENTS OF
059489,000606: 07,3347           34675                           CAF      BIT14                                 #  8192. INITIAL COMMAND IS AT LEAST 8192.
059490,000607: 07,3350           60062                           AD       ITEMP2                                
059491,000608: 07,3351           54047                           TS       GYROCMD                               
059492,000609: 
059493,000610: 07,3352           00006        AUG3               EXTEND                                         #  GET WAITLIST DT TO TIME WHEN TRAIN IS
059494,000611: 07,3353           74701                           MP       BIT10                                 #  ALMOST OUT.
059495,000612: 07,3354           67714                           AD       NEG3                                  
059496,000613: 07,3355           05140                           TC       WAITLIST                              
059497,000614: 07,3356  E3,1474                                  EBANK=   CDUIND                                
059498,000615: 07,3356           03361 16103                     2CADR    8192AUG                               
059499,000616: 07,3360           13341                           TCF      GYROEXIT                              
059500,000617: 
059501,000618: 07,3361           03443        8192AUG            TC       CAGETEST                              
059502,000619: 
059503,000620: 07,3362           34707                           CAF      BIT4                                  
059504,000621: 07,3363           00006                           EXTEND                                         
059505,000622: 07,3364           02012                           RAND     CHAN12                                
059506,000623: 07,3365           10000                           CCS      A                                     
059507,000624: 07,3366           13441                           TCF      IMUBAD                                
059508,000625: 07,3367           31304                           CA       LGYRO                                 #  ADD 8192 PULSES TO GYROCMD
059509,000626: 07,3370           54003                           TS       EBANK                                 
059510,000627: 07,3371           74373                           MASK     LOW8                                  
059511,000628: 07,3372           54061                           TS       ITEMP1                                
059512,000629: 
059513,000630: 07,3373           50061                           INDEX    ITEMP1                                #  SEE IF THIS IS THE LAST AUG.
059514,000631: 07,3374           11400                           CCS      1400                                  
059515,000632: 07,3375           13401                           TCF      AUG2                                  #  MORE TO COME.
059516,000633: 
059517,000634: 07,3376           34675                           CAF      BIT14                                 
059518,000635: 07,3377           26047                           ADS      GYROCMD                               
059519,000636: 07,3400           13333                           TCF      LASTSEG    +1                         
059520,000637: 

Page 1400

059522,000639: 07,3401           50061        AUG2               INDEX    ITEMP1                                
059523,000640: 07,3402           55400                           TS       1400                                  
059524,000641: 07,3403           34675                           CAF      BIT14                                 
059525,000642: 07,3404           26047                           ADS      GYROCMD                               
059526,000643: 07,3405           13352                           TCF      AUG3                                  #  COMPUTE DT.
059527,000644: 

Page 1401

059529,000646: 07,3406           63322        MIN-               AD       -GYROMIN                              #  POSSIBLE NEGATIVE OUTPUT.
059530,000647: 07,3407           00006                           EXTEND                                         
059531,000648: 07,3410           63213                           BZMF     STRTGYR2                              
059532,000649: 
059533,000650: 07,3411           00006        MAJ-               EXTEND                                         #  DEFINITE NEGATIVE OUTPUT.
059534,000651: 07,3412           43432                           DCS      GYROFRAC                              
059535,000652: 07,3413           20071                           DAS      RUPTREG1                              
059536,000653: 
059537,000654: 07,3414           30064                           CA       ITEMP4                                #  SELECT NEGATIVE TORQUING FOR THIS GYRO.
059538,000655: 07,3415           64702                           AD       BIT9                                  
059539,000656: 07,3416           00006                           EXTEND                                         
059540,000657: 07,3417           05014                           WOR      CHAN14                                
059541,000658: 
059542,000659: 07,3420           40070                           CS       RUPTREG1                              #  SET UP RUPTREGS TO FALL INTO GMERGE.
059543,000660: 07,3421           54070                           TS       RUPTREG1                              #  ALL NUMBERS PUT INTO GYROCMD ARE
059544,000661: 07,3422           40071                           CS       RUPTREG2                              #  POSITIVE - BIT9 OF CHAN 14 DETERMINES
059545,000662: 07,3423           76043                           MASK     LOW7                                  #  THE SIGN OF THE COMMAND.
059546,000663: 07,3424           40000                           COM                                            
059547,000664: 07,3425           56071                           XCH      RUPTREG2                              
059548,000665: 07,3426           40000                           COM                                            
059549,000666: 07,3427           13302                           TCF      GMERGE                                
059550,000667: 
059551,000668: 07,3430           01700        GDESELCT           OCT      1700                                  #  TURN OFF SELECT AND ACTIVITY BITS.
059552,000669: 
059553,000670: 07,3431           00000 00034  GYROFRAC           2DEC     .215       B          -21             
059554,000671: 

Page 1402

059556,000673:                                                                                                  #           IMU MODE SWITCHING ROUTINES COME HERE WHEN ACTION COMPLETE.
059557,000674: 
059558,000675: 07,3433           00006        ENDIMU             EXTEND                                         #  MODE IS BAD IF CAGE HAS OCCURED OR IF
059559,000676: 07,3434           00011                           READ     DSALMOUT                              #  ISS WARNING IS ON.
059560,000677: 07,3435           74712                           MASK     BIT1                                  
059561,000678: 07,3436           10000                           CCS      A                                     
059562,000679: 07,3437           13441                           TCF      IMUBAD                                
059563,000680: 
059564,000681: 07,3440           13467        IMUGOOD            TCF      GOODEND                               #  WITH C(A) = 0.
059565,000682: 
059566,000683: 07,3441           34714        IMUBAD             CAF      ZERO                                  
059567,000684: 07,3442           13464                           TCF      BADEND                                
059568,000685: 
059569,000686: 07,3443           34705        CAGETEST           CAF      BIT6                                  #  SUBROUTINE TO TERMINATE IMU MODE
059570,000687: 07,3444           71320                           MASK     IMODES30                              #  SWITCH IF IMU HAS BEEN CAGED.
059571,000688: 07,3445           10000                           CCS      A                                     
059572,000689: 07,3446           13441                           TCF      IMUBAD                                #  DIRECTLY.
059573,000690: 07,3447           00002                           TC       Q                                     #  WITH C(A) = +0.
059574,000691: 
059575,000692: 07,3450           41320        CAGETSTQ           CS       IMODES30                              #  SKIP IF IMU NOT BEING CAGED.
059576,000693: 07,3451           74705                           MASK     BIT6                                  
059577,000694: 07,3452           10000                           CCS      A                                     
059578,000695: 07,3453           24002                           INCR     Q                                     
059579,000696: 07,3454           00002                           TC       Q                                     
059580,000697: 
059581,000698: 07,3455           41320        CAGETSTJ           CS       IMODES30                              #  IF DURING MODE SWITCH INITIALIZATION
059582,000699: 07,3456           74705                           MASK     BIT6                                  #  IT IS FOUND THAT THE IMU IS BEING CAGED,
059583,000700: 07,3457           10000                           CCS      A                                     #  SET IMUCADR TO -0 TO INDICATE OPERATION
059584,000701: 07,3460           00002                           TC       Q                                     #  COMPLETE BUT FAILED. RETURN IMMEDIATELY
059585,000702: 
059586,000703: 07,3461           44714                           CS       ZERO                                  #  TO SWRETURN.
059587,000704: 07,3462           55322                           TS       IMUCADR                               
059588,000705: 07,3463           12557                           TCF      MODEEXIT                              
059589,000706: 

Page 1403

059591,000708:                                                                                                  #           GENERALIZED MODE SWITCHING TERMINATION. ENTER AT GOODEND FOR SUCCESSFUL COMPLETION OF AN I/O OPERATION
059592,000709:                                                                                                  #  OR AT BADEND FOR AN UNSUCCESSFUL ONE. C(A) OR ARRIVAL =0 FOR IMU, 1 FOR OPTICS.
059593,000710: 
059594,000711: 07,3464           54071        BADEND             TS       RUPTREG2                              #  DEVICE INDEX.
059595,000712: 07,3465           44714                           CS       ZERO                                  #  FOR FAILURE.
059596,000713: 07,3466           13471                           TCF      GOODEND    +2                         
059597,000714: 
059598,000715: 07,3467           54071        GOODEND            TS       RUPTREG2                              
059599,000716: 07,3470           44712                           CS       ONE                                   #  FOR SUCCESS.
059600,000717: 
059601,000718: 07,3471           54072                           TS       RUPTREG3                              
059602,000719: 07,3472           50071                           INDEX    RUPTREG2                              #  SEE IF USING PROGRAM ASLEEP.
059603,000720: 07,3473           11322                           CCS      MODECADR                              
059604,000721: 07,3474           13476                           TCF      +2                                    #  YES - WAKE IT UP.
059605,000722: 07,3475           13506                           TCF      ENDMODE                               #  IF 0, PROGRAM NOT IN YET.
059606,000723: 
059607,000724: 07,3476           34714                           CAF      ZERO                                  #  WAKE SLEEPING PROGRAM.
059608,000725: 07,3477           50071                           INDEX    RUPTREG2                              
059609,000726: 07,3500           57322                           XCH      MODECADR                              
059610,000727: 07,3501           05074                           TC       JOBWAKE                               
059611,000728: 
059612,000729: 07,3502           40072                           CS       RUPTREG3                              #  ADVANCE LOC IF SUCCESSFUL.
059613,000730: 07,3503           50064                           INDEX    LOCCTR                                
059614,000731: 07,3504           26164                           ADS      LOC                                   
059615,000732: 
059616,000733: 07,3505           15213                           TCF      TASKOVER                              
059617,000734: 
059618,000735: 07,3506           30072        ENDMODE            CA       RUPTREG3                              #  -0 INDICATES OPERATION COMPLETE BUT
059619,000736: 07,3507           50071                           INDEX    RUPTREG2                              #  UNSUCCESSFUL - -1 INDICATES COMPLETE AND
059620,000737: 07,3510           55322                           TS       MODECADR                              #  SUCCESSFUL.
059621,000738: 07,3511           15213                           TCF      TASKOVER                              
059622,000739: 

Page 1404

059624,000741:                                                                                                  #           GENERAL STALLING ROUTINE. USING PROGRAMS COME HERE TO WAIT FOR I/O COMPLETION.
059625,000742: 
059626,000743:                                                                                                  #  PROGRAM DESCRIPTION                                    DATE- 21 FEB 1967
059627,000744:                                                                                                  #                                            LOG SECTION IMU MODE SWITCHING
059628,000745:                                                                                                  #  MOD BY- R.MELANSON TO ADD DOCUMENTATION       ASSEMBLY SUNDISK  REV.  82
059629,000746: 
059630,000747:                                                                                                  #  FUNCTIONAL DESCRIPTION-
059631,000748:                                                                                                  #    TO DELAY FURTHER EXECUTION OF THE CALLING ROUTINE UNTIL ITS SELECTED
059632,000749:                                                                                                  #    I/O FUNCTION IS COMPLETE.THE FOLLOWING CHECKS ON THE CALLING ROUTINE:S
059633,000750:                                                                                                  #    MODECADR ARE MADE AND ACTED UPON.
059634,000751:                                                                                                  #      1) +0 INDICATES INCOMPLETE I/O OPERATION.CALLING ROUTINE IS PUT TO
059635,000752:                                                                                                  #         SLEEP.
059636,000753:                                                                                                  #      2) -1 INDICATES COMPLETED I/O OPERATION. STALL BYPASSES JOBSLEEP
059637,000754:                                                                                                  #         CALL AND RETURNS TO CALLING ROUTINE AT L+3
059638,000755:                                                                                                  #      3) -0 INDICATES COMPLETED I/O WITH FAILURE. STALL CLEARS MODECADR
059639,000756:                                                                                                  #         AND RETURNS TO CALLING ROUTINE AT L+2.
059640,000757:                                                                                                  #      4) VALUE GREATER THAN 0 INDICATES TWO ROUTINES CALLING FOR USE OF
059641,000758:                                                                                                  #         SAME DEVICE. STALL EXITS TO ABORT WHICH EXECUTES A PROGRAM
059642,000759:                                                                                                  #         RESTART WHICH IN TURN CLEARS ALL MODECADR REGISTERS.
059643,000760: 
059644,000761:                                                                                                  #   CALLING SEQUENCE-
059645,000762:                                                                                                  #    L   TC   BANKCALL
059646,000763:                                                                                                  #    L+1 CADR (ONE OF 5 STALL ADDRESSES I.E. IMUSTALL,OPTSTALL,RADSTALL,
059647,000764:                                                                                                  #              AOTSTALL,OR ATTSTALL)
059648,000765: 
059649,000766:                                                                                                  #   NORMAL-EXIT MODE-
059650,000767:                                                                                                  #    TCF   JOBSLEEP OR TCF  MODEXIT
059651,000768: 
059652,000769:                                                                                                  #  ALARM OR ABORT EXIT MODE-
059653,000770:                                                                                                  #    TC   ABORT
059654,000771: 
059655,000772:                                                                                                  #  OUTPUT-
059656,000773:                                                                                                  #    MODECADR= CADR  IF JOBSLEEP
059657,000774:                                                                                                  #    MODECADR=+0     IF I/O COMPLETE
059658,000775:                                                                                                  #    BUF2=L+3        IF I/O COMPLETE AND GOOD.
059659,000776:                                                                                                  #    BUF2=L+2        IF I/O COMPLETE BUT FAILED.
059660,000777: 
059661,000778:                                                                                                  #  ERASABLE INITIALIZATION-
059662,000779:                                                                                                  #    BUF2 CONTAINS RETURN ADDRESS PLUS 1,(L+2)
059663,000780:                                                                                                  #    BUF2+1 CONTAINS FBANK VALUE OF CALLING ROUTINE.
059664,000781:                                                                                                  #    MODECADR OF CALLING ROUTINE CONTAINS +0,-1,-0 OR CADR RETURN ADDRESS.
059665,000782: 
059666,000783:                                                                                                  #  DEBRIS-
059667,000784:                                                                                                  #    RUPTREG2 AND CALLING ROUTINE MODECADR.
059668,000785: 
059669,000786: 07,3512           34712        AOTSTALL           CAF      ONE                                   #  AOT.
059670,000787: 07,3513           03517                           TC       STALL                                 
059671,000788: 
059672,000789: 07,3514           34711        RADSTALL           CAF      TWO                                   
059673,000790: 07,3515           13517                           TCF      STALL                                 

Page 1405

059675,000792: 07,3516  07,3512               OPTSTALL           EQUALS   AOTSTALL                              
059676,000793: 
059677,000794: 07,3516           34714        IMUSTALL           CAF      ZERO                                  #  IMU.
059678,000795: 
059679,000796: 07,3517           00004        STALL              INHINT                                         
059680,000797: 07,3520           54071                           TS       RUPTREG2                              #  SAVE DEVICE INDEX.
059681,000798: 07,3521           50000                           INDEX    A                                     #  SEE IF OPERATION COMPLETE.
059682,000799: 07,3522           11322                           CCS      MODECADR                              
059683,000800: 07,3523           13541                           TCF      MODABORT                              #  ALLOWABLE STATES ARE +0, -1, AND -0.
059684,000801: 07,3524           13535                           TCF      MODESLP                               #  OPERATION INCOMPLETE.
059685,000802: 07,3525           13531                           TCF      MODEGOOD                              #  COMPLETE AND GOOD IF = -1.
059686,000803: 
059687,000804: 07,3526           50071        MG2                INDEX    RUPTREG2                              #  COMPLETE AND FAILED IF -0. RESET TO +0.
059688,000805: 07,3527           55322                           TS       MODECADR                              #  RETURN TO CALLER.
059689,000806: 07,3530           12557                           TCF      MODEEXIT                              
059690,000807: 
059691,000808: 07,3531           10000        MODEGOOD           CCS      A                                     #  MAKE SURE INITIAL STATE -1.
059692,000809: 07,3532           13541                           TCF      MODABORT                              
059693,000810: 
059694,000811: 07,3533           24133                           INCR     BUF2                                  #  IF SO, INCREMENT RETURN ADDRESS AND
059695,000812: 07,3534           13526                           TCF      MG2                                   #  RETURN IMMEDIATELY, SETTING CADR = +0.
059696,000813: 
059697,000814: 07,3535           04604        MODESLP            TC       MAKECADR                              #  CALL FROM SWITCHABLE FIXED ONLY.
059698,000815: 07,3536           50071                           INDEX    RUPTREG2                              
059699,000816: 07,3537           55322                           TS       MODECADR                              
059700,000817: 07,3540           15070                           TCF      JOBSLEEP                              
059701,000818: 
059702,000819: 07,3541           05622        MODABORT           TC       POODOO                                #  TWO PROGRAMS USING SAME DEVICE.
059703,000820: 07,3542           01210                           OCT      1210                                  
059704,000821: 

Page 1406

059706,000823:                                                                                                  #           CONSTANTS FOR MODE SWITCHING ROUTINES
059707,000824: 
059708,000825: 07,3543     5660               BITS3&4            =        OCT14                                 
059709,000826: 07,3543     4726               BITS4&6            =        OCT50                                 
059710,000827: 07,3543           00030        BITS4-5            OCT      00030                                 
059711,000828: 07,3544     4703               IMUSEFLG           EQUALS   BIT8                                  #  INTERPRETER SWITCH 7.
059712,000829: 07,3544           77500        -COMMAX            DEC      -191       B-14                       
059713,000830: 07,3545           77477        -COMMAX-           DEC      -192       B-14                       
059714,000831: 07,3546           00074        600MS              DEC      60         B-14                       
059715,000832: 07,3547  07,3012               IMUFIN20           =        IMUFINE                               
059716,000833: 07,3547           31325        GOMANUR            CA       ATTCADR                               #  IS KALCMANU FREE
059717,000834: 07,3550           00006                           EXTEND                                         
059718,000835: 07,3551           13554                           BZF      +3                                    
059719,000836: 
059720,000837: 07,3552           05622                           TC       POODOO                                #  NO
059721,000838: 07,3553           01210                           OCT      1210                                  #  2 TRYING TO USE SAME DEVICE
059722,000839: 
059723,000840: 07,3554           00006                 +3        EXTEND                                         
059724,000841: 07,3555           30134                           DCA      BUF2                                  
059725,000842: 07,3556           53326                           DXCH     ATTCADR                               #  SAVE FINAL RETURN FOR KALCMAN3
059726,000843: 
059727,000844: 07,3557           30006                           CA       BBANK                                 
059728,000845: 07,3560           74716                           MASK     SEVEN                                 
059729,000846: 07,3561           27326                           ADS      ATTCADR    +1                         
059730,000847: 
059731,000848: 07,3562           30167                           CA       PRIORITY                              
059732,000849: 07,3563           77674                           MASK     PRIO37                                
059733,000850: 07,3564           55327                           TS       ATTPRIO                               #  SAVE USERS PRIO
059734,000851: 
059735,000852: 07,3565           33571                           CAF      KALEBCON                              #  SET EBANK FOR KALCMAN3
059736,000853: 07,3566           54003                           TS       EBANK                                 
059737,000854: 07,3567           04574                           TC       POSTJUMP                              
059738,000855: 07,3570           44000                           CADR     KALCMAN3                              
059739,000856: 07,3571           03261        KALEBCON           ECADR    BCDU                                  
059740,000857: 

Page 1407

059742,000859:                                                                                                  #  PROGRAM DESCRIPTION
059743,000860:                                                                                                  #  IMU STATUS CHECK ROUTINE R02  (SUBROUTINE UTILITY)
059744,000861:                                                                                                  #  MOD NO - 1
059745,000862:                                                                                                  #  MOD BY - N.BRODEUR
059746,000863:                                                                                                  #  FUNCTIONAL DESCRIPTION
059747,000864: 
059748,000865:                                                                                                  #  TO CHECK WHETHER IMU IS ON AND IF ON WHETHER IT IS ALIGNED TO AN
059749,000866:                                                                                                  #  ORIENTATION KNOWN BY THE CMC. TO REQUEST SELECTION OF THE APPROPRIATE
059750,000867:                                                                                                  #  PROGRAM IF THE IMU IS OFF OR NOT ALIGNED TO AN ORIENTATION KNOWN BY THE
059751,000868:                                                                                                  #  CMC. CALLED THROUGH BANKCALL
059752,000869:                                                                                                  #  CALLING SEQUENCE-
059753,000870: 
059754,000871:                                                                                                  #  L        TC     BANKCALL
059755,000872:                                                                                                  #  L+1      CADR   R02BOTH
059756,000873:                                                                                                  #  SUBROUTINES CALLED
059757,000874: 
059758,000875:                                                                                                  #        VARALARM
059759,000876:                                                                                                  #        FLAGUP
059760,000877:                                                                                                  #  NORMAL EXIT MODES
059761,000878: 
059762,000879:                                                                                                  #  AT L+2 OF CALLING SEQUENCE
059763,000880:                                                                                                  #  ALARM OR ABORT EXIT MODES
059764,000881:                                                                                                  #        GOTOPOOH, WITH ALARM
059765,000882:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED
059766,000883: 
059767,000884:                                                                                                  #  NONE
059768,000885:                                                                                                  #  DEBRIS
059769,000886: 
059770,000887:                                                                                                  #  CENTRALS-A,Q,L
059771,000888: 34,3777                                           BANK     34                                    
059772,000889: 07,2000                                           SETLOC   R02                                   
059773,000890: 07,2000                                           BANK                                           
059774,000891: 07,3572                                           COUNT    04/R02                                #  COUNT*
059775,000892: 
059776,000893: 07,3572           00063        DEC51              DEC      51         B-14                       
059777,000894: 07,3573           34676        R02BOTH            CAF      BIT13                                 
059778,000895: 07,3574           70077                           MASK     STATE      +3                         #  REFSMFLG
059779,000896: 07,3575           10000                           CCS      A                                     
059780,000897: 07,3576           03607                           TC       R02ZERO                               #  ZERO IMUS
059781,000898: 
059782,000899: 07,3577           31320                           CA       IMODES30                              
059783,000900: 07,3600           74702                           MASK     BIT9                                  #  IS ISS INITIALIZED
059784,000901: 07,3601           00006                           EXTEND                                         
059785,000902: 07,3602           13604                           BZF      +2                                    
059786,000903: 07,3603           44707                           CS       BIT4                                  #  SEND IMU ALARM CODE 210
059787,000904: 07,3604           63612                           AD       OCT220                                #  SEND REFSMM ALARM
059788,000905: 07,3605           05653                           TC       VARALARM                              
059789,000906: 
059790,000907: 07,3606           04106                           TC       GOTOPOOH                              
059791,000908: 

Page 1408

059793,000910: 07,3607           05435        R02ZERO            TC       UPFLAG                                
059794,000911: 07,3610           00007                           ADRES    IMUSE                                 
059795,000912: 07,3611           14570                           TCF      SWRETURN                              
059796,000913: 07,3612           00220        OCT220             OCT      220                                   
059797,000914: 

Page 1409

059799,000916:                                                                                                  #  PROGRAM DESCRIPTION   P06   10FEB67
059800,000917: 
059801,000918:                                                                                                  #  TRANSFER THE ISS/CMC FROM THE OPERATE TO THE STANDBY CONDITION.
059802,000919: 
059803,000920:                                                                                                  #  THE NORMAL CONDITION OF READINESS OF THE GNCS WHEN NOT IN USE IS STANDBY. IN THIS CONDITION THE IMU
059804,000921:                                                                                                  #  HEATER POWER IS ON. THE IMU OPERATE POWER IS OFF. THE COMPUTER POWER IS ON. THE OPTICS POWER IS OFF. THE
059805,000922:                                                                                                  #  CMC  STANDBY ON THE MAIN AND LEB DISKYS IS ON.
059806,000923: 
059807,000924:                                                                                                  #  CALLING SEQUENCE:
059808,000925:                                                                                                  #           ASTRONAUT REQUEST THROUGH DSKY     V37E 06E.
059809,000926: 
059810,000927:                                                                                                  #  SUBROUTINES CALLED:
059811,000928:                                                                                                  #           GOPERF1
059812,000929:                                                                                                  #           BANKCALL
059813,000930:                                                                                                  #           FLAGDOWN
059814,000931: 

Page 1410

059816,000933:                                                                                                  #  PRESTAND PREPARES FOR STANDBY BY SNAPSHOTTING THE SCALER AND TIME1 TIME2
059817,000934:                                                                                                  #  THE LOW 5 BITS OF THE SCALER ARE INSPECTED TO INSURE COMPATABILITY
059818,000935:                                                                                                  #  BETWEEN THE SCALER READING AND THE TIME1 TIME2 READING.
059819,000936: 
059820,000937: 26,2000                                           SETLOC   P05P06                                
059821,000938: 26,2000                                           BANK                                           
059822,000939: 
059823,000940: 26,3655     1150                                  EBANK=   TIME2SAV                              
059824,000941: 26,3655                                           COUNT*   $$/P06                                
059825,000942: 
059826,000943: 26,3655           05435        P06                TC       UPFLAG                                #  SET NODOV37 BIT
059827,000944: 26,3656           00054                           ADRES    NODOFLAG                              
059828,000945: 
059829,000946: 26,3657           00004        PRESTAND           INHINT                                         
059830,000947: 26,3660           00006                           EXTEND                                         
059831,000948: 26,3661           30025                           DCA      TIME2                                 #  SNAPSHOT TIME1TIME2
059832,000949: 26,3662           53151                           DXCH     TIME2SAV                              
059833,000950: 26,3663           03714                           TC       SCALPREP                              
059834,000951: 26,3664           03657                           TC       PRESTAND                              #  T1,T2,SCALER NOT COMPATIBLE
059835,000952: 26,3665           52155                           DXCH     MPAC                                  #  T1,T2 AND SCALER OK
059836,000953: 26,3666           53153                           DXCH     SCALSAVE                              #  STORE SCALER
059837,000954: 26,3667           00004                           INHINT                                         
059838,000955: 26,3670           04555                           TC       BANKCALL                              
059839,000956: 26,3671           16777                           CADR     RNDREFDR                              #  REFSMM, DRIFT, TRACK FLAGS DOWN
059840,000957: 
059841,000958: 26,3672           05447                           TC       DOWNFLAG                              
059842,000959: 26,3673           00007                           ADRES    IMUSE                                 #  IMUSE DOWN
059843,000960: 26,3674           05447                           TC       DOWNFLAG                              
059844,000961: 26,3675           00010                           ADRES    RNDVZFLG                              #  RNDVZFLG DOWN
059845,000962: 
059846,000963: 26,3676           34700                           CAF      BIT11                                 
059847,000964: 26,3677           00006                           EXTEND                                         
059848,000965: 26,3700           05013                           WOR      CHAN13                                #  SET STANDBY ENABLE BIT
059849,000966: 
059850,000967: 26,3701           05301                           TC       PHASCHNG                              #  SET RESTART TO POSTAND WHEN STANDBY
059851,000968: 26,3702           07024                           OCT      07024                                 #    RECOVERS
059852,000969: 26,3703           20000                           OCT      20000                                 
059853,000970: 26,3704     1152                                  EBANK=   SCALSAVE                              
059854,000971: 26,3704           03734 54102                     2CADR    POSTAND                               
059855,000972: 26,3706           34731                           CAF      OCT62                                 
059856,000973: 26,3707           04555                           TC       BANKCALL                              
059857,000974: 26,3710           20751                           CADR     GOPERF1                               
059858,000975: 26,3711           13706                           TCF      -3                                    
059859,000976: 26,3712           13706                           TCF      -4                                    
059860,000977: 26,3713           13706                           TCF      -5                                    
059861,000978: 
059862,000979: 26,3714     4731               OCT62              EQUALS   .5SEC                                 #  DEC 50 = OCT 62
059863,000980: 
059864,000981:                                                                                                  #  THE LOW 5 BITS OF THE SCALER READS 10000 FOR THE FIRST INTERVAL AFTER A

Page 1411

059866,000983:                                                                                                  #  T1 INCREMENT. IF SCALPREP DETECTS THIS INTERVAL THE T1,T2 AND SCALER
059867,000984:                                                                                                  #  DATA ARE NOT COMPATABLE AND RETURN IS TO L+1 FOR ANOTHER READING OF THE
059868,000985:                                                                                                  #  DATA. OTHERWISE, THE RETURN IS TO L+2 TO PROCEED. ROUTINE ALSO PREPARES
059869,000986:                                                                                                  #  THE SCALER READING FOR COMPUTATION OF THE INCREMENT TO UPDATE T1T2. (THE
059870,000987:                                                                                                  #  10 MS BIT (BIT 6) OF THE SCALER IS INCREMENTED 5 MS OUT OF PHASE FROM
059871,000988:                                                                                                  #  T1.) ADDITION OF 5 MS (BIT 5) TO THE SCALER READING HAS THE EFFECT OF
059872,000989:                                                                                                  #  ADJUSTING BIT 6 IN THE SCALER TO BE IN PHASE WITH BIT 1 OF T1. THE LOW 5
059873,000990:                                                                                                  #  BITS OF THE SCALER READING ARE THEN SET TO ZERO, TO TRUNCATE THE SCALER
059874,000991:                                                                                                  #  DATA TO 10 MS. RESULTS ARE STORED IN MPAC, +1.
059875,000992: 
059876,000993: 26,3714           00006        SCALPREP           EXTEND                                         
059877,000994: 26,3715           22156                           QXCH     MPAC       +2                         
059878,000995: 26,3716           04527                           TC       FINETIME   +1                         
059879,000996: 26,3717           00003                           RELINT                                         
059880,000997: 26,3720           52155                           DXCH     MPAC                                  
059881,000998: 26,3721           34706                           CA       BIT5                                  #  ADD 5 MS TO THE SCALER READING.
059882,000999: 26,3722           54001                           TS       L                                     
059883,001000: 26,3723           34714                           CA       ZERO                                  
059884,001001: 26,3724           20155                           DAS      MPAC                                  
059885,001002: 26,3725           44362                           CS       LOW5                                  #  SET LOW 5 BITS OF (SCALER+5MS) TO ZERO
059886,001003: 26,3726           70155                           MASK     MPAC       +1                         #  AND STORE RESULTS IN MPAC,+1.
059887,001004: 26,3727           56155                           XCH      MPAC       +1                         
059888,001005: 26,3730           74362                           MASK     LOW5                                  #  TEST LOW 5 BITS OF SCALER FOR THE FIRST
059889,001006:                                                                                                  #                                          INTERVAL AFTER THE T1 INCREMENT
059890,001007:                                                                                                  #                                          (NOW = 00000, SINCE BIT 5 ADDED).
059891,001008: 26,3731           10000                           CCS      A                                     #  IS IT 1ST INTERVAL AFTER T1 INCREMENT
059892,001009: 26,3732           24156                           INCR     MPAC       +2                         #  NO
059893,001010: 26,3733           00156                           TC       MPAC       +2                         #  YES
059894,001011: 
059895,001012:                                                                                                  #  POSTAND RECOVERS TIME AFTER STANDBY.THE SCALER IS SNAPSHOTTED AND THE
059896,001013:                                                                                                  #  TIME1 TIME2 COUNTER IS SET TO ZERO. THE LOW 5 BITS OF THE SCALER ARE
059897,001014:                                                                                                  #  INSPECTED TO INSURE COMPATABILITY BETWEEN THE SCALER READING AND THE
059898,001015:                                                                                                  #  CLEARING OF THE TIME COUNTER. IT THEN COMPUTES THE DIFFERENCE IN SCALER
059899,001016:                                                                                                  #  VALUES (IN DP) AND ADDS THIS TO THE PREVIOUSLY SNAPSHOTTED VALUES OF
059900,001017:                                                                                                  #  TIME1 TIME2 AND PLACES THIS NEW TIME INTO THE TIME1 TIME2 COUNTER.
059901,001018: 
059902,001019: 26,3734                                           COUNT*   $$/P05                                
059903,001020: 
059904,001021: 26,3734           44700        POSTAND            CS       BIT11                                 #  RECOVER TIME AFTER STANDBY.
059905,001022: 26,3735           00006                           EXTEND                                         
059906,001023: 26,3736           03013                           WAND     CHAN13                                #  CLEAR STANDBY ENABLE BIT
059907,001024: 26,3737           00004                           INHINT                                         
059908,001025: 26,3740           34714                           CA       ZERO                                  
059909,001026: 26,3741           54001                           TS       L                                     
059910,001027: 26,3742           52025                           DXCH     TIME2                                 #  CLEAR TIME1TIME2
059911,001028: 26,3743           03714                           TC       SCALPREP                              #  STORE SCALER IN MPAC, MPAC+1
059912,001029: 26,3744           03737                           TC       POSTAND    +3                         #  T1,T2,SCALER NOT COMPATIBLE
059913,001030: 26,3745           00006                           EXTEND                                         #  T1,T2 AND SCALER OK
059914,001031: 26,3746           41153                           DCS      SCALSAVE                              
059915,001032: 26,3747           20155                           DAS      MPAC                                  #  FORM DP DIFFERENCE OF POSTSTANDBY SCALER

Page 1412

059917,001034: 26,3750           34701                           CAF      BIT10                                 #  MINUS PRESTANDBY SCALER AND SHIFT RIGHT
059918,001035: 26,3751           07256                           TC       SHORTMP                               #  5 TO ALIGN BITS WITH TIME1 TIME2.
059919,001036: 26,3752           34714                           CAF      ZERO                                  
059920,001037: 26,3753           54156                           TS       MPAC       +2                         #  NEEDED FOR TP AGREE
059921,001038: 26,3754           07226                           TC       TPAGREE                               #  MAKE DP DIFF AGREE
059922,001039: 26,3755           10154                           CCS      MPAC                                  
059923,001040: 26,3756           03763                           TC       POSTCOM                               #  IF DP DIFF NET +, NO SCALER OVERFLOW
059924,001041: 26,3757           03763                           TC       POSTCOM                               #  BETWEEN PRE AND POST STANDBY.
059925,001042: 26,3760           03761                           TC       +1                                    #  IF DP DIFF NET -, SCALER OVERFLOWED. ADD
059926,001043: 26,3761           34701                           CAF      BIT10                                 #  BIT 10 TO HIGH DIFF TO CORRECT.
059927,001044: 26,3762           26154                           ADS      MPAC                                  
059928,001045: 26,3763           00006        POSTCOM            EXTEND                                         #  C(MPAC,+1) IS MAGNITUDE OF DELTA SCALER.
059929,001046: 26,3764           31151                           DCA      TIME2SAV                              #  PRESTANDBY TIME1TIME2
059930,001047: 26,3765           20155                           DAS      MPAC                                  
059931,001048: 26,3766           07226                           TC       TPAGREE                               #  FORCE SIGN AGREEMENT
059932,001049: 26,3767           52155                           DXCH     MPAC                                  #  UPDATED VALUE FOR T1,T2.
059933,001050: 26,3770           20025                           DAS      TIME2                                 #  LOAD UPDATED VALUE INTO T1,T2, WITH
059934,001051: 26,3771           05447                           TC       DOWNFLAG                              #  CLEAR NODOFLAG
059935,001052: 26,3772           00054                           ADRES    NODOFLAG                              
059936,001053: 
059937,001054: 26,3773           04106                           TC       GOTOPOOH                              

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