Source Code

These source-code files are part of a reconstructed copy of Luminary 178, the final release of the Apollo 14 Lunar Module (LM) Apollo Guidance Computer (AGC) software.

The reconstruction began with source code of Zerlina 56, Luminary 210, and Luminary 131, previously transcribed from digitized copies of those programs. The code was created by combining the three, using Zerlina 56 as a base, since it was based off of Luminary 183. The differences between the three were carefully merged using the Luminary memos as a guide, with all changes made after Luminary 178 being backed out. The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152N. Note that page numbers in the reconstructed code match those for the baseline log section mentioned in each file's changelog; the page numbers for a real Luminary 178 listing would be different.

Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository.

055660,000002:                                                                                                  ## Copyright:   Public domain.
055661,000003:                                                                                                  ## Filename:    IMU_MODE_SWITCHING_ROUTINES.agc
055662,000004:                                                                                                  ## Purpose:     A section of Luminary revision 178.
055663,000005:                                                                                                  ##              It is part of the reconstructed source code for the final
055664,000006:                                                                                                  ##              release of the flight software for the Lunar Module's
055665,000007:                                                                                                  ##              (LM) Apollo Guidance Computer (AGC) for Apollo 14. The
055666,000008:                                                                                                  ##              code has been recreated from copies of Zerlina 56, Luminary
055667,000009:                                                                                                  ##              210, and Luminary 131, as well as many Luminary memos.
055668,000010:                                                                                                  ##              It has been adapted such that the resulting bugger words
055669,000011:                                                                                                  ##              exactly match those specified for Luminary 178 in NASA
055670,000012:                                                                                                  ##              drawing 2021152N, which gives relatively high confidence
055671,000013:                                                                                                  ##              that the reconstruction is correct.
055672,000014:                                                                                                  ## Reference:   pp. 1298-1326
055673,000015:                                                                                                  ## Assembler:   yaYUL
055674,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
055675,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
055676,000018:                                                                                                  ## Mod history: 2019-08-14 MAS  Created from Zerlina 56.
055677,000019:                                                                                                  ##              2019-09-15 MAS  Removed DONTPULS, COARSTST, and CAGETSTG,
055678,000020:                                                                                                  ##                              which were added in Luminary 183.
055679,000021: 

Page 1298

055681,000023:    5470                                           BLOCK    02                                    
055682,000024:    4000                                           SETLOC   FFTAG3                                
055683,000025:    4000                                           BANK                                           
055684,000026: 
055685,000027:    5470  E3,1471                                  EBANK=   COMMAND                               
055686,000028: 
055687,000029:                                                                                                  #           FIXED-FIXED ROUTINES.
055688,000030: 
055689,000031:    5470                                           COUNT*   $$/IMODE                              
055690,000032:    5470           34755        ZEROICDU           CAF      ZERO                                  #  ZERO ICDU COUNTERS.
055691,000033:    5471           54032                           TS       CDUX                                  
055692,000034:    5472           54033                           TS       CDUY                                  
055693,000035:    5473           54034                           TS       CDUZ                                  
055694,000036:    5474           00002                           TC       Q                                     
055695,000037: 
055696,000038:    5475     4743               SPSCODE            =        BIT9                                  
055697,000039: 

Page 1299

055699,000041:                                                                                                  #           IMU ZEROING ROUTINE.
055700,000042: 
055701,000043: 11,3774                                           BANK     11                                    
055702,000044: 07,2000                                           SETLOC   MODESW                                
055703,000045: 07,2000                                           BANK                                           
055704,000046: 
055705,000047: 07,2700                                           COUNT*   $$/IMODE                              
055706,000048: 07,2700           00004        IMUZERO            INHINT                                         #  ROUTINE TO ZERO ICDUS.
055707,000049: 07,2701           41035                           CS       DSPTAB     +11D                       #  DONT ZERO CDUS IF IMU IN GIMBAL LOCK AND
055708,000050: 07,2702           74771                           MASK     BITS4&6                               #  COARSE ALIGN (GIMBAL RUNAWAY PROTECTION)
055709,000051: 07,2703           10000                           CCS      A                                     
055710,000052: 07,2704           12710                           TCF      IMUZEROA                              
055711,000053: 
055712,000054: 07,2705           05600                           TC       ALARM                                 #  IF SO.
055713,000055: 07,2706           00206                           OCT      00206                                 
055714,000056: 
055715,000057: 07,2707           13663                           TCF      CAGETSTJ   +4                         #  IMMEDIATE FAILURE.
055716,000058: 
055717,000059: 07,2710           03657        IMUZEROA           TC       CAGETSTJ                              
055718,000060:                                                                                                  #           DELETE
055719,000061: 07,2711           41300                           CS       IMODES33                              #  DISABLE DAP AUTO AND HOLD MODES
055720,000062: 07,2712           74773                           MASK     SUPER011                              #      BIT5 FOR GROUND
055721,000063: 07,2713           27300                           ADS      IMODES33                              
055722,000064: 
055723,000065: 07,2714           41277                           CS       IMODES30                              #  INHIBIT ICDUFAIL AND IMUFAIL (IN CASE WE
055724,000066: 07,2715           75752                           MASK     BITS3&4                               #  JUST CAME OUT OF COARSE ALIGN).
055725,000067: 07,2716           27277                           ADS      IMODES30                              
055726,000068: 
055727,000069: 07,2717           44771                           CS       BITS4&6                               #  SEND ZERO ENCODE WITH COARSE AND ERROR
055728,000070: 07,2720           00006                           EXTEND                                         #  COUNTER DISABLED.
055729,000071: 07,2721           03012                           WAND     CHAN12                                
055730,000072: 
055731,000073: 07,2722           03252                           TC       NOATTOFF                              #  TURN OFF NO ATT LAMP.
055732,000074: 
055733,000075: 07,2723           34747                           CAF      BIT5                                  
055734,000076: 07,2724           00006                           EXTEND                                         
055735,000077: 07,2725           05012                           WOR      CHAN12                                
055736,000078: 
055737,000079: 07,2726           05470                           TC       ZEROICDU                              
055738,000080: 07,2727           34746                           CAF      BIT6                                  #  WAIT 320 MS TO GIVE AGS ADEQUATE TIME TO
055739,000081: 07,2730           05214                           TC       WAITLIST                              #  RECEIVE ITS PULSE TRAIN.
055740,000082: 07,2731  E3,1474                                  EBANK=   CDUIND                                
055741,000083: 07,2731           02743 16103                     2CADR    IMUZERO2                              
055742,000084: 
055743,000085: 
055744,000086: 07,2733           41277                           CS       IMODES30                              #  SEE IF IMU OPERATING AND ALARM IF NOT.
055745,000087: 07,2734           74743                           MASK     BIT9                                  
055746,000088: 07,2735           10000                           CCS      A                                     
055747,000089: 07,2736           12741                           TCF      MODEEXIT                              

Page 1300

055749,000091: 07,2737           05600                           TC       ALARM                                 
055750,000092: 07,2740           00210                           OCT      210                                   
055751,000093: 
055752,000094: 07,2741           00003        MODEEXIT           RELINT                                         #  GENERAL MODE-SWITCHING EXIT.
055753,000095: 07,2742           14631                           TCF      SWRETURN                              
055754,000096: 
055755,000097: 
055756,000098: 07,2743           03645        IMUZERO2           TC       CAGETEST                              
055757,000099: 07,2744           05470                           TC       ZEROICDU                              #  ZERO CDUX, CDUY, CDUZ
055758,000100: 
055759,000101: 07,2745           44747                           CS       BIT5                                  #  REMOVE ZERO DISCRETE.
055760,000102: 07,2746           00006                           EXTEND                                         
055761,000103: 07,2747           03012                           WAND     CHAN12                                
055762,000104: 
055763,000105: 07,2750           34741                           CAF      BIT11                                 #  WAIT 10 SECS FOR CTRS TO FIND GIMBALS
055764,000106: 07,2751           05235                           TC       VARDELAY                              
055765,000107: 
055766,000108: 07,2752           03645        IMUZERO3           TC       CAGETEST                              
055767,000109: 07,2753           45752                           CS       BITS3&4                               #  REMOVE IMUFAIL AND ICDUFAIL INHIBIT.
055768,000110: 07,2754           71277                           MASK     IMODES30                              
055769,000111: 07,2755           55277                           TS       IMODES30                              
055770,000112: 
055771,000113: 07,2756           44773                           CS       SUPER011                              #  ENABLE DAP AUTO AND HOLD MODES
055772,000114: 07,2757           71300                           MASK     IMODES33                              #      BIT5 FOR GROUND
055773,000115: 07,2760           55300                           TS       IMODES33                              
055774,000116: 
055775,000117: 07,2761           04674                           TC       IBNKCALL                              #  SET ISS WARNING IF EITHER OF ABOVE ARE
055776,000118: 07,2762           14703                           CADR     SETISSW                               #  PRESENT.
055777,000119: 
055778,000120: 07,2763           13635                           TCF      ENDIMU                                
055779,000121: 

Page 1301

055781,000123:                                                                                                  #           IMU COARSE ALIGN MODE.
055782,000124: 
055783,000125: 07,2764           00004        IMUCOARS           INHINT                                         
055784,000126: 07,2765           03657                           TC       CAGETSTJ                              
055785,000127: 07,2766           03130                           TC       SETCOARS                              
055786,000128: 
055787,000129: 07,2767           36245                           CAF      SIX                                   
055788,000130: 07,2770           05214                           TC       WAITLIST                              
055789,000131: 07,2771  E3,1474                                  EBANK=   CDUIND                                
055790,000132: 07,2771           02774 16103                     2CADR    COARS                                 
055791,000133: 
055792,000134: 
055793,000135: 07,2773           12741                           TCF      MODEEXIT                              
055794,000136: 
055795,000137: 07,2774           03645        COARS              TC       CAGETEST                              
055796,000138: 07,2775           34746                           CAF      BIT6                                  #  ENABLE ALL THREE ISS CDU ERROR COUNTERS
055797,000139: 07,2776           00006                           EXTEND                                         
055798,000140: 07,2777           05012                           WOR      CHAN12                                
055799,000141: 
055800,000142: 07,3000           34752                           CAF      TWO                                   #  SET CDU INDICATOR
055801,000143: 07,3001           55474        COARS1             TS       CDUIND                                
055802,000144: 
055803,000145: 07,3002           51474                           INDEX    CDUIND                                #  COMPUTE THETAD - THETAA IN 1:S
055804,000146: 07,3003           30321                           CA       THETAD                                #    COMPLEMENT FORM
055805,000147: 07,3004           00006                           EXTEND                                         
055806,000148: 07,3005           51474                           INDEX    CDUIND                                
055807,000149: 07,3006           20032                           MSU      CDUX                                  
055808,000150: 07,3007           00006                           EXTEND                                         
055809,000151: 07,3010           74737                           MP       BIT13                                 #  SHIFT RIGHT 2
055810,000152: 07,3011           56001                           XCH      L                                     #  ROUND
055811,000153: 07,3012           60000                           DOUBLE                                         
055812,000154: 07,3013           54061                           TS       ITEMP1                                
055813,000155: 07,3014           13016                           TCF      +2                                    
055814,000156: 07,3015           26001                           ADS      L                                     
055815,000157: 
055816,000158: 07,3016           51474                           INDEX    CDUIND                                #  DIFFERENCE TO BE COMPUTED
055817,000159: 07,3017           23471                           LXCH     COMMAND                               
055818,000160: 07,3020           11474                           CCS      CDUIND                                
055819,000161: 07,3021           03001                           TC       COARS1                                
055820,000162: 
055821,000163: 07,3022           34752                           CAF      TWO                                   #  MINIMUM OF 4 MS WAIT
055822,000164: 07,3023           05235                           TC       VARDELAY                              
055823,000165: 

Page 1302

055825,000167: 07,3024           03645        COARS2             TC       CAGETEST                              #  DONT CONTINUE IF CAGED.
055826,000168: 07,3025           54061                           TS       ITEMP1                                #  SETS TO +0.
055827,000169: 07,3026           34752                           CAF      TWO                                   #  SET CDU INDICATOR
055828,000170: 07,3027           55474                 +3        TS       CDUIND                                
055829,000171: 
055830,000172: 07,3030           51474                           INDEX    CDUIND                                
055831,000173: 07,3031           11471                           CCS      COMMAND                               #  NUMBER OF PULSES REQUIRED
055832,000174: 07,3032           03036                           TC       COMPOS                                #  GREATER THAN MAX ALLOWED
055833,000175: 07,3033           03045                           TC       NEXTCDU    +1                         
055834,000176: 07,3034           03103                           TC       COMNEG                                
055835,000177: 07,3035           03045                           TC       NEXTCDU    +1                         
055836,000178: 
055837,000179: 07,3036           63751        COMPOS             AD       -COMMAX                               #  COMMAX = MAX NUMBER OF PULSES ALLOWED
055838,000180: 07,3037           00006                           EXTEND                                         #    MINUS ONE
055839,000181: 07,3040           63113                           BZMF     COMZERO                               
055840,000182: 07,3041           51474                           INDEX    CDUIND                                
055841,000183: 07,3042           55471                           TS       COMMAND                               #  REDUCE COMMAND BY MAX NUMBER OF PULSES
055842,000184: 07,3043           43752                           CS       -COMMAX-                              #    ALLOWED
055843,000185: 
055844,000186: 07,3044           24061        NEXTCDU            INCR     ITEMP1                                
055845,000187: 07,3045           64754                           AD       NEG0                                  
055846,000188: 07,3046           51474                           INDEX    CDUIND                                
055847,000189: 07,3047           54050                           TS       CDUXCMD                               #  SET UP COMMAND REGISTER.
055848,000190: 
055849,000191: 07,3050           11474                           CCS      CDUIND                                
055850,000192: 07,3051           03027                           TC       COARS2     +3                         
055851,000193: 
055852,000194: 07,3052           10061                           CCS      ITEMP1                                #  SEE IF ANY PULSES TO GO OUT.
055853,000195: 07,3053           13117                           TCF      SENDPULS                              
055854,000196: 
055855,000197: 07,3054           05232                           TC       FIXDELAY                              #  WAIT FOR GIMBALS TO SETTLE.
055856,000198: 07,3055           00226                           DEC      150        B-14                       
055857,000199: 
055858,000200: 
055859,000201: 07,3056           34752                           CAF      TWO                                   #  AT END OF COMMAND, CHECK TO SEE THAT
055860,000202: 07,3057           54061        CHKCORS            TS       ITEMP1                                #  GIMBALS ARE WITHIN 2 DEGREES OF THETAD.
055861,000203: 07,3060           50000                           INDEX    A                                     
055862,000204: 07,3061           30032                           CA       CDUX                                  
055863,000205: 07,3062           00006                           EXTEND                                         
055864,000206: 07,3063           50061                           INDEX    ITEMP1                                
055865,000207: 07,3064           20321                           MSU      THETAD                                
055866,000208: 07,3065           10000                           CCS      A                                     
055867,000209: 07,3066           13074                           TCF      COARSERR                              
055868,000210: 07,3067           13071                           TCF      CORSCHK2                              
055869,000211: 07,3070           13074                           TCF      COARSERR                              
055870,000212: 

Page 1303

055872,000214: 07,3071           10061        CORSCHK2           CCS      ITEMP1                                
055873,000215: 07,3072           13057                           TCF      CHKCORS                               
055874,000216: 07,3073           13635                           TCF      ENDIMU                                #  END OF COARSE ALIGNMENT.
055875,000217: 
055876,000218: 07,3074           63102        COARSERR           AD       COARSTOL                              #  2 DEGREES.
055877,000219: 07,3075           00006                           EXTEND                                         
055878,000220: 07,3076           63071                           BZMF     CORSCHK2                              
055879,000221: 
055880,000222: 07,3077           05600                           TC       ALARM                                 #  COARSE ALIGN ERROR.
055881,000223: 07,3100           00211                           OCT      211                                   
055882,000224: 
055883,000225: 07,3101           13643                           TCF      IMUBAD                                
055884,000226: 
055885,000227: 07,3102           77511        COARSTOL           DEC      -.01111                               #  2 DEGREES SCALED AT HALF-REVOLUTIONS
055886,000228: 
055887,000229: 
055888,000230: 07,3103           63751        COMNEG             AD       -COMMAX                               
055889,000231: 07,3104           00006                           EXTEND                                         
055890,000232: 07,3105           63113                           BZMF     COMZERO                               
055891,000233: 07,3106           40000                           COM                                            
055892,000234: 07,3107           51474                           INDEX    CDUIND                                
055893,000235: 07,3110           55471                           TS       COMMAND                               
055894,000236: 07,3111           33752                           CA       -COMMAX-                              
055895,000237: 07,3112           03044                           TC       NEXTCDU                               
055896,000238: 
055897,000239: 07,3113           34755        COMZERO            CAF      ZERO                                  
055898,000240: 07,3114           51474                           INDEX    CDUIND                                
055899,000241: 07,3115           57471                           XCH      COMMAND                               
055900,000242: 07,3116           03044                           TC       NEXTCDU                               
055901,000243: 
055902,000244: 
055903,000245: 07,3117           37743        SENDPULS           CAF      13,14,15                              
055904,000246: 07,3120           00006                           EXTEND                                         
055905,000247: 07,3121           05014                           WOR      CHAN14                                
055906,000248: 07,3122           33753                           CAF      600MS                                 
055907,000249: 07,3123           13023                           TCF      COARS2     -1                         #  THEN TO VARDELAY
055908,000250: 
055909,000251: 
055910,000252: 07,3124           34746        CA+ECE             CAF      BIT6                                  #  ENABLE ALL THREE ISS CDU ERROR COUNTERS
055911,000253: 07,3125           00006                           EXTEND                                         
055912,000254: 07,3126           05012                           WOR      CHAN12                                
055913,000255: 07,3127           05272                           TC       TASKOVER                              
055914,000256: 

Page 1304

055916,000258: 07,3130           34750        SETCOARS           CAF      BIT4                                  #  BYPASS IF ALREADY IN COARSE ALIGN
055917,000259: 07,3131           00006                           EXTEND                                         
055918,000260: 07,3132           02012                           RAND     CHAN12                                
055919,000261: 07,3133           10000                           CCS      A                                     
055920,000262: 07,3134           00002                           TC       Q                                     
055921,000263: 
055922,000264: 07,3135           44746                           CS       BIT6                                  #  CLEAR ISS ERROR COUNTERS
055923,000265: 07,3136           00006                           EXTEND                                         
055924,000266: 07,3137           03012                           WAND     CHAN12                                
055925,000267: 
055926,000268: 07,3140           44742                           CS       BIT10                                 #  KNOCK DOWN GYRO ACTIVITY
055927,000269: 07,3141           00006                           EXTEND                                         
055928,000270: 07,3142           03014                           WAND     CHAN14                                
055929,000271: 07,3143           44755                           CS       ZERO                                  
055930,000272: 07,3144           54047                           TS       GYROCMD                               
055931,000273: 
055932,000274: 07,3145           34750                           CAF      BIT4                                  #  PUT ISS IN COARSE ALIGN
055933,000275: 07,3146           00006                           EXTEND                                         
055934,000276: 07,3147           05012                           WOR      CHAN12                                
055935,000277: 
055936,000278: 07,3150           41035                           CS       DSPTAB     +11D                       #  TURN ON NO ATT LAMP
055937,000279: 07,3151           73173                           MASK     OCT40010                              
055938,000280: 07,3152           27035                           ADS      DSPTAB     +11D                       
055939,000281: 
055940,000282: 07,3153           41300                           CS       IMODES33                              #  DISABLE DAP AUTO AND HOLD MODES
055941,000283: 07,3154           74746                           MASK     BIT6                                  
055942,000284: 07,3155           27300                           ADS      IMODES33                              
055943,000285: 
055944,000286: 07,3156           41277                           CS       IMODES30                              #  DISABLE IMUFAIL
055945,000287: 07,3157           74750                           MASK     BIT4                                  
055946,000288: 07,3160           27277                           ADS      IMODES30                              
055947,000289: 
055948,000290: 07,3161           44747        RNDREFDR           CS       TRACKBIT                              #  CLEAR TRACK FLAG
055949,000291: 07,3162           70075                           MASK     FLAGWRD1                              
055950,000292: 07,3163           54075                           TS       FLAGWRD1                              
055951,000293: 
055952,000294: 07,3164           44735                           CS       DRFTBIT                               #  CLEAR DRIFT FLAG
055953,000295: 07,3165           70076                           MASK     FLAGWRD2                              
055954,000296: 07,3166           54076                           TS       FLAGWRD2                              
055955,000297: 
055956,000298: 07,3167           44737                           CS       REFSMBIT                              #  CLEAR REFSMMAT FLAG
055957,000299: 07,3170           70077                           MASK     FLAGWRD3                              
055958,000300: 07,3171           54077                           TS       FLAGWRD3                              
055959,000301: 
055960,000302: 07,3172           00002                           TC       Q                                     
055961,000303: 
055962,000304: 07,3173           40010        OCT40010           OCT      40010                                 
055963,000305: 

Page 1305

055965,000307:                                                                                                  #           IMU FINE ALIGN MODE SWITCH.
055966,000308: 
055967,000309: 07,3174           00004        IMUFINE            INHINT                                         
055968,000310: 07,3175           03657                           TC       CAGETSTJ                              #  SEE IF IMU BEING CAGED.
055969,000311: 
055970,000312: 07,3176           43750                           CS       BITS4-5                               #  RESET ZERO AND COARSE
055971,000313: 07,3177           00006                           EXTEND                                         
055972,000314: 07,3200           03012                           WAND     CHAN12                                
055973,000315: 
055974,000316: 07,3201           44746                           CS       BIT6                                  #  INSURE DAP AUTO AND HOLD MODES ENABLED
055975,000317: 07,3202           71300                           MASK     IMODES33                              
055976,000318: 07,3203           55300                           TS       IMODES33                              
055977,000319: 
055978,000320: 07,3204           03252                           TC       NOATTOFF                              
055979,000321: 
055980,000322: 07,3205           34742                           CAF      BIT10                                 #  IMU FAIL WAS INHIBITED DURING THE
055981,000323: 07,3206           05214                           TC       WAITLIST                              #  PRESUMABLY PRECEDING COARSE ALIGN. LEAVE
055982,000324: 07,3207  E3,1474                                  EBANK=   CDUIND                                
055983,000325: 07,3207           03220 16103                     2CADR    IFAILOK                               #  IT ON FOR THE FIRST 5 SECS OF FINE ALIGN
055984,000326: 
055985,000327: 
055986,000328: 07,3211           35000                           CAF      2SECS                                 
055987,000329: 07,3212           05214                           TC       WAITLIST                              
055988,000330: 07,3213  E3,1474                                  EBANK=   CDUIND                                
055989,000331: 07,3213           03216 16103                     2CADR    IMUFINED                              
055990,000332: 
055991,000333: 
055992,000334: 07,3215           12741                           TCF      MODEEXIT                              
055993,000335: 
055994,000336: 07,3216           03645        IMUFINED           TC       CAGETEST                              #  SEE THAT NO ONE HAS CAGED THE IMU.
055995,000337: 07,3217           13635                           TCF      ENDIMU                                
055996,000338: 

Page 1306

055998,000340: 07,3220           03652        IFAILOK            TC       CAGETSTQ                              #  ENABLE IMU FIAL UNLESS IMU BEING CAGED.
055999,000341: 07,3221           15272                           TCF      TASKOVER                              #  IT IS.
056000,000342: 
056001,000343: 07,3222           34750                           CAF      BIT4                                  #  DONT RESET IMU FAIL INHIBIT IF SOMEONE
056002,000344: 07,3223           00006                           EXTEND                                         #  HAS GONE INTO COARSE ALIGN.
056003,000345: 07,3224           02012                           RAND     CHAN12                                
056004,000346: 07,3225           10000                           CCS      A                                     
056005,000347: 07,3226           15272                           TCF      TASKOVER                              
056006,000348: 
056007,000349: 07,3227           41277                           CS       IMODES30                              #  RESET IMUFAIL.
056008,000350: 07,3230           74737                           MASK     BIT13                                 
056009,000351: 07,3231           27277                           ADS      IMODES30                              
056010,000352: 07,3232           44750                           CS       BIT4                                  
056011,000353: 07,3233           71277        PFAILOK2           MASK     IMODES30                              
056012,000354: 07,3234           55277                           TS       IMODES30                              
056013,000355: 07,3235           04674                           TC       IBNKCALL                              #  THE ISS WARNING LIGHT MAY COME ON NOW
056014,000356: 07,3236           14703                           CADR     SETISSW                               #  THAT THE INHIBIT HAS BEEN REMOVED.
056015,000357: 07,3237           15272                           TCF      TASKOVER                              
056016,000358: 
056017,000359: 07,3240           03652        PFAILOK            TC       CAGETSTQ                              #  ENABLE PIP FAIL PROG ALARM.
056018,000360: 07,3241           15272                           TCF      TASKOVER                              
056019,000361: 
056020,000362: 07,3242           41277                           CS       IMODES30                              #  RESET IMU AND PIPA FAIL BITS.
056021,000363: 07,3243           74742                           MASK     BIT10                                 
056022,000364: 07,3244           27277                           ADS      IMODES30                              
056023,000365: 
056024,000366: 07,3245           41300                           CS       IMODES33                              
056025,000367: 07,3246           74737                           MASK     BIT13                                 
056026,000368: 07,3247           27300                           ADS      IMODES33                              
056027,000369: 
056028,000370: 07,3250           44747                           CS       BIT5                                  
056029,000371: 07,3251           13233                           TCF      PFAILOK2                              
056030,000372: 
056031,000373: 07,3252           43173        NOATTOFF           CS       OCT40010                              #  SUBROUTINE TO TURN OFF NO ATT LAMP.
056032,000374: 07,3253           71035                           MASK     DSPTAB     +11D                       
056033,000375: 07,3254           64735                           AD       BIT15                                 
056034,000376: 07,3255           55035                           TS       DSPTAB     +11D                       
056035,000377: 07,3256           00002                           TC       Q                                     
056036,000378: 

Page 1307

056038,000380:                                                                                                  #           ROUITNES TO INITIATE AND TERMINATE PROGRAM USE OF THE PIPAS. NO IMUSTALL REQUIRED IN EITHER CASE.
056039,000381: 
056040,000382: 07,3257           44755        PIPUSE             CS       ZERO                                  
056041,000383: 07,3260           54037                           TS       PIPAX                                 
056042,000384: 07,3261           54040                           TS       PIPAY                                 
056043,000385: 07,3262           54041                           TS       PIPAZ                                 
056044,000386: 
056045,000387: 07,3263           03652        PIPUSE1            TC       CAGETSTQ                              #  DO NOT ENABLE PIPA FAIL IF IMU IS CAGED
056046,000388: 07,3264           14631                           TCF      SWRETURN                              
056047,000389: 
056048,000390: 07,3265           00004                           INHINT                                         
056049,000391: 07,3266           44753                           CS       BIT1                                  #  IF PIPA FAILS FROM NOW ON (UNTIL
056050,000392: 07,3267           71277                           MASK     IMODES30                              #  PIPFREE), LIGHT ISS WARNING.
056051,000393: 07,3270           55277                           TS       IMODES30                              
056052,000394: 
056053,000395: 07,3271           04674        PIPFREE2           TC       IBNKCALL                              #  ISS WARNING MIGHT COME ON NOW.
056054,000396: 07,3272           14703                           CADR     SETISSW                               #  (OR GO OFF ON PIPFREE).
056055,000397: 
056056,000398: 07,3273           12741                           TCF      MODEEXIT                              
056057,000399: 
056058,000400: 07,3274           00004        PIPFREE            INHINT                                         #  PROGRAM DONE WITH PIPAS. DONT LIGHT
056059,000401: 07,3275           41277                           CS       IMODES30                              #  ISS WARNING.
056060,000402: 07,3276           74753                           MASK     BIT1                                  
056061,000403: 07,3277           27277                           ADS      IMODES30                              
056062,000404: 
056063,000405: 07,3300           74742                           MASK     BIT10                                 #  IF PIP FAIL ON, DO PROG ALSRM AND RESET
056064,000406: 07,3301           10000                           CCS      A                                     #  ISS WARNING.
056065,000407: 07,3302           12741                           TCF      MODEEXIT                              
056066,000408: 
056067,000409: 07,3303           05600                           TC       ALARM                                 
056068,000410: 07,3304           00212                           OCT      212                                   
056069,000411: 
056070,000412: 07,3305           00004                           INHINT                                         
056071,000413: 
056072,000414: 07,3306           13271                           TCF      PIPFREE2                              
056073,000415: 

Page 1308

056075,000417:                                                                                                  #           THE FOLLOWING ROUTINE TORQUES THE IRIGS ACCORDING TO DOUBLE PRECISION INPUTS IN THE SIX REGISTERS
056076,000418:                                                                                                  #  BEGINNING AT THE ECADR ARRIVING IN A. THE MINIMUM SIZE OF ANY PULSE TRAIN IS 16 PULSES (.25 CDU COUNTS). THE
056077,000419:                                                                                                  #  UNSENT PORTION OF THE COMMAND IS LEFT INTACT IN THE INPUT COMMAND REGISTERS.
056078,000420: 
056079,000421: 07,3307  E3,1400                                  EBANK=   1400                                  #  VARIABLE, ACTUALLY.
056080,000422: 
056081,000423: 07,3307           54161        IMUPULSE           TS       MPAC       +5                         #  SAVE ARRIVING ECADR.
056082,000424: 07,3310           03657                           TC       CAGETSTJ                              #  DONT PROCEED IF IMU BEING CAGED.
056083,000425: 
056084,000426: 07,3311           11311                           CCS      LGYRO                                 #  SEE IF GYROS BUSY.
056085,000427: 07,3312           03353                           TC       GYROBUSY                              #  SLEEP.
056086,000428: 
056087,000429: 07,3313           54156                           TS       MPAC       +2                         
056088,000430: 07,3314           34746                           CAF      BIT6                                  #  ENABLE THE POWER SUPPLY.
056089,000431: 07,3315           00006                           EXTEND                                         
056090,000432: 07,3316           05014                           WOR      CHAN14                                
056091,000433: 
056092,000434: 07,3317           34751                           CAF      FOUR                                  
056093,000435: 07,3320           05214        GWAKE2             TC       WAITLIST                              #  (IF A JOB WAS PUT TO SLEEP, THE POWER
056094,000436: 07,3321  E3,1474                                  EBANK=   CDUIND                                #  SUPPLY IS LEFT ON BY THE WAKING JOB).
056095,000437: 07,3321           03371 16103                     2CADR    STRTGYRO                              
056096,000438: 
056097,000439: 
056098,000440: 07,3323           30161                           CA       MPAC       +5                         #  SET UP EBANK, SAVING CALLER'S EBANK FOR
056099,000441: 07,3324           56003                           XCH      EBANK                                 #  RESTORATION ON RETURN.
056100,000442: 07,3325           56161                           XCH      MPAC       +5                         
056101,000443: 07,3326           55311                           TS       LGYRO                                 #  RESERVES GYROS.
056102,000444: 07,3327           74357                           MASK     LOW8                                  
056103,000445: 07,3330           54061                           TS       ITEMP1                                
056104,000446: 
056105,000447: 07,3331           34752                           CAF      TWO                                   #  FORCE SIGN AGREEMENT ON INPUTS.
056106,000448: 07,3332           54157        GYROAGRE           TS       MPAC       +3                         
056107,000449: 07,3333           60000                           DOUBLE                                         
056108,000450: 07,3334           60061                           AD       ITEMP1                                
056109,000451: 07,3335           54160                           TS       MPAC       +4                         
056110,000452: 07,3336           00006                           EXTEND                                         
056111,000453: 07,3337           50000                           INDEX    A                                     
056112,000454: 07,3340           31401                           DCA      1400                                  
056113,000455: 07,3341           52155                           DXCH     MPAC                                  
056114,000456: 07,3342           07262                           TC       TPAGREE                               
056115,000457: 07,3343           52155                           DXCH     MPAC                                  
056116,000458: 07,3344           50160                           INDEX    MPAC       +4                         
056117,000459: 07,3345           53401                           DXCH     1400                                  
056118,000460: 
056119,000461: 07,3346           10157                           CCS      MPAC       +3                         
056120,000462: 07,3347           13332                           TCF      GYROAGRE                              
056121,000463: 
056122,000464: 07,3350           30161                           CA       MPAC       +5                         #  RESTORE CALLER'S EBANK.
056123,000465: 07,3351           54003                           TS       EBANK                                 
056124,000466: 07,3352           12741                           TCF      MODEEXIT                              
056125,000467: 

Page 1309

056127,000469:                                                                                                  #           ROUTINES TO ALLOW TORQUING BY ONLY ONE JOB AT A TIME.
056128,000470: 
056129,000471: 07,3353           00006        GYROBUSY           EXTEND                                         #  SAVE RETURN 2FCADR.
056130,000472: 07,3354           30134                           DCA      BUF2                                  
056131,000473: 07,3355           52155                           DXCH     MPAC                                  
056132,000474: 07,3356           33370        REGSLEEP           CAF      LGWAKE                                
056133,000475: 07,3357           15133                           TCF      JOBSLEEP                              
056134,000476: 
056135,000477: 07,3360           11311        GWAKE              CCS      LGYRO                                 #  WHEN AWAKENED, SEE IF GYROS STILL BUSY.
056136,000478: 07,3361           13356                           TCF      REGSLEEP                              #  IF SO, SLEEP SOME MORE.
056137,000479: 
056138,000480: 07,3362           54156                           TS       MPAC       +2                         
056139,000481: 07,3363           00006                           EXTEND                                         
056140,000482: 07,3364           30155                           DCA      MPAC                                  
056141,000483: 07,3365           52134                           DXCH     BUF2                                  #  RESTORE SWRETURN INFO.
056142,000484: 07,3366           34753                           CAF      ONE                                   
056143,000485: 07,3367           13320                           TCF      GWAKE2                                
056144,000486: 
056145,000487: 07,3370           17360        LGWAKE             CADR     GWAKE                                 
056146,000488: 

Page 1310

056148,000490:                                                                                                  #           GYRO-TORQUING WAITLIST TASKS.
056149,000491: 
056150,000492: 07,3371           43632        STRTGYRO           CS       GDESELCT                              #  DE-SELECT LAST GYRO.
056151,000493: 07,3372           00006                           EXTEND                                         
056152,000494: 07,3373           03014                           WAND     CHAN14                                
056153,000495: 
056154,000496: 07,3374           03645                           TC       CAGETEST                              
056155,000497: 
056156,000498: 07,3375           31311        STRTGYR2           CA       LGYRO                                 #  JUMP ON PHASE COUNTER IN BITS 13-14.
056157,000499: 07,3376           00006                           EXTEND                                         
056158,000500: 07,3377           74750                           MP       BIT4                                  
056159,000501: 07,3400           50000                           INDEX    A                                     
056160,000502: 07,3401           13402                           TCF      +1                                    
056161,000503: 07,3402           03417                           TC       GSELECT                               #  =0. DO Y GYRO.
056162,000504: 07,3403           00202                           OCT      00202                                 
056163,000505: 
056164,000506: 07,3404           03417                           TC       GSELECT                               #  =1. DO Z GYRO.
056165,000507: 07,3405           00302                           OCT      00302                                 
056166,000508: 
056167,000509: 07,3406           03415                           TC       GSELECT    -2                         #  =2. DO X GYRO.
056168,000510: 07,3407           00100                           OCT      00100                                 
056169,000511: 
056170,000512: 07,3410           34755                           CAF      ZERO                                  #  =3. DONE
056171,000513: 07,3411           55311                           TS       LGYRO                                 
056172,000514: 07,3412           33370                           CAF      LGWAKE                                #  WAKE A POSSIBLE SLEEPING JOB.
056173,000515: 07,3413           05137                           TC       JOBWAKE                               
056174,000516: 
056175,000517: 07,3414           13216        NORESET            TCF      IMUFINED                              #  DO NOT RESET POWER SUPPLY
056176,000518: 

Page 1311

056178,000520: 07,3415           44751                 -2        CS       FOUR                                  #  SPECIAL ENTRY TO REGRESS LGYRO FOR X.
056179,000521: 07,3416           27311                           ADS      LGYRO                                 
056180,000522: 
056181,000523: 07,3417           50002        GSELECT            INDEX    Q                                     #  SELECT GYRO.
056182,000524: 07,3420           30000                           CAF      0                                     #  PACKED WORD CONTAINS GYRO SELECT BITS
056183,000525: 07,3421           54064                           TS       ITEMP4                                #  AND INCREMENT TO LGYRO.
056184,000526: 07,3422           74757                           MASK     SEVEN                                 
056185,000527: 07,3423           64737                           AD       BIT13                                 
056186,000528: 07,3424           27311                           ADS      LGYRO                                 
056187,000529: 07,3425           54003                           TS       EBANK                                 
056188,000530: 07,3426           74357                           MASK     LOW8                                  
056189,000531: 07,3427           54061                           TS       ITEMP1                                
056190,000532: 
056191,000533: 07,3430           44757                           CS       SEVEN                                 
056192,000534: 07,3431           70064                           MASK     ITEMP4                                
056193,000535: 07,3432           54064                           TS       ITEMP4                                
056194,000536: 
056195,000537: 07,3433           00006                           EXTEND                                         #  MOVE DP COMMAND TO RUPTREGS FOR TESTING.
056196,000538: 07,3434           50061                           INDEX    ITEMP1                                
056197,000539: 07,3435           31401                           DCA      1400                                  
056198,000540: 07,3436           52071                           DXCH     RUPTREG1                              
056199,000541: 
056200,000542: 07,3437           10070                           CCS      RUPTREG1                              
056201,000543: 07,3440           13453                           TCF      MAJ+                                  
056202,000544: 07,3441           13443                           TCF      +2                                    
056203,000545: 07,3442           13613                           TCF      MAJ-                                  
056204,000546: 
056205,000547: 07,3443           10071                           CCS      RUPTREG2                              
056206,000548: 07,3444           13450                           TCF      MIN+                                  
056207,000549: 07,3445           13375                           TCF      STRTGYR2                              
056208,000550: 07,3446           13610                           TCF      MIN-                                  
056209,000551: 07,3447           13375                           TCF      STRTGYR2                              
056210,000552: 

Page 1312

056212,000554: 07,3450           63504        MIN+               AD       -GYROMIN                              #  SMALL POSITIVE COMMAND. SEE IF AT LEAST
056213,000555: 07,3451           00006                           EXTEND                                         #  16 GYRO PULSES.
056214,000556: 07,3452           63375                           BZMF     STRTGYR2                              
056215,000557: 
056216,000558: 07,3453           00006        MAJ+               EXTEND                                         #  DEFINITE POSITIVE OUTPUT.
056217,000559: 07,3454           33634                           DCA      GYROFRAC                              
056218,000560: 07,3455           20071                           DAS      RUPTREG1                              
056219,000561: 
056220,000562: 07,3456           30064                           CA       ITEMP4                                #  SELECT POSITIVE TORQUING FOR THIS GYRO.
056221,000563: 07,3457           00006                           EXTEND                                         
056222,000564: 07,3460           05014                           WOR      CHAN14                                
056223,000565: 
056224,000566: 07,3461           36077                           CAF      LOW7                                  #  LEAVE NUMBER OF POSSIBLE 8192 AUGMENTS
056225,000567: 07,3462           70071                           MASK     RUPTREG2                              #  TO INITIAL COMMAND IN MAJOR PART OF LONG
056226,000568: 07,3463           56071                           XCH      RUPTREG2                              #  TERM STORAGE AND TRUNCATED FRACTION
056227,000569: 07,3464           00006        GMERGE             EXTEND                                         #  IN MINOR PART. THE MAJOR PART WILL BE
056228,000570: 07,3465           74744                           MP       BIT8                                  #  COUNTED DOWN TO ZERO IN THE COURSE OF
056229,000571: 07,3466           54062                           TS       ITEMP2                                #  PUTTING OUT THE ENTIRE COMMAND.
056230,000572: 07,3467           30070                           CA       RUPTREG1                              
056231,000573: 07,3470           00006                           EXTEND                                         
056232,000574: 07,3471           74743                           MP       BIT9                                  
056233,000575: 07,3472           54070                           TS       RUPTREG1                              
056234,000576: 07,3473           30001                           CA       L                                     
056235,000577: 07,3474           00006                           EXTEND                                         
056236,000578: 07,3475           74736                           MP       BIT14                                 
056237,000579: 07,3476           26062                           ADS      ITEMP2                                #  INITIAL COMMAND.
056238,000580: 
056239,000581: 07,3477           00006                           EXTEND                                         #  SEE IF MORE THAN ONE PULSE TRAIN NEEDED
056240,000582: 07,3500           30071                           DCA      RUPTREG1                              #  (MORE THAN 16383 PULSES).
056241,000583: 07,3501           67752                           AD       MINUS1                                
056242,000584: 07,3502           10000                           CCS      A                                     
056243,000585: 07,3503           13547                           TCF      LONGGYRO                              
056244,000586: 07,3504           77601        -GYROMIN           OCT      -176                                  #  MAY BE ADJUSTED TO SPECIFY MINIMUM CMD
056245,000587: 07,3505           13511                           TCF      +4                                    
056246,000588: 
056247,000589: 07,3506           34736                           CAF      BIT14                                 
056248,000590: 07,3507           26062                           ADS      ITEMP2                                
056249,000591: 07,3510           34755                           CAF      ZERO                                  
056250,000592: 
056251,000593: 07,3511           50061                 +4        INDEX    ITEMP1                                
056252,000594: 07,3512           53401                           DXCH     1400                                  

Page 1313

056254,000596: 07,3513           30062                           CA       ITEMP2                                #  ENTIRE COMMAND.
056255,000597: 07,3514           54047        LASTSEG            TS       GYROCMD                               
056256,000598: 07,3515           00006                           EXTEND                                         
056257,000599: 07,3516           74742                           MP       BIT10                                 #  WAITLIST DT
056258,000600: 07,3517           66250                           AD       THREE                                 #  TRUNCATION AND PHASE UNCERTAINTIES.
056259,000601: 07,3520           05214                           TC       WAITLIST                              
056260,000602: 07,3521  E3,1474                                  EBANK=   CDUIND                                
056261,000603: 07,3521           03533 16103                     2CADR    TWOPULSE                              
056262,000604: 
056263,000605: 07,3523           03527        EXITGYRO           TC       GYROEXIT                              
056264,000606: 07,3524           15272                           TCF      TASKOVER                              
056265,000607: 07,3525           34752        OUTPULSE           CA       BIT2                                  
056266,000608: 07,3526           54047                           TS       GYROCMD                               
056267,000609: 07,3527           34742        GYROEXIT           CAF      BIT10                                 
056268,000610: 07,3530           00006                           EXTEND                                         
056269,000611: 07,3531           05014                           WOR      CHAN14                                
056270,000612: 07,3532           00002                           TC       Q                                     
056271,000613: 07,3533           44743        TWOPULSE           CS       BIT9                                  
056272,000614: 07,3534           00006                           EXTEND                                         
056273,000615: 07,3535           03014                           WAND     CHAN14                                
056274,000616: 07,3536           03525                           TC       OUTPULSE                              
056275,000617: 07,3537           34753                           CA       BIT1                                  
056276,000618: 07,3540           05204                           TC       TWIDDLE                               
056277,000619: 07,3541           03371                           ADRES    STRTGYRO                              
056278,000620: 07,3542           34743                           CA       BIT9                                  
056279,000621: 07,3543           00006                           EXTEND                                         
056280,000622: 07,3544           05014                           WOR      CHAN14                                
056281,000623: 07,3545           03525                           TC       OUTPULSE                              
056282,000624: 07,3546           15272                           TCF      TASKOVER                              
056283,000625: 07,3547           50061        LONGGYRO           INDEX    ITEMP1                                
056284,000626: 07,3550           53401                           DXCH     1400                                  
056285,000627: 07,3551           34736                           CAF      BIT14                                 #  8192. INITIAL COMMAND IS AT LEAST 8192.
056286,000628: 07,3552           60062                           AD       ITEMP2                                
056287,000629: 07,3553           54047                           TS       GYROCMD                               
056288,000630: 
056289,000631: 07,3554           00006        AUG3               EXTEND                                         #  GET WAITLIST DT TO TIME WHEN TRAIN IS
056290,000632: 07,3555           74742                           MP       BIT10                                 #  ALMOST OUT.
056291,000633: 07,3556           67750                           AD       NEG3                                  
056292,000634: 07,3557           05214                           TC       WAITLIST                              
056293,000635: 07,3560  E3,1474                                  EBANK=   CDUIND                                
056294,000636: 07,3560           03563 16103                     2CADR    8192AUG                               
056295,000637: 
056296,000638: 07,3562           13523                           TCF      EXITGYRO                              
056297,000639: 
056298,000640: 07,3563           03645        8192AUG            TC       CAGETEST                              
056299,000641: 
056300,000642: 07,3564           34750                           CAF      BIT4                                  
056301,000643: 07,3565           00006                           EXTEND                                         
056302,000644: 07,3566           02012                           RAND     CHAN12                                
056303,000645: 07,3567           10000                           CCS      A                                     
056304,000646: 07,3570           13643                           TCF      IMUBAD                                
056305,000647: 07,3571           31311                           CA       LGYRO                                 #  ADD 8192 PULSES TO GYROCMD
056306,000648: 07,3572           54003                           TS       EBANK                                 

Page 1314

056308,000650: 07,3573           74357                           MASK     LOW8                                  
056309,000651: 07,3574           54061                           TS       ITEMP1                                
056310,000652: 
056311,000653: 07,3575           50061                           INDEX    ITEMP1                                #  SEE IF THIS IS THE LAST AUG.
056312,000654: 07,3576           11400                           CCS      1400                                  
056313,000655: 07,3577           13603                           TCF      AUG2                                  #  MORE TO COME.
056314,000656: 
056315,000657: 07,3600           34736                           CAF      BIT14                                 
056316,000658: 07,3601           26047                           ADS      GYROCMD                               
056317,000659: 07,3602           13515                           TCF      LASTSEG    +1                         
056318,000660: 
056319,000661: 07,3603           50061        AUG2               INDEX    ITEMP1                                
056320,000662: 07,3604           55400                           TS       1400                                  
056321,000663: 07,3605           34736                           CAF      BIT14                                 
056322,000664: 07,3606           26047                           ADS      GYROCMD                               
056323,000665: 07,3607           13554                           TCF      AUG3                                  #  COMPUTE DT.
056324,000666: 

Page 1315

056326,000668: 07,3610           63504        MIN-               AD       -GYROMIN                              #  POSSIBLE NEGATIVE OUTPUT.
056327,000669: 07,3611           00006                           EXTEND                                         
056328,000670: 07,3612           63375                           BZMF     STRTGYR2                              
056329,000671: 
056330,000672: 07,3613           00006        MAJ-               EXTEND                                         #  DEFINITE NEGATIVE OUTPUT.
056331,000673: 07,3614           43634                           DCS      GYROFRAC                              
056332,000674: 07,3615           20071                           DAS      RUPTREG1                              
056333,000675: 
056334,000676: 07,3616           30064                           CA       ITEMP4                                #  SELECT NEGATIVE TORQUING FOR THIS GYRO.
056335,000677: 07,3617           64743                           AD       BIT9                                  
056336,000678: 07,3620           00006                           EXTEND                                         
056337,000679: 07,3621           05014                           WOR      CHAN14                                
056338,000680: 
056339,000681: 07,3622           40070                           CS       RUPTREG1                              #  SET UP RUPTREGS TO FALL INTO GMERGE.
056340,000682: 07,3623           54070                           TS       RUPTREG1                              #  ALL NUMBERS PUT INTO GYROCMD ARE
056341,000683: 07,3624           40071                           CS       RUPTREG2                              #  POSITIVE - BIT9 OF CHAN 14 DETERMINES
056342,000684: 07,3625           76077                           MASK     LOW7                                  #  THE SIGN OF THE COMMAND.
056343,000685: 07,3626           40000                           COM                                            
056344,000686: 07,3627           56071                           XCH      RUPTREG2                              
056345,000687: 07,3630           40000                           COM                                            
056346,000688: 07,3631           13464                           TCF      GMERGE                                
056347,000689: 
056348,000690: 07,3632           01700        GDESELCT           OCT      1700                                  #  TURN OFF SELECT AND ACTIVITY BITS.
056349,000691: 
056350,000692: 07,3633           00000 00034  GYROFRAC           2DEC     .215       B-21                       
056351,000693: 

Page 1316

056353,000695:                                                                                                  #           IMU MODE SWITCHING ROUTINES COME HERE WHEN ACTION COMPLETE.
056354,000696: 
056355,000697: 07,3635           00006        ENDIMU             EXTEND                                         #  MODE IS BAD IF CAGE HAS OCCURED OR IF
056356,000698: 07,3636           00011                           READ     DSALMOUT                              #  ISS WARNING IS ON.
056357,000699: 07,3637           74753                           MASK     BIT1                                  
056358,000700: 07,3640           10000                           CCS      A                                     
056359,000701: 07,3641           13643                           TCF      IMUBAD                                
056360,000702: 
056361,000703: 07,3642           13671        IMUGOOD            TCF      GOODEND                               #  WITH C(A) = 0.
056362,000704: 
056363,000705: 07,3643           34755        IMUBAD             CAF      ZERO                                  
056364,000706: 07,3644           13666                           TCF      BADEND                                
056365,000707: 
056366,000708: 07,3645           34746        CAGETEST           CAF      BIT6                                  #  SUBROUTINE TO TERMINATE IMU MODE
056367,000709: 07,3646           71277                           MASK     IMODES30                              #  SWITCH IF IMU HAS BEEN CAGED.
056368,000710: 07,3647           10000                           CCS      A                                     
056369,000711: 07,3650           13643                           TCF      IMUBAD                                #  DIRECTLY.
056370,000712: 07,3651           00002                           TC       Q                                     #  WITH C(A) = +0.
056371,000713: 
056372,000714: 07,3652           41277        CAGETSTQ           CS       IMODES30                              #  SKIP IF IMU NOT BEING CAGED.
056373,000715: 07,3653           74746                           MASK     BIT6                                  
056374,000716: 07,3654           10000                           CCS      A                                     
056375,000717: 07,3655           24002                           INCR     Q                                     
056376,000718: 07,3656           00002                           TC       Q                                     
056377,000719: 
056378,000720: 07,3657           41277        CAGETSTJ           CS       IMODES30                              #  IF DURING MODE SWITCH INITIALIZATION
056379,000721: 07,3660           74746                           MASK     BIT6                                  #  IT IS FOUND THAT THE IMU IS BEING CAGED,
056380,000722: 07,3661           10000                           CCS      A                                     #  SET IMUCADR TO -0 TO INDICATE OPERATION
056381,000723: 07,3662           00002                           TC       Q                                     #  COMPLETE BUT FAILED. RETURN IMMEDIATELY
056382,000724: 
056383,000725: 07,3663           44755                           CS       ZERO                                  #  TO SWRETURN.
056384,000726: 07,3664           55301                           TS       IMUCADR                               
056385,000727: 07,3665           12741                           TCF      MODEEXIT                              
056386,000728: 

Page 1317

056388,000730:                                                                                                  #           GENERALIZED MODE SWITCHING TERMINATION. ENTER AT GOODEND FOR SUCCESSFUL COMPLETION OF AN I/O OPERATION
056389,000731:                                                                                                  #  OR AT BADEND FOR A N UNSUCCESSFUL ONE. C(A) OR ARRIVAL =0 FOR IMU, 1 FOR OPTICS.
056390,000732: 
056391,000733: 07,3666           54071        BADEND             TS       RUPTREG2                              #  DEVICE INDEX.
056392,000734: 07,3667           44755                           CS       ZERO                                  #  FOR FAILURE.
056393,000735: 07,3670           13673                           TCF      GOODEND    +2                         
056394,000736: 
056395,000737: 07,3671           54071        GOODEND            TS       RUPTREG2                              
056396,000738: 07,3672           44753                           CS       ONE                                   #  FOR SUCCESS.
056397,000739: 
056398,000740: 07,3673           54072                           TS       RUPTREG3                              
056399,000741: 07,3674           50071                           INDEX    RUPTREG2                              #  SEE IF USING PROGRAM ASLEEP.
056400,000742: 07,3675           11301                           CCS      MODECADR                              
056401,000743: 07,3676           13702                           TCF      +4                                    #  YES - WAKE IT UP.
056402,000744: 07,3677           13712                           TCF      ENDMODE                               #  IF 0, PROGRAM NOT IN YET.
056403,000745: 
056404,000746: 07,3700           00006                           EXTEND                                         
056405,000747: 07,3701           13713                           BZF      ENDMODE    +1                         #  BZF = TCF IF MODECADR = -0.
056406,000748: 
056407,000749: 07,3702           34755                           CAF      ZERO                                  #  WAKE SLEEPING PROGRAM.
056408,000750: 07,3703           50071                           INDEX    RUPTREG2                              
056409,000751: 07,3704           57301                           XCH      MODECADR                              
056410,000752: 07,3705           05137                           TC       JOBWAKE                               
056411,000753: 
056412,000754: 07,3706           40072                           CS       RUPTREG3                              #  ADVANCE LOC IF SUCCESSFUL.
056413,000755: 07,3707           50064                           INDEX    LOCCTR                                
056414,000756: 07,3710           26164                           ADS      LOC                                   
056415,000757: 
056416,000758: 07,3711           15272                           TCF      TASKOVER                              
056417,000759: 
056418,000760: 07,3712           30072        ENDMODE            CA       RUPTREG3                              #  -0 INDICATES OPERATION COMPLETE BUT
056419,000761: 07,3713           50071                 +1        INDEX    RUPTREG2                              #  UNSUCCESSFUL: -1 INDICATES COMPLETE AND
056420,000762: 07,3714           55301                           TS       MODECADR                              #  SUCCESSFUL.
056421,000763: 07,3715           15272                           TCF      TASKOVER                              
056422,000764: 

Page 1318

056424,000766:                                                                                                  #           GENERAL STALLING ROUTINE. USING PROGRAMS COME HERE TO WAIT FOR I/O COMPLETION.
056425,000767: 
056426,000768:                                                                                                  #  PROGRAM DESCRIPTION                                    DATE- 21 FEB 1967
056427,000769:                                                                                                  #                                            LOG SECTION IMU MODE SWITCHING
056428,000770:                                                                                                  #  MOD BY- R.MELANSON TO ADD DOCUMENTATION       ASSEMBLY SUNDISK  REV.  82
056429,000771: 
056430,000772:                                                                                                  #  FUNCTIONAL DESCRIPTION-
056431,000773:                                                                                                  #    TO DELAY FURTHER EXECUTION OF THE CALLING ROUTINE UNTIL ITS SELECTED
056432,000774:                                                                                                  #    I/O FUNCTION IS COMPLETE.THE FOLLOWING CHECKS ON THE CALLING ROUTINE:S
056433,000775:                                                                                                  #    MODECADR ARE MADE AND ACTED UPON.
056434,000776:                                                                                                  #      1) +0 INDICATES INCOMPLETE I/O OPERATION.CALLING ROUTINE IS PUT TO
056435,000777:                                                                                                  #         SLEEP.
056436,000778:                                                                                                  #      2) -1 INDICATES COMPLETED I/O OPERATION. STALL BYPASSES JOBSLEEP
056437,000779:                                                                                                  #         CALL AND RETURNS TO CALLING ROUTINE AT L+3
056438,000780:                                                                                                  #      3) -0 INDICATES COMPLETED I/O WITH FAILURE. STALL CLEARS MODECADR
056439,000781:                                                                                                  #         AND RETURNS TO CALLING ROUTINE AT L+2.
056440,000782:                                                                                                  #      4) VALUE GREATER THAN 0 INDICATES TWO ROUTINES CALLING FOR USE OF
056441,000783:                                                                                                  #         SAME DEVICE. STALL EXITS TO ABORT WHICH EXECUTES A PROGRAM
056442,000784:                                                                                                  #         RESTART WHICH IN TURN CLEARS ALL MODECADR REGISTERS.
056443,000785: 
056444,000786:                                                                                                  #   CALLING SEQUENCE-
056445,000787:                                                                                                  #    L   TC   BANKCALL
056446,000788:                                                                                                  #    L+1 CADR (ONE OF 5 STALL ADDRESSES I.E. IMUSTALL,OPTSTALL,RADSTALL,
056447,000789:                                                                                                  #              AOTSTALL,OR ATTSTALL)
056448,000790: 
056449,000791:                                                                                                  #   NORMAL-EXIT MODE-
056450,000792:                                                                                                  #    TCF   JOBSLEEP OR TCF  MODEXIT
056451,000793: 
056452,000794:                                                                                                  #  ALARM OR ABORT EXIT MODE-
056453,000795:                                                                                                  #    TC   ABORT
056454,000796: 
056455,000797:                                                                                                  #  OUTPUT-
056456,000798:                                                                                                  #    MODECADR= CADR IF JOBSLEEP
056457,000799:                                                                                                  #    MODECADR=+0    IF I/O COMPLETE
056458,000800:                                                                                                  #    BUF2=L+3       IF I/O COMPLETE AND GOOD.
056459,000801:                                                                                                  #    BUF2=L+2 IF I/O COMPLETE BUT FAILED.
056460,000802: 
056461,000803:                                                                                                  #  ERASABLE INITIALIZATION-
056462,000804:                                                                                                  #    BUF2 CONTAINS RETURN ADDRESS PLUS 1,(L+2)
056463,000805:                                                                                                  #    BUF2+1 CONTAINS FBANK VALUE OF CALLING ROUTINE.
056464,000806:                                                                                                  #    MODECADR OF CALLING ROUTINE CONTAINS +0,-1,-0 OR  CADR RETURN ADDRESS.
056465,000807: 
056466,000808:                                                                                                  #  DEBRIS-
056467,000809:                                                                                                  #    RUPTREG2 AND CALLING ROUTINE MODECADR.
056468,000810: 
056469,000811: 07,3716           34753        AOTSTALL           CAF      ONE                                   #  AOT.
056470,000812: 07,3717           03723                           TC       STALL                                 
056471,000813: 
056472,000814: 07,3720           34752        RADSTALL           CAF      TWO                                   
056473,000815: 07,3721           13723                           TCF      STALL                                 
056474,000816: 

Page 1319

056476,000818: 07,3722  07,3716               OPTSTALL           EQUALS   AOTSTALL                              
056477,000819: 
056478,000820: 07,3722           34755        IMUSTALL           CAF      ZERO                                  #  IMU.
056479,000821: 
056480,000822: 07,3723           00004        STALL              INHINT                                         
056481,000823: 07,3724           54071                           TS       RUPTREG2                              #  SAVE DEVICE INDEX.
056482,000824: 07,3725           50000                           INDEX    A                                     #  SEE IF OPERATION COMPLETE.
056483,000825: 07,3726           11301                           CCS      MODECADR                              
056484,000826: 07,3727           13745                           TCF      MODABORT                              #  ALLOWABLE STATES ARE +0, -1, AND -0.
056485,000827: 07,3730           13741                           TCF      MODESLP                               #  OPERATION INCOMPLETE.
056486,000828: 07,3731           13735                           TCF      MODEGOOD                              #  COMPLETE AND GOOD IF = -1.
056487,000829: 
056488,000830: 07,3732           50071        MG2                INDEX    RUPTREG2                              #  COMPLETE AND FAILED IF -0. RESET TO +0.
056489,000831: 07,3733           55301                           TS       MODECADR                              #  RETURN TO CALLER.
056490,000832: 07,3734           12741                           TCF      MODEEXIT                              
056491,000833: 
056492,000834: 07,3735           10000        MODEGOOD           CCS      A                                     #  MAKE SURE INITIAL STATE -1.
056493,000835: 07,3736           13745                           TCF      MODABORT                              
056494,000836: 
056495,000837: 07,3737           24133                           INCR     BUF2                                  #  IF SO, INCREMENT RETURN ADDRESS AND
056496,000838: 07,3740           13732                           TCF      MG2                                   #  RETURN IMMEDIATELY, SETTING CADR = +0.
056497,000839: 
056498,000840: 07,3741           04645        MODESLP            TC       MAKECADR                              #  CALL FROM SWITCHABLE FIXED ONLY.
056499,000841: 07,3742           50071                           INDEX    RUPTREG2                              
056500,000842: 07,3743           55301                           TS       MODECADR                              
056501,000843: 07,3744           15133                           TCF      JOBSLEEP                              
056502,000844: 
056503,000845: 07,3745           52134        MODABORT           DXCH     BUF2                                  
056504,000846: 07,3746           05717                           TC       BAILOUT1                              #  TWO PROGRAMS USING THE SAME DEVICE.
056505,000847: 07,3747           31210                           OCT      31210                                 
056506,000848: 

Page 1320

056508,000850:                                                                                                  #           CONSTANTS FOR MODE SWITCHING ROUTINES
056509,000851: 
056510,000852: 07,3750     5752               BITS3&4            =        OCT14                                 
056511,000853: 07,3750     4771               BITS4&6            =        OCT50                                 
056512,000854: 07,3750           00030        BITS4-5            OCT      00030                                 
056513,000855: 07,3751     4744               IMUSEFLG           EQUALS   BIT8                                  #  INTERPRETER SWITCH 7.
056514,000856: 07,3751           77500        -COMMAX            DEC      -191       B-14                       
056515,000857: 07,3752           77477        -COMMAX-           DEC      -192       B-14                       
056516,000858: 07,3753           00074        600MS              DEC      60         B-14                       
056517,000859: 07,3754  07,3174               IMUFIN20           =        IMUFINE                               
056518,000860: 07,3754           31304        GOMANUR            CA       ATTCADR                               #  IS KALCMANU FREE
056519,000861: 07,3755           00006                           EXTEND                                         
056520,000862: 07,3756           13760                           BZF      +2                                    
056521,000863: 07,3757           03745                           TC       MODABORT                              #  BAILOUT
056522,000864: 07,3760           00006                 +2        EXTEND                                         
056523,000865: 07,3761           30134                           DCA      BUF2                                  
056524,000866: 07,3762           53305                           DXCH     ATTCADR                               #  SAVE FINAL RETURN FOR KALCMAN3
056525,000867: 
056526,000868: 07,3763           30006                           CA       BBANK                                 
056527,000869: 07,3764           74757                           MASK     SEVEN                                 
056528,000870: 07,3765           27305                           ADS      ATTCADR    +1                         
056529,000871: 
056530,000872: 07,3766           30167                           CA       PRIORITY                              
056531,000873: 07,3767           77730                           MASK     PRIO37                                
056532,000874: 07,3770           55306                           TS       ATTPRIO                               #  SAVE USERS PRIO
056533,000875: 
056534,000876: 07,3771           33775                           CAF      KALEBCON                              #  SET EBANK FOR KALCMAN3
056535,000877: 07,3772           54003                           TS       EBANK                                 
056536,000878: 07,3773           04635                           TC       POSTJUMP                              
056537,000879: 07,3774           44004                           CADR     KALCMAN3                              
056538,000880: 07,3775           03275        KALEBCON           ECADR    BCDU                                  
056539,000881: 

Page 1321

056541,000883:                                                                                                  #  PROGRAM DESCRIPTION
056542,000884:                                                                                                  #  IMU STATUS CHECK ROUTINE R02  (SUBROUTINE UTILITY)
056543,000885:                                                                                                  #  MOD NO - 1
056544,000886:                                                                                                  #  MOD BY - N.BRODEUR
056545,000887:                                                                                                  #  FUNCTIONAL DESCRIPTION
056546,000888: 
056547,000889:                                                                                                  #  TO CHECK WHETHER IMU IS ON AND IF ON WHETHER IT IS ALIGNED TO AN
056548,000890:                                                                                                  #  ORIENTATION KNOWN BY THE CMC. TO REQUEST SELECTION OF THE APPROPRIATE
056549,000891:                                                                                                  #  PROGRAM IF THE IMU IS OFF OR NOT ALIGNED TO AN ORIENTATION KNOWN BY THE
056550,000892:                                                                                                  #  CMC. CALLED THROUGH BANKCALL
056551,000893:                                                                                                  #  CALLING SEQUENCE-
056552,000894: 
056553,000895:                                                                                                  #  L        TC     BANKCALL
056554,000896:                                                                                                  #  L+1      CADR   R02BOTH
056555,000897:                                                                                                  #  SUBROUTINES CALLED
056556,000898: 
056557,000899:                                                                                                  #        VARALARM
056558,000900:                                                                                                  #        FLAGUP
056559,000901:                                                                                                  #  NORMAL EXIT MODES
056560,000902: 
056561,000903:                                                                                                  #  AT L+2 OF CALLING SEQUENCE
056562,000904:                                                                                                  #  ALARM OR ABORT EXIT MODES
056563,000905:                                                                                                  #        GOTOPOOH, WITH ALARM
056564,000906:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED
056565,000907: 
056566,000908:                                                                                                  #  NONE
056567,000909:                                                                                                  #  DEBRIS
056568,000910: 
056569,000911:                                                                                                  #  CENTRALS-A,Q,L
056570,000912: 34,3574                                           BANK     34                                    
056571,000913: 04,2000                                           SETLOC   R02                                   
056572,000914: 04,2000                                           BANK                                           
056573,000915: 04,3240                                           COUNT*   $$/R02                                
056574,000916: 04,3240           00063        DEC51              DEC      51         B-14                       
056575,000917: 04,3241           34737        R02BOTH            CAF      REFSMBIT                              
056576,000918: 04,3242           70077                           MASK     FLAGWRD3                              
056577,000919: 04,3243           10000                           CCS      A                                     
056578,000920: 04,3244           03255                           TC       R02ZERO                               #  ZERO IMUS
056579,000921: 
056580,000922: 04,3245           31277                           CA       IMODES30                              
056581,000923: 04,3246           74743                           MASK     BIT9                                  #  IS ISS INITIALIZED
056582,000924: 04,3247           00006                           EXTEND                                         
056583,000925: 04,3250           13252                           BZF      +2                                    
056584,000926: 04,3251           44750                           CS       BIT4                                  #  SEND IMU ALARM CODE 210
056585,000927: 04,3252           63260                           AD       OCT220                                #  SEND REFSMM ALARM
056586,000928: 04,3253           05745                           TC       VARALARM                              
056587,000929: 
056588,000930: 04,3254           06001                           TC       GOTOPOOH                              
056589,000931: 
056590,000932: 04,3255           05515        R02ZERO            TC       UPFLAG                                

Page 1322

056592,000934: 04,3256           00007                           ADRES    IMUSE                                 
056593,000935: 04,3257           14631                           TCF      SWRETURN                              
056594,000936: 04,3260           00220        OCT220             OCT      220                                   
056595,000937: 

Page 1323

056597,000939:                                                                                                  #  PROGRAM DESCRIPTION   P06   10FEB67
056598,000940: 
056599,000941:                                                                                                  #  TRANSFER THE ISS/CMC FROM THE OPERATE TO THE STANDBY CONDITION.
056600,000942: 
056601,000943:                                                                                                  #  THE NORMAL CONDITION OF READINESS OF THE GNCS WHEN NOT IN USE IS STANDBY. IN THIS CONDITION THE IMU
056602,000944:                                                                                                  #  HEATER POWER IS ON. THE IMU OPERATE POWER IS OFF. THE COMPUTER POWER IS ON. THE OPTICS POWER IS OFF. THE
056603,000945:                                                                                                  #  CMC  STANDBY ON THE MAIN AND LEB DISKYS IS ON.
056604,000946: 
056605,000947:                                                                                                  #  CALLING SEQUENCE:
056606,000948:                                                                                                  #           ASTRONAUT REQUEST THROUGH DSKY     V37E 06E.
056607,000949: 
056608,000950:                                                                                                  #  SUBROUTINES CALLED:
056609,000951:                                                                                                  #           GOPERF1
056610,000952:                                                                                                  #           BANKCALL
056611,000953:                                                                                                  #           FLAGDOWN
056612,000954: 

Page 1324

056614,000956:                                                                                                  #  PRESTAND PREPARES FOR STANDBY BY SNAPSHOTTING THE SCALER AND TIME1 TIME2
056615,000957:                                                                                                  #  THE LOW 5 BITS OF THE SCALER ARE INSPECTED TO INSURE COMPATABILITY
056616,000958:                                                                                                  #  BETWEEN THE SCALER READING AND THE TIME1 TIME2 READING.
056617,000959: 
056618,000960: 37,2000                                           SETLOC   P05P06                                
056619,000961: 37,2000                                           BANK                                           
056620,000962: 
056621,000963: 37,3654     0314                                  EBANK=   TIME2SAV                              
056622,000964: 37,3654                                           COUNT*   $$/P06                                
056623,000965: 
056624,000966: 37,3654           05515        P06                TC       UPFLAG                                #  SET NODOV37 BIT
056625,000967: 37,3655           00054                           ADRES    NODOFLAG                              
056626,000968: 
056627,000969: 37,3656           00004        PRESTAND           INHINT                                         
056628,000970: 37,3657           00006                           EXTEND                                         
056629,000971: 37,3660           30025                           DCA      TIME2                                 #  SNAPSHOT TIME1TIME2
056630,000972: 37,3661           52315                           DXCH     TIME2SAV                              
056631,000973: 37,3662           03713                           TC       SCALPREP                              
056632,000974: 37,3663           03656                           TC       PRESTAND                              #  T1,T2,SCALER NOT COMPATIBLE
056633,000975: 37,3664           52155                           DXCH     MPAC                                  #  T1,T2 AND SCALER OK
056634,000976: 37,3665           52317                           DXCH     SCALSAVE                              #  STORE SCALER
056635,000977: 37,3666           00004                           INHINT                                         
056636,000978: 37,3667           04616                           TC       BANKCALL                              
056637,000979: 37,3670           17161                           CADR     RNDREFDR                              #  REFSMM, DRIFT, TRACK FLAGS DOWN
056638,000980: 
056639,000981: 37,3671           05527                           TC       DOWNFLAG                              
056640,000982: 37,3672           00007                           ADRES    IMUSE                                 #  IMUSE DOWN
056641,000983: 37,3673           05527                           TC       DOWNFLAG                              
056642,000984: 37,3674           00010                           ADRES    RNDVZFLG                              #  RNDVZFLG DOWN
056643,000985: 
056644,000986: 37,3675           34741                           CAF      BIT11                                 
056645,000987: 37,3676           00006                           EXTEND                                         
056646,000988: 37,3677           05013                           WOR      CHAN13                                #  SET STANDBY ENABLE BIT
056647,000989: 
056648,000990: 37,3700           05364                           TC       PHASCHNG                              #  SET RESTART TO POSTAND WHEN STANDBY
056649,000991: 37,3701           07024                           OCT      07024                                 #    RECOVERS
056650,000992: 37,3702           20000                           OCT      20000                                 
056651,000993: 37,3703     0316                                  EBANK=   SCALSAVE                              
056652,000994: 37,3703           03733 76060                     2CADR    POSTAND                               
056653,000995: 
056654,000996: 37,3705           34774                           CAF      OCT62                                 
056655,000997: 37,3706           04616                           TC       BANKCALL                              
056656,000998: 37,3707           20624                           CADR     GOPERF1                               
056657,000999: 37,3710           13705                           TCF      -3                                    
056658,001000: 37,3711           13705                           TCF      -4                                    
056659,001001: 37,3712           13705                           TCF      -5                                    
056660,001002: 
056661,001003: 37,3713     4774               OCT62              EQUALS   .5SEC                                 #  DEC 50 = OCT 62
056662,001004: 
056663,001005:                                                                                                  #  THE LOW 5 BITS OF THE SCALER READS 10000 FOR THE FIRST INTERVAL AFTER A

Page 1325

056665,001007:                                                                                                  #  T1 INCREMENT. IF SCALPREP DETECTS THIS INTERVAL THE T1,T2 AND SCALER
056666,001008:                                                                                                  #  DATA ARE NOT COMPATABLE AND RETURN IS TO L+1 FOR ANOTHER READING OF THE
056667,001009:                                                                                                  #  DATA. OTHERWISE, THE RETURN IS TO L+2 TO PROCEED. ROUTINE ALSO PREPARES
056668,001010:                                                                                                  #  THE SCALER READING FOR COMPUTATION OF THE INCREMENT TO UPDATE T1T2. (THE
056669,001011:                                                                                                  #  10 MS BIT (BIT 6) OF THE SCALER IS INCREMENTED 5 MS OUT OF PHASE FROM
056670,001012:                                                                                                  #  T1.) ADDITION OF 5 MS (BIT 5) TO THE SCALER READING HAS THE EFFECT OF
056671,001013:                                                                                                  #  ADJUSTING BIT 6 IN THE SCALER TO BE IN PHASE WITH BIT 1 OF T1. THE LOW 5
056672,001014:                                                                                                  #  BITS OF THE SCALER READING ARE THEN SET TO ZERO, TO TRUNCATE THE SCALER
056673,001015:                                                                                                  #  DATA TO 10 MS. RESULTS ARE STORED IN MPAC, +1.
056674,001016: 
056675,001017: 37,3713           00006        SCALPREP           EXTEND                                         
056676,001018: 37,3714           22156                           QXCH     MPAC       +2                         
056677,001019: 37,3715           04103                           TC       FINETIME   +1                         
056678,001020: 37,3716           00003                           RELINT                                         
056679,001021: 37,3717           52155                           DXCH     MPAC                                  
056680,001022: 37,3720           34747                           CA       BIT5                                  #  ADD 5 MS TO THE SCALER READING.
056681,001023: 37,3721           54001                           TS       L                                     
056682,001024: 37,3722           34755                           CA       ZERO                                  
056683,001025: 37,3723           20155                           DAS      MPAC                                  
056684,001026: 37,3724           44346                           CS       LOW5                                  #  SET LOW 5 BITS OF (SCALER+5MS) TO ZERO
056685,001027: 37,3725           70155                           MASK     MPAC       +1                         #  AND STORE RESULTS IN MPAC,+1.
056686,001028: 37,3726           56155                           XCH      MPAC       +1                         
056687,001029: 37,3727           74346                           MASK     LOW5                                  #  TEST LOW 5 BITS OF SCALER FOR THE FIRST
056688,001030:                                                                                                  #  INTERVAL AFTER THE T1 INCREMENT
056689,001031:                                                                                                  #  (NOW = 00000, SINCE BIT 5 ADDED).
056690,001032: 37,3730           10000                           CCS      A                                     #  IS IT 1ST INTERVAL AFTER T1 INCREMENT
056691,001033: 37,3731           24156                           INCR     MPAC       +2                         #  NO
056692,001034: 37,3732           00156                           TC       MPAC       +2                         #  YES
056693,001035: 
056694,001036:                                                                                                  #  POSTAND RECOVERS TIME AFTER STANDBY.THE SCALER IS SNAPSHOTTED AND THE
056695,001037:                                                                                                  #  TIME1 TIME2 COUNTER IS SET TO ZERO. THE LOW 5 BITS OF THE SCALER ARE
056696,001038:                                                                                                  #  INSPECTED TO INSURE COMPATABILITY BETWEEN THE SCALER READING AND THE
056697,001039:                                                                                                  #  CLEARING OF THE TIME COUNTER. IT THEN COMPUTES THE DIFFERENCE IN SCALER
056698,001040:                                                                                                  #  VALUES (IN DP) AND ADDS THIS TO THE PREVIOUSLY SNAPSHOTTED VALUES OF
056699,001041:                                                                                                  #  TIME1 TIME2 AND PLACES THIS NEW TIME INTO THE TIME1 TIME2 COUNTER.
056700,001042: 
056701,001043: 37,3733                                           COUNT*   $$/P05                                
056702,001044: 
056703,001045: 37,3733           44741        POSTAND            CS       BIT11                                 #  RECOVER TIME AFTER STANDBY.
056704,001046: 37,3734           00006                           EXTEND                                         
056705,001047: 37,3735           03013                           WAND     CHAN13                                #  CLEAR STANDBY ENABLE BIT
056706,001048: 37,3736           00004                           INHINT                                         
056707,001049: 37,3737           34755                           CA       ZERO                                  
056708,001050: 37,3740           54001                           TS       L                                     
056709,001051: 37,3741           52025                           DXCH     TIME2                                 #  CLEAR TIME1TIME2
056710,001052: 37,3742           03713                           TC       SCALPREP                              #  STORE SCALER IN MPAC, MPAC+1
056711,001053: 37,3743           03736                           TC       POSTAND    +3                         #  T1,T2,SCALER NOT COMPATIBLE
056712,001054: 37,3744           00006                           EXTEND                                         #  T1,T2 AND SCALER OK
056713,001055: 37,3745           40317                           DCS      SCALSAVE                              
056714,001056: 37,3746           20155                           DAS      MPAC                                  #  FORM DP DIFFERENCE OF POSTSTANDBY SCALER

Page 1326

056716,001058: 37,3747           34742                           CAF      BIT10                                 #  MINUS PRESTANDBY SCALER AND SHIFT RIGHT
056717,001059: 37,3750           07312                           TC       SHORTMP                               #  5 TO ALIGN BITS WITH TIME1TIME2.
056718,001060: 37,3751           34755                           CAF      ZERO                                  
056719,001061: 37,3752           54156                           TS       MPAC       +2                         #  NEEDED FOR TP AGREE
056720,001062: 37,3753           07262                           TC       TPAGREE                               #  MAKE DP DIFF AGREE
056721,001063: 37,3754           10154                           CCS      MPAC                                  
056722,001064: 37,3755           03762                           TC       POSTCOM                               #  IF DP DIFF NET +, NO SCALER OVERFLOW
056723,001065: 37,3756           03762                           TC       POSTCOM                               #  BETWEEN PRE AND POST STANDBY.
056724,001066: 37,3757           03760                           TC       +1                                    #  IF DP DIFF NET -, SCALER OVERFLOWED. ADD
056725,001067: 37,3760           34742                           CAF      BIT10                                 #  BIT 10 TO HIGH DIFF TO CORRECT.
056726,001068: 37,3761           26154                           ADS      MPAC                                  
056727,001069: 37,3762           00006        POSTCOM            EXTEND                                         #  C(MPAC,+1) IS MAGNITUDE OF DELTA SCALER.
056728,001070: 37,3763           30315                           DCA      TIME2SAV                              #  PRESTANDBY TIME1TIME2
056729,001071: 37,3764           20155                           DAS      MPAC                                  
056730,001072: 37,3765           07262                           TC       TPAGREE                               #  FORCE SIGN AGREEMENT
056731,001073: 37,3766           52155                           DXCH     MPAC                                  #  UPDATED VALUE FOR T1,T2.
056732,001074: 37,3767           20025                           DAS      TIME2                                 #  LOAD UPDATED VALUE INTO T1,T2, WITH
056733,001075: 37,3770           05527                           TC       DOWNFLAG                              #  CLEAR NODOFLAG
056734,001076: 37,3771           00054                           ADRES    NODOFLAG                              
056735,001077: 
056736,001078: 37,3772           06001                           TC       GOTOPOOH                              

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