Source Code

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

The reconstruction began with reconstructed source code for Luminary 173. Changes between revision 163 and 173 were backed out, as described by Luminary memos 157 and 158. 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 163 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.

055497,000002:                                                                                                  ## Copyright:   Public domain.
055498,000003:                                                                                                  ## Filename:    IMU_MODE_SWITCHING_ROUTINES.agc
055499,000004:                                                                                                  ## Purpose:     A section of Luminary revision 163.
055500,000005:                                                                                                  ##              It is part of the reconstructed source code for the first
055501,000006:                                                                                                  ##              (unflown) release of the flight software for the Lunar
055502,000007:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 14.
055503,000008:                                                                                                  ##              The code has been recreated from a reconstructed copy of
055504,000009:                                                                                                  ##              Luminary 173, as well as Luminary memos 157 amd 158.
055505,000010:                                                                                                  ##              It has been adapted such that the resulting bugger words
055506,000011:                                                                                                  ##              exactly match those specified for Luminary 163 in NASA
055507,000012:                                                                                                  ##              drawing 2021152N, which gives relatively high confidence
055508,000013:                                                                                                  ##              that the reconstruction is correct.
055509,000014:                                                                                                  ## Reference:   pp. 1298-1326
055510,000015:                                                                                                  ## Assembler:   yaYUL
055511,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
055512,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
055513,000018:                                                                                                  ## Mod history: 2019-08-21 MAS  Created from Luminary 173.
055514,000019: 

Page 1298

055516,000021:    5470                                           BLOCK    02                                    
055517,000022:    4000                                           SETLOC   FFTAG3                                
055518,000023:    4000                                           BANK                                           
055519,000024: 
055520,000025:    5470  E3,1471                                  EBANK=   COMMAND                               
055521,000026: 
055522,000027:                                                                                                  #           FIXED-FIXED ROUTINES.
055523,000028: 
055524,000029:    5470                                           COUNT*   $$/IMODE                              
055525,000030:    5470           34755        ZEROICDU           CAF      ZERO                                  #  ZERO ICDU COUNTERS.
055526,000031:    5471           54032                           TS       CDUX                                  
055527,000032:    5472           54033                           TS       CDUY                                  
055528,000033:    5473           54034                           TS       CDUZ                                  
055529,000034:    5474           00002                           TC       Q                                     
055530,000035: 
055531,000036:    5475     4743               SPSCODE            =        BIT9                                  
055532,000037: 

Page 1299

055534,000039:                                                                                                  #           IMU ZEROING ROUTINE.
055535,000040: 
055536,000041: 11,3774                                           BANK     11                                    
055537,000042: 07,2000                                           SETLOC   MODESW                                
055538,000043: 07,2000                                           BANK                                           
055539,000044: 
055540,000045: 07,2700                                           COUNT*   $$/IMODE                              
055541,000046: 07,2700           00004        IMUZERO            INHINT                                         #  ROUTINE TO ZERO ICDUS.
055542,000047: 07,2701           41035                           CS       DSPTAB     +11D                       #  DONT ZERO CDUS IF IMU IN GIMBAL LOCK AND
055543,000048: 07,2702           74771                           MASK     BITS4&6                               #  COARSE ALIGN (GIMBAL RUNAWAY PROTECTION)
055544,000049: 07,2703           10000                           CCS      A                                     
055545,000050: 07,2704           12710                           TCF      IMUZEROA                              
055546,000051: 
055547,000052: 07,2705           05600                           TC       ALARM                                 #  IF SO.
055548,000053: 07,2706           00206                           OCT      00206                                 
055549,000054: 
055550,000055: 07,2707           13663                           TCF      CAGETSTJ   +4                         #  IMMEDIATE FAILURE.
055551,000056: 
055552,000057: 07,2710           03657        IMUZEROA           TC       CAGETSTJ                              
055553,000058:                                                                                                  #           DELETE
055554,000059: 07,2711           41300                           CS       IMODES33                              #  DISABLE DAP AUTO AND HOLD MODES
055555,000060: 07,2712           74773                           MASK     SUPER011                              #      BIT5 FOR GROUND
055556,000061: 07,2713           27300                           ADS      IMODES33                              
055557,000062: 
055558,000063: 07,2714           41277                           CS       IMODES30                              #  INHIBIT ICDUFAIL AND IMUFAIL (IN CASE WE
055559,000064: 07,2715           75752                           MASK     BITS3&4                               #  JUST CAME OUT OF COARSE ALIGN).
055560,000065: 07,2716           27277                           ADS      IMODES30                              
055561,000066: 
055562,000067: 07,2717           44771                           CS       BITS4&6                               #  SEND ZERO ENCODE WITH COARSE AND ERROR
055563,000068: 07,2720           00006                           EXTEND                                         #  COUNTER DISABLED.
055564,000069: 07,2721           03012                           WAND     CHAN12                                
055565,000070: 
055566,000071: 07,2722           03252                           TC       NOATTOFF                              #  TURN OFF NO ATT LAMP.
055567,000072: 
055568,000073: 07,2723           34747                           CAF      BIT5                                  
055569,000074: 07,2724           00006                           EXTEND                                         
055570,000075: 07,2725           05012                           WOR      CHAN12                                
055571,000076: 
055572,000077: 07,2726           05470                           TC       ZEROICDU                              
055573,000078: 07,2727           34746                           CAF      BIT6                                  #  WAIT 320 MS TO GIVE AGS ADEQUATE TIME TO
055574,000079: 07,2730           05214                           TC       WAITLIST                              #  RECEIVE ITS PULSE TRAIN.
055575,000080: 07,2731  E3,1474                                  EBANK=   CDUIND                                
055576,000081: 07,2731           02743 16103                     2CADR    IMUZERO2                              
055577,000082: 
055578,000083: 
055579,000084: 07,2733           41277                           CS       IMODES30                              #  SEE IF IMU OPERATING AND ALARM IF NOT.
055580,000085: 07,2734           74743                           MASK     BIT9                                  
055581,000086: 07,2735           10000                           CCS      A                                     
055582,000087: 07,2736           12741                           TCF      MODEEXIT                              

Page 1300

055584,000089: 07,2737           05600                           TC       ALARM                                 
055585,000090: 07,2740           00210                           OCT      210                                   
055586,000091: 
055587,000092: 07,2741           00003        MODEEXIT           RELINT                                         #  GENERAL MODE-SWITCHING EXIT.
055588,000093: 07,2742           14631                           TCF      SWRETURN                              
055589,000094: 
055590,000095: 
055591,000096: 07,2743           03645        IMUZERO2           TC       CAGETEST                              
055592,000097: 07,2744           05470                           TC       ZEROICDU                              #  ZERO CDUX, CDUY, CDUZ
055593,000098: 
055594,000099: 07,2745           44747                           CS       BIT5                                  #  REMOVE ZERO DISCRETE.
055595,000100: 07,2746           00006                           EXTEND                                         
055596,000101: 07,2747           03012                           WAND     CHAN12                                
055597,000102: 
055598,000103: 07,2750           34741                           CAF      BIT11                                 #  WAIT 10 SECS FOR CTRS TO FIND GIMBALS
055599,000104: 07,2751           05235                           TC       VARDELAY                              
055600,000105: 
055601,000106: 07,2752           03645        IMUZERO3           TC       CAGETEST                              
055602,000107: 07,2753           45752                           CS       BITS3&4                               #  REMOVE IMUFAIL AND ICDUFAIL INHIBIT.
055603,000108: 07,2754           71277                           MASK     IMODES30                              
055604,000109: 07,2755           55277                           TS       IMODES30                              
055605,000110: 
055606,000111: 07,2756           44773                           CS       SUPER011                              #  ENABLE DAP AUTO AND HOLD MODES
055607,000112: 07,2757           71300                           MASK     IMODES33                              #      BIT5 FOR GROUND
055608,000113: 07,2760           55300                           TS       IMODES33                              
055609,000114: 
055610,000115: 07,2761           04674                           TC       IBNKCALL                              #  SET ISS WARNING IF EITHER OF ABOVE ARE
055611,000116: 07,2762           14703                           CADR     SETISSW                               #  PRESENT.
055612,000117: 
055613,000118: 07,2763           13635                           TCF      ENDIMU                                
055614,000119: 

Page 1301

055616,000121:                                                                                                  #           IMU COARSE ALIGN MODE.
055617,000122: 
055618,000123: 07,2764           00004        IMUCOARS           INHINT                                         
055619,000124: 07,2765           03657                           TC       CAGETSTJ                              
055620,000125: 07,2766           03130                           TC       SETCOARS                              
055621,000126: 
055622,000127: 07,2767           36245                           CAF      SIX                                   
055623,000128: 07,2770           05214                           TC       WAITLIST                              
055624,000129: 07,2771  E3,1474                                  EBANK=   CDUIND                                
055625,000130: 07,2771           02774 16103                     2CADR    COARS                                 
055626,000131: 
055627,000132: 
055628,000133: 07,2773           12741                           TCF      MODEEXIT                              
055629,000134: 
055630,000135: 07,2774           03645        COARS              TC       CAGETEST                              
055631,000136: 07,2775           34746                           CAF      BIT6                                  #  ENABLE ALL THREE ISS CDU ERROR COUNTERS
055632,000137: 07,2776           00006                           EXTEND                                         
055633,000138: 07,2777           05012                           WOR      CHAN12                                
055634,000139: 
055635,000140: 07,3000           34752                           CAF      TWO                                   #  SET CDU INDICATOR
055636,000141: 07,3001           55474        COARS1             TS       CDUIND                                
055637,000142: 
055638,000143: 07,3002           51474                           INDEX    CDUIND                                #  COMPUTE THETAD - THETAA IN 1:S
055639,000144: 07,3003           30321                           CA       THETAD                                #    COMPLEMENT FORM
055640,000145: 07,3004           00006                           EXTEND                                         
055641,000146: 07,3005           51474                           INDEX    CDUIND                                
055642,000147: 07,3006           20032                           MSU      CDUX                                  
055643,000148: 07,3007           00006                           EXTEND                                         
055644,000149: 07,3010           74737                           MP       BIT13                                 #  SHIFT RIGHT 2
055645,000150: 07,3011           56001                           XCH      L                                     #  ROUND
055646,000151: 07,3012           60000                           DOUBLE                                         
055647,000152: 07,3013           54061                           TS       ITEMP1                                
055648,000153: 07,3014           13016                           TCF      +2                                    
055649,000154: 07,3015           26001                           ADS      L                                     
055650,000155: 
055651,000156: 07,3016           51474                           INDEX    CDUIND                                #  DIFFERENCE TO BE COMPUTED
055652,000157: 07,3017           23471                           LXCH     COMMAND                               
055653,000158: 07,3020           11474                           CCS      CDUIND                                
055654,000159: 07,3021           03001                           TC       COARS1                                
055655,000160: 
055656,000161: 07,3022           34752                           CAF      TWO                                   #  MINIMUM OF 4 MS WAIT
055657,000162: 07,3023           05235                           TC       VARDELAY                              
055658,000163: 

Page 1302

055660,000165: 07,3024           03645        COARS2             TC       CAGETEST                              #  DONT CONTINUE IF CAGED.
055661,000166: 07,3025           54061                           TS       ITEMP1                                #  SETS TO +0.
055662,000167: 07,3026           34752                           CAF      TWO                                   #  SET CDU INDICATOR
055663,000168: 07,3027           55474                 +3        TS       CDUIND                                
055664,000169: 
055665,000170: 07,3030           51474                           INDEX    CDUIND                                
055666,000171: 07,3031           11471                           CCS      COMMAND                               #  NUMBER OF PULSES REQUIRED
055667,000172: 07,3032           03036                           TC       COMPOS                                #  GREATER THAN MAX ALLOWED
055668,000173: 07,3033           03045                           TC       NEXTCDU    +1                         
055669,000174: 07,3034           03103                           TC       COMNEG                                
055670,000175: 07,3035           03045                           TC       NEXTCDU    +1                         
055671,000176: 
055672,000177: 07,3036           63751        COMPOS             AD       -COMMAX                               #  COMMAX = MAX NUMBER OF PULSES ALLOWED
055673,000178: 07,3037           00006                           EXTEND                                         #    MINUS ONE
055674,000179: 07,3040           63113                           BZMF     COMZERO                               
055675,000180: 07,3041           51474                           INDEX    CDUIND                                
055676,000181: 07,3042           55471                           TS       COMMAND                               #  REDUCE COMMAND BY MAX NUMBER OF PULSES
055677,000182: 07,3043           43752                           CS       -COMMAX-                              #    ALLOWED
055678,000183: 
055679,000184: 07,3044           24061        NEXTCDU            INCR     ITEMP1                                
055680,000185: 07,3045           64754                           AD       NEG0                                  
055681,000186: 07,3046           51474                           INDEX    CDUIND                                
055682,000187: 07,3047           54050                           TS       CDUXCMD                               #  SET UP COMMAND REGISTER.
055683,000188: 
055684,000189: 07,3050           11474                           CCS      CDUIND                                
055685,000190: 07,3051           03027                           TC       COARS2     +3                         
055686,000191: 
055687,000192: 07,3052           10061                           CCS      ITEMP1                                #  SEE IF ANY PULSES TO GO OUT.
055688,000193: 07,3053           13117                           TCF      SENDPULS                              
055689,000194: 
055690,000195: 07,3054           05232                           TC       FIXDELAY                              #  WAIT FOR GIMBALS TO SETTLE.
055691,000196: 07,3055           00226                           DEC      150        B-14                       
055692,000197: 
055693,000198: 
055694,000199: 07,3056           34752                           CAF      TWO                                   #  AT END OF COMMAND, CHECK TO SEE THAT
055695,000200: 07,3057           54061        CHKCORS            TS       ITEMP1                                #  GIMBALS ARE WITHIN 2 DEGREES OF THETAD.
055696,000201: 07,3060           50000                           INDEX    A                                     
055697,000202: 07,3061           30032                           CA       CDUX                                  
055698,000203: 07,3062           00006                           EXTEND                                         
055699,000204: 07,3063           50061                           INDEX    ITEMP1                                
055700,000205: 07,3064           20321                           MSU      THETAD                                
055701,000206: 07,3065           10000                           CCS      A                                     
055702,000207: 07,3066           13074                           TCF      COARSERR                              
055703,000208: 07,3067           13071                           TCF      CORSCHK2                              
055704,000209: 07,3070           13074                           TCF      COARSERR                              
055705,000210: 

Page 1303

055707,000212: 07,3071           10061        CORSCHK2           CCS      ITEMP1                                
055708,000213: 07,3072           13057                           TCF      CHKCORS                               
055709,000214: 07,3073           13635                           TCF      ENDIMU                                #  END OF COARSE ALIGNMENT.
055710,000215: 
055711,000216: 07,3074           63102        COARSERR           AD       COARSTOL                              #  2 DEGREES.
055712,000217: 07,3075           00006                           EXTEND                                         
055713,000218: 07,3076           63071                           BZMF     CORSCHK2                              
055714,000219: 
055715,000220: 07,3077           05600                           TC       ALARM                                 #  COARSE ALIGN ERROR.
055716,000221: 07,3100           00211                           OCT      211                                   
055717,000222: 
055718,000223: 07,3101           13643                           TCF      IMUBAD                                
055719,000224: 
055720,000225: 07,3102           77511        COARSTOL           DEC      -.01111                               #  2 DEGREES SCALED AT HALF-REVOLUTIONS
055721,000226: 
055722,000227: 
055723,000228: 07,3103           63751        COMNEG             AD       -COMMAX                               
055724,000229: 07,3104           00006                           EXTEND                                         
055725,000230: 07,3105           63113                           BZMF     COMZERO                               
055726,000231: 07,3106           40000                           COM                                            
055727,000232: 07,3107           51474                           INDEX    CDUIND                                
055728,000233: 07,3110           55471                           TS       COMMAND                               
055729,000234: 07,3111           33752                           CA       -COMMAX-                              
055730,000235: 07,3112           03044                           TC       NEXTCDU                               
055731,000236: 
055732,000237: 07,3113           34755        COMZERO            CAF      ZERO                                  
055733,000238: 07,3114           51474                           INDEX    CDUIND                                
055734,000239: 07,3115           57471                           XCH      COMMAND                               
055735,000240: 07,3116           03044                           TC       NEXTCDU                               
055736,000241: 
055737,000242: 
055738,000243: 07,3117           37743        SENDPULS           CAF      13,14,15                              
055739,000244: 07,3120           00006                           EXTEND                                         
055740,000245: 07,3121           05014                           WOR      CHAN14                                
055741,000246: 07,3122           33753                           CAF      600MS                                 
055742,000247: 07,3123           13023                           TCF      COARS2     -1                         #  THEN TO VARDELAY
055743,000248: 
055744,000249: 
055745,000250: 07,3124           34746        CA+ECE             CAF      BIT6                                  #  ENABLE ALL THREE ISS CDU ERROR COUNTERS
055746,000251: 07,3125           00006                           EXTEND                                         
055747,000252: 07,3126           05012                           WOR      CHAN12                                
055748,000253: 07,3127           05272                           TC       TASKOVER                              
055749,000254: 

Page 1304

055751,000256: 07,3130           34750        SETCOARS           CAF      BIT4                                  #  BYPASS IF ALREADY IN COARSE ALIGN
055752,000257: 07,3131           00006                           EXTEND                                         
055753,000258: 07,3132           02012                           RAND     CHAN12                                
055754,000259: 07,3133           10000                           CCS      A                                     
055755,000260: 07,3134           00002                           TC       Q                                     
055756,000261: 
055757,000262: 07,3135           44746                           CS       BIT6                                  #  CLEAR ISS ERROR COUNTERS
055758,000263: 07,3136           00006                           EXTEND                                         
055759,000264: 07,3137           03012                           WAND     CHAN12                                
055760,000265: 
055761,000266: 07,3140           44742                           CS       BIT10                                 #  KNOCK DOWN GYRO ACTIVITY
055762,000267: 07,3141           00006                           EXTEND                                         
055763,000268: 07,3142           03014                           WAND     CHAN14                                
055764,000269: 07,3143           44755                           CS       ZERO                                  
055765,000270: 07,3144           54047                           TS       GYROCMD                               
055766,000271: 
055767,000272: 07,3145           34750                           CAF      BIT4                                  #  PUT ISS IN COARSE ALIGN
055768,000273: 07,3146           00006                           EXTEND                                         
055769,000274: 07,3147           05012                           WOR      CHAN12                                
055770,000275: 
055771,000276: 07,3150           41035                           CS       DSPTAB     +11D                       #  TURN ON NO ATT LAMP
055772,000277: 07,3151           73173                           MASK     OCT40010                              
055773,000278: 07,3152           27035                           ADS      DSPTAB     +11D                       
055774,000279: 
055775,000280: 07,3153           41300                           CS       IMODES33                              #  DISABLE DAP AUTO AND HOLD MODES
055776,000281: 07,3154           74746                           MASK     BIT6                                  
055777,000282: 07,3155           27300                           ADS      IMODES33                              
055778,000283: 
055779,000284: 07,3156           41277                           CS       IMODES30                              #  DISABLE IMUFAIL
055780,000285: 07,3157           74750                           MASK     BIT4                                  
055781,000286: 07,3160           27277                           ADS      IMODES30                              
055782,000287: 
055783,000288: 07,3161           44747        RNDREFDR           CS       TRACKBIT                              #  CLEAR TRACK FLAG
055784,000289: 07,3162           70075                           MASK     FLAGWRD1                              
055785,000290: 07,3163           54075                           TS       FLAGWRD1                              
055786,000291: 
055787,000292: 07,3164           44735                           CS       DRFTBIT                               #  CLEAR DRIFT FLAG
055788,000293: 07,3165           70076                           MASK     FLAGWRD2                              
055789,000294: 07,3166           54076                           TS       FLAGWRD2                              
055790,000295: 
055791,000296: 07,3167           44737                           CS       REFSMBIT                              #  CLEAR REFSMMAT FLAG
055792,000297: 07,3170           70077                           MASK     FLAGWRD3                              
055793,000298: 07,3171           54077                           TS       FLAGWRD3                              
055794,000299: 
055795,000300: 07,3172           00002                           TC       Q                                     
055796,000301: 
055797,000302: 07,3173           40010        OCT40010           OCT      40010                                 
055798,000303: 

Page 1305

055800,000305:                                                                                                  #           IMU FINE ALIGN MODE SWITCH.
055801,000306: 
055802,000307: 07,3174           00004        IMUFINE            INHINT                                         
055803,000308: 07,3175           03657                           TC       CAGETSTJ                              #  SEE IF IMU BEING CAGED.
055804,000309: 
055805,000310: 07,3176           43750                           CS       BITS4-5                               #  RESET ZERO AND COARSE
055806,000311: 07,3177           00006                           EXTEND                                         
055807,000312: 07,3200           03012                           WAND     CHAN12                                
055808,000313: 
055809,000314: 07,3201           44746                           CS       BIT6                                  #  INSURE DAP AUTO AND HOLD MODES ENABLED
055810,000315: 07,3202           71300                           MASK     IMODES33                              
055811,000316: 07,3203           55300                           TS       IMODES33                              
055812,000317: 
055813,000318: 07,3204           03252                           TC       NOATTOFF                              
055814,000319: 
055815,000320: 07,3205           34742                           CAF      BIT10                                 #  IMU FAIL WAS INHIBITED DURING THE
055816,000321: 07,3206           05214                           TC       WAITLIST                              #  PRESUMABLY PRECEDING COARSE ALIGN. LEAVE
055817,000322: 07,3207  E3,1474                                  EBANK=   CDUIND                                
055818,000323: 07,3207           03220 16103                     2CADR    IFAILOK                               #  IT ON FOR THE FIRST 5 SECS OF FINE ALIGN
055819,000324: 
055820,000325: 
055821,000326: 07,3211           35000                           CAF      2SECS                                 
055822,000327: 07,3212           05214                           TC       WAITLIST                              
055823,000328: 07,3213  E3,1474                                  EBANK=   CDUIND                                
055824,000329: 07,3213           03216 16103                     2CADR    IMUFINED                              
055825,000330: 
055826,000331: 
055827,000332: 07,3215           12741                           TCF      MODEEXIT                              
055828,000333: 
055829,000334: 07,3216           03645        IMUFINED           TC       CAGETEST                              #  SEE THAT NO ONE HAS CAGED THE IMU.
055830,000335: 07,3217           13635                           TCF      ENDIMU                                
055831,000336: 

Page 1306

055833,000338: 07,3220           03652        IFAILOK            TC       CAGETSTQ                              #  ENABLE IMU FIAL UNLESS IMU BEING CAGED.
055834,000339: 07,3221           15272                           TCF      TASKOVER                              #  IT IS.
055835,000340: 
055836,000341: 07,3222           34750                           CAF      BIT4                                  #  DONT RESET IMU FAIL INHIBIT IF SOMEONE
055837,000342: 07,3223           00006                           EXTEND                                         #  HAS GONE INTO COARSE ALIGN.
055838,000343: 07,3224           02012                           RAND     CHAN12                                
055839,000344: 07,3225           10000                           CCS      A                                     
055840,000345: 07,3226           15272                           TCF      TASKOVER                              
055841,000346: 
055842,000347: 07,3227           41277                           CS       IMODES30                              #  RESET IMUFAIL.
055843,000348: 07,3230           74737                           MASK     BIT13                                 
055844,000349: 07,3231           27277                           ADS      IMODES30                              
055845,000350: 07,3232           44750                           CS       BIT4                                  
055846,000351: 07,3233           71277        PFAILOK2           MASK     IMODES30                              
055847,000352: 07,3234           55277                           TS       IMODES30                              
055848,000353: 07,3235           04674                           TC       IBNKCALL                              #  THE ISS WARNING LIGHT MAY COME ON NOW
055849,000354: 07,3236           14703                           CADR     SETISSW                               #  THAT THE INHIBIT HAS BEEN REMOVED.
055850,000355: 07,3237           15272                           TCF      TASKOVER                              
055851,000356: 
055852,000357: 07,3240           03652        PFAILOK            TC       CAGETSTQ                              #  ENABLE PIP FAIL PROG ALARM.
055853,000358: 07,3241           15272                           TCF      TASKOVER                              
055854,000359: 
055855,000360: 07,3242           41277                           CS       IMODES30                              #  RESET IMU AND PIPA FAIL BITS.
055856,000361: 07,3243           74742                           MASK     BIT10                                 
055857,000362: 07,3244           27277                           ADS      IMODES30                              
055858,000363: 
055859,000364: 07,3245           41300                           CS       IMODES33                              
055860,000365: 07,3246           74737                           MASK     BIT13                                 
055861,000366: 07,3247           27300                           ADS      IMODES33                              
055862,000367: 
055863,000368: 07,3250           44747                           CS       BIT5                                  
055864,000369: 07,3251           13233                           TCF      PFAILOK2                              
055865,000370: 
055866,000371: 07,3252           43173        NOATTOFF           CS       OCT40010                              #  SUBROUTINE TO TURN OFF NO ATT LAMP.
055867,000372: 07,3253           71035                           MASK     DSPTAB     +11D                       
055868,000373: 07,3254           64735                           AD       BIT15                                 
055869,000374: 07,3255           55035                           TS       DSPTAB     +11D                       
055870,000375: 07,3256           00002                           TC       Q                                     
055871,000376: 

Page 1307

055873,000378:                                                                                                  #           ROUITNES TO INITIATE AND TERMINATE PROGRAM USE OF THE PIPAS. NO IMUSTALL REQUIRED IN EITHER CASE.
055874,000379: 
055875,000380: 07,3257           44755        PIPUSE             CS       ZERO                                  
055876,000381: 07,3260           54037                           TS       PIPAX                                 
055877,000382: 07,3261           54040                           TS       PIPAY                                 
055878,000383: 07,3262           54041                           TS       PIPAZ                                 
055879,000384: 
055880,000385: 07,3263           03652        PIPUSE1            TC       CAGETSTQ                              #  DO NOT ENABLE PIPA FAIL IF IMU IS CAGED
055881,000386: 07,3264           14631                           TCF      SWRETURN                              
055882,000387: 
055883,000388: 07,3265           00004                           INHINT                                         
055884,000389: 07,3266           44753                           CS       BIT1                                  #  IF PIPA FAILS FROM NOW ON (UNTIL
055885,000390: 07,3267           71277                           MASK     IMODES30                              #  PIPFREE), LIGHT ISS WARNING.
055886,000391: 07,3270           55277                           TS       IMODES30                              
055887,000392: 
055888,000393: 07,3271           04674        PIPFREE2           TC       IBNKCALL                              #  ISS WARNING MIGHT COME ON NOW.
055889,000394: 07,3272           14703                           CADR     SETISSW                               #  (OR GO OFF ON PIPFREE).
055890,000395: 
055891,000396: 07,3273           12741                           TCF      MODEEXIT                              
055892,000397: 
055893,000398: 07,3274           00004        PIPFREE            INHINT                                         #  PROGRAM DONE WITH PIPAS. DONT LIGHT
055894,000399: 07,3275           41277                           CS       IMODES30                              #  ISS WARNING.
055895,000400: 07,3276           74753                           MASK     BIT1                                  
055896,000401: 07,3277           27277                           ADS      IMODES30                              
055897,000402: 
055898,000403: 07,3300           74742                           MASK     BIT10                                 #  IF PIP FAIL ON, DO PROG ALSRM AND RESET
055899,000404: 07,3301           10000                           CCS      A                                     #  ISS WARNING.
055900,000405: 07,3302           12741                           TCF      MODEEXIT                              
055901,000406: 
055902,000407: 07,3303           05600                           TC       ALARM                                 
055903,000408: 07,3304           00212                           OCT      212                                   
055904,000409: 
055905,000410: 07,3305           00004                           INHINT                                         
055906,000411: 
055907,000412: 07,3306           13271                           TCF      PIPFREE2                              
055908,000413: 

Page 1308

055910,000415:                                                                                                  #           THE FOLLOWING ROUTINE TORQUES THE IRIGS ACCORDING TO DOUBLE PRECISION INPUTS IN THE SIX REGISTERS
055911,000416:                                                                                                  #  BEGINNING AT THE ECADR ARRIVING IN A. THE MINIMUM SIZE OF ANY PULSE TRAIN IS 16 PULSES (.25 CDU COUNTS). THE
055912,000417:                                                                                                  #  UNSENT PORTION OF THE COMMAND IS LEFT INTACT IN THE INPUT COMMAND REGISTERS.
055913,000418: 
055914,000419: 07,3307  E3,1400                                  EBANK=   1400                                  #  VARIABLE, ACTUALLY.
055915,000420: 
055916,000421: 07,3307           54161        IMUPULSE           TS       MPAC       +5                         #  SAVE ARRIVING ECADR.
055917,000422: 07,3310           03657                           TC       CAGETSTJ                              #  DONT PROCEED IF IMU BEING CAGED.
055918,000423: 
055919,000424: 07,3311           11311                           CCS      LGYRO                                 #  SEE IF GYROS BUSY.
055920,000425: 07,3312           03353                           TC       GYROBUSY                              #  SLEEP.
055921,000426: 
055922,000427: 07,3313           54156                           TS       MPAC       +2                         
055923,000428: 07,3314           34746                           CAF      BIT6                                  #  ENABLE THE POWER SUPPLY.
055924,000429: 07,3315           00006                           EXTEND                                         
055925,000430: 07,3316           05014                           WOR      CHAN14                                
055926,000431: 
055927,000432: 07,3317           34751                           CAF      FOUR                                  
055928,000433: 07,3320           05214        GWAKE2             TC       WAITLIST                              #  (IF A JOB WAS PUT TO SLEEP, THE POWER
055929,000434: 07,3321  E3,1474                                  EBANK=   CDUIND                                #  SUPPLY IS LEFT ON BY THE WAKING JOB).
055930,000435: 07,3321           03371 16103                     2CADR    STRTGYRO                              
055931,000436: 
055932,000437: 
055933,000438: 07,3323           30161                           CA       MPAC       +5                         #  SET UP EBANK, SAVING CALLER'S EBANK FOR
055934,000439: 07,3324           56003                           XCH      EBANK                                 #  RESTORATION ON RETURN.
055935,000440: 07,3325           56161                           XCH      MPAC       +5                         
055936,000441: 07,3326           55311                           TS       LGYRO                                 #  RESERVES GYROS.
055937,000442: 07,3327           74357                           MASK     LOW8                                  
055938,000443: 07,3330           54061                           TS       ITEMP1                                
055939,000444: 
055940,000445: 07,3331           34752                           CAF      TWO                                   #  FORCE SIGN AGREEMENT ON INPUTS.
055941,000446: 07,3332           54157        GYROAGRE           TS       MPAC       +3                         
055942,000447: 07,3333           60000                           DOUBLE                                         
055943,000448: 07,3334           60061                           AD       ITEMP1                                
055944,000449: 07,3335           54160                           TS       MPAC       +4                         
055945,000450: 07,3336           00006                           EXTEND                                         
055946,000451: 07,3337           50000                           INDEX    A                                     
055947,000452: 07,3340           31401                           DCA      1400                                  
055948,000453: 07,3341           52155                           DXCH     MPAC                                  
055949,000454: 07,3342           07262                           TC       TPAGREE                               
055950,000455: 07,3343           52155                           DXCH     MPAC                                  
055951,000456: 07,3344           50160                           INDEX    MPAC       +4                         
055952,000457: 07,3345           53401                           DXCH     1400                                  
055953,000458: 
055954,000459: 07,3346           10157                           CCS      MPAC       +3                         
055955,000460: 07,3347           13332                           TCF      GYROAGRE                              
055956,000461: 
055957,000462: 07,3350           30161                           CA       MPAC       +5                         #  RESTORE CALLER'S EBANK.
055958,000463: 07,3351           54003                           TS       EBANK                                 
055959,000464: 07,3352           12741                           TCF      MODEEXIT                              
055960,000465: 

Page 1309

055962,000467:                                                                                                  #           ROUTINES TO ALLOW TORQUING BY ONLY ONE JOB AT A TIME.
055963,000468: 
055964,000469: 07,3353           00006        GYROBUSY           EXTEND                                         #  SAVE RETURN 2FCADR.
055965,000470: 07,3354           30134                           DCA      BUF2                                  
055966,000471: 07,3355           52155                           DXCH     MPAC                                  
055967,000472: 07,3356           33370        REGSLEEP           CAF      LGWAKE                                
055968,000473: 07,3357           15133                           TCF      JOBSLEEP                              
055969,000474: 
055970,000475: 07,3360           11311        GWAKE              CCS      LGYRO                                 #  WHEN AWAKENED, SEE IF GYROS STILL BUSY.
055971,000476: 07,3361           13356                           TCF      REGSLEEP                              #  IF SO, SLEEP SOME MORE.
055972,000477: 
055973,000478: 07,3362           54156                           TS       MPAC       +2                         
055974,000479: 07,3363           00006                           EXTEND                                         
055975,000480: 07,3364           30155                           DCA      MPAC                                  
055976,000481: 07,3365           52134                           DXCH     BUF2                                  #  RESTORE SWRETURN INFO.
055977,000482: 07,3366           34753                           CAF      ONE                                   
055978,000483: 07,3367           13320                           TCF      GWAKE2                                
055979,000484: 
055980,000485: 07,3370           17360        LGWAKE             CADR     GWAKE                                 
055981,000486: 

Page 1310

055983,000488:                                                                                                  #           GYRO-TORQUING WAITLIST TASKS.
055984,000489: 
055985,000490: 07,3371           43632        STRTGYRO           CS       GDESELCT                              #  DE-SELECT LAST GYRO.
055986,000491: 07,3372           00006                           EXTEND                                         
055987,000492: 07,3373           03014                           WAND     CHAN14                                
055988,000493: 
055989,000494: 07,3374           03645                           TC       CAGETEST                              
055990,000495: 
055991,000496: 07,3375           31311        STRTGYR2           CA       LGYRO                                 #  JUMP ON PHASE COUNTER IN BITS 13-14.
055992,000497: 07,3376           00006                           EXTEND                                         
055993,000498: 07,3377           74750                           MP       BIT4                                  
055994,000499: 07,3400           50000                           INDEX    A                                     
055995,000500: 07,3401           13402                           TCF      +1                                    
055996,000501: 07,3402           03417                           TC       GSELECT                               #  =0. DO Y GYRO.
055997,000502: 07,3403           00202                           OCT      00202                                 
055998,000503: 
055999,000504: 07,3404           03417                           TC       GSELECT                               #  =1. DO Z GYRO.
056000,000505: 07,3405           00302                           OCT      00302                                 
056001,000506: 
056002,000507: 07,3406           03415                           TC       GSELECT    -2                         #  =2. DO X GYRO.
056003,000508: 07,3407           00100                           OCT      00100                                 
056004,000509: 
056005,000510: 07,3410           34755                           CAF      ZERO                                  #  =3. DONE
056006,000511: 07,3411           55311                           TS       LGYRO                                 
056007,000512: 07,3412           33370                           CAF      LGWAKE                                #  WAKE A POSSIBLE SLEEPING JOB.
056008,000513: 07,3413           05137                           TC       JOBWAKE                               
056009,000514: 
056010,000515: 07,3414           13216        NORESET            TCF      IMUFINED                              #  DO NOT RESET POWER SUPPLY
056011,000516: 

Page 1311

056013,000518: 07,3415           44751                 -2        CS       FOUR                                  #  SPECIAL ENTRY TO REGRESS LGYRO FOR X.
056014,000519: 07,3416           27311                           ADS      LGYRO                                 
056015,000520: 
056016,000521: 07,3417           50002        GSELECT            INDEX    Q                                     #  SELECT GYRO.
056017,000522: 07,3420           30000                           CAF      0                                     #  PACKED WORD CONTAINS GYRO SELECT BITS
056018,000523: 07,3421           54064                           TS       ITEMP4                                #  AND INCREMENT TO LGYRO.
056019,000524: 07,3422           74757                           MASK     SEVEN                                 
056020,000525: 07,3423           64737                           AD       BIT13                                 
056021,000526: 07,3424           27311                           ADS      LGYRO                                 
056022,000527: 07,3425           54003                           TS       EBANK                                 
056023,000528: 07,3426           74357                           MASK     LOW8                                  
056024,000529: 07,3427           54061                           TS       ITEMP1                                
056025,000530: 
056026,000531: 07,3430           44757                           CS       SEVEN                                 
056027,000532: 07,3431           70064                           MASK     ITEMP4                                
056028,000533: 07,3432           54064                           TS       ITEMP4                                
056029,000534: 
056030,000535: 07,3433           00006                           EXTEND                                         #  MOVE DP COMMAND TO RUPTREGS FOR TESTING.
056031,000536: 07,3434           50061                           INDEX    ITEMP1                                
056032,000537: 07,3435           31401                           DCA      1400                                  
056033,000538: 07,3436           52071                           DXCH     RUPTREG1                              
056034,000539: 
056035,000540: 07,3437           10070                           CCS      RUPTREG1                              
056036,000541: 07,3440           13453                           TCF      MAJ+                                  
056037,000542: 07,3441           13443                           TCF      +2                                    
056038,000543: 07,3442           13613                           TCF      MAJ-                                  
056039,000544: 
056040,000545: 07,3443           10071                           CCS      RUPTREG2                              
056041,000546: 07,3444           13450                           TCF      MIN+                                  
056042,000547: 07,3445           13375                           TCF      STRTGYR2                              
056043,000548: 07,3446           13610                           TCF      MIN-                                  
056044,000549: 07,3447           13375                           TCF      STRTGYR2                              
056045,000550: 

Page 1312

056047,000552: 07,3450           63504        MIN+               AD       -GYROMIN                              #  SMALL POSITIVE COMMAND. SEE IF AT LEAST
056048,000553: 07,3451           00006                           EXTEND                                         #  16 GYRO PULSES.
056049,000554: 07,3452           63375                           BZMF     STRTGYR2                              
056050,000555: 
056051,000556: 07,3453           00006        MAJ+               EXTEND                                         #  DEFINITE POSITIVE OUTPUT.
056052,000557: 07,3454           33634                           DCA      GYROFRAC                              
056053,000558: 07,3455           20071                           DAS      RUPTREG1                              
056054,000559: 
056055,000560: 07,3456           30064                           CA       ITEMP4                                #  SELECT POSITIVE TORQUING FOR THIS GYRO.
056056,000561: 07,3457           00006                           EXTEND                                         
056057,000562: 07,3460           05014                           WOR      CHAN14                                
056058,000563: 
056059,000564: 07,3461           36077                           CAF      LOW7                                  #  LEAVE NUMBER OF POSSIBLE 8192 AUGMENTS
056060,000565: 07,3462           70071                           MASK     RUPTREG2                              #  TO INITIAL COMMAND IN MAJOR PART OF LONG
056061,000566: 07,3463           56071                           XCH      RUPTREG2                              #  TERM STORAGE AND TRUNCATED FRACTION
056062,000567: 07,3464           00006        GMERGE             EXTEND                                         #  IN MINOR PART. THE MAJOR PART WILL BE
056063,000568: 07,3465           74744                           MP       BIT8                                  #  COUNTED DOWN TO ZERO IN THE COURSE OF
056064,000569: 07,3466           54062                           TS       ITEMP2                                #  PUTTING OUT THE ENTIRE COMMAND.
056065,000570: 07,3467           30070                           CA       RUPTREG1                              
056066,000571: 07,3470           00006                           EXTEND                                         
056067,000572: 07,3471           74743                           MP       BIT9                                  
056068,000573: 07,3472           54070                           TS       RUPTREG1                              
056069,000574: 07,3473           30001                           CA       L                                     
056070,000575: 07,3474           00006                           EXTEND                                         
056071,000576: 07,3475           74736                           MP       BIT14                                 
056072,000577: 07,3476           26062                           ADS      ITEMP2                                #  INITIAL COMMAND.
056073,000578: 
056074,000579: 07,3477           00006                           EXTEND                                         #  SEE IF MORE THAN ONE PULSE TRAIN NEEDED
056075,000580: 07,3500           30071                           DCA      RUPTREG1                              #  (MORE THAN 16383 PULSES).
056076,000581: 07,3501           67752                           AD       MINUS1                                
056077,000582: 07,3502           10000                           CCS      A                                     
056078,000583: 07,3503           13547                           TCF      LONGGYRO                              
056079,000584: 07,3504           77601        -GYROMIN           OCT      -176                                  #  MAY BE ADJUSTED TO SPECIFY MINIMUM CMD
056080,000585: 07,3505           13511                           TCF      +4                                    
056081,000586: 
056082,000587: 07,3506           34736                           CAF      BIT14                                 
056083,000588: 07,3507           26062                           ADS      ITEMP2                                
056084,000589: 07,3510           34755                           CAF      ZERO                                  
056085,000590: 
056086,000591: 07,3511           50061                 +4        INDEX    ITEMP1                                
056087,000592: 07,3512           53401                           DXCH     1400                                  

Page 1313

056089,000594: 07,3513           30062                           CA       ITEMP2                                #  ENTIRE COMMAND.
056090,000595: 07,3514           54047        LASTSEG            TS       GYROCMD                               
056091,000596: 07,3515           00006                           EXTEND                                         
056092,000597: 07,3516           74742                           MP       BIT10                                 #  WAITLIST DT
056093,000598: 07,3517           66250                           AD       THREE                                 #  TRUNCATION AND PHASE UNCERTAINTIES.
056094,000599: 07,3520           05214                           TC       WAITLIST                              
056095,000600: 07,3521  E3,1474                                  EBANK=   CDUIND                                
056096,000601: 07,3521           03533 16103                     2CADR    TWOPULSE                              
056097,000602: 
056098,000603: 07,3523           03527        EXITGYRO           TC       GYROEXIT                              
056099,000604: 07,3524           15272                           TCF      TASKOVER                              
056100,000605: 07,3525           34752        OUTPULSE           CA       BIT2                                  
056101,000606: 07,3526           54047                           TS       GYROCMD                               
056102,000607: 07,3527           34742        GYROEXIT           CAF      BIT10                                 
056103,000608: 07,3530           00006                           EXTEND                                         
056104,000609: 07,3531           05014                           WOR      CHAN14                                
056105,000610: 07,3532           00002                           TC       Q                                     
056106,000611: 07,3533           44743        TWOPULSE           CS       BIT9                                  
056107,000612: 07,3534           00006                           EXTEND                                         
056108,000613: 07,3535           03014                           WAND     CHAN14                                
056109,000614: 07,3536           03525                           TC       OUTPULSE                              
056110,000615: 07,3537           34753                           CA       BIT1                                  
056111,000616: 07,3540           05204                           TC       TWIDDLE                               
056112,000617: 07,3541           03371                           ADRES    STRTGYRO                              
056113,000618: 07,3542           34743                           CA       BIT9                                  
056114,000619: 07,3543           00006                           EXTEND                                         
056115,000620: 07,3544           05014                           WOR      CHAN14                                
056116,000621: 07,3545           03525                           TC       OUTPULSE                              
056117,000622: 07,3546           15272                           TCF      TASKOVER                              
056118,000623: 07,3547           50061        LONGGYRO           INDEX    ITEMP1                                
056119,000624: 07,3550           53401                           DXCH     1400                                  
056120,000625: 07,3551           34736                           CAF      BIT14                                 #  8192. INITIAL COMMAND IS AT LEAST 8192.
056121,000626: 07,3552           60062                           AD       ITEMP2                                
056122,000627: 07,3553           54047                           TS       GYROCMD                               
056123,000628: 
056124,000629: 07,3554           00006        AUG3               EXTEND                                         #  GET WAITLIST DT TO TIME WHEN TRAIN IS
056125,000630: 07,3555           74742                           MP       BIT10                                 #  ALMOST OUT.
056126,000631: 07,3556           67750                           AD       NEG3                                  
056127,000632: 07,3557           05214                           TC       WAITLIST                              
056128,000633: 07,3560  E3,1474                                  EBANK=   CDUIND                                
056129,000634: 07,3560           03563 16103                     2CADR    8192AUG                               
056130,000635: 
056131,000636: 07,3562           13523                           TCF      EXITGYRO                              
056132,000637: 
056133,000638: 07,3563           03645        8192AUG            TC       CAGETEST                              
056134,000639: 
056135,000640: 07,3564           34750                           CAF      BIT4                                  
056136,000641: 07,3565           00006                           EXTEND                                         
056137,000642: 07,3566           02012                           RAND     CHAN12                                
056138,000643: 07,3567           10000                           CCS      A                                     
056139,000644: 07,3570           13643                           TCF      IMUBAD                                
056140,000645: 07,3571           31311                           CA       LGYRO                                 #  ADD 8192 PULSES TO GYROCMD
056141,000646: 07,3572           54003                           TS       EBANK                                 

Page 1314

056143,000648: 07,3573           74357                           MASK     LOW8                                  
056144,000649: 07,3574           54061                           TS       ITEMP1                                
056145,000650: 
056146,000651: 07,3575           50061                           INDEX    ITEMP1                                #  SEE IF THIS IS THE LAST AUG.
056147,000652: 07,3576           11400                           CCS      1400                                  
056148,000653: 07,3577           13603                           TCF      AUG2                                  #  MORE TO COME.
056149,000654: 
056150,000655: 07,3600           34736                           CAF      BIT14                                 
056151,000656: 07,3601           26047                           ADS      GYROCMD                               
056152,000657: 07,3602           13515                           TCF      LASTSEG    +1                         
056153,000658: 
056154,000659: 07,3603           50061        AUG2               INDEX    ITEMP1                                
056155,000660: 07,3604           55400                           TS       1400                                  
056156,000661: 07,3605           34736                           CAF      BIT14                                 
056157,000662: 07,3606           26047                           ADS      GYROCMD                               
056158,000663: 07,3607           13554                           TCF      AUG3                                  #  COMPUTE DT.
056159,000664: 

Page 1315

056161,000666: 07,3610           63504        MIN-               AD       -GYROMIN                              #  POSSIBLE NEGATIVE OUTPUT.
056162,000667: 07,3611           00006                           EXTEND                                         
056163,000668: 07,3612           63375                           BZMF     STRTGYR2                              
056164,000669: 
056165,000670: 07,3613           00006        MAJ-               EXTEND                                         #  DEFINITE NEGATIVE OUTPUT.
056166,000671: 07,3614           43634                           DCS      GYROFRAC                              
056167,000672: 07,3615           20071                           DAS      RUPTREG1                              
056168,000673: 
056169,000674: 07,3616           30064                           CA       ITEMP4                                #  SELECT NEGATIVE TORQUING FOR THIS GYRO.
056170,000675: 07,3617           64743                           AD       BIT9                                  
056171,000676: 07,3620           00006                           EXTEND                                         
056172,000677: 07,3621           05014                           WOR      CHAN14                                
056173,000678: 
056174,000679: 07,3622           40070                           CS       RUPTREG1                              #  SET UP RUPTREGS TO FALL INTO GMERGE.
056175,000680: 07,3623           54070                           TS       RUPTREG1                              #  ALL NUMBERS PUT INTO GYROCMD ARE
056176,000681: 07,3624           40071                           CS       RUPTREG2                              #  POSITIVE - BIT9 OF CHAN 14 DETERMINES
056177,000682: 07,3625           76077                           MASK     LOW7                                  #  THE SIGN OF THE COMMAND.
056178,000683: 07,3626           40000                           COM                                            
056179,000684: 07,3627           56071                           XCH      RUPTREG2                              
056180,000685: 07,3630           40000                           COM                                            
056181,000686: 07,3631           13464                           TCF      GMERGE                                
056182,000687: 
056183,000688: 07,3632           01700        GDESELCT           OCT      1700                                  #  TURN OFF SELECT AND ACTIVITY BITS.
056184,000689: 
056185,000690: 07,3633           00000 00034  GYROFRAC           2DEC     .215       B-21                       
056186,000691: 

Page 1316

056188,000693:                                                                                                  #           IMU MODE SWITCHING ROUTINES COME HERE WHEN ACTION COMPLETE.
056189,000694: 
056190,000695: 07,3635           00006        ENDIMU             EXTEND                                         #  MODE IS BAD IF CAGE HAS OCCURED OR IF
056191,000696: 07,3636           00011                           READ     DSALMOUT                              #  ISS WARNING IS ON.
056192,000697: 07,3637           74753                           MASK     BIT1                                  
056193,000698: 07,3640           10000                           CCS      A                                     
056194,000699: 07,3641           13643                           TCF      IMUBAD                                
056195,000700: 
056196,000701: 07,3642           13671        IMUGOOD            TCF      GOODEND                               #  WITH C(A) = 0.
056197,000702: 
056198,000703: 07,3643           34755        IMUBAD             CAF      ZERO                                  
056199,000704: 07,3644           13666                           TCF      BADEND                                
056200,000705: 
056201,000706: 07,3645           34746        CAGETEST           CAF      BIT6                                  #  SUBROUTINE TO TERMINATE IMU MODE
056202,000707: 07,3646           71277                           MASK     IMODES30                              #  SWITCH IF IMU HAS BEEN CAGED.
056203,000708: 07,3647           10000                           CCS      A                                     
056204,000709: 07,3650           13643                           TCF      IMUBAD                                #  DIRECTLY.
056205,000710: 07,3651           00002                           TC       Q                                     #  WITH C(A) = +0.
056206,000711: 
056207,000712: 07,3652           41277        CAGETSTQ           CS       IMODES30                              #  SKIP IF IMU NOT BEING CAGED.
056208,000713: 07,3653           74746                           MASK     BIT6                                  
056209,000714: 07,3654           10000                           CCS      A                                     
056210,000715: 07,3655           24002                           INCR     Q                                     
056211,000716: 07,3656           00002                           TC       Q                                     
056212,000717: 
056213,000718: 07,3657           41277        CAGETSTJ           CS       IMODES30                              #  IF DURING MODE SWITCH INITIALIZATION
056214,000719: 07,3660           74746                           MASK     BIT6                                  #  IT IS FOUND THAT THE IMU IS BEING CAGED,
056215,000720: 07,3661           10000                           CCS      A                                     #  SET IMUCADR TO -0 TO INDICATE OPERATION
056216,000721: 07,3662           00002                           TC       Q                                     #  COMPLETE BUT FAILED. RETURN IMMEDIATELY
056217,000722: 
056218,000723: 07,3663           44755                           CS       ZERO                                  #  TO SWRETURN.
056219,000724: 07,3664           55301                           TS       IMUCADR                               
056220,000725: 07,3665           12741                           TCF      MODEEXIT                              
056221,000726: 

Page 1317

056223,000728:                                                                                                  #           GENERALIZED MODE SWITCHING TERMINATION. ENTER AT GOODEND FOR SUCCESSFUL COMPLETION OF AN I/O OPERATION
056224,000729:                                                                                                  #  OR AT BADEND FOR A N UNSUCCESSFUL ONE. C(A) OR ARRIVAL =0 FOR IMU, 1 FOR OPTICS.
056225,000730: 
056226,000731: 07,3666           54071        BADEND             TS       RUPTREG2                              #  DEVICE INDEX.
056227,000732: 07,3667           44755                           CS       ZERO                                  #  FOR FAILURE.
056228,000733: 07,3670           13673                           TCF      GOODEND    +2                         
056229,000734: 
056230,000735: 07,3671           54071        GOODEND            TS       RUPTREG2                              
056231,000736: 07,3672           44753                           CS       ONE                                   #  FOR SUCCESS.
056232,000737: 
056233,000738: 07,3673           54072                           TS       RUPTREG3                              
056234,000739: 07,3674           50071                           INDEX    RUPTREG2                              #  SEE IF USING PROGRAM ASLEEP.
056235,000740: 07,3675           11301                           CCS      MODECADR                              
056236,000741: 07,3676           13702                           TCF      +4                                    #  YES - WAKE IT UP.
056237,000742: 07,3677           13712                           TCF      ENDMODE                               #  IF 0, PROGRAM NOT IN YET.
056238,000743: 
056239,000744: 07,3700           00006                           EXTEND                                         
056240,000745: 07,3701           13713                           BZF      ENDMODE    +1                         #  BZF = TCF IF MODECADR = -0.
056241,000746: 
056242,000747: 07,3702           34755                           CAF      ZERO                                  #  WAKE SLEEPING PROGRAM.
056243,000748: 07,3703           50071                           INDEX    RUPTREG2                              
056244,000749: 07,3704           57301                           XCH      MODECADR                              
056245,000750: 07,3705           05137                           TC       JOBWAKE                               
056246,000751: 
056247,000752: 07,3706           40072                           CS       RUPTREG3                              #  ADVANCE LOC IF SUCCESSFUL.
056248,000753: 07,3707           50064                           INDEX    LOCCTR                                
056249,000754: 07,3710           26164                           ADS      LOC                                   
056250,000755: 
056251,000756: 07,3711           15272                           TCF      TASKOVER                              
056252,000757: 
056253,000758: 07,3712           30072        ENDMODE            CA       RUPTREG3                              #  -0 INDICATES OPERATION COMPLETE BUT
056254,000759: 07,3713           50071                 +1        INDEX    RUPTREG2                              #  UNSUCCESSFUL: -1 INDICATES COMPLETE AND
056255,000760: 07,3714           55301                           TS       MODECADR                              #  SUCCESSFUL.
056256,000761: 07,3715           15272                           TCF      TASKOVER                              
056257,000762: 

Page 1318

056259,000764:                                                                                                  #           GENERAL STALLING ROUTINE. USING PROGRAMS COME HERE TO WAIT FOR I/O COMPLETION.
056260,000765: 
056261,000766:                                                                                                  #  PROGRAM DESCRIPTION                                    DATE- 21 FEB 1967
056262,000767:                                                                                                  #                                            LOG SECTION IMU MODE SWITCHING
056263,000768:                                                                                                  #  MOD BY- R.MELANSON TO ADD DOCUMENTATION       ASSEMBLY SUNDISK  REV.  82
056264,000769: 
056265,000770:                                                                                                  #  FUNCTIONAL DESCRIPTION-
056266,000771:                                                                                                  #    TO DELAY FURTHER EXECUTION OF THE CALLING ROUTINE UNTIL ITS SELECTED
056267,000772:                                                                                                  #    I/O FUNCTION IS COMPLETE.THE FOLLOWING CHECKS ON THE CALLING ROUTINE:S
056268,000773:                                                                                                  #    MODECADR ARE MADE AND ACTED UPON.
056269,000774:                                                                                                  #      1) +0 INDICATES INCOMPLETE I/O OPERATION.CALLING ROUTINE IS PUT TO
056270,000775:                                                                                                  #         SLEEP.
056271,000776:                                                                                                  #      2) -1 INDICATES COMPLETED I/O OPERATION. STALL BYPASSES JOBSLEEP
056272,000777:                                                                                                  #         CALL AND RETURNS TO CALLING ROUTINE AT L+3
056273,000778:                                                                                                  #      3) -0 INDICATES COMPLETED I/O WITH FAILURE. STALL CLEARS MODECADR
056274,000779:                                                                                                  #         AND RETURNS TO CALLING ROUTINE AT L+2.
056275,000780:                                                                                                  #      4) VALUE GREATER THAN 0 INDICATES TWO ROUTINES CALLING FOR USE OF
056276,000781:                                                                                                  #         SAME DEVICE. STALL EXITS TO ABORT WHICH EXECUTES A PROGRAM
056277,000782:                                                                                                  #         RESTART WHICH IN TURN CLEARS ALL MODECADR REGISTERS.
056278,000783: 
056279,000784:                                                                                                  #   CALLING SEQUENCE-
056280,000785:                                                                                                  #    L   TC   BANKCALL
056281,000786:                                                                                                  #    L+1 CADR (ONE OF 5 STALL ADDRESSES I.E. IMUSTALL,OPTSTALL,RADSTALL,
056282,000787:                                                                                                  #              AOTSTALL,OR ATTSTALL)
056283,000788: 
056284,000789:                                                                                                  #   NORMAL-EXIT MODE-
056285,000790:                                                                                                  #    TCF   JOBSLEEP OR TCF  MODEXIT
056286,000791: 
056287,000792:                                                                                                  #  ALARM OR ABORT EXIT MODE-
056288,000793:                                                                                                  #    TC   ABORT
056289,000794: 
056290,000795:                                                                                                  #  OUTPUT-
056291,000796:                                                                                                  #    MODECADR= CADR IF JOBSLEEP
056292,000797:                                                                                                  #    MODECADR=+0    IF I/O COMPLETE
056293,000798:                                                                                                  #    BUF2=L+3       IF I/O COMPLETE AND GOOD.
056294,000799:                                                                                                  #    BUF2=L+2 IF I/O COMPLETE BUT FAILED.
056295,000800: 
056296,000801:                                                                                                  #  ERASABLE INITIALIZATION-
056297,000802:                                                                                                  #    BUF2 CONTAINS RETURN ADDRESS PLUS 1,(L+2)
056298,000803:                                                                                                  #    BUF2+1 CONTAINS FBANK VALUE OF CALLING ROUTINE.
056299,000804:                                                                                                  #    MODECADR OF CALLING ROUTINE CONTAINS +0,-1,-0 OR  CADR RETURN ADDRESS.
056300,000805: 
056301,000806:                                                                                                  #  DEBRIS-
056302,000807:                                                                                                  #    RUPTREG2 AND CALLING ROUTINE MODECADR.
056303,000808: 
056304,000809: 07,3716           34753        AOTSTALL           CAF      ONE                                   #  AOT.
056305,000810: 07,3717           03723                           TC       STALL                                 
056306,000811: 
056307,000812: 07,3720           34752        RADSTALL           CAF      TWO                                   
056308,000813: 07,3721           13723                           TCF      STALL                                 
056309,000814: 

Page 1319

056311,000816: 07,3722  07,3716               OPTSTALL           EQUALS   AOTSTALL                              
056312,000817: 
056313,000818: 07,3722           34755        IMUSTALL           CAF      ZERO                                  #  IMU.
056314,000819: 
056315,000820: 07,3723           00004        STALL              INHINT                                         
056316,000821: 07,3724           54071                           TS       RUPTREG2                              #  SAVE DEVICE INDEX.
056317,000822: 07,3725           50000                           INDEX    A                                     #  SEE IF OPERATION COMPLETE.
056318,000823: 07,3726           11301                           CCS      MODECADR                              
056319,000824: 07,3727           13745                           TCF      MODABORT                              #  ALLOWABLE STATES ARE +0, -1, AND -0.
056320,000825: 07,3730           13741                           TCF      MODESLP                               #  OPERATION INCOMPLETE.
056321,000826: 07,3731           13735                           TCF      MODEGOOD                              #  COMPLETE AND GOOD IF = -1.
056322,000827: 
056323,000828: 07,3732           50071        MG2                INDEX    RUPTREG2                              #  COMPLETE AND FAILED IF -0. RESET TO +0.
056324,000829: 07,3733           55301                           TS       MODECADR                              #  RETURN TO CALLER.
056325,000830: 07,3734           12741                           TCF      MODEEXIT                              
056326,000831: 
056327,000832: 07,3735           10000        MODEGOOD           CCS      A                                     #  MAKE SURE INITIAL STATE -1.
056328,000833: 07,3736           13745                           TCF      MODABORT                              
056329,000834: 
056330,000835: 07,3737           24133                           INCR     BUF2                                  #  IF SO, INCREMENT RETURN ADDRESS AND
056331,000836: 07,3740           13732                           TCF      MG2                                   #  RETURN IMMEDIATELY, SETTING CADR = +0.
056332,000837: 
056333,000838: 07,3741           04645        MODESLP            TC       MAKECADR                              #  CALL FROM SWITCHABLE FIXED ONLY.
056334,000839: 07,3742           50071                           INDEX    RUPTREG2                              
056335,000840: 07,3743           55301                           TS       MODECADR                              
056336,000841: 07,3744           15133                           TCF      JOBSLEEP                              
056337,000842: 
056338,000843: 07,3745           52134        MODABORT           DXCH     BUF2                                  
056339,000844: 07,3746           05717                           TC       BAILOUT1                              #  TWO PROGRAMS USING THE SAME DEVICE.
056340,000845: 07,3747           31210                           OCT      31210                                 
056341,000846: 

Page 1320

056343,000848:                                                                                                  #           CONSTANTS FOR MODE SWITCHING ROUTINES
056344,000849: 
056345,000850: 07,3750     5752               BITS3&4            =        OCT14                                 
056346,000851: 07,3750     4771               BITS4&6            =        OCT50                                 
056347,000852: 07,3750           00030        BITS4-5            OCT      00030                                 
056348,000853: 07,3751     4744               IMUSEFLG           EQUALS   BIT8                                  #  INTERPRETER SWITCH 7.
056349,000854: 07,3751           77500        -COMMAX            DEC      -191       B-14                       
056350,000855: 07,3752           77477        -COMMAX-           DEC      -192       B-14                       
056351,000856: 07,3753           00074        600MS              DEC      60         B-14                       
056352,000857: 07,3754  07,3174               IMUFIN20           =        IMUFINE                               
056353,000858: 07,3754           31304        GOMANUR            CA       ATTCADR                               #  IS KALCMANU FREE
056354,000859: 07,3755           00006                           EXTEND                                         
056355,000860: 07,3756           13760                           BZF      +2                                    
056356,000861: 07,3757           03745                           TC       MODABORT                              #  BAILOUT
056357,000862: 07,3760           00006                 +2        EXTEND                                         
056358,000863: 07,3761           30134                           DCA      BUF2                                  
056359,000864: 07,3762           53305                           DXCH     ATTCADR                               #  SAVE FINAL RETURN FOR KALCMAN3
056360,000865: 
056361,000866: 07,3763           30006                           CA       BBANK                                 
056362,000867: 07,3764           74757                           MASK     SEVEN                                 
056363,000868: 07,3765           27305                           ADS      ATTCADR    +1                         
056364,000869: 
056365,000870: 07,3766           30167                           CA       PRIORITY                              
056366,000871: 07,3767           77730                           MASK     PRIO37                                
056367,000872: 07,3770           55306                           TS       ATTPRIO                               #  SAVE USERS PRIO
056368,000873: 
056369,000874: 07,3771           33775                           CAF      KALEBCON                              #  SET EBANK FOR KALCMAN3
056370,000875: 07,3772           54003                           TS       EBANK                                 
056371,000876: 07,3773           04635                           TC       POSTJUMP                              
056372,000877: 07,3774           44004                           CADR     KALCMAN3                              
056373,000878: 07,3775           03275        KALEBCON           ECADR    BCDU                                  
056374,000879: 

Page 1321

056376,000881:                                                                                                  #  PROGRAM DESCRIPTION
056377,000882:                                                                                                  #  IMU STATUS CHECK ROUTINE R02  (SUBROUTINE UTILITY)
056378,000883:                                                                                                  #  MOD NO - 1
056379,000884:                                                                                                  #  MOD BY - N.BRODEUR
056380,000885:                                                                                                  #  FUNCTIONAL DESCRIPTION
056381,000886: 
056382,000887:                                                                                                  #  TO CHECK WHETHER IMU IS ON AND IF ON WHETHER IT IS ALIGNED TO AN
056383,000888:                                                                                                  #  ORIENTATION KNOWN BY THE CMC. TO REQUEST SELECTION OF THE APPROPRIATE
056384,000889:                                                                                                  #  PROGRAM IF THE IMU IS OFF OR NOT ALIGNED TO AN ORIENTATION KNOWN BY THE
056385,000890:                                                                                                  #  CMC. CALLED THROUGH BANKCALL
056386,000891:                                                                                                  #  CALLING SEQUENCE-
056387,000892: 
056388,000893:                                                                                                  #  L        TC     BANKCALL
056389,000894:                                                                                                  #  L+1      CADR   R02BOTH
056390,000895:                                                                                                  #  SUBROUTINES CALLED
056391,000896: 
056392,000897:                                                                                                  #        VARALARM
056393,000898:                                                                                                  #        FLAGUP
056394,000899:                                                                                                  #  NORMAL EXIT MODES
056395,000900: 
056396,000901:                                                                                                  #  AT L+2 OF CALLING SEQUENCE
056397,000902:                                                                                                  #  ALARM OR ABORT EXIT MODES
056398,000903:                                                                                                  #        GOTOPOOH, WITH ALARM
056399,000904:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED
056400,000905: 
056401,000906:                                                                                                  #  NONE
056402,000907:                                                                                                  #  DEBRIS
056403,000908: 
056404,000909:                                                                                                  #  CENTRALS-A,Q,L
056405,000910: 34,3574                                           BANK     34                                    
056406,000911: 04,2000                                           SETLOC   R02                                   
056407,000912: 04,2000                                           BANK                                           
056408,000913: 04,3240                                           COUNT*   $$/R02                                
056409,000914: 04,3240           00063        DEC51              DEC      51         B-14                       
056410,000915: 04,3241           34737        R02BOTH            CAF      REFSMBIT                              
056411,000916: 04,3242           70077                           MASK     FLAGWRD3                              
056412,000917: 04,3243           10000                           CCS      A                                     
056413,000918: 04,3244           03255                           TC       R02ZERO                               #  ZERO IMUS
056414,000919: 
056415,000920: 04,3245           31277                           CA       IMODES30                              
056416,000921: 04,3246           74743                           MASK     BIT9                                  #  IS ISS INITIALIZED
056417,000922: 04,3247           00006                           EXTEND                                         
056418,000923: 04,3250           13252                           BZF      +2                                    
056419,000924: 04,3251           44750                           CS       BIT4                                  #  SEND IMU ALARM CODE 210
056420,000925: 04,3252           63260                           AD       OCT220                                #  SEND REFSMM ALARM
056421,000926: 04,3253           05745                           TC       VARALARM                              
056422,000927: 
056423,000928: 04,3254           06001                           TC       GOTOPOOH                              
056424,000929: 
056425,000930: 04,3255           05515        R02ZERO            TC       UPFLAG                                

Page 1322

056427,000932: 04,3256           00007                           ADRES    IMUSE                                 
056428,000933: 04,3257           14631                           TCF      SWRETURN                              
056429,000934: 04,3260           00220        OCT220             OCT      220                                   
056430,000935: 

Page 1323

056432,000937:                                                                                                  #  PROGRAM DESCRIPTION   P06   10FEB67
056433,000938: 
056434,000939:                                                                                                  #  TRANSFER THE ISS/CMC FROM THE OPERATE TO THE STANDBY CONDITION.
056435,000940: 
056436,000941:                                                                                                  #  THE NORMAL CONDITION OF READINESS OF THE GNCS WHEN NOT IN USE IS STANDBY. IN THIS CONDITION THE IMU
056437,000942:                                                                                                  #  HEATER POWER IS ON. THE IMU OPERATE POWER IS OFF. THE COMPUTER POWER IS ON. THE OPTICS POWER IS OFF. THE
056438,000943:                                                                                                  #  CMC  STANDBY ON THE MAIN AND LEB DISKYS IS ON.
056439,000944: 
056440,000945:                                                                                                  #  CALLING SEQUENCE:
056441,000946:                                                                                                  #           ASTRONAUT REQUEST THROUGH DSKY     V37E 06E.
056442,000947: 
056443,000948:                                                                                                  #  SUBROUTINES CALLED:
056444,000949:                                                                                                  #           GOPERF1
056445,000950:                                                                                                  #           BANKCALL
056446,000951:                                                                                                  #           FLAGDOWN
056447,000952: 

Page 1324

056449,000954:                                                                                                  #  PRESTAND PREPARES FOR STANDBY BY SNAPSHOTTING THE SCALER AND TIME1 TIME2
056450,000955:                                                                                                  #  THE LOW 5 BITS OF THE SCALER ARE INSPECTED TO INSURE COMPATABILITY
056451,000956:                                                                                                  #  BETWEEN THE SCALER READING AND THE TIME1 TIME2 READING.
056452,000957: 
056453,000958: 37,2000                                           SETLOC   P05P06                                
056454,000959: 37,2000                                           BANK                                           
056455,000960: 
056456,000961: 37,3654     0314                                  EBANK=   TIME2SAV                              
056457,000962: 37,3654                                           COUNT*   $$/P06                                
056458,000963: 
056459,000964: 37,3654           05515        P06                TC       UPFLAG                                #  SET NODOV37 BIT
056460,000965: 37,3655           00054                           ADRES    NODOFLAG                              
056461,000966: 
056462,000967: 37,3656           00004        PRESTAND           INHINT                                         
056463,000968: 37,3657           00006                           EXTEND                                         
056464,000969: 37,3660           30025                           DCA      TIME2                                 #  SNAPSHOT TIME1TIME2
056465,000970: 37,3661           52315                           DXCH     TIME2SAV                              
056466,000971: 37,3662           03713                           TC       SCALPREP                              
056467,000972: 37,3663           03656                           TC       PRESTAND                              #  T1,T2,SCALER NOT COMPATIBLE
056468,000973: 37,3664           52155                           DXCH     MPAC                                  #  T1,T2 AND SCALER OK
056469,000974: 37,3665           52317                           DXCH     SCALSAVE                              #  STORE SCALER
056470,000975: 37,3666           00004                           INHINT                                         
056471,000976: 37,3667           04616                           TC       BANKCALL                              
056472,000977: 37,3670           17161                           CADR     RNDREFDR                              #  REFSMM, DRIFT, TRACK FLAGS DOWN
056473,000978: 
056474,000979: 37,3671           05527                           TC       DOWNFLAG                              
056475,000980: 37,3672           00007                           ADRES    IMUSE                                 #  IMUSE DOWN
056476,000981: 37,3673           05527                           TC       DOWNFLAG                              
056477,000982: 37,3674           00010                           ADRES    RNDVZFLG                              #  RNDVZFLG DOWN
056478,000983: 
056479,000984: 37,3675           34741                           CAF      BIT11                                 
056480,000985: 37,3676           00006                           EXTEND                                         
056481,000986: 37,3677           05013                           WOR      CHAN13                                #  SET STANDBY ENABLE BIT
056482,000987: 
056483,000988: 37,3700           05364                           TC       PHASCHNG                              #  SET RESTART TO POSTAND WHEN STANDBY
056484,000989: 37,3701           07024                           OCT      07024                                 #    RECOVERS
056485,000990: 37,3702           20000                           OCT      20000                                 
056486,000991: 37,3703     0316                                  EBANK=   SCALSAVE                              
056487,000992: 37,3703           03733 76060                     2CADR    POSTAND                               
056488,000993: 
056489,000994: 37,3705           34774                           CAF      OCT62                                 
056490,000995: 37,3706           04616                           TC       BANKCALL                              
056491,000996: 37,3707           20624                           CADR     GOPERF1                               
056492,000997: 37,3710           13705                           TCF      -3                                    
056493,000998: 37,3711           13705                           TCF      -4                                    
056494,000999: 37,3712           13705                           TCF      -5                                    
056495,001000: 
056496,001001: 37,3713     4774               OCT62              EQUALS   .5SEC                                 #  DEC 50 = OCT 62
056497,001002: 
056498,001003:                                                                                                  #  THE LOW 5 BITS OF THE SCALER READS 10000 FOR THE FIRST INTERVAL AFTER A

Page 1325

056500,001005:                                                                                                  #  T1 INCREMENT. IF SCALPREP DETECTS THIS INTERVAL THE T1,T2 AND SCALER
056501,001006:                                                                                                  #  DATA ARE NOT COMPATABLE AND RETURN IS TO L+1 FOR ANOTHER READING OF THE
056502,001007:                                                                                                  #  DATA. OTHERWISE, THE RETURN IS TO L+2 TO PROCEED. ROUTINE ALSO PREPARES
056503,001008:                                                                                                  #  THE SCALER READING FOR COMPUTATION OF THE INCREMENT TO UPDATE T1T2. (THE
056504,001009:                                                                                                  #  10 MS BIT (BIT 6) OF THE SCALER IS INCREMENTED 5 MS OUT OF PHASE FROM
056505,001010:                                                                                                  #  T1.) ADDITION OF 5 MS (BIT 5) TO THE SCALER READING HAS THE EFFECT OF
056506,001011:                                                                                                  #  ADJUSTING BIT 6 IN THE SCALER TO BE IN PHASE WITH BIT 1 OF T1. THE LOW 5
056507,001012:                                                                                                  #  BITS OF THE SCALER READING ARE THEN SET TO ZERO, TO TRUNCATE THE SCALER
056508,001013:                                                                                                  #  DATA TO 10 MS. RESULTS ARE STORED IN MPAC, +1.
056509,001014: 
056510,001015: 37,3713           00006        SCALPREP           EXTEND                                         
056511,001016: 37,3714           22156                           QXCH     MPAC       +2                         
056512,001017: 37,3715           04103                           TC       FINETIME   +1                         
056513,001018: 37,3716           00003                           RELINT                                         
056514,001019: 37,3717           52155                           DXCH     MPAC                                  
056515,001020: 37,3720           34747                           CA       BIT5                                  #  ADD 5 MS TO THE SCALER READING.
056516,001021: 37,3721           54001                           TS       L                                     
056517,001022: 37,3722           34755                           CA       ZERO                                  
056518,001023: 37,3723           20155                           DAS      MPAC                                  
056519,001024: 37,3724           44346                           CS       LOW5                                  #  SET LOW 5 BITS OF (SCALER+5MS) TO ZERO
056520,001025: 37,3725           70155                           MASK     MPAC       +1                         #  AND STORE RESULTS IN MPAC,+1.
056521,001026: 37,3726           56155                           XCH      MPAC       +1                         
056522,001027: 37,3727           74346                           MASK     LOW5                                  #  TEST LOW 5 BITS OF SCALER FOR THE FIRST
056523,001028:                                                                                                  #  INTERVAL AFTER THE T1 INCREMENT
056524,001029:                                                                                                  #  (NOW = 00000, SINCE BIT 5 ADDED).
056525,001030: 37,3730           10000                           CCS      A                                     #  IS IT 1ST INTERVAL AFTER T1 INCREMENT
056526,001031: 37,3731           24156                           INCR     MPAC       +2                         #  NO
056527,001032: 37,3732           00156                           TC       MPAC       +2                         #  YES
056528,001033: 
056529,001034:                                                                                                  #  POSTAND RECOVERS TIME AFTER STANDBY.THE SCALER IS SNAPSHOTTED AND THE
056530,001035:                                                                                                  #  TIME1 TIME2 COUNTER IS SET TO ZERO. THE LOW 5 BITS OF THE SCALER ARE
056531,001036:                                                                                                  #  INSPECTED TO INSURE COMPATABILITY BETWEEN THE SCALER READING AND THE
056532,001037:                                                                                                  #  CLEARING OF THE TIME COUNTER. IT THEN COMPUTES THE DIFFERENCE IN SCALER
056533,001038:                                                                                                  #  VALUES (IN DP) AND ADDS THIS TO THE PREVIOUSLY SNAPSHOTTED VALUES OF
056534,001039:                                                                                                  #  TIME1 TIME2 AND PLACES THIS NEW TIME INTO THE TIME1 TIME2 COUNTER.
056535,001040: 
056536,001041: 37,3733                                           COUNT*   $$/P05                                
056537,001042: 
056538,001043: 37,3733           44741        POSTAND            CS       BIT11                                 #  RECOVER TIME AFTER STANDBY.
056539,001044: 37,3734           00006                           EXTEND                                         
056540,001045: 37,3735           03013                           WAND     CHAN13                                #  CLEAR STANDBY ENABLE BIT
056541,001046: 37,3736           00004                           INHINT                                         
056542,001047: 37,3737           34755                           CA       ZERO                                  
056543,001048: 37,3740           54001                           TS       L                                     
056544,001049: 37,3741           52025                           DXCH     TIME2                                 #  CLEAR TIME1TIME2
056545,001050: 37,3742           03713                           TC       SCALPREP                              #  STORE SCALER IN MPAC, MPAC+1
056546,001051: 37,3743           03736                           TC       POSTAND    +3                         #  T1,T2,SCALER NOT COMPATIBLE
056547,001052: 37,3744           00006                           EXTEND                                         #  T1,T2 AND SCALER OK
056548,001053: 37,3745           40317                           DCS      SCALSAVE                              
056549,001054: 37,3746           20155                           DAS      MPAC                                  #  FORM DP DIFFERENCE OF POSTSTANDBY SCALER

Page 1326

056551,001056: 37,3747           34742                           CAF      BIT10                                 #  MINUS PRESTANDBY SCALER AND SHIFT RIGHT
056552,001057: 37,3750           07312                           TC       SHORTMP                               #  5 TO ALIGN BITS WITH TIME1TIME2.
056553,001058: 37,3751           34755                           CAF      ZERO                                  
056554,001059: 37,3752           54156                           TS       MPAC       +2                         #  NEEDED FOR TP AGREE
056555,001060: 37,3753           07262                           TC       TPAGREE                               #  MAKE DP DIFF AGREE
056556,001061: 37,3754           10154                           CCS      MPAC                                  
056557,001062: 37,3755           03762                           TC       POSTCOM                               #  IF DP DIFF NET +, NO SCALER OVERFLOW
056558,001063: 37,3756           03762                           TC       POSTCOM                               #  BETWEEN PRE AND POST STANDBY.
056559,001064: 37,3757           03760                           TC       +1                                    #  IF DP DIFF NET -, SCALER OVERFLOWED. ADD
056560,001065: 37,3760           34742                           CAF      BIT10                                 #  BIT 10 TO HIGH DIFF TO CORRECT.
056561,001066: 37,3761           26154                           ADS      MPAC                                  
056562,001067: 37,3762           00006        POSTCOM            EXTEND                                         #  C(MPAC,+1) IS MAGNITUDE OF DELTA SCALER.
056563,001068: 37,3763           30315                           DCA      TIME2SAV                              #  PRESTANDBY TIME1TIME2
056564,001069: 37,3764           20155                           DAS      MPAC                                  
056565,001070: 37,3765           07262                           TC       TPAGREE                               #  FORCE SIGN AGREEMENT
056566,001071: 37,3766           52155                           DXCH     MPAC                                  #  UPDATED VALUE FOR T1,T2.
056567,001072: 37,3767           20025                           DAS      TIME2                                 #  LOAD UPDATED VALUE INTO T1,T2, WITH
056568,001073: 37,3770           05527                           TC       DOWNFLAG                              #  CLEAR NODOFLAG
056569,001074: 37,3771           00054                           ADRES    NODOFLAG                              
056570,001075: 
056571,001076: 37,3772           06001                           TC       GOTOPOOH                              

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