Source Code

These source-code files derive from a printout of Luminary 210 (Apollo 15-17 Lunar Module guidance computer program), from the personal library of original AGC developer Don Eyles, digitally photographed at archive.org, financially sponsored by Jim Lawton, and transcribed to source code by a team of volunteers. This colorized, syntax-highlighted form was created by assembling that transcribed source code. Note that the full page images are available on the Virtual AGC project page at archive.org, while reduced-size images are presented at the VirtualAGC project website. Report or fix any transcription errors at the Virtual AGC project code repository.

Notations on the program listing read, in part:

	GAP: ASSEMBLE REVISION 210 OF AGC PROGRAM LUMINARY 
	BY NASA 2021112-161 17:11 MAR. 19,1971
Note that the date is the date of the printout, not the date of the program revision.

056525,000002:                                                                                                  ## Copyright:   Public domain.
056526,000003:                                                                                                  ## Filename:    IMU_MODE_SWITCHING_ROUTINES.agc
056527,000004:                                                                                                  ## Purpose:     A section of Luminary revision 210.
056528,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
056529,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 15-17.
056530,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
056531,000008:                                                                                                  ##              that the code format has been changed to conform to the
056532,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
056533,000010:                                                                                                  ##              original YUL assembler.
056534,000011:                                                                                                  ## Reference:   pp. 1306-1334
056535,000012:                                                                                                  ## Assembler:   yaYUL
056536,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
056537,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
056538,000015:                                                                                                  ## Mod history: 2016-11-17 JL   Created from Luminary131 version.
056539,000016:                                                                                                  ##              2016-12-08 MAS  Began transcription
056540,000017:                                                                                                  ##              2016-12-09 MAS  Completed updates for Luminary 210.
056541,000018:                                                                                                  ##              2016-12-11 HG   Fix operand CAGETEST -> CAGETSTG
056542,000019:                                                                                                  ##                                          GYROEXIT -> EXITGYRO
056543,000020:                                                                                                  ##                                          CAGETEST -> COARSTST    
056544,000021:                                                                                                  ##              2016-12-26 RSB  Comment-text proofed using ProoferComments
056545,000022:                                                                                                  ##                              and corrected errors found.
056546,000023:                                                                                                  ##              2017-01-28 RSB  Comment-text fixes identified for Luminary 69.
056547,000024:                                                                                                  ##              2017-03-13 RSB  Comment-text fixes noted in proofing Luminary 116.
056548,000025: 

Page 1306

056550,000027:    4000                                           SETLOC   FFTAG3                                
056551,000028:    4000                                           BANK                                           
056552,000029: 
056553,000030:    5461  E3,1471                                  EBANK=   COMMAND                               
056554,000031: 
056555,000032:                                                                                                  #           FIXED-FIXED ROUTINES.
056556,000033: 
056557,000034:    5461                                           COUNT*   $$/IMODE                              
056558,000035:    5461           34746        ZEROICDU           CAF      ZERO                                  #  ZERO ICDU COUNTERS.
056559,000036:    5462           54032                           TS       CDUX                                  
056560,000037:    5463           54033                           TS       CDUY                                  
056561,000038:    5464           54034                           TS       CDUZ                                  
056562,000039:    5465           00002                           TC       Q                                     
056563,000040: 
056564,000041:    5466     4734               SPSCODE            =        BIT9                                  
056565,000042: 

Page 1307

056567,000044:                                                                                                  #           IMU ZEROING ROUTINE.
056568,000045: 
056569,000046: 11,3776                                           BANK     11                                    
056570,000047: 07,2000                                           SETLOC   MODESW                                
056571,000048: 07,2000                                           BANK                                           
056572,000049: 
056573,000050: 07,2701                                           COUNT*   $$/IMODE                              
056574,000051: 07,2701           00004        IMUZERO            INHINT                                         #  ROUTINE TO ZERO ICDUS.
056575,000052: 07,2702           41035                           CS       DSPTAB     +11D                       #  DONT ZERO CDUS IF IMU IN GIMBAL LOCK AND
056576,000053: 07,2703           74762                           MASK     BITS4&6                               #  COARSE ALIGN (GIMBAL RUNAWAY PROTECTION)
056577,000054: 07,2704           10000                           CCS      A                                     
056578,000055: 07,2705           12711                           TCF      IMUZEROA                              
056579,000056: 
056580,000057: 07,2706           05571                           TC       ALARM                                 #  IF SO.
056581,000058: 07,2707           00206                           OCT      00206                                 
056582,000059: 
056583,000060: 07,2710           13676                           TCF      CAGETSTJ   +4                         #  IMMEDIATE FAILURE.
056584,000061: 
056585,000062: 07,2711           03672        IMUZEROA           TC       CAGETSTJ                              
056586,000063:                                                                                                  #  DELETE
056587,000064: 07,2712           41300                           CS       IMODES33                              #  DISABLE DAP AUTO AND HOLD MODES
056588,000065: 07,2713           74764                           MASK     SUPER011                              #      BIT5 FOR GROUND
056589,000066: 07,2714           27300                           ADS      IMODES33                              
056590,000067: 
056591,000068: 07,2715           41277                           CS       IMODES30                              #  INHIBIT ICDUFAIL AND IMUFAIL (IN CASE WE
056592,000069: 07,2716           75745                           MASK     BITS3&4                               #  JUST CAME OUT OF COARSE ALIGN).
056593,000070: 07,2717           27277                           ADS      IMODES30                              
056594,000071: 
056595,000072: 07,2720           44762                           CS       BITS4&6                               #  SEND ZERO ENCODE WITH COARSE AND ERROR
056596,000073: 07,2721           00006                           EXTEND                                         #  COUNTER DISABLED.
056597,000074: 07,2722           03012                           WAND     CHAN12                                
056598,000075: 
056599,000076: 07,2723           03253                           TC       NOATTOFF                              #  TURN OFF NO ATT LAMP.
056600,000077: 
056601,000078: 07,2724           34740                           CAF      BIT5                                  
056602,000079: 07,2725           00006                           EXTEND                                         
056603,000080: 07,2726           05012                           WOR      CHAN12                                
056604,000081: 
056605,000082: 07,2727           05461                           TC       ZEROICDU                              
056606,000083: 07,2730           34737                           CAF      BIT6                                  #  WAIT 320 MS TO GIVE AGS ADEQUATE TIME TO
056607,000084: 07,2731           05205                           TC       WAITLIST                              #  RECEIVE ITS PULSE TRAIN.
056608,000085: 07,2732  E3,1474                                  EBANK=   CDUIND                                
056609,000086: 07,2732           02744 16103                     2CADR    IMUZERO2                              
056610,000087: 
056611,000088: 07,2734           41277                           CS       IMODES30                              #  SEE IF IMU OPERATING AND ALARM IF NOT.
056612,000089: 07,2735           74734                           MASK     BIT9                                  
056613,000090: 07,2736           10000                           CCS      A                                     
056614,000091: 07,2737           12742                           TCF      MODEEXIT                              

Page 1308

056616,000093: 07,2740           05571                           TC       ALARM                                 
056617,000094: 07,2741           00210                           OCT      210                                   
056618,000095: 
056619,000096: 07,2742           00003        MODEEXIT           RELINT                                         #  GENERAL MODE-SWITCHING EXIT.
056620,000097: 07,2743           14622                           TCF      SWRETURN                              
056621,000098: 
056622,000099: 
056623,000100: 07,2744           03660        IMUZERO2           TC       CAGETEST                              
056624,000101: 07,2745           05461                           TC       ZEROICDU                              #  ZERO CDUX, CDUY, CDUZ
056625,000102: 
056626,000103: 07,2746           44740                           CS       BIT5                                  #  REMOVE ZERO DISCRETE.
056627,000104: 07,2747           00006                           EXTEND                                         
056628,000105: 07,2750           03012                           WAND     CHAN12                                
056629,000106: 
056630,000107: 07,2751           34732                           CAF      BIT11                                 #  WAIT 10 SECS FOR CTRS TO FIND GIMBALS
056631,000108: 07,2752           05226                           TC       VARDELAY                              
056632,000109: 
056633,000110: 07,2753           03660        IMUZERO3           TC       CAGETEST                              
056634,000111: 07,2754           45745                           CS       BITS3&4                               #  REMOVE IMUFAIL AND ICDUFAIL INHIBIT.
056635,000112: 07,2755           71277                           MASK     IMODES30                              
056636,000113: 07,2756           55277                           TS       IMODES30                              
056637,000114: 
056638,000115: 07,2757           44764                           CS       SUPER011                              #  ENABLE DAP AUTO AND HOLD MODES
056639,000116: 07,2760           71300                           MASK     IMODES33                              #      BIT5 FOR GROUND
056640,000117: 07,2761           55300                           TS       IMODES33                              
056641,000118: 
056642,000119: 07,2762           04665                           TC       IBNKCALL                              #  SET ISS WARNING IF EITHER OF ABOVE ARE
056643,000120: 07,2763           14703                           CADR     SETISSW                               #  PRESENT.
056644,000121: 
056645,000122: 07,2764           13633                           TCF      ENDIMU                                
056646,000123: 

Page 1309

056648,000125:                                                                                                  #           IMU COARSE ALIGN MODE.
056649,000126: 
056650,000127: 07,2765           00004        IMUCOARS           INHINT                                         
056651,000128: 07,2766           03672                           TC       CAGETSTJ                              
056652,000129: 07,2767           03131                           TC       SETCOARS                              
056653,000130: 
056654,000131: 07,2770           36263                           CAF      SIX                                   
056655,000132: 07,2771           05205                           TC       WAITLIST                              
056656,000133: 07,2772  E3,1474                                  EBANK=   CDUIND                                
056657,000134: 07,2772           02775 16103                     2CADR    COARS                                 
056658,000135: 
056659,000136: 
056660,000137: 07,2774           12742                           TCF      MODEEXIT                              
056661,000138: 
056662,000139: 07,2775           03660        COARS              TC       CAGETEST                              
056663,000140: 07,2776           34737                           CAF      BIT6                                  #  ENABLE ALL THREE ISS CDU ERROR COUNTERS
056664,000141: 07,2777           00006                           EXTEND                                         
056665,000142: 07,3000           05012                           WOR      CHAN12                                
056666,000143: 
056667,000144: 07,3001           34743                           CAF      TWO                                   #  SET CDU INDICATOR
056668,000145: 07,3002           55474        COARS1             TS       CDUIND                                
056669,000146: 
056670,000147: 07,3003           51474                           INDEX    CDUIND                                #  COMPUTE THETAD - THETAA IN 1:S
056671,000148: 07,3004           30321                           CA       THETAD                                #    COMPLEMENT FORM
056672,000149: 07,3005           00006                           EXTEND                                         
056673,000150: 07,3006           51474                           INDEX    CDUIND                                
056674,000151: 07,3007           20032                           MSU      CDUX                                  
056675,000152: 07,3010           00006                           EXTEND                                         
056676,000153: 07,3011           74730                           MP       BIT13                                 #  SHIFT RIGHT 2
056677,000154: 07,3012           56001                           XCH      L                                     #  ROUND
056678,000155: 07,3013           60000                           DOUBLE                                         
056679,000156: 07,3014           54061                           TS       ITEMP1                                
056680,000157: 07,3015           13017                           TCF      +2                                    
056681,000158: 07,3016           26001                           ADS      L                                     
056682,000159: 
056683,000160: 07,3017           51474                           INDEX    CDUIND                                #  DIFFERENCE TO BE COMPUTED
056684,000161: 07,3020           23471                           LXCH     COMMAND                               
056685,000162: 07,3021           11474                           CCS      CDUIND                                
056686,000163: 07,3022           03002                           TC       COARS1                                
056687,000164: 
056688,000165: 07,3023           34743                           CAF      TWO                                   #  MINIMUM OF 4 MS WAIT
056689,000166: 07,3024           05226                           TC       VARDELAY                              
056690,000167: 

Page 1310

056692,000169: 07,3025           03660        COARS2             TC       CAGETEST                              #  DONT CONTINUE IF CAGED.
056693,000170: 07,3026           54061                           TS       ITEMP1                                #  SETS TO +0.
056694,000171: 07,3027           34743                           CAF      TWO                                   #  SET CDU INDICATOR
056695,000172: 07,3030           55474                 +3        TS       CDUIND                                
056696,000173: 
056697,000174: 07,3031           51474                           INDEX    CDUIND                                
056698,000175: 07,3032           11471                           CCS      COMMAND                               #  NUMBER OF PULSES REQUIRED
056699,000176: 07,3033           03037                           TC       COMPOS                                #  GREATER THAN MAX ALLOWED
056700,000177: 07,3034           03046                           TC       NEXTCDU    +1                         
056701,000178: 07,3035           03104                           TC       COMNEG                                
056702,000179: 07,3036           03046                           TC       NEXTCDU    +1                         
056703,000180: 
056704,000181: 07,3037           63764        COMPOS             AD       -COMMAX                               #  COMMAX = MAX NUMBER OF PULSES ALLOWED
056705,000182: 07,3040           00006                           EXTEND                                         #    MINUS ONE
056706,000183: 07,3041           63114                           BZMF     COMZERO                               
056707,000184: 07,3042           51474                           INDEX    CDUIND                                
056708,000185: 07,3043           55471                           TS       COMMAND                               #  REDUCE COMMAND BY MAX NUMBER OF PULSES
056709,000186: 07,3044           43765                           CS       -COMMAX-                              #    ALLOWED
056710,000187: 
056711,000188: 07,3045           24061        NEXTCDU            INCR     ITEMP1                                
056712,000189: 07,3046           64745                           AD       NEG0                                  
056713,000190: 07,3047           51474                           INDEX    CDUIND                                
056714,000191: 07,3050           54050                           TS       CDUXCMD                               #  SET UP COMMAND REGISTER.
056715,000192: 
056716,000193: 07,3051           11474                           CCS      CDUIND                                
056717,000194: 07,3052           03030                           TC       COARS2     +3                         
056718,000195: 
056719,000196: 07,3053           10061                           CCS      ITEMP1                                #  SEE IF ANY PULSES TO GO OUT.
056720,000197: 07,3054           13120                           TCF      SENDPULS                              
056721,000198: 
056722,000199: 07,3055           05223                           TC       FIXDELAY                              #  WAIT FOR GIMBALS TO SETTLE.
056723,000200: 07,3056           00226                           DEC      150        B-14                       
056724,000201: 
056725,000202: 
056726,000203: 07,3057           34743                           CAF      TWO                                   #  AT END OF COMMAND, CHECK TO SEE THAT
056727,000204: 07,3060           54061        CHKCORS            TS       ITEMP1                                #  GIMBALS ARE WITHIN 2 DEGREES OF THETAD.
056728,000205: 07,3061           50000                           INDEX    A                                     
056729,000206: 07,3062           30032                           CA       CDUX                                  
056730,000207: 07,3063           00006                           EXTEND                                         
056731,000208: 07,3064           50061                           INDEX    ITEMP1                                
056732,000209: 07,3065           20321                           MSU      THETAD                                
056733,000210: 07,3066           10000                           CCS      A                                     
056734,000211: 07,3067           13075                           TCF      COARSERR                              
056735,000212: 07,3070           13072                           TCF      CORSCHK2                              
056736,000213: 07,3071           13075                           TCF      COARSERR                              
056737,000214: 

Page 1311

056739,000216: 07,3072           10061        CORSCHK2           CCS      ITEMP1                                
056740,000217: 07,3073           13060                           TCF      CHKCORS                               
056741,000218: 07,3074           13633                           TCF      ENDIMU                                #  END OF COARSE ALIGNMENT.
056742,000219: 
056743,000220: 07,3075           63103        COARSERR           AD       COARSTOL                              #  2 DEGREES.
056744,000221: 07,3076           00006                           EXTEND                                         
056745,000222: 07,3077           63072                           BZMF     CORSCHK2                              
056746,000223: 
056747,000224: 07,3100           05571                           TC       ALARM                                 #  COARSE ALIGN ERROR.
056748,000225: 07,3101           00211                           OCT      211                                   
056749,000226: 
056750,000227: 07,3102           13656                           TCF      IMUBAD                                
056751,000228: 
056752,000229: 07,3103           77511        COARSTOL           DEC      -.01111                               #  2 DEGREES SCALED AT HALF-REVOLUTIONS
056753,000230: 
056754,000231: 
056755,000232: 07,3104           63764        COMNEG             AD       -COMMAX                               
056756,000233: 07,3105           00006                           EXTEND                                         
056757,000234: 07,3106           63114                           BZMF     COMZERO                               
056758,000235: 07,3107           40000                           COM                                            
056759,000236: 07,3110           51474                           INDEX    CDUIND                                
056760,000237: 07,3111           55471                           TS       COMMAND                               
056761,000238: 07,3112           33765                           CA       -COMMAX-                              
056762,000239: 07,3113           03045                           TC       NEXTCDU                               
056763,000240: 
056764,000241: 07,3114           34746        COMZERO            CAF      ZERO                                  
056765,000242: 07,3115           51474                           INDEX    CDUIND                                
056766,000243: 07,3116           57471                           XCH      COMMAND                               
056767,000244: 07,3117           03045                           TC       NEXTCDU                               
056768,000245: 
056769,000246: 
056770,000247: 07,3120           37761        SENDPULS           CAF      13,14,15                              
056771,000248: 07,3121           00006                           EXTEND                                         
056772,000249: 07,3122           05014                           WOR      CHAN14                                
056773,000250: 07,3123           33766                           CAF      600MS                                 
056774,000251: 07,3124           13024                           TCF      COARS2     -1                         #  THEN TO VARDELAY
056775,000252: 
056776,000253: 07,3125           34737        CA+ECE             CAF      BIT6                                  #  ENABLE ALL THREE ISS CDU ERROR COUNTERS
056777,000254: 07,3126           00006                           EXTEND                                         
056778,000255: 07,3127           05012                           WOR      CHAN12                                
056779,000256: 07,3130           05263                           TC       TASKOVER                              
056780,000257: 

Page 1312

056782,000259: 07,3131           34741        SETCOARS           CAF      BIT4                                  #  BYPASS IF ALREADY IN COARSE ALIGN
056783,000260: 07,3132           00006                           EXTEND                                         
056784,000261: 07,3133           02012                           RAND     CHAN12                                
056785,000262: 07,3134           10000                           CCS      A                                     
056786,000263: 07,3135           00002                           TC       Q                                     
056787,000264: 
056788,000265: 07,3136           44737                           CS       BIT6                                  #  CLEAR ISS ERROR COUNTERS
056789,000266: 07,3137           00006                           EXTEND                                         
056790,000267: 07,3140           03012                           WAND     CHAN12                                
056791,000268: 
056792,000269: 07,3141           44733                           CS       BIT10                                 #  KNOCK DOWN GYRO ACTIVITY
056793,000270: 07,3142           00006                           EXTEND                                         
056794,000271: 07,3143           03014                           WAND     CHAN14                                
056795,000272: 07,3144           44746                           CS       ZERO                                  
056796,000273: 07,3145           54047                           TS       GYROCMD                               
056797,000274: 
056798,000275: 07,3146           34741                           CAF      BIT4                                  #  PUT ISS IN COARSE ALIGN
056799,000276: 07,3147           00006                           EXTEND                                         
056800,000277: 07,3150           05012                           WOR      CHAN12                                
056801,000278: 
056802,000279: 07,3151           41035                           CS       DSPTAB     +11D                       #  TURN ON NO ATT LAMP
056803,000280: 07,3152           73174                           MASK     OCT40010                              
056804,000281: 07,3153           27035                           ADS      DSPTAB     +11D                       
056805,000282: 
056806,000283: 07,3154           41300                           CS       IMODES33                              #  DISABLE DAP AUTO AND HOLD MODES
056807,000284: 07,3155           74737                           MASK     BIT6                                  
056808,000285: 07,3156           27300                           ADS      IMODES33                              
056809,000286: 
056810,000287: 07,3157           41277                           CS       IMODES30                              #  DISABLE IMUFAIL
056811,000288: 07,3160           74741                           MASK     BIT4                                  
056812,000289: 07,3161           27277                           ADS      IMODES30                              
056813,000290: 
056814,000291: 07,3162           44740        RNDREFDR           CS       TRACKBIT                              #  CLEAR TRACK FLAG
056815,000292: 07,3163           70075                           MASK     FLAGWRD1                              
056816,000293: 07,3164           54075                           TS       FLAGWRD1                              
056817,000294: 

The next three instructions are circled.

056819,000296: 07,3165           44726                           CS       DRFTBIT                               #  CLEAR DRIFT FLAG
056820,000297: 07,3166           70076                           MASK     FLAGWRD2                              
056821,000298: 07,3167           54076                           TS       FLAGWRD2                              
056822,000299: 
056823,000300: 07,3170           44730                           CS       REFSMBIT                              #  CLEAR REFSMMAT FLAG
056824,000301: 07,3171           70077                           MASK     FLAGWRD3                              
056825,000302: 07,3172           54077                           TS       FLAGWRD3                              
056826,000303: 
056827,000304: 07,3173           00002                           TC       Q                                     
056828,000305: 
056829,000306: 07,3174           40010        OCT40010           OCT      40010                                 
056830,000307: 

Page 1313

056832,000309:                                                                                                  #           IMU FINE ALIGN MODE SWITCH.
056833,000310: 
056834,000311: 07,3175           00004        IMUFINE            INHINT                                         
056835,000312: 07,3176           03672                           TC       CAGETSTJ                              #  SEE IF IMU BEING CAGED.
056836,000313: 
056837,000314: 07,3177           43763                           CS       BITS4-5                               #  RESET ZERO AND COARSE
056838,000315: 07,3200           00006                           EXTEND                                         
056839,000316: 07,3201           03012                           WAND     CHAN12                                
056840,000317: 
056841,000318: 07,3202           44737                           CS       BIT6                                  #  INSURE DAP AUTO AND HOLD MODES ENABLED
056842,000319: 07,3203           71300                           MASK     IMODES33                              
056843,000320: 07,3204           55300                           TS       IMODES33                              
056844,000321: 
056845,000322: 07,3205           03253                           TC       NOATTOFF                              
056846,000323: 
056847,000324: 07,3206           34733                           CAF      BIT10                                 #  IMU FAIL WAS INHIBITED DURING THE
056848,000325: 07,3207           05205                           TC       WAITLIST                              #  PRESUMABLY PRECEDING COARSE ALIGN. LEAVE
056849,000326: 07,3210  E3,1474                                  EBANK=   CDUIND                                
056850,000327: 07,3210           03221 16103                     2CADR    IFAILOK                               #  IT ON FOR THE FIRST 5 SECS OF FINE ALIGN
056851,000328: 
056852,000329: 
056853,000330: 07,3212           34771                           CAF      2SECS                                 
056854,000331: 07,3213           05205                           TC       WAITLIST                              
056855,000332: 07,3214  E3,1474                                  EBANK=   CDUIND                                
056856,000333: 07,3214           03217 16103                     2CADR    IMUFINED                              
056857,000334: 
056858,000335: 
056859,000336: 07,3216           12742                           TCF      MODEEXIT                              
056860,000337: 
056861,000338: 07,3217           03660        IMUFINED           TC       CAGETEST                              #  SEE THAT NO ONE HAS CAGED THE IMU.
056862,000339: 07,3220           13633                           TCF      ENDIMU                                
056863,000340: 

Page 1314

056865,000342: 07,3221           03665        IFAILOK            TC       CAGETSTQ                              #  ENABLE IMU FIAL UNLESS IMU BEING CAGED.
056866,000343: 07,3222           15263                           TCF      TASKOVER                              #  IT IS.
056867,000344: 
056868,000345: 07,3223           34741                           CAF      BIT4                                  #  DONT RESET IMU FAIL INHIBIT IF SOMEONE
056869,000346: 07,3224           00006                           EXTEND                                         #  HAS GONE INTO COARSE ALIGN.
056870,000347: 07,3225           02012                           RAND     CHAN12                                
056871,000348: 07,3226           10000                           CCS      A                                     
056872,000349: 07,3227           15263                           TCF      TASKOVER                              
056873,000350: 
056874,000351: 07,3230           41277                           CS       IMODES30                              #  RESET IMUFAIL.
056875,000352: 07,3231           74730                           MASK     BIT13                                 
056876,000353: 07,3232           27277                           ADS      IMODES30                              
056877,000354: 07,3233           44741                           CS       BIT4                                  
056878,000355: 07,3234           71277        PFAILOK2           MASK     IMODES30                              
056879,000356: 07,3235           55277                           TS       IMODES30                              
056880,000357: 07,3236           04665                           TC       IBNKCALL                              #  THE ISS WARNING LIGHT MAY COME ON NOW
056881,000358: 07,3237           14703                           CADR     SETISSW                               #  THAT THE INHIBIT HAS BEEN REMOVED.
056882,000359: 07,3240           15263                           TCF      TASKOVER                              
056883,000360: 
056884,000361: 07,3241           03665        PFAILOK            TC       CAGETSTQ                              #  ENABLE PIP FAIL PROG ALARM.
056885,000362: 07,3242           15263                           TCF      TASKOVER                              
056886,000363: 
056887,000364: 07,3243           41277                           CS       IMODES30                              #  RESET IMU AND PIPA FAIL BITS.
056888,000365: 07,3244           74733                           MASK     BIT10                                 
056889,000366: 07,3245           27277                           ADS      IMODES30                              
056890,000367: 
056891,000368: 07,3246           41300                           CS       IMODES33                              
056892,000369: 07,3247           74730                           MASK     BIT13                                 
056893,000370: 07,3250           27300                           ADS      IMODES33                              
056894,000371: 
056895,000372: 07,3251           44740                           CS       BIT5                                  
056896,000373: 07,3252           13234                           TCF      PFAILOK2                              
056897,000374: 
056898,000375: 07,3253           43174        NOATTOFF           CS       OCT40010                              #  SUBROUTINE TO TURN OFF NO ATT LAMP.
056899,000376: 07,3254           71035                           MASK     DSPTAB     +11D                       
056900,000377: 07,3255           64726                           AD       BIT15                                 
056901,000378: 07,3256           55035                           TS       DSPTAB     +11D                       
056902,000379: 07,3257           00002                           TC       Q                                     
056903,000380: 

Page 1315

056905,000382:                                                                                                  #           ROUITNES TO INITIATE AND TERMINATE PROGRAM USE OF THE PIPAS. NO IMUSTALL REQUIRED IN EITHER CASE.
056906,000383: 
056907,000384: 07,3260           44746        PIPUSE             CS       ZERO                                  
056908,000385: 07,3261           54037                           TS       PIPAX                                 
056909,000386: 07,3262           54040                           TS       PIPAY                                 
056910,000387: 07,3263           54041                           TS       PIPAZ                                 
056911,000388: 
056912,000389: 07,3264           03665        PIPUSE1            TC       CAGETSTQ                              #  DO NOT ENABLE PIPA FAIL IF IMU IS CAGED
056913,000390: 07,3265           14622                           TCF      SWRETURN                              
056914,000391: 
056915,000392: 07,3266           00004                           INHINT                                         
056916,000393: 07,3267           44744                           CS       BIT1                                  #  IF PIPA FAILS FROM NOW ON (UNTIL
056917,000394: 07,3270           71277                           MASK     IMODES30                              #  PIPFREE), LIGHT ISS WARNING.
056918,000395: 07,3271           55277                           TS       IMODES30                              
056919,000396: 
056920,000397: 07,3272           04665        PIPFREE2           TC       IBNKCALL                              #  ISS WARNING MIGHT COME ON NOW.
056921,000398: 07,3273           14703                           CADR     SETISSW                               #  (OR GO OFF ON PIPFREE).
056922,000399: 
056923,000400: 07,3274           12742                           TCF      MODEEXIT                              
056924,000401: 
056925,000402: 07,3275           00004        PIPFREE            INHINT                                         #  PROGRAM DONE WITH PIPAS. DONT LIGHT
056926,000403: 07,3276           41277                           CS       IMODES30                              #  ISS WARNING.
056927,000404: 07,3277           74744                           MASK     BIT1                                  
056928,000405: 07,3300           27277                           ADS      IMODES30                              
056929,000406: 
056930,000407: 07,3301           74733                           MASK     BIT10                                 #  IF PIP FAIL ON, DO PROG ALSRM AND RESET
056931,000408: 07,3302           10000                           CCS      A                                     #  ISS WARNING.
056932,000409: 07,3303           12742                           TCF      MODEEXIT                              
056933,000410: 
056934,000411: 07,3304           05571                           TC       ALARM                                 
056935,000412: 07,3305           00212                           OCT      212                                   
056936,000413: 
056937,000414: 07,3306           00004                           INHINT                                         
056938,000415: 
056939,000416: 07,3307           13272                           TCF      PIPFREE2                              
056940,000417: 

Page 1316

056942,000419:                                                                                                  #           THE FOLLOWING ROUTINE TORQUES THE IRIGS ACCORDING TO DOUBLE PRECISION INPUTS IN THE SIX REGISTERS
056943,000420:                                                                                                  #  BEGINNING AT THE ECADR ARRIVING IN A. THE MINIMUM SIZE OF ANY PULSE TRAIN IS 16 PULSES (.25 CDU COUNTS). THE
056944,000421:                                                                                                  #  UNSENT PORTION OF THE COMMAND IS LEFT INTACT IN THE INPUT COMMAND REGISTERS.
056945,000422: 
056946,000423: 07,3310  E3,1400                                  EBANK=   1400                                  #  VARIABLE, ACTUALLY.
056947,000424: 
056948,000425: 07,3310           54161        IMUPULSE           TS       MPAC       +5                         #  SAVE ARRIVING ECADR.
056949,000426: 07,3311           03672                           TC       CAGETSTJ                              #  DONT PROCEED IF IMU BEING CAGED.
056950,000427: 
056951,000428: 07,3312           11311                           CCS      LGYRO                                 #  SEE IF GYROS BUSY.
056952,000429: 07,3313           03354                           TC       GYROBUSY                              #  SLEEP.
056953,000430: 
056954,000431: 07,3314           54156                           TS       MPAC       +2                         
056955,000432: 07,3315           34737                           CAF      BIT6                                  #  ENABLE THE POWER SUPPLY.
056956,000433: 07,3316           00006                           EXTEND                                         
056957,000434: 07,3317           05014                           WOR      CHAN14                                
056958,000435: 
056959,000436: 07,3320           34742                           CAF      FOUR                                  
056960,000437: 07,3321           05205        GWAKE2             TC       WAITLIST                              #  (IF A JOB WAS PUT TO SLEEP, THE POWER
056961,000438: 07,3322  E3,1474                                  EBANK=   CDUIND                                #  SUPPLY IS LEFT ON BY THE WAKING JOB).
056962,000439: 07,3322           03372 16103                     2CADR    STRTGYRO                              
056963,000440: 
056964,000441: 
056965,000442: 07,3324           30161                           CA       MPAC       +5                         #  SET UP EBANK, SAVING CALLER'S EBANK FOR
056966,000443: 07,3325           56003                           XCH      EBANK                                 #  RESTORATION ON RETURN.
056967,000444: 07,3326           56161                           XCH      MPAC       +5                         
056968,000445: 07,3327           55311                           TS       LGYRO                                 #  RESERVES GYROS.
056969,000446: 07,3330           74350                           MASK     LOW8                                  
056970,000447: 07,3331           54061                           TS       ITEMP1                                
056971,000448: 
056972,000449: 07,3332           34743                           CAF      TWO                                   #  FORCE SIGN AGREEMENT ON INPUTS.
056973,000450: 07,3333           54157        GYROAGRE           TS       MPAC       +3                         
056974,000451: 07,3334           60000                           DOUBLE                                         
056975,000452: 07,3335           60061                           AD       ITEMP1                                
056976,000453: 07,3336           54160                           TS       MPAC       +4                         
056977,000454: 07,3337           00006                           EXTEND                                         
056978,000455: 07,3340           50000                           INDEX    A                                     
056979,000456: 07,3341           31401                           DCA      1400                                  
056980,000457: 07,3342           52155                           DXCH     MPAC                                  
056981,000458: 07,3343           07300                           TC       TPAGREE                               
056982,000459: 07,3344           52155                           DXCH     MPAC                                  
056983,000460: 07,3345           50160                           INDEX    MPAC       +4                         
056984,000461: 07,3346           53401                           DXCH     1400                                  
056985,000462: 
056986,000463: 07,3347           10157                           CCS      MPAC       +3                         
056987,000464: 07,3350           13333                           TCF      GYROAGRE                              
056988,000465: 
056989,000466: 07,3351           30161                           CA       MPAC       +5                         #  RESTORE CALLER'S EBANK.
056990,000467: 07,3352           54003                           TS       EBANK                                 
056991,000468: 07,3353           12742                           TCF      MODEEXIT                              
056992,000469: 

Page 1317

056994,000471:                                                                                                  #           ROUTINES TO ALLOW TORQUING BY ONLY ONE JOB AT A TIME.
056995,000472: 
056996,000473: 07,3354           00006        GYROBUSY           EXTEND                                         #  SAVE RETURN 2FCADR.
056997,000474: 07,3355           30134                           DCA      BUF2                                  
056998,000475: 07,3356           52155                           DXCH     MPAC                                  
056999,000476: 07,3357           33371        REGSLEEP           CAF      LGWAKE                                
057000,000477: 07,3360           15124                           TCF      JOBSLEEP                              
057001,000478: 
057002,000479: 07,3361           11311        GWAKE              CCS      LGYRO                                 #  WHEN AWAKENED, SEE IF GYROS STILL BUSY.
057003,000480: 07,3362           13357                           TCF      REGSLEEP                              #  IF SO, SLEEP SOME MORE.
057004,000481: 
057005,000482: 07,3363           54156                           TS       MPAC       +2                         
057006,000483: 07,3364           00006                           EXTEND                                         
057007,000484: 07,3365           30155                           DCA      MPAC                                  
057008,000485: 07,3366           52134                           DXCH     BUF2                                  #  RESTORE SWRETURN INFO.
057009,000486: 07,3367           34744                           CAF      ONE                                   
057010,000487: 07,3370           13321                           TCF      GWAKE2                                
057011,000488: 
057012,000489: 07,3371           17361        LGWAKE             CADR     GWAKE                                 
057013,000490: 

Page 1318

057015,000492:                                                                                                  #           GYRO-TORQUING WAITLIST TASKS.
057016,000493: 
057017,000494: 07,3372           43630        STRTGYRO           CS       GDESELCT                              #  DE-SELECT LAST GYRO.
057018,000495: 07,3373           00006                           EXTEND                                         
057019,000496: 07,3374           03014                           WAND     CHAN14                                
057020,000497: 
057021,000498: 07,3375           03646                           TC       CAGETSTG                              
057022,000499: 
057023,000500: 07,3376           31311        STRTGYR2           CA       LGYRO                                 #  JUMP ON PHASE COUNTER IN BITS 13-14.
057024,000501: 07,3377           00006                           EXTEND                                         
057025,000502: 07,3400           74741                           MP       BIT4                                  
057026,000503: 07,3401           50000                           INDEX    A                                     
057027,000504: 07,3402           13403                           TCF      +1                                    
057028,000505: 07,3403           03420                           TC       GSELECT                               #  =0. DO Y GYRO.
057029,000506: 07,3404           00202                           OCT      00202                                 
057030,000507: 
057031,000508: 07,3405           03420                           TC       GSELECT                               #  =1. DO Z GYRO.
057032,000509: 07,3406           00302                           OCT      00302                                 
057033,000510: 
057034,000511: 07,3407           03416                           TC       GSELECT    -2                         #  =2. DO X GYRO.
057035,000512: 07,3410           00100                           OCT      00100                                 
057036,000513: 
057037,000514: 07,3411           34746                           CAF      ZERO                                  #  =3. DONE
057038,000515: 07,3412           55311                           TS       LGYRO                                 
057039,000516: 07,3413           33371                           CAF      LGWAKE                                #  WAKE A POSSIBLE SLEEPING JOB.
057040,000517: 07,3414           05130                           TC       JOBWAKE                               
057041,000518: 
057042,000519: 07,3415           13217        NORESET            TCF      IMUFINED                              #  DO NOT RESET POWER SUPPLY
057043,000520: 

Page 1319

057045,000522: 07,3416           44742                 -2        CS       FOUR                                  #  SPECIAL ENTRY TO REGRESS LGYRO FOR X.
057046,000523: 07,3417           27311                           ADS      LGYRO                                 
057047,000524: 
057048,000525: 07,3420           50002        GSELECT            INDEX    Q                                     #  SELECT GYRO.
057049,000526: 07,3421           30000                           CAF      0                                     #  PACKED WORD CONTAINS GYRO SELECT BITS
057050,000527: 07,3422           54064                           TS       ITEMP4                                #  AND INCREMENT TO LGYRO.
057051,000528: 07,3423           74750                           MASK     SEVEN                                 
057052,000529: 07,3424           64730                           AD       BIT13                                 
057053,000530: 07,3425           27311                           ADS      LGYRO                                 
057054,000531: 07,3426           54003                           TS       EBANK                                 
057055,000532: 07,3427           74350                           MASK     LOW8                                  
057056,000533: 07,3430           54061                           TS       ITEMP1                                
057057,000534: 
057058,000535: 07,3431           44750                           CS       SEVEN                                 
057059,000536: 07,3432           70064                           MASK     ITEMP4                                
057060,000537: 07,3433           54064                           TS       ITEMP4                                
057061,000538: 
057062,000539: 07,3434           00006                           EXTEND                                         #  MOVE DP COMMAND TO RUPTREGS FOR TESTING.
057063,000540: 07,3435           50061                           INDEX    ITEMP1                                
057064,000541: 07,3436           31401                           DCA      1400                                  
057065,000542: 07,3437           52071                           DXCH     RUPTREG1                              
057066,000543: 
057067,000544: 07,3440           10070                           CCS      RUPTREG1                              
057068,000545: 07,3441           13454                           TCF      MAJ+                                  
057069,000546: 07,3442           13444                           TCF      +2                                    
057070,000547: 07,3443           13611                           TCF      MAJ-                                  
057071,000548: 
057072,000549: 07,3444           10071                           CCS      RUPTREG2                              
057073,000550: 07,3445           13451                           TCF      MIN+                                  
057074,000551: 07,3446           13376                           TCF      STRTGYR2                              
057075,000552: 07,3447           13606                           TCF      MIN-                                  
057076,000553: 07,3450           13376                           TCF      STRTGYR2                              
057077,000554: 

Page 1320

057079,000556: 07,3451           63505        MIN+               AD       -GYROMIN                              #  SMALL POSITIVE COMMAND. SEE IF AT LEAST
057080,000557: 07,3452           00006                           EXTEND                                         #  16 GYRO PULSES.
057081,000558: 07,3453           63376                           BZMF     STRTGYR2                              
057082,000559: 
057083,000560: 07,3454           00006        MAJ+               EXTEND                                         #  DEFINITE POSITIVE OUTPUT.
057084,000561: 07,3455           33632                           DCA      GYROFRAC                              
057085,000562: 07,3456           20071                           DAS      RUPTREG1                              
057086,000563: 
057087,000564: 07,3457           30064                           CA       ITEMP4                                #  SELECT POSITIVE TORQUING FOR THIS GYRO.
057088,000565: 07,3460           00006                           EXTEND                                         
057089,000566: 07,3461           05014                           WOR      CHAN14                                
057090,000567: 
057091,000568: 07,3462           36115                           CAF      LOW7                                  #  LEAVE NUMBER OF POSSIBLE 8192 AUGMENTS
057092,000569: 07,3463           70071                           MASK     RUPTREG2                              #  TO INITIAL COMMAND IN MAJOR PART OF LONG
057093,000570: 07,3464           56071                           XCH      RUPTREG2                              #  TERM STORAGE AND TRUNCATED FRACTION
057094,000571: 07,3465           00006        GMERGE             EXTEND                                         #  IN MINOR PART. THE MAJOR PART WILL BE
057095,000572: 07,3466           74735                           MP       BIT8                                  #  COUNTED DOWN TO ZERO IN THE COURSE OF
057096,000573: 07,3467           54062                           TS       ITEMP2                                #  PUTTING OUT THE ENTIRE COMMAND.
057097,000574: 07,3470           30070                           CA       RUPTREG1                              
057098,000575: 07,3471           00006                           EXTEND                                         
057099,000576: 07,3472           74734                           MP       BIT9                                  
057100,000577: 07,3473           54070                           TS       RUPTREG1                              
057101,000578: 07,3474           30001                           CA       L                                     
057102,000579: 07,3475           00006                           EXTEND                                         
057103,000580: 07,3476           74727                           MP       BIT14                                 
057104,000581: 07,3477           26062                           ADS      ITEMP2                                #  INITIAL COMMAND.
057105,000582: 
057106,000583: 07,3500           00006                           EXTEND                                         #  SEE IF MORE THAN ONE PULSE TRAIN NEEDED
057107,000584: 07,3501           30071                           DCA      RUPTREG1                              #  (MORE THAN 16383 PULSES).
057108,000585: 07,3502           67770                           AD       MINUS1                                
057109,000586: 07,3503           10000                           CCS      A                                     
057110,000587: 07,3504           13552                           TCF      LONGGYRO                              
057111,000588: 07,3505           77601        -GYROMIN           OCT      -176                                  #  MAY BE ADJUSTED TO SPECIFY MINIMUM CMD
057112,000589: 07,3506           13512                           TCF      +4                                    
057113,000590: 
057114,000591: 07,3507           34727                           CAF      BIT14                                 
057115,000592: 07,3510           26062                           ADS      ITEMP2                                
057116,000593: 07,3511           34746                           CAF      ZERO                                  
057117,000594: 
057118,000595: 07,3512           50061                 +4        INDEX    ITEMP1                                
057119,000596: 07,3513           53401                           DXCH     1400                                  

Page 1321

057121,000598: 07,3514           30062                           CA       ITEMP2                                #  ENTIRE COMMAND.
057122,000599: 07,3515           54047        LASTSEG            TS       GYROCMD                               
057123,000600: 07,3516           03641                           TC       COARSTST                              
057124,000601: 
057125,000602: 07,3517           30047                           CA       GYROCMD                               
057126,000603: 07,3520           00006                           EXTEND                                         
057127,000604: 07,3521           74733                           MP       BIT10                                 #  WAITLIST DT
057128,000605: 07,3522           66266                           AD       THREE                                 #  TRUNCATION AND PHASE UNCERTAINTIES.
057129,000606: 07,3523           05205                           TC       WAITLIST                              
057130,000607: 07,3524  E3,1474                                  EBANK=   CDUIND                                
057131,000608: 07,3524           03536 16103                     2CADR    TWOPULSE                              
057132,000609: 
057133,000610: 07,3526           03532        EXITGYRO           TC       GYROEXIT                              
057134,000611: 07,3527           15263                           TCF      TASKOVER                              
057135,000612: 07,3530           34743        OUTPULSE           CA       BIT2                                  
057136,000613: 07,3531           54047                           TS       GYROCMD                               
057137,000614: 07,3532           34733        GYROEXIT           CAF      BIT10                                 
057138,000615: 07,3533           00006                           EXTEND                                         
057139,000616: 07,3534           05014                           WOR      CHAN14                                
057140,000617: 07,3535           00002                           TC       Q                                     
057141,000618: 07,3536           44734        TWOPULSE           CS       BIT9                                  
057142,000619: 07,3537           00006                           EXTEND                                         
057143,000620: 07,3540           03014                           WAND     CHAN14                                
057144,000621: 07,3541           03530                           TC       OUTPULSE                              
057145,000622: 07,3542           34744                           CA       BIT1                                  
057146,000623: 07,3543           05175                           TC       TWIDDLE                               
057147,000624: 07,3544           03372                           ADRES    STRTGYRO                              
057148,000625: 07,3545           34734                           CA       BIT9                                  
057149,000626: 07,3546           00006                           EXTEND                                         
057150,000627: 07,3547           05014                           WOR      CHAN14                                
057151,000628: 07,3550           03530                           TC       OUTPULSE                              
057152,000629: 07,3551           15263                           TCF      TASKOVER                              
057153,000630: 07,3552           50061        LONGGYRO           INDEX    ITEMP1                                
057154,000631: 07,3553           53401                           DXCH     1400                                  
057155,000632: 07,3554           34727                           CAF      BIT14                                 #  8192. INITIAL COMMAND IS AT LEAST 8192.
057156,000633: 07,3555           60062                           AD       ITEMP2                                
057157,000634: 07,3556           54047                           TS       GYROCMD                               
057158,000635: 
057159,000636: 07,3557           00006        AUG3               EXTEND                                         #  GET WAITLIST DT TO TIME WHEN TRAIN IS
057160,000637: 07,3560           74733                           MP       BIT10                                 #  ALMOST OUT.
057161,000638: 07,3561           67766                           AD       NEG3                                  
057162,000639: 07,3562           05205                           TC       WAITLIST                              
057163,000640: 07,3563  E3,1474                                  EBANK=   CDUIND                                
057164,000641: 07,3563           03566 16103                     2CADR    8192AUG                               
057165,000642: 
057166,000643: 07,3565           13526                           TCF      EXITGYRO                              
057167,000644: 07,3566           03641        8192AUG            TC       COARSTST                              
057168,000645: 
057169,000646: 07,3567           31311                           CA       LGYRO                                 #  ADD 8192 PULSES TO GYROCMD
057170,000647: 07,3570           54003                           TS       EBANK                                 

Page 1322

057172,000649: 07,3571           74350                           MASK     LOW8                                  
057173,000650: 07,3572           54061                           TS       ITEMP1                                
057174,000651: 
057175,000652: 07,3573           50061                           INDEX    ITEMP1                                #  SEE IF THIS IS THE LAST AUG.
057176,000653: 07,3574           11400                           CCS      1400                                  
057177,000654: 07,3575           13601                           TCF      AUG2                                  #  MORE TO COME.
057178,000655: 
057179,000656: 07,3576           34727                           CAF      BIT14                                 
057180,000657: 07,3577           26047                           ADS      GYROCMD                               
057181,000658: 07,3600           13516                           TCF      LASTSEG    +1                         
057182,000659: 
057183,000660: 07,3601           50061        AUG2               INDEX    ITEMP1                                
057184,000661: 07,3602           55400                           TS       1400                                  
057185,000662: 07,3603           34727                           CAF      BIT14                                 
057186,000663: 07,3604           26047                           ADS      GYROCMD                               
057187,000664: 07,3605           13557                           TCF      AUG3                                  #  COMPUTE DT.
057188,000665: 

Page 1323

057190,000667: 07,3606           63505        MIN-               AD       -GYROMIN                              #  POSSIBLE NEGATIVE OUTPUT.
057191,000668: 07,3607           00006                           EXTEND                                         
057192,000669: 07,3610           63376                           BZMF     STRTGYR2                              
057193,000670: 
057194,000671: 07,3611           00006        MAJ-               EXTEND                                         #  DEFINITE NEGATIVE OUTPUT.
057195,000672: 07,3612           43632                           DCS      GYROFRAC                              
057196,000673: 07,3613           20071                           DAS      RUPTREG1                              
057197,000674: 
057198,000675: 07,3614           30064                           CA       ITEMP4                                #  SELECT NEGATIVE TORQUING FOR THIS GYRO.
057199,000676: 07,3615           64734                           AD       BIT9                                  
057200,000677: 07,3616           00006                           EXTEND                                         
057201,000678: 07,3617           05014                           WOR      CHAN14                                
057202,000679: 
057203,000680: 07,3620           40070                           CS       RUPTREG1                              #  SET UP RUPTREGS TO FALL INTO GMERGE.
057204,000681: 07,3621           54070                           TS       RUPTREG1                              #  ALL NUMBERS PUT INTO GYROCMD ARE
057205,000682: 07,3622           40071                           CS       RUPTREG2                              #  POSITIVE - BIT9 OF CHAN 14 DETERMINES
057206,000683: 07,3623           76115                           MASK     LOW7                                  #  THE SIGN OF THE COMMAND.
057207,000684: 07,3624           40000                           COM                                            
057208,000685: 07,3625           56071                           XCH      RUPTREG2                              
057209,000686: 07,3626           40000                           COM                                            
057210,000687: 07,3627           13465                           TCF      GMERGE                                
057211,000688: 
057212,000689: 07,3630           01700        GDESELCT           OCT      1700                                  #  TURN OFF SELECT AND ACTIVITY BITS.
057213,000690: 
057214,000691: 07,3631           00000 00034  GYROFRAC           2DEC     .215       B-21                       
057215,000692: 

Page 1324

057217,000694:                                                                                                  #           IMU MODE SWITCHING ROUTINES COME HERE WHEN ACTION COMPLETE.
057218,000695: 
057219,000696: 07,3633           00006        ENDIMU             EXTEND                                         #  MODE IS BAD IF CAGE HAS OCCURED OR IF
057220,000697: 07,3634           00011                           READ     DSALMOUT                              #  ISS WARNING IS ON.
057221,000698: 07,3635           74744                           MASK     BIT1                                  
057222,000699: 07,3636           10000                           CCS      A                                     
057223,000700: 07,3637           13656                           TCF      IMUBAD                                
057224,000701: 
057225,000702: 07,3640           13704        IMUGOOD            TCF      GOODEND                               #  WITH C(A) = 0.
057226,000703: 
057227,000704: 07,3641           34741        COARSTST           CAF      BIT4                                  
057228,000705: 07,3642           00006                           EXTEND                                         
057229,000706: 07,3643           02012                           RAND     CHAN12                                
057230,000707: 07,3644           10000                           CCS      A                                     
057231,000708: 07,3645           13652                           TCF      DONTPULS                              
057232,000709: 
057233,000710: 07,3646           41277        CAGETSTG           CS       IMODES30                              
057234,000711: 07,3647           74737                           MASK     BIT6                                  
057235,000712: 07,3650           10000                           CCS      A                                     
057236,000713: 07,3651           00002                           TC       Q                                     
057237,000714: 
057238,000715: 07,3652           34746        DONTPULS           CAF      ZERO                                  
057239,000716: 07,3653           55311                           TS       LGYRO                                 
057240,000717: 
057241,000718: 07,3654           33371                           CAF      LGWAKE                                
057242,000719: 07,3655           05130                           TC       JOBWAKE                               
057243,000720: 
057244,000721: 07,3656           34746        IMUBAD             CAF      ZERO                                  
057245,000722: 07,3657           13701                           TCF      BADEND                                
057246,000723: 
057247,000724: 07,3660           34737        CAGETEST           CAF      BIT6                                  #  SUBROUTINE TO TERMINATE IMU MODE
057248,000725: 07,3661           71277                           MASK     IMODES30                              #  SWITCH IF IMU HAS BEEN CAGED.
057249,000726: 07,3662           10000                           CCS      A                                     
057250,000727: 07,3663           13656                           TCF      IMUBAD                                #  DIRECTLY.
057251,000728: 07,3664           00002                           TC       Q                                     #  WITH C(A) = +0.
057252,000729: 
057253,000730: 07,3665           41277        CAGETSTQ           CS       IMODES30                              #  SKIP IF IMU NOT BEING CAGED.
057254,000731: 07,3666           74737                           MASK     BIT6                                  
057255,000732: 07,3667           10000                           CCS      A                                     
057256,000733: 07,3670           24002                           INCR     Q                                     
057257,000734: 07,3671           00002                           TC       Q                                     
057258,000735: 
057259,000736: 07,3672           41277        CAGETSTJ           CS       IMODES30                              #  IF DURING MODE SWITCH INITIALIZATION
057260,000737: 07,3673           74737                           MASK     BIT6                                  #  IT IS FOUND THAT THE IMU IS BEING CAGED,
057261,000738: 07,3674           10000                           CCS      A                                     #  SET IMUCADR TO -0 TO INDICATE OPERATION
057262,000739: 07,3675           00002                           TC       Q                                     #  COMPLETE BUT FAILED. RETURN IMMEDIATELY
057263,000740: 
057264,000741: 07,3676           44746                           CS       ZERO                                  #  TO SWRETURN.
057265,000742: 07,3677           55301                           TS       IMUCADR                               
057266,000743: 07,3700           12742                           TCF      MODEEXIT                              
057267,000744: 

Page 1325

057269,000746:                                                                                                  #           GENERALIZED MODE SWITCHING TERMINATION. ENTER AT GOODEND FOR SUCCESSFUL COMPLETION OF AN I/O OPERATION
057270,000747:                                                                                                  #  OR AT BADEND FOR A N UNSUCCESSFUL ONE. C(A) OR ARRIVAL =0 FOR IMU, 1 FOR OPTICS.
057271,000748: 
057272,000749: 07,3701           54071        BADEND             TS       RUPTREG2                              #  DEVICE INDEX.
057273,000750: 07,3702           44746                           CS       ZERO                                  #  FOR FAILURE.
057274,000751: 07,3703           13706                           TCF      GOODEND    +2                         
057275,000752: 
057276,000753: 07,3704           54071        GOODEND            TS       RUPTREG2                              
057277,000754: 07,3705           44744                           CS       ONE                                   #  FOR SUCCESS.
057278,000755: 
057279,000756: 07,3706           54072                           TS       RUPTREG3                              
057280,000757: 07,3707           50071                           INDEX    RUPTREG2                              #  SEE IF USING PROGRAM ASLEEP.
057281,000758: 07,3710           11301                           CCS      MODECADR                              
057282,000759: 07,3711           13715                           TCF      +4                                    #  YES - WAKE IT UP.
057283,000760: 07,3712           13725                           TCF      ENDMODE                               #  IF 0, PROGRAM NOT IN YET.
057284,000761: 
057285,000762: 07,3713           00006                           EXTEND                                         
057286,000763: 07,3714           13726                           BZF      ENDMODE    +1                         #  BZF = TCF IF MODECADR = -0.
057287,000764: 
057288,000765: 07,3715           34746                           CAF      ZERO                                  #  WAKE SLEEPING PROGRAM.
057289,000766: 07,3716           50071                           INDEX    RUPTREG2                              
057290,000767: 07,3717           57301                           XCH      MODECADR                              
057291,000768: 07,3720           05130                           TC       JOBWAKE                               
057292,000769: 
057293,000770: 07,3721           40072                           CS       RUPTREG3                              #  ADVANCE LOC IF SUCCESSFUL.
057294,000771: 07,3722           50064                           INDEX    LOCCTR                                
057295,000772: 07,3723           26164                           ADS      LOC                                   
057296,000773: 
057297,000774: 07,3724           15263                           TCF      TASKOVER                              
057298,000775: 
057299,000776: 07,3725           30072        ENDMODE            CA       RUPTREG3                              #  -0 INDICATES OPERATION COMPLETE BUT
057300,000777: 07,3726           50071                 +1        INDEX    RUPTREG2                              #  UNSUCCESSFUL: -1 INDICATES COMPLETE AND
057301,000778: 07,3727           55301                           TS       MODECADR                              #  SUCCESSFUL.
057302,000779: 07,3730           15263                           TCF      TASKOVER                              
057303,000780: 

Page 1326

057305,000782:                                                                                                  #           GENERAL STALLING ROUTINE. USING PROGRAMS COME HERE TO WAIT FOR I/O COMPLETION.
057306,000783: 
057307,000784:                                                                                                  #  PROGRAM DESCRIPTION                                    DATE- 21 FEB 1967
057308,000785:                                                                                                  #                                            LOG SECTION IMU MODE SWITCHING
057309,000786:                                                                                                  #  MOD BY- R.MELANSON TO ADD DOCUMENTATION       ASSEMBLY SUNDISK  REV.  82
057310,000787: 
057311,000788:                                                                                                  #  FUNCTIONAL DESCRIPTION-
057312,000789:                                                                                                  #    TO DELAY FURTHER EXECUTION OF THE CALLING ROUTINE UNTIL ITS SELECTED
057313,000790:                                                                                                  #    I/O FUNCTION IS COMPLETE.THE FOLLOWING CHECKS ON THE CALLING ROUTINE:S
057314,000791:                                                                                                  #    MODECADR ARE MADE AND ACTED UPON.
057315,000792:                                                                                                  #      1) +0 INDICATES INCOMPLETE I/O OPERATION.CALLING ROUTINE IS PUT TO
057316,000793:                                                                                                  #         SLEEP.
057317,000794:                                                                                                  #      2) -1 INDICATES COMPLETED I/O OPERATION. STALL BYPASSES JOBSLEEP
057318,000795:                                                                                                  #         CALL AND RETURNS TO CALLING ROUTINE AT L+3
057319,000796:                                                                                                  #      3) -0 INDICATES COMPLETED I/O WITH FAILURE. STALL CLEARS MODECADR
057320,000797:                                                                                                  #         AND RETURNS TO CALLING ROUTINE AT L+2.
057321,000798:                                                                                                  #      4) VALUE GREATER THAN 0 INDICATES TWO ROUTINES CALLING FOR USE OF
057322,000799:                                                                                                  #         SAME DEVICE. STALL EXITS TO ABORT WHICH EXECUTES A PROGRAM
057323,000800:                                                                                                  #         RESTART WHICH IN TURN CLEARS ALL MODECADR REGISTERS.
057324,000801: 
057325,000802:                                                                                                  #   CALLING SEQUENCE-
057326,000803:                                                                                                  #    L   TC   BANKCALL
057327,000804:                                                                                                  #    L+1 CADR (ONE OF 5 STALL ADDRESSES I.E. IMUSTALL,OPTSTALL,RADSTALL,
057328,000805:                                                                                                  #              AOTSTALL,OR ATTSTALL)
057329,000806: 
057330,000807:                                                                                                  #   NORMAL-EXIT MODE-
057331,000808:                                                                                                  #    TCF   JOBSLEEP OR TCF  MODEXIT
057332,000809: 
057333,000810:                                                                                                  #  ALARM OR ABORT EXIT MODE-
057334,000811:                                                                                                  #    TC   ABORT
057335,000812: 
057336,000813:                                                                                                  #  OUTPUT-
057337,000814:                                                                                                  #     MODECADR= CADR IF JOBSLEEP
057338,000815:                                                                                                  #     MODECADR=+0    IF I/O COMPLETE
057339,000816:                                                                                                  #     BUF2=L+3       IF I/O COMPLETE AND GOOD.
057340,000817:                                                                                                  #     BUF2=L+2 IF I/O COMPLETE BUT FAILED.
057341,000818: 
057342,000819:                                                                                                  #  ERASABLE INITIALIZATION-
057343,000820:                                                                                                  #    BUF2 CONTAINS RETURN ADDRESS PLUS 1,(L+2)
057344,000821:                                                                                                  #    BUF2+1 CONTAINS FBANK VALUE OF CALLING ROUTINE.
057345,000822:                                                                                                  #    MODECADR OF CALLING ROUTINE CONTAINS +0,-1,-0 OR  CADR RETURN ADDRESS.
057346,000823: 
057347,000824:                                                                                                  #  DEBRIS-
057348,000825:                                                                                                  #    RUPTREG2 AND CALLING ROUTINE MODECADR.
057349,000826: 
057350,000827: 07,3731           34744        AOTSTALL           CAF      ONE                                   #  AOT.
057351,000828: 07,3732           03736                           TC       STALL                                 
057352,000829: 
057353,000830: 07,3733           34743        RADSTALL           CAF      TWO                                   
057354,000831: 07,3734           13736                           TCF      STALL                                 
057355,000832: 

Page 1327

057357,000834: 07,3735  07,3731               OPTSTALL           EQUALS   AOTSTALL                              
057358,000835: 
057359,000836: 07,3735           34746        IMUSTALL           CAF      ZERO                                  #  IMU.
057360,000837: 
057361,000838: 07,3736           00004        STALL              INHINT                                         
057362,000839: 07,3737           54071                           TS       RUPTREG2                              #  SAVE DEVICE INDEX.
057363,000840: 07,3740           50000                           INDEX    A                                     #  SEE IF OPERATION COMPLETE.
057364,000841: 07,3741           11301                           CCS      MODECADR                              
057365,000842: 07,3742           13760                           TCF      MODABORT                              #  ALLOWABLE STATES ARE +0, -1, AND -0.
057366,000843: 07,3743           13754                           TCF      MODESLP                               #  OPERATION INCOMPLETE.
057367,000844: 07,3744           13750                           TCF      MODEGOOD                              #  COMPLETE AND GOOD IF = -1.
057368,000845: 
057369,000846: 07,3745           50071        MG2                INDEX    RUPTREG2                              #  COMPLETE AND FAILED IF -0. RESET TO +0.
057370,000847: 07,3746           55301                           TS       MODECADR                              #  RETURN TO CALLER.
057371,000848: 07,3747           12742                           TCF      MODEEXIT                              
057372,000849: 
057373,000850: 07,3750           10000        MODEGOOD           CCS      A                                     #  MAKE SURE INITIAL STATE -1.
057374,000851: 07,3751           13760                           TCF      MODABORT                              
057375,000852: 
057376,000853: 07,3752           24133                           INCR     BUF2                                  #  IF SO, INCREMENT RETURN ADDRESS AND
057377,000854: 07,3753           13745                           TCF      MG2                                   #  RETURN IMMEDIATELY, SETTING CADR = +0.
057378,000855: 
057379,000856: 07,3754           04636        MODESLP            TC       MAKECADR                              #  CALL FROM SWITCHABLE FIXED ONLY.
057380,000857: 07,3755           50071                           INDEX    RUPTREG2                              
057381,000858: 07,3756           55301                           TS       MODECADR                              
057382,000859: 07,3757           15124                           TCF      JOBSLEEP                              
057383,000860: 
057384,000861: 07,3760           52134        MODABORT           DXCH     BUF2                                  
057385,000862: 07,3761           05712                           TC       BAILOUT1                              #  TWO PROGRAMS USING THE SAME DEVICE.
057386,000863: 07,3762           31210                           OCT      31210                                 
057387,000864: 

Page 1328

057389,000866:                                                                                                  #           CONSTANTS FOR MODE SWITCHING ROUTINES
057390,000867: 
057391,000868: 07,3763     5745               BITS3&4            =        OCT14                                 
057392,000869: 07,3763     4762               BITS4&6            =        OCT50                                 
057393,000870: 07,3763           00030        BITS4-5            OCT      00030                                 
057394,000871: 07,3764     4735               IMUSEFLG           EQUALS   BIT8                                  #  INTERPRETER SWITCH 7.
057395,000872: 07,3764           77500        -COMMAX            DEC      -191       B-14                       
057396,000873: 07,3765           77477        -COMMAX-           DEC      -192       B-14                       
057397,000874: 07,3766           00074        600MS              DEC      60         B-14                       
057398,000875: 07,3767  07,3175               IMUFIN20           =        IMUFINE                               
057399,000876: 21,2000                                           SETLOC   MANUR                                 
057400,000877: 21,2000                                           BANK                                           
057401,000878: 
057402,000879: 21,2764           31304        GOMANUR            CA       ATTCADR                               #  IS KALCMANU FREE
057403,000880: 21,2765           00006                           EXTEND                                         
057404,000881: 21,2766           12771                           BZF      OKMANUR                               
057405,000882: 21,2767           04626                           TC       POSTJUMP                              
057406,000883: 21,2770           17760                           CADR     MODABORT                              
057407,000884: 21,2771           00006        OKMANUR            EXTEND                                         
057408,000885: 21,2772           30134                           DCA      BUF2                                  
057409,000886: 21,2773           53305                           DXCH     ATTCADR                               #  SAVE FINAL RETURN FOR KALCMAN3
057410,000887: 
057411,000888: 21,2774           30006                           CA       BBANK                                 
057412,000889: 21,2775           74750                           MASK     SEVEN                                 
057413,000890: 21,2776           27305                           ADS      ATTCADR    +1                         
057414,000891: 
057415,000892: 21,2777           30167                           CA       PRIORITY                              
057416,000893: 21,3000           77746                           MASK     PRIO37                                
057417,000894: 21,3001           55306                           TS       ATTPRIO                               #  SAVE USERS PRIO
057418,000895: 
057419,000896: 21,3002           33006                           CAF      KALEBCON                              #  SET EBANK FOR KALCMAN3
057420,000897: 21,3003           54003                           TS       EBANK                                 
057421,000898: 21,3004           04626                           TC       POSTJUMP                              
057422,000899: 21,3005           44004                           CADR     KALCMAN3                              
057423,000900: 21,3006           03275        KALEBCON           ECADR    BCDU                                  
057424,000901: 

Page 1329

057426,000903:                                                                                                  #  PROGRAM DESCRIPTION
057427,000904:                                                                                                  #  IMU STATUS CHECK ROUTINE R02 (SUBROUTINE UTILITY)
057428,000905:                                                                                                  #  MOD NO - 1
057429,000906:                                                                                                  #  MOD BY - N.BRODEUR
057430,000907:                                                                                                  #  FUNCTIONAL DESCRIPTION
057431,000908: 
057432,000909:                                                                                                  #  TO CHECK WHETHER IMU IS ON AND IF ON WHETHER IT IS ALIGNED TO AN
057433,000910:                                                                                                  #  ORIENTATION KNOWN BY THE CMC. TO REQUEST SELECTION OF THE APPROPRIATE
057434,000911:                                                                                                  #  PROGRAM IF THE IMU IS OFF OR NOT ALIGNED TO AN ORIENTATION KNOWN BY THE
057435,000912:                                                                                                  #  CMC. CALLED THROUGH BANKCALL
057436,000913:                                                                                                  #  CALLING SEQUENCE-
057437,000914: 
057438,000915:                                                                                                  #  L        TC     BANKCALL
057439,000916:                                                                                                  #  L+1      CADR   R02BOTH
057440,000917:                                                                                                  #  SUBROUTINES CALLED
057441,000918: 
057442,000919:                                                                                                  #        VARALARM
057443,000920:                                                                                                  #        FLAGUP
057444,000921:                                                                                                  #  NORMAL EXIT MODES
057445,000922: 
057446,000923:                                                                                                  #  AT L+2 OF CALLING SEQUENCE
057447,000924:                                                                                                  #  ALARM OR ABORT EXIT MODES
057448,000925:                                                                                                  #        GOTOPOOH, WITH ALARM
057449,000926:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED
057450,000927: 
057451,000928:                                                                                                  #  NONE
057452,000929:                                                                                                  #  DEBRIS
057453,000930: 
057454,000931:                                                                                                  #  CENTRALS-A,Q,L
057455,000932: 04,2000                                           SETLOC   R02                                   
057456,000933: 04,2000                                           BANK                                           
057457,000934: 04,3256                                           COUNT*   $$/R02                                
057458,000935: 04,3256           00063        DEC51              DEC      51         B-14                       
057459,000936: 
057460,000937: 
057461,000938: 15,2000                                           SETLOC   R02BNK15                              
057462,000939: 15,2000                                           BANK                                           
057463,000940: 
057464,000941: 15,3757           34730        R02BOTH            CAF      REFSMBIT                              
057465,000942: 15,3760           70077                           MASK     FLAGWRD3                              
057466,000943: 15,3761           10000                           CCS      A                                     
057467,000944: 15,3762           03773                           TC       R02ZERO                               #  ZERO IMUS
057468,000945: 
057469,000946: 15,3763           31277                           CA       IMODES30                              
057470,000947: 15,3764           74734                           MASK     BIT9                                  #  IS ISS INITIALIZED
057471,000948: 15,3765           00006                           EXTEND                                         
057472,000949: 15,3766           13770                           BZF      +2                                    
057473,000950: 15,3767           44741                           CS       BIT4                                  #  SEND IMU ALARM CODE 210
057474,000951: 15,3770           63776                           AD       OCT220                                #  SEND REFSMM ALARM
057475,000952: 15,3771           05740                           TC       VARALARM                              
057476,000953: 

Page 1330

057478,000955: 15,3772           06001                           TC       GOTOPOOH                              
057479,000956: 
057480,000957: 15,3773           05506        R02ZERO            TC       UPFLAG                                
057481,000958: 15,3774           00007                           ADRES    IMUSE                                 
057482,000959: 15,3775           14622                           TCF      SWRETURN                              
057483,000960: 15,3776           00220        OCT220             OCT      220                                   
057484,000961: 

Page 1331

057486,000963:                                                                                                  #  PROGRAM DESCRIPTION   P06   10FEB67
057487,000964: 
057488,000965:                                                                                                  #  TRANSFER THE ISS/CMC FROM THE OPERATE TO THE STANDBY CONDITION.
057489,000966: 
057490,000967:                                                                                                  #  THE NORMAL CONDITION OF READINESS OF THE GNCS WHEN NOT IN USE IS STANDBY. IN THIS CONDITION THE IMU
057491,000968:                                                                                                  #  HEATER POWER IS ON. THE IMU OPERATE POWER IS OFF. THE COMPUTER POWER IS ON. THE OPTICS POWER IS OFF. THE
057492,000969:                                                                                                  #  CMC  STANDBY ON THE MAIN AND LEB DISKYS IS ON.
057493,000970: 
057494,000971:                                                                                                  #  CALLING SEQUENCE:
057495,000972:                                                                                                  #           ASTRONAUT REQUEST THROUGH DSKY     V37E 06E.
057496,000973: 
057497,000974:                                                                                                  #  SUBROUTINES CALLED:
057498,000975:                                                                                                  #           GOPERF1
057499,000976:                                                                                                  #           BANKCALL
057500,000977:                                                                                                  #           FLAGDOWN
057501,000978: 

Page 1332

057503,000980:                                                                                                  #  PRESTAND PREPARES FOR STANDBY BY SNAPSHOTTING THE SCALER AND TIME1 TIME2
057504,000981:                                                                                                  #  THE LOW 5 BITS OF THE SCALER ARE INSPECTED TO INSURE COMPATABILITY
057505,000982:                                                                                                  #  BETWEEN THE SCALER READING AND THE TIME1 TIME2 READING.
057506,000983: 
057507,000984: 37,2000                                           SETLOC   P05P06                                
057508,000985: 37,2000                                           BANK                                           
057509,000986: 
057510,000987: 37,3654     0314                                  EBANK=   TIME2SAV                              
057511,000988: 37,3654                                           COUNT*   $$/P06                                
057512,000989: 
057513,000990: 37,3654           05506        P06                TC       UPFLAG                                #  SET NODOV37 BIT
057514,000991: 37,3655           00054                           ADRES    NODOFLAG                              
057515,000992: 
057516,000993: 37,3656           00004        PRESTAND           INHINT                                         
057517,000994: 37,3657           00006                           EXTEND                                         
057518,000995: 37,3660           30025                           DCA      TIME2                                 #  SNAPSHOT TIME1TIME2
057519,000996: 37,3661           52315                           DXCH     TIME2SAV                              
057520,000997: 37,3662           03713                           TC       SCALPREP                              
057521,000998: 37,3663           03656                           TC       PRESTAND                              #  T1,T2,SCALER NOT COMPATIBLE
057522,000999: 37,3664           52155                           DXCH     MPAC                                  #  T1,T2 AND SCALER OK
057523,001000: 37,3665           52317                           DXCH     SCALSAVE                              #  STORE SCALER
057524,001001: 37,3666           00004                           INHINT                                         
057525,001002: 37,3667           04607                           TC       BANKCALL                              
057526,001003: 37,3670           17162                           CADR     RNDREFDR                              #  REFSMM, DRIFT, TRACK FLAGS DOWN
057527,001004: 
057528,001005: 37,3671           05520                           TC       DOWNFLAG                              
057529,001006: 37,3672           00007                           ADRES    IMUSE                                 #  IMUSE DOWN
057530,001007: 37,3673           05520                           TC       DOWNFLAG                              
057531,001008: 37,3674           00010                           ADRES    RNDVZFLG                              #  RNDVZFLG DOWN
057532,001009: 
057533,001010: 37,3675           34732                           CAF      BIT11                                 
057534,001011: 37,3676           00006                           EXTEND                                         
057535,001012: 37,3677           05013                           WOR      CHAN13                                #  SET STANDBY ENABLE BIT
057536,001013: 
057537,001014: 37,3700           05355                           TC       PHASCHNG                              #  SET RESTART TO POSTAND WHEN STANDBY
057538,001015: 37,3701           07024                           OCT      07024                                 #    RECOVERS
057539,001016: 37,3702           20000                           OCT      20000                                 
057540,001017: 37,3703     0316                                  EBANK=   SCALSAVE                              
057541,001018: 37,3703           03733 76060                     2CADR    POSTAND                               
057542,001019: 
057543,001020: 37,3705           34765                           CAF      OCT62                                 
057544,001021: 37,3706           04607                           TC       BANKCALL                              
057545,001022: 37,3707           20635                           CADR     GOPERF1                               
057546,001023: 37,3710           13705                           TCF      -3                                    
057547,001024: 37,3711           13705                           TCF      -4                                    
057548,001025: 37,3712           13705                           TCF      -5                                    
057549,001026: 
057550,001027: 37,3713     4765               OCT62              EQUALS   .5SEC                                 #  DEC 50 = OCT 62
057551,001028: 
057552,001029:                                                                                                  #  THE LOW 5 BITS OF THE SCALER READS 10000 FOR THE FIRST INTERVAL AFTER A

Page 1333

057554,001031:                                                                                                  #  T1 INCREMENT. IF SCALPREP DETECTS THIS INTERVAL THE T1,T2 AND SCALER
057555,001032:                                                                                                  #  DATA ARE NOT COMPATABLE AND RETURN IS TO L+1 FOR ANOTHER READING OF THE
057556,001033:                                                                                                  #  DATA. OTHERWISE, THE RETURN IS TO L+2 TO PROCEED. ROUTINE ALSO PREPARES
057557,001034:                                                                                                  #  THE SCALER READING FOR COMPUTATION OF THE INCREMENT TO UPDATE T1T2. (THE
057558,001035:                                                                                                  #  10 MS BIT (BIT 6) OF THE SCALER IS INCREMENTED 5 MS OUT OF PHASE FROM
057559,001036:                                                                                                  #  T1.) ADDITION OF 5 MS (BIT 5) TO THE SCALER READING HAS THE EFFECT OF
057560,001037:                                                                                                  #  ADJUSTING BIT 6 IN THE SCALER TO BE IN PHASE WITH BIT 1 OF T1. THE LOW 5
057561,001038:                                                                                                  #  BITS OF THE SCALER READING ARE THEN SET TO ZERO, TO TRUNCATE THE SCALER
057562,001039:                                                                                                  #  DATA TO 10 MS. RESULTS ARE STORED IN MPAC, +1.
057563,001040: 
057564,001041: 37,3713           00006        SCALPREP           EXTEND                                         
057565,001042: 37,3714           22156                           QXCH     MPAC       +2                         
057566,001043: 37,3715           04103                           TC       FINETIME   +1                         
057567,001044: 37,3716           00003                           RELINT                                         
057568,001045: 37,3717           52155                           DXCH     MPAC                                  
057569,001046: 37,3720           34740                           CA       BIT5                                  #  ADD 5 MS TO THE SCALER READING.
057570,001047: 37,3721           54001                           TS       L                                     
057571,001048: 37,3722           34746                           CA       ZERO                                  
057572,001049: 37,3723           20155                           DAS      MPAC                                  
057573,001050: 37,3724           44337                           CS       LOW5                                  #  SET LOW 5 BITS OF (SCALER+5MS) TO ZERO
057574,001051: 37,3725           70155                           MASK     MPAC       +1                         #  AND STORE RESULTS IN MPAC,+1.
057575,001052: 37,3726           56155                           XCH      MPAC       +1                         
057576,001053: 37,3727           74337                           MASK     LOW5                                  #  TEST LOW 5 BITS OF SCALER FOR THE FIRST
057577,001054:                                                                                                  #  INTERVAL AFTER THE T1 INCREMENT
057578,001055:                                                                                                  #  (NOW = 00000, SINCE BIT 5 ADDED).
057579,001056: 37,3730           10000                           CCS      A                                     #  IS IT 1ST INTERVAL AFTER T1 INCREMENT
057580,001057: 37,3731           24156                           INCR     MPAC       +2                         #  NO
057581,001058: 37,3732           00156                           TC       MPAC       +2                         #  YES
057582,001059: 
057583,001060:                                                                                                  #  POSTAND RECOVERS TIME AFTER STANDBY.THE SCALER IS SNAPSHOTTED AND THE
057584,001061:                                                                                                  #  TIME1 TIME2 COUNTER IS SET TO ZERO. THE LOW 5 BITS OF THE SCALER ARE
057585,001062:                                                                                                  #  INSPECTED TO INSURE COMPATABILITY BETWEEN THE SCALER READING AND THE
057586,001063:                                                                                                  #  CLEARING OF THE TIME COUNTER. IT THEN COMPUTES THE DIFFERENCE IN SCALER
057587,001064:                                                                                                  #  VALUES (IN DP) AND ADDS THIS TO THE PREVIOUSLY SNAPSHOTTED VALUES OF
057588,001065:                                                                                                  #  TIME1 TIME2 AND PLACES THIS NEW TIME INTO THE TIME1 TIME2 COUNTER.
057589,001066: 
057590,001067: 37,3733                                           COUNT*   $$/P05                                
057591,001068: 
057592,001069: 37,3733           44732        POSTAND            CS       BIT11                                 #  RECOVER TIME AFTER STANDBY.
057593,001070: 37,3734           00006                           EXTEND                                         
057594,001071: 37,3735           03013                           WAND     CHAN13                                #  CLEAR STANDBY ENABLE BIT
057595,001072: 37,3736           00004                           INHINT                                         
057596,001073: 37,3737           34746                           CA       ZERO                                  
057597,001074: 37,3740           54001                           TS       L                                     
057598,001075: 37,3741           52025                           DXCH     TIME2                                 #  CLEAR TIME1TIME2
057599,001076: 37,3742           03713                           TC       SCALPREP                              #  STORE SCALER IN MPAC, MPAC+1
057600,001077: 37,3743           03736                           TC       POSTAND    +3                         #  T1,T2,SCALER NOT COMPATIBLE
057601,001078: 37,3744           00006                           EXTEND                                         #  T1,T2 AND SCALER OK
057602,001079: 37,3745           40317                           DCS      SCALSAVE                              
057603,001080: 37,3746           20155                           DAS      MPAC                                  #  FORM DP DIFFERENCE OF POSTSTANDBY SCALER

Page 1334

057605,001082: 37,3747           34733                           CAF      BIT10                                 #  MINUS PRESTANDBY SCALER AND SHIFT RIGHT
057606,001083: 37,3750           07330                           TC       SHORTMP                               #  5 TO ALIGN BITS WITH TIME1TIME2.
057607,001084: 37,3751           34746                           CAF      ZERO                                  
057608,001085: 37,3752           54156                           TS       MPAC       +2                         #  NEEDED FOR TP AGREE
057609,001086: 37,3753           07300                           TC       TPAGREE                               #  MAKE DP DIFF AGREE
057610,001087: 37,3754           10154                           CCS      MPAC                                  
057611,001088: 37,3755           03762                           TC       POSTCOM                               #  IF DP DIFF NET +, NO SCALER OVERFLOW
057612,001089: 37,3756           03762                           TC       POSTCOM                               #  BETWEEN PRE AND POST STANDBY.
057613,001090: 37,3757           03760                           TC       +1                                    #  IF DP DIFF NET -, SCALER OVERFLOWED. ADD
057614,001091: 37,3760           34733                           CAF      BIT10                                 #  BIT 10 TO HIGH DIFF TO CORRECT.
057615,001092: 37,3761           26154                           ADS      MPAC                                  
057616,001093: 37,3762           00006        POSTCOM            EXTEND                                         #  C(MPAC,+1) IS MAGNITUDE OF DELTA SCALER.
057617,001094: 37,3763           30315                           DCA      TIME2SAV                              #  PRESTANDBY TIME1TIME2
057618,001095: 37,3764           20155                           DAS      MPAC                                  
057619,001096: 37,3765           07300                           TC       TPAGREE                               #  FORCE SIGN AGREEMENT
057620,001097: 37,3766           52155                           DXCH     MPAC                                  #  UPDATED VALUE FOR T1,T2.
057621,001098: 37,3767           20025                           DAS      TIME2                                 #  LOAD UPDATED VALUE INTO T1,T2, WITH
057622,001099: 37,3770           05520                           TC       DOWNFLAG                              #  CLEAR NODOFLAG
057623,001100: 37,3771           00054                           ADRES    NODOFLAG                              
057624,001101: 
057625,001102: 37,3772           06001                           TC       GOTOPOOH                              
057626,001103: 

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