Source Code

These source-code files are part of a reconstructed copy of LM131 revision 1, the final release of the Apollo 13 Lunar Module (LM) Apollo Guidance Computer (AGC) software.

The source reconstruction began with source code of Luminary 131 previously transcribed from a digitized copy of that program. A dump of the flight spare core rope memory module B5, part number 2010802-171, serial number RAY 411, was obtained. This module is the only module different between Luminary 131 and LM131 revision 1. The dump was disassembled and all changes were incorporated into these source files. Note that page numbers in the reconstructed code match those on the Luminary 131 printout, although the changed code would likely have changed page numbers for a real LM131 revision 1 listing.

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.

054833,000002:                                                                                                  ## Copyright:   Public domain.
054834,000003:                                                                                                  ## Filename:    IMU_MODE_SWITCHING_ROUTINES.agc
054835,000004:                                                                                                  ## Purpose:     A section of LM131 revision 1.
054836,000005:                                                                                                  ##              It is part of the reconstructed source code for the final
054837,000006:                                                                                                  ##              release of the flight software for the Lunar Module's (LM)
054838,000007:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 13. The code has
054839,000008:                                                                                                  ##              been reconstructed from a listing of Luminary 131 and a dump
054840,000009:                                                                                                  ##              of a core rope memory module B5, part number 2010802-171,
054841,000010:                                                                                                  ##              which is the only module different between LM131 revision 1
054842,000011:                                                                                                  ##              and Luminary 131. The executable generated from this source
054843,000012:                                                                                                  ##              has been verified against the module dump, so while the names,
054844,000013:                                                                                                  ##              comments, and ordering may not be exactly correct, the
054845,000014:                                                                                                  ##              resulting binary is.
054846,000015:                                                                                                  ## Reference:   pp. 1301-1329
054847,000016:                                                                                                  ## Assembler:   yaYUL
054848,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
054849,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
054850,000019:                                                                                                  ## Mod history: 2022-10-28 MAS  Created from Luminary 131.
054851,000020: 

Page 1301

054853,000022:    5457                                           BLOCK    02                                    
054854,000023:    4000                                           SETLOC   FFTAG3                                
054855,000024:    4000                                           BANK                                           
054856,000025: 
054857,000026:    5457  E3,1471                                  EBANK=   COMMAND                               
054858,000027: 
054859,000028:                                                                                                  #  FIXED-FIXED ROUTINES.
054860,000029: 
054861,000030:    5457                                           COUNT*   $$/IMODE                              
054862,000031:    5457           34755        ZEROICDU           CAF      ZERO                                  #  ZERO ICDU COUNTERS.
054863,000032:    5460           54032                           TS       CDUX                                  
054864,000033:    5461           54033                           TS       CDUY                                  
054865,000034:    5462           54034                           TS       CDUZ                                  
054866,000035:    5463           00002                           TC       Q                                     
054867,000036: 
054868,000037:    5464     4743               SPSCODE            =        BIT9                                  
054869,000038: 

Page 1302

054871,000040:                                                                                                  #  IMU ZEROING ROUTINE.
054872,000041: 
054873,000042: 11,3774                                           BANK     11                                    
054874,000043: 07,2000                                           SETLOC   MODESW                                
054875,000044: 07,2000                                           BANK                                           
054876,000045: 
054877,000046: 07,2705                                           COUNT*   $$/IMODE                              
054878,000047: 07,2705           00004        IMUZERO            INHINT                                         #  ROUTINE TO ZERO ICDUS.
054879,000048: 07,2706           41035                           CS       DSPTAB     +11D                       #  DONT ZERO CDUS IF IMU IN GIMBAL LOCK AND
054880,000049: 07,2707           74771                           MASK     BITS4&6                               #  COARSE ALIGN (GIMBAL RUNAWAY PROTECTION)
054881,000050: 07,2710           10000                           CCS      A                                     
054882,000051: 07,2711           12715                           TCF      IMUZEROA                              
054883,000052: 
054884,000053: 07,2712           05567                           TC       ALARM                                 #  IF SO.
054885,000054: 07,2713           00206                           OCT      00206                                 
054886,000055: 
054887,000056: 07,2714           13650                           TCF      CAGETSTJ   +4                         #  IMMEDIATE FAILURE.
054888,000057: 
054889,000058: 07,2715           03644        IMUZEROA           TC       CAGETSTJ                              
054890,000059:                                                                                                  #           DELETE
054891,000060: 07,2716           41300                           CS       IMODES33                              #  DISABLE DAP AUTO AND HOLD MODES
054892,000061: 07,2717           74773                           MASK     SUPER011                              #        BIT5 FOR GROUND
054893,000062: 07,2720           27300                           ADS      IMODES33                              
054894,000063: 
054895,000064: 07,2721           41277                           CS       IMODES30                              #  INHIBIT ICDUFAIL AND IMUFAIL (IN CASE WE
054896,000065: 07,2722           75741                           MASK     BITS3&4                               #  JUST CAME OUT OF COARSE ALIGN).
054897,000066: 07,2723           27277                           ADS      IMODES30                              
054898,000067: 
054899,000068: 07,2724           44771                           CS       BITS4&6                               #  SEND ZERO ENCODE WITH COARSE AND ERROR
054900,000069: 07,2725           00006                           EXTEND                                         #  COUNTER DISABLED.
054901,000070: 07,2726           03012                           WAND     CHAN12                                
054902,000071: 
054903,000072: 07,2727           03257                           TC       NOATTOFF                              #  TURN OFF NO ATT LAMP.
054904,000073: 
054905,000074: 07,2730           34747                           CAF      BIT5                                  
054906,000075: 07,2731           00006                           EXTEND                                         
054907,000076: 07,2732           05012                           WOR      CHAN12                                
054908,000077: 
054909,000078: 07,2733           05457                           TC       ZEROICDU                              
054910,000079: 07,2734           34746                           CAF      BIT6                                  #  WAIT 320 MS TO GIVE AGS ADEQUATE TIME TO
054911,000080: 07,2735           05203                           TC       WAITLIST                              #  RECEIVE ITS PULSE TRAIN.
054912,000081: 07,2736  E3,1474                                  EBANK=   CDUIND                                
054913,000082: 07,2736           02750 16103                     2CADR    IMUZERO2                              
054914,000083: 
054915,000084: 07,2740           41277                           CS       IMODES30                              #  SEE IF IMU OPERATING AND ALARM IF NOT.
054916,000085: 07,2741           74743                           MASK     BIT9                                  
054917,000086: 07,2742           10000                           CCS      A                                     
054918,000087: 07,2743           12746                           TCF      MODEEXIT                              

Page 1303

054920,000089: 07,2744           05567                           TC       ALARM                                 
054921,000090: 07,2745           00210                           OCT      210                                   
054922,000091: 
054923,000092: 07,2746           00003        MODEEXIT           RELINT                                         #  GENERAL MODE-SWITCHING EXIT.
054924,000093: 07,2747           14631                           TCF      SWRETURN                              
054925,000094: 
054926,000095: 07,2750           03632        IMUZERO2           TC       CAGETEST                              
054927,000096: 07,2751           05457                           TC       ZEROICDU                              #  ZERO CDUX, CDUY, CDUZ
054928,000097: 
054929,000098: 07,2752           44747                           CS       BIT5                                  #  REMOVE ZERO DISCRETE.
054930,000099: 07,2753           00006                           EXTEND                                         
054931,000100: 07,2754           03012                           WAND     CHAN12                                
054932,000101: 
054933,000102: 07,2755           34741                           CAF      BIT11                                 #  WAIT 10 SECS FOR CTRS TO FIND GIMBALS
054934,000103: 07,2756           05224                           TC       VARDELAY                              
054935,000104: 
054936,000105: 07,2757           03632        IMUZERO3           TC       CAGETEST                              
054937,000106: 07,2760           45741                           CS       BITS3&4                               #  REMOVE IMUFAIL AND ICDUFAIL INHIBIT.
054938,000107: 07,2761           71277                           MASK     IMODES30                              
054939,000108: 07,2762           55277                           TS       IMODES30                              
054940,000109: 
054941,000110: 07,2763           44773                           CS       SUPER011                              #  ENABLE DAP AUTO AND HOLD MODES
054942,000111: 07,2764           71300                           MASK     IMODES33                              #        BIT5 FOR GROUND
054943,000112: 07,2765           55300                           TS       IMODES33                              
054944,000113: 
054945,000114: 07,2766           04674                           TC       IBNKCALL                              #  SET ISS WARNING IF EITHER OF ABOVE ARE
054946,000115: 07,2767           14703                           CADR     SETISSW                               #  PRESENT.
054947,000116: 
054948,000117: 07,2770           13622                           TCF      ENDIMU                                
054949,000118: 

Page 1304

054951,000120:                                                                                                  #  IMU COARSE ALIGN MODE.
054952,000121: 
054953,000122: 07,2771           00004        IMUCOARS           INHINT                                         
054954,000123: 07,2772           03644                           TC       CAGETSTJ                              
054955,000124: 07,2773           03135                           TC       SETCOARS                              
054956,000125: 
054957,000126: 07,2774           36245                           CAF      SIX                                   
054958,000127: 07,2775           05203                           TC       WAITLIST                              
054959,000128: 07,2776  E3,1474                                  EBANK=   CDUIND                                
054960,000129: 07,2776           03001 16103                     2CADR    COARS                                 
054961,000130: 
054962,000131: 07,3000           12746                           TCF      MODEEXIT                              
054963,000132: 
054964,000133: 07,3001           03632        COARS              TC       CAGETEST                              
054965,000134: 07,3002           34746                           CAF      BIT6                                  #  ENABLE ALL THREE ISS CDU ERROR COUNTERS
054966,000135: 07,3003           00006                           EXTEND                                         
054967,000136: 07,3004           05012                           WOR      CHAN12                                
054968,000137: 
054969,000138: 07,3005           34752                           CAF      TWO                                   #  SET CDU INDICATOR
054970,000139: 07,3006           55474        COARS1             TS       CDUIND                                
054971,000140: 
054972,000141: 07,3007           51474                           INDEX    CDUIND                                #  COMPUTE THETAD - THETAA IN 1:S
054973,000142: 07,3010           30321                           CA       THETAD                                #        COMPLEMENT FORM
054974,000143: 07,3011           00006                           EXTEND                                         
054975,000144: 07,3012           51474                           INDEX    CDUIND                                
054976,000145: 07,3013           20032                           MSU      CDUX                                  
054977,000146: 07,3014           00006                           EXTEND                                         
054978,000147: 07,3015           74737                           MP       BIT13                                 #  SHIFT RIGHT 2
054979,000148: 07,3016           56001                           XCH      L                                     #  ROUND
054980,000149: 07,3017           60000                           DOUBLE                                         
054981,000150: 07,3020           54061                           TS       ITEMP1                                
054982,000151: 07,3021           13023                           TCF      +2                                    
054983,000152: 07,3022           26001                           ADS      L                                     
054984,000153: 
054985,000154: 07,3023           51474                           INDEX    CDUIND                                #  DIFFERENCE TO BE COMPUTED
054986,000155: 07,3024           23471                           LXCH     COMMAND                               
054987,000156: 07,3025           11474                           CCS      CDUIND                                
054988,000157: 07,3026           03006                           TC       COARS1                                
054989,000158: 
054990,000159: 07,3027           34752                           CAF      TWO                                   #  MINIMUM OF 4 MS WAIT
054991,000160: 07,3030           05224                           TC       VARDELAY                              
054992,000161: 

Page 1305

054994,000163: 07,3031           03632        COARS2             TC       CAGETEST                              #  DONT CONTINUE IF CAGED.
054995,000164: 07,3032           54061                           TS       ITEMP1                                #  SETS TO +0.
054996,000165: 07,3033           34752                           CAF      TWO                                   #  SET CDU INDICATOR
054997,000166: 07,3034           55474                 +3        TS       CDUIND                                
054998,000167: 
054999,000168: 07,3035           51474                           INDEX    CDUIND                                
055000,000169: 07,3036           11471                           CCS      COMMAND                               #  NUMBER OF PULSES REQUIRED
055001,000170: 07,3037           03043                           TC       COMPOS                                #  GREATER THAN MAX ALLOWED
055002,000171: 07,3040           03052                           TC       NEXTCDU    +1                         
055003,000172: 07,3041           03110                           TC       COMNEG                                
055004,000173: 07,3042           03052                           TC       NEXTCDU    +1                         
055005,000174: 
055006,000175: 07,3043           63736        COMPOS             AD       -COMMAX                               #  COMMAX = MAX NUMBER OF PULSES ALLOWED
055007,000176: 07,3044           00006                           EXTEND                                         #        MINUS ONE
055008,000177: 07,3045           63120                           BZMF     COMZERO                               
055009,000178: 07,3046           51474                           INDEX    CDUIND                                
055010,000179: 07,3047           55471                           TS       COMMAND                               #  REDUCE COMMAND BY MAX NUMBER OF PULSES
055011,000180: 07,3050           43737                           CS       -COMMAX-                              #        ALLOWED
055012,000181: 
055013,000182: 07,3051           24061        NEXTCDU            INCR     ITEMP1                                
055014,000183: 07,3052           64754                           AD       NEG0                                  
055015,000184: 07,3053           51474                           INDEX    CDUIND                                
055016,000185: 07,3054           54050                           TS       CDUXCMD                               #  SET UP COMMAND REGISTER.
055017,000186: 
055018,000187: 07,3055           11474                           CCS      CDUIND                                
055019,000188: 07,3056           03034                           TC       COARS2     +3                         
055020,000189: 
055021,000190: 07,3057           10061                           CCS      ITEMP1                                #  SEE IF ANY PULSES TO GO OUT.
055022,000191: 07,3060           13124                           TCF      SENDPULS                              
055023,000192: 
055024,000193: 07,3061           05221                           TC       FIXDELAY                              #  WAIT FOR GIMBALS TO SETTLE.
055025,000194: 07,3062           00226                           DEC      150        B-14                       
055026,000195: 
055027,000196: 07,3063           34752                           CAF      TWO                                   #  AT END OF COMMAND, CHECK TO SEE THAT
055028,000197: 07,3064           54061        CHKCORS            TS       ITEMP1                                #  GIMBALS ARE WITHIN 2 DEGREES OF THETAD.
055029,000198: 07,3065           50000                           INDEX    A                                     
055030,000199: 07,3066           30032                           CA       CDUX                                  
055031,000200: 07,3067           00006                           EXTEND                                         
055032,000201: 07,3070           50061                           INDEX    ITEMP1                                
055033,000202: 07,3071           20321                           MSU      THETAD                                
055034,000203: 07,3072           10000                           CCS      A                                     
055035,000204: 07,3073           13101                           TCF      COARSERR                              
055036,000205: 07,3074           13076                           TCF      CORSCHK2                              
055037,000206: 07,3075           13101                           TCF      COARSERR                              
055038,000207: 

Page 1306

055040,000209: 07,3076           10061        CORSCHK2           CCS      ITEMP1                                
055041,000210: 07,3077           13064                           TCF      CHKCORS                               
055042,000211: 07,3100           13622                           TCF      ENDIMU                                #  END OF COARSE ALIGNMENT.
055043,000212: 
055044,000213: 07,3101           63107        COARSERR           AD       COARSTOL                              #  2 DEGREES.
055045,000214: 07,3102           00006                           EXTEND                                         
055046,000215: 07,3103           63076                           BZMF     CORSCHK2                              
055047,000216: 
055048,000217: 07,3104           05567                           TC       ALARM                                 #  COARSE ALIGN ERROR.
055049,000218: 07,3105           00211                           OCT      211                                   
055050,000219: 
055051,000220: 07,3106           13630                           TCF      IMUBAD                                
055052,000221: 
055053,000222: 07,3107           77511        COARSTOL           DEC      -.01111                               #  2 DEGREES SCALED AT HALF-REVOLUTIONS
055054,000223: 
055055,000224: 07,3110           63736        COMNEG             AD       -COMMAX                               
055056,000225: 07,3111           00006                           EXTEND                                         
055057,000226: 07,3112           63120                           BZMF     COMZERO                               
055058,000227: 07,3113           40000                           COM                                            
055059,000228: 07,3114           51474                           INDEX    CDUIND                                
055060,000229: 07,3115           55471                           TS       COMMAND                               
055061,000230: 07,3116           33737                           CA       -COMMAX-                              
055062,000231: 07,3117           03051                           TC       NEXTCDU                               
055063,000232: 
055064,000233: 07,3120           34755        COMZERO            CAF      ZERO                                  
055065,000234: 07,3121           51474                           INDEX    CDUIND                                
055066,000235: 07,3122           57471                           XCH      COMMAND                               
055067,000236: 07,3123           03051                           TC       NEXTCDU                               
055068,000237: 
055069,000238: 07,3124           37743        SENDPULS           CAF      13,14,15                              
055070,000239: 07,3125           00006                           EXTEND                                         
055071,000240: 07,3126           05014                           WOR      CHAN14                                
055072,000241: 07,3127           33740                           CAF      600MS                                 
055073,000242: 07,3130           13030                           TCF      COARS2     -1                         #  THEN TO VARDELAY
055074,000243: 
055075,000244: 07,3131           34746        CA+ECE             CAF      BIT6                                  #  ENABLE ALL THREE ISS CDU ERROR COUNTERS
055076,000245: 07,3132           00006                           EXTEND                                         
055077,000246: 07,3133           05012                           WOR      CHAN12                                
055078,000247: 07,3134           05261                           TC       TASKOVER                              
055079,000248: 

Page 1307

055081,000250: 07,3135           34750        SETCOARS           CAF      BIT4                                  #  BYPASS IF ALREADY IN COARSE ALIGN
055082,000251: 07,3136           00006                           EXTEND                                         
055083,000252: 07,3137           02012                           RAND     CHAN12                                
055084,000253: 07,3140           10000                           CCS      A                                     
055085,000254: 07,3141           00002                           TC       Q                                     
055086,000255: 
055087,000256: 07,3142           44746                           CS       BIT6                                  #  CLEAR ISS ERROR COUNTERS
055088,000257: 07,3143           00006                           EXTEND                                         
055089,000258: 07,3144           03012                           WAND     CHAN12                                
055090,000259: 
055091,000260: 07,3145           44742                           CS       BIT10                                 #  KNOCK DOWN GYRO ACTIVITY
055092,000261: 07,3146           00006                           EXTEND                                         
055093,000262: 07,3147           03014                           WAND     CHAN14                                
055094,000263: 07,3150           44755                           CS       ZERO                                  
055095,000264: 07,3151           54047                           TS       GYROCMD                               
055096,000265: 
055097,000266: 07,3152           34750                           CAF      BIT4                                  #  PUT ISS IN COARSE ALIGN
055098,000267: 07,3153           00006                           EXTEND                                         
055099,000268: 07,3154           05012                           WOR      CHAN12                                
055100,000269: 
055101,000270: 07,3155           41035                           CS       DSPTAB     +11D                       #  TURN ON NO ATT LAMP
055102,000271: 07,3156           73200                           MASK     OCT40010                              
055103,000272: 07,3157           27035                           ADS      DSPTAB     +11D                       
055104,000273: 
055105,000274: 07,3160           41300                           CS       IMODES33                              #  DISABLE DAP AUTO AND HOLD MODES
055106,000275: 07,3161           74746                           MASK     BIT6                                  
055107,000276: 07,3162           27300                           ADS      IMODES33                              
055108,000277: 
055109,000278: 07,3163           41277                           CS       IMODES30                              #  DISABLE IMUFAIL
055110,000279: 07,3164           74750                           MASK     BIT4                                  
055111,000280: 07,3165           27277                           ADS      IMODES30                              
055112,000281: 
055113,000282: 07,3166           44747        RNDREFDR           CS       TRACKBIT                              #  CLEAR TRACK FLAG
055114,000283: 07,3167           70075                           MASK     FLAGWRD1                              
055115,000284: 07,3170           54075                           TS       FLAGWRD1                              
055116,000285: 
055117,000286: 07,3171           44735                           CS       DRFTBIT                               #  CLEAR DRIFT FLAG
055118,000287: 07,3172           70076                           MASK     FLAGWRD2                              
055119,000288: 07,3173           54076                           TS       FLAGWRD2                              
055120,000289: 
055121,000290: 07,3174           44737                           CS       REFSMBIT                              #  CLEAR REFSMMAT FLAG
055122,000291: 07,3175           70077                           MASK     FLAGWRD3                              
055123,000292: 07,3176           54077                           TS       FLAGWRD3                              
055124,000293: 
055125,000294: 07,3177           00002                           TC       Q                                     
055126,000295: 
055127,000296: 07,3200           40010        OCT40010           OCT      40010                                 
055128,000297: 

Page 1308

055130,000299:                                                                                                  #  IMU FINE ALIGN MODE SWITCH.
055131,000300: 
055132,000301: 07,3201           00004        IMUFINE            INHINT                                         
055133,000302: 07,3202           03644                           TC       CAGETSTJ                              #  SEE IF IMU BEING CAGED.
055134,000303: 
055135,000304: 07,3203           43735                           CS       BITS4-5                               #  RESET ZERO AND COARSE
055136,000305: 07,3204           00006                           EXTEND                                         
055137,000306: 07,3205           03012                           WAND     CHAN12                                
055138,000307: 
055139,000308: 07,3206           44746                           CS       BIT6                                  #  INSURE DAP AUTO AND HOLD MODES ENABLED
055140,000309: 07,3207           71300                           MASK     IMODES33                              
055141,000310: 07,3210           55300                           TS       IMODES33                              
055142,000311: 
055143,000312: 07,3211           03257                           TC       NOATTOFF                              
055144,000313: 
055145,000314: 07,3212           34742                           CAF      BIT10                                 #  IMU FAIL WAS INHIBITED DURING THE
055146,000315: 07,3213           05203                           TC       WAITLIST                              #  PRESUMABLY PRECEDING COARSE ALIGN.  LEAVE
055147,000316: 07,3214  E3,1474                                  EBANK=   CDUIND                                
055148,000317: 07,3214           03225 16103                     2CADR    IFAILOK                               #  IT ON FOR THE FIRST 5 SECS OF FINE ALIGN
055149,000318: 
055150,000319: 07,3216           35000                           CAF      2SECS                                 
055151,000320: 07,3217           05203                           TC       WAITLIST                              
055152,000321: 07,3220  E3,1474                                  EBANK=   CDUIND                                
055153,000322: 07,3220           03223 16103                     2CADR    IMUFINED                              
055154,000323: 
055155,000324: 07,3222           12746                           TCF      MODEEXIT                              
055156,000325: 
055157,000326: 07,3223           03632        IMUFINED           TC       CAGETEST                              #  SEE THAT NO ONE HAS CAGED THE IMU.
055158,000327: 07,3224           13622                           TCF      ENDIMU                                
055159,000328: 

Page 1309

055161,000330: 07,3225           03637        IFAILOK            TC       CAGETSTQ                              #  ENABLE IMU FIAL UNLESS IMU BEING CAGED.
055162,000331: 07,3226           15261                           TCF      TASKOVER                              #  IT IS.
055163,000332: 
055164,000333: 07,3227           34750                           CAF      BIT4                                  #  DONT RESET IMU FAIL INHIBIT IF SOMEONE
055165,000334: 07,3230           00006                           EXTEND                                         #  HAS GONE INTO COARSE ALIGN.
055166,000335: 07,3231           02012                           RAND     CHAN12                                
055167,000336: 07,3232           10000                           CCS      A                                     
055168,000337: 07,3233           15261                           TCF      TASKOVER                              
055169,000338: 
055170,000339: 07,3234           41277                           CS       IMODES30                              #  RESET IMUFAIL.
055171,000340: 07,3235           74737                           MASK     BIT13                                 
055172,000341: 07,3236           27277                           ADS      IMODES30                              
055173,000342: 07,3237           44750                           CS       BIT4                                  
055174,000343: 07,3240           71277        PFAILOK2           MASK     IMODES30                              
055175,000344: 07,3241           55277                           TS       IMODES30                              
055176,000345: 07,3242           04674                           TC       IBNKCALL                              #  THE ISS WARNING LIGHT MAY COME ON NOW
055177,000346: 07,3243           14703                           CADR     SETISSW                               #  THAT THE INHIBIT HAS BEEN REMOVED.
055178,000347: 07,3244           15261                           TCF      TASKOVER                              
055179,000348: 
055180,000349: 07,3245           03637        PFAILOK            TC       CAGETSTQ                              #  ENABLE PIP FAIL PROG ALARM.
055181,000350: 07,3246           15261                           TCF      TASKOVER                              
055182,000351: 
055183,000352: 07,3247           41277                           CS       IMODES30                              #  RESET IMU AND PIPA FAIL BITS.
055184,000353: 07,3250           74742                           MASK     BIT10                                 
055185,000354: 07,3251           27277                           ADS      IMODES30                              
055186,000355: 
055187,000356: 07,3252           41300                           CS       IMODES33                              
055188,000357: 07,3253           74737                           MASK     BIT13                                 
055189,000358: 07,3254           27300                           ADS      IMODES33                              
055190,000359: 
055191,000360: 07,3255           44747                           CS       BIT5                                  
055192,000361: 07,3256           13240                           TCF      PFAILOK2                              
055193,000362: 
055194,000363: 07,3257           43200        NOATTOFF           CS       OCT40010                              #  SUBROUTINE TO TURN OFF NO ATT LAMP.
055195,000364: 07,3260           71035                           MASK     DSPTAB     +11D                       
055196,000365: 07,3261           64735                           AD       BIT15                                 
055197,000366: 07,3262           55035                           TS       DSPTAB     +11D                       
055198,000367: 07,3263           00002                           TC       Q                                     
055199,000368: 

Page 1310

055201,000370:                                                                                                  #  ROUITNES TO INITIATE AND TERMINATE PROGRAM USE OF THE PIPAS.  NO IMUSTALL REQUIRED IN EITHER CASE.
055202,000371: 
055203,000372: 07,3264           44755        PIPUSE             CS       ZERO                                  
055204,000373: 07,3265           54037                           TS       PIPAX                                 
055205,000374: 07,3266           54040                           TS       PIPAY                                 
055206,000375: 07,3267           54041                           TS       PIPAZ                                 
055207,000376: 
055208,000377: 07,3270           03637        PIPUSE1            TC       CAGETSTQ                              #  DO NOT ENABLE PIPA FAIL IF IMU IS CAGED
055209,000378: 07,3271           14631                           TCF      SWRETURN                              
055210,000379: 
055211,000380: 07,3272           00004                           INHINT                                         
055212,000381: 07,3273           44753                           CS       BIT1                                  #  IF PIPA FAILS FROM NOW ON (UNTIL
055213,000382: 07,3274           71277                           MASK     IMODES30                              #  PIPFREE), LIGHT ISS WARNING.
055214,000383: 07,3275           55277                           TS       IMODES30                              
055215,000384: 
055216,000385: 07,3276           04674        PIPFREE2           TC       IBNKCALL                              #  ISS WARNING MIGHT COME ON NOW.
055217,000386: 07,3277           14703                           CADR     SETISSW                               #  (OR GO OFF ON PIPFREE).
055218,000387: 
055219,000388: 07,3300           12746                           TCF      MODEEXIT                              
055220,000389: 
055221,000390: 07,3301           00004        PIPFREE            INHINT                                         #  PROGRAM DONE WITH PIPAS.  DONT LIGHT
055222,000391: 07,3302           41277                           CS       IMODES30                              #  ISS WARNING.
055223,000392: 07,3303           74753                           MASK     BIT1                                  
055224,000393: 07,3304           27277                           ADS      IMODES30                              
055225,000394: 
055226,000395: 07,3305           74742                           MASK     BIT10                                 #  IF PIP FAIL ON, DO PROG ALSRM AND RESET
055227,000396: 07,3306           10000                           CCS      A                                     #  ISS WARNING.
055228,000397: 07,3307           12746                           TCF      MODEEXIT                              
055229,000398: 
055230,000399: 07,3310           05567                           TC       ALARM                                 
055231,000400: 07,3311           00212                           OCT      212                                   
055232,000401: 
055233,000402: 07,3312           00004                           INHINT                                         
055234,000403: 
055235,000404: 07,3313           13276                           TCF      PIPFREE2                              
055236,000405: 

Page 1311

055238,000407:                                                                                                  #  THE FOLLOWING ROUTINE TORQUES THE IRIGS ACCORDING TO DOUBLE PRECISION INPUTS IN THE SIX REGISTERS
055239,000408:                                                                                                  #  BEGINNING AT THE ECADR ARRIVING IN A.  THE MINIMUM SIZE OF ANY PULSE TRAIN IS 16 PULSES (.25 CDU COUNTS).  THE
055240,000409:                                                                                                  #  UNSENT PORTION OF THE COMMAND IS LEFT INTACT IN THE INPUT COMMAND REGISTERS.
055241,000410: 
055242,000411: 07,3314  E3,1400                                  EBANK=   1400                                  #  VARIABLE, ACTUALLY.
055243,000412: 
055244,000413: 07,3314           54161        IMUPULSE           TS       MPAC       +5                         #  SAVE ARRIVING ECADR.
055245,000414: 07,3315           03644                           TC       CAGETSTJ                              #  DONT PROCEED IF IMU BEING CAGED.
055246,000415: 
055247,000416: 07,3316           11311                           CCS      LGYRO                                 #  SEE IF GYROS BUSY.
055248,000417: 07,3317           03360                           TC       GYROBUSY                              #  SLEEP.
055249,000418: 
055250,000419: 07,3320           54156                           TS       MPAC       +2                         
055251,000420: 07,3321           34746                           CAF      BIT6                                  #  ENABLE THE POWER SUPPLY.
055252,000421: 07,3322           00006                           EXTEND                                         
055253,000422: 07,3323           05014                           WOR      CHAN14                                
055254,000423: 
055255,000424: 07,3324           34751                           CAF      FOUR                                  
055256,000425: 07,3325           05203        GWAKE2             TC       WAITLIST                              #  (IF A JOB WAS PUT TO SLEEP, THE POWER
055257,000426: 07,3326  E3,1474                                  EBANK=   CDUIND                                #  SUPPLY IS LEFT ON BY THE WAKING JOB).
055258,000427: 07,3326           03376 16103                     2CADR    STRTGYRO                              
055259,000428: 
055260,000429: 07,3330           30161                           CA       MPAC       +5                         #  SET UP EBANK, SAVING CALLER'S EBANK FOR
055261,000430: 07,3331           56003                           XCH      EBANK                                 #  RESTORATION ON RETURN.
055262,000431: 07,3332           56161                           XCH      MPAC       +5                         
055263,000432: 07,3333           55311                           TS       LGYRO                                 #  RESERVES GYROS.
055264,000433: 07,3334           74357                           MASK     LOW8                                  
055265,000434: 07,3335           54061                           TS       ITEMP1                                
055266,000435: 
055267,000436: 07,3336           34752                           CAF      TWO                                   #  FORCE SIGN AGREEMENT ON INPUTS.
055268,000437: 07,3337           54157        GYROAGRE           TS       MPAC       +3                         
055269,000438: 07,3340           60000                           DOUBLE                                         
055270,000439: 07,3341           60061                           AD       ITEMP1                                
055271,000440: 07,3342           54160                           TS       MPAC       +4                         
055272,000441: 07,3343           00006                           EXTEND                                         
055273,000442: 07,3344           50000                           INDEX    A                                     
055274,000443: 07,3345           31401                           DCA      1400                                  
055275,000444: 07,3346           52155                           DXCH     MPAC                                  
055276,000445: 07,3347           07262                           TC       TPAGREE                               
055277,000446: 07,3350           52155                           DXCH     MPAC                                  
055278,000447: 07,3351           50160                           INDEX    MPAC       +4                         
055279,000448: 07,3352           53401                           DXCH     1400                                  
055280,000449: 
055281,000450: 07,3353           10157                           CCS      MPAC       +3                         
055282,000451: 07,3354           13337                           TCF      GYROAGRE                              
055283,000452: 
055284,000453: 07,3355           30161                           CA       MPAC       +5                         #  RESTORE CALLER'S EBANK.
055285,000454: 07,3356           54003                           TS       EBANK                                 
055286,000455: 07,3357           12746                           TCF      MODEEXIT                              
055287,000456: 

Page 1312

055289,000458:                                                                                                  #  ROUTINES TO ALLOW TORQUING BY ONLY ONE JOB AT A TIME.
055290,000459: 
055291,000460: 07,3360           00006        GYROBUSY           EXTEND                                         #  SAVE RETURN 2FCADR.
055292,000461: 07,3361           30134                           DCA      BUF2                                  
055293,000462: 07,3362           52155                           DXCH     MPAC                                  
055294,000463: 07,3363           33375        REGSLEEP           CAF      LGWAKE                                
055295,000464: 07,3364           15133                           TCF      JOBSLEEP                              
055296,000465: 
055297,000466: 07,3365           11311        GWAKE              CCS      LGYRO                                 #  WHEN AWAKENED, SEE IF GYROS STILL BUSY.
055298,000467: 07,3366           13363                           TCF      REGSLEEP                              #  IF SO, SLEEP SOME MORE.
055299,000468: 
055300,000469: 07,3367           54156                           TS       MPAC       +2                         
055301,000470: 07,3370           00006                           EXTEND                                         
055302,000471: 07,3371           30155                           DCA      MPAC                                  
055303,000472: 07,3372           52134                           DXCH     BUF2                                  #  RESTORE SWRETURN INFO.
055304,000473: 07,3373           34753                           CAF      ONE                                   
055305,000474: 07,3374           13325                           TCF      GWAKE2                                
055306,000475: 
055307,000476: 07,3375           17365        LGWAKE             CADR     GWAKE                                 
055308,000477: 

Page 1313

055310,000479:                                                                                                  #  GYRO-TORQUING WAITLIST TASKS.
055311,000480: 
055312,000481: 07,3376           43617        STRTGYRO           CS       GDESELCT                              #  DE-SELECT LAST GYRO.
055313,000482: 07,3377           00006                           EXTEND                                         
055314,000483: 07,3400           03014                           WAND     CHAN14                                
055315,000484: 
055316,000485: 07,3401           03632                           TC       CAGETEST                              
055317,000486: 
055318,000487: 07,3402           31311        STRTGYR2           CA       LGYRO                                 #  JUMP ON PHASE COUNTER IN BITS 13-14.
055319,000488: 07,3403           00006                           EXTEND                                         
055320,000489: 07,3404           74750                           MP       BIT4                                  
055321,000490: 07,3405           50000                           INDEX    A                                     
055322,000491: 07,3406           13407                           TCF      +1                                    
055323,000492: 07,3407           03424                           TC       GSELECT                               #  =0.  DO Y GYRO.
055324,000493: 07,3410           00202                           OCT      00202                                 
055325,000494: 
055326,000495: 07,3411           03424                           TC       GSELECT                               #  =1.  DO Z GYRO.
055327,000496: 07,3412           00302                           OCT      00302                                 
055328,000497: 
055329,000498: 07,3413           03422                           TC       GSELECT    -2                         #  =2.  DO X GYRO.
055330,000499: 07,3414           00100                           OCT      00100                                 
055331,000500: 
055332,000501: 07,3415           34755                           CAF      ZERO                                  #  =3.  DONE
055333,000502: 07,3416           55311                           TS       LGYRO                                 
055334,000503: 07,3417           33375                           CAF      LGWAKE                                #  WAKE A POSSIBLE SLEEPING JOB.
055335,000504: 07,3420           05137                           TC       JOBWAKE                               
055336,000505: 
055337,000506: 07,3421           13223        NORESET            TCF      IMUFINED                              #  DO NOT RESET POWER SUPPLY

Page 1314

055339,000508: 07,3422           44751                 -2        CS       FOUR                                  #  SPECIAL ENTRY TO REGRESS LGYRO FOR X.
055340,000509: 07,3423           27311                           ADS      LGYRO                                 
055341,000510: 
055342,000511: 07,3424           50002        GSELECT            INDEX    Q                                     #  SELECT GYRO.
055343,000512: 07,3425           30000                           CAF      0                                     #  PACKED WORD CONTAINS GYRO SELECT BITS
055344,000513: 07,3426           54064                           TS       ITEMP4                                #  AND INCREMENT TO LGYRO.
055345,000514: 07,3427           74757                           MASK     SEVEN                                 
055346,000515: 07,3430           64737                           AD       BIT13                                 
055347,000516: 07,3431           27311                           ADS      LGYRO                                 
055348,000517: 07,3432           54003                           TS       EBANK                                 
055349,000518: 07,3433           74357                           MASK     LOW8                                  
055350,000519: 07,3434           54061                           TS       ITEMP1                                
055351,000520: 
055352,000521: 07,3435           44757                           CS       SEVEN                                 
055353,000522: 07,3436           70064                           MASK     ITEMP4                                
055354,000523: 07,3437           54064                           TS       ITEMP4                                
055355,000524: 
055356,000525: 07,3440           00006                           EXTEND                                         #  MOVE DP COMMAND TO RUPTREGS FOR TESTING.
055357,000526: 07,3441           50061                           INDEX    ITEMP1                                
055358,000527: 07,3442           31401                           DCA      1400                                  
055359,000528: 07,3443           52071                           DXCH     RUPTREG1                              
055360,000529: 
055361,000530: 07,3444           10070                           CCS      RUPTREG1                              
055362,000531: 07,3445           13460                           TCF      MAJ+                                  
055363,000532: 07,3446           13450                           TCF      +2                                    
055364,000533: 07,3447           13600                           TCF      MAJ-                                  
055365,000534: 
055366,000535: 07,3450           10071                           CCS      RUPTREG2                              
055367,000536: 07,3451           13455                           TCF      MIN+                                  
055368,000537: 07,3452           13402                           TCF      STRTGYR2                              
055369,000538: 07,3453           13575                           TCF      MIN-                                  
055370,000539: 07,3454           13402                           TCF      STRTGYR2                              
055371,000540: 

Page 1315

055373,000542: 07,3455           63511        MIN+               AD       -GYROMIN                              #  SMALL POSITIVE COMMAND.  SEE IF AT LEAST
055374,000543: 07,3456           00006                           EXTEND                                         #  16 GYRO PULSES.
055375,000544: 07,3457           63402                           BZMF     STRTGYR2                              
055376,000545: 
055377,000546: 07,3460           00006        MAJ+               EXTEND                                         #  DEFINITE POSITIVE OUTPUT.
055378,000547: 07,3461           33621                           DCA      GYROFRAC                              
055379,000548: 07,3462           20071                           DAS      RUPTREG1                              
055380,000549: 
055381,000550: 07,3463           30064                           CA       ITEMP4                                #  SELECT POSITIVE TORQUING FOR THIS GYRO.
055382,000551: 07,3464           00006                           EXTEND                                         
055383,000552: 07,3465           05014                           WOR      CHAN14                                
055384,000553: 
055385,000554: 07,3466           36077                           CAF      LOW7                                  #  LEAVE NUMBER OF POSSIBLE 8192 AUGMENTS
055386,000555: 07,3467           70071                           MASK     RUPTREG2                              #  TO INITIAL COMMAND IN MAJOR PART OF LONG
055387,000556: 07,3470           56071                           XCH      RUPTREG2                              #  TERM STORAGE AND TRUNCATED FRACTION
055388,000557: 07,3471           00006        GMERGE             EXTEND                                         #  IN MINOR PART.  THE MAJOR PART WILL BE
055389,000558: 07,3472           74744                           MP       BIT8                                  #  COUNTED DOWN TO ZERO IN THE COURSE OF
055390,000559: 07,3473           54062                           TS       ITEMP2                                #  PUTTING OUT THE ENTIRE COMMAND.
055391,000560: 07,3474           30070                           CA       RUPTREG1                              
055392,000561: 07,3475           00006                           EXTEND                                         
055393,000562: 07,3476           74743                           MP       BIT9                                  
055394,000563: 07,3477           54070                           TS       RUPTREG1                              
055395,000564: 07,3500           30001                           CA       L                                     
055396,000565: 07,3501           00006                           EXTEND                                         
055397,000566: 07,3502           74736                           MP       BIT14                                 
055398,000567: 07,3503           26062                           ADS      ITEMP2                                #  INITIAL COMMAND.
055399,000568: 
055400,000569: 07,3504           00006                           EXTEND                                         #  SEE IF MORE THAN ONE PULSE TRAIN NEEDED
055401,000570: 07,3505           30071                           DCA      RUPTREG1                              #  (MORE THAN 16383 PULSES).
055402,000571: 07,3506           67752                           AD       MINUS1                                
055403,000572: 07,3507           10000                           CCS      A                                     
055404,000573: 07,3510           13534                           TCF      LONGGYRO                              
055405,000574: 07,3511           77601        -GYROMIN           OCT      -176                                  #  MAY BE ADJUSTED TO SPECIFY MINIMUM CMD
055406,000575: 07,3512           13516                           TCF      +4                                    
055407,000576: 
055408,000577: 07,3513           34736                           CAF      BIT14                                 
055409,000578: 07,3514           26062                           ADS      ITEMP2                                
055410,000579: 07,3515           34755                           CAF      ZERO                                  
055411,000580: 
055412,000581: 07,3516           50061                 +4        INDEX    ITEMP1                                
055413,000582: 07,3517           53401                           DXCH     1400                                  

Page 1316

055415,000584: 07,3520           30062                           CA       ITEMP2                                #  ENTIRE COMMAND.
055416,000585: 07,3521           54047        LASTSEG            TS       GYROCMD                               
055417,000586: 07,3522           00006                           EXTEND                                         
055418,000587: 07,3523           74742                           MP       BIT10                                 #  WAITLIST DT
055419,000588: 07,3524           66250                           AD       THREE                                 #  TRUNCATION AND PHASE UNCERTAINTIES.
055420,000589: 07,3525           05203                           TC       WAITLIST                              
055421,000590: 07,3526  E3,1474                                  EBANK=   CDUIND                                
055422,000591: 07,3526           03376 16103                     2CADR    STRTGYRO                              
055423,000592: 
055424,000593: 07,3530           34742        GYROEXIT           CAF      BIT10                                 
055425,000594: 07,3531           00006                           EXTEND                                         
055426,000595: 07,3532           05014                           WOR      CHAN14                                
055427,000596: 07,3533           15261                           TCF      TASKOVER                              
055428,000597: 
055429,000598: 07,3534           50061        LONGGYRO           INDEX    ITEMP1                                
055430,000599: 07,3535           53401                           DXCH     1400                                  #  INITIAL COMMAND OUT PLUS N AUGMENTS OF
055431,000600: 07,3536           34736                           CAF      BIT14                                 #  8192.  INITIAL COMMAND IS AT LEAST 8192.
055432,000601: 07,3537           60062                           AD       ITEMP2                                
055433,000602: 07,3540           54047                           TS       GYROCMD                               
055434,000603: 
055435,000604: 07,3541           00006        AUG3               EXTEND                                         #  GET WAITLIST DT TO TIME WHEN TRAIN IS
055436,000605: 07,3542           74742                           MP       BIT10                                 #  ALMOST OUT.
055437,000606: 07,3543           67750                           AD       NEG3                                  
055438,000607: 07,3544           05203                           TC       WAITLIST                              
055439,000608: 07,3545  E3,1474                                  EBANK=   CDUIND                                
055440,000609: 07,3545           03550 16103                     2CADR    8192AUG                               
055441,000610: 
055442,000611: 07,3547           13530                           TCF      GYROEXIT                              
055443,000612: 
055444,000613: 07,3550           03632        8192AUG            TC       CAGETEST                              
055445,000614: 
055446,000615: 07,3551           34750                           CAF      BIT4                                  
055447,000616: 07,3552           00006                           EXTEND                                         
055448,000617: 07,3553           02012                           RAND     CHAN12                                
055449,000618: 07,3554           10000                           CCS      A                                     
055450,000619: 07,3555           13630                           TCF      IMUBAD                                
055451,000620: 07,3556           31311                           CA       LGYRO                                 #  ADD 8192 PULSES TO GYROCMD
055452,000621: 07,3557           54003                           TS       EBANK                                 
055453,000622: 07,3560           74357                           MASK     LOW8                                  
055454,000623: 07,3561           54061                           TS       ITEMP1                                
055455,000624: 
055456,000625: 07,3562           50061                           INDEX    ITEMP1                                #  SEE IF THIS IS THE LAST AUG.
055457,000626: 07,3563           11400                           CCS      1400                                  
055458,000627: 07,3564           13570                           TCF      AUG2                                  #  MORE TO COME.
055459,000628: 
055460,000629: 07,3565           34736                           CAF      BIT14                                 
055461,000630: 07,3566           26047                           ADS      GYROCMD                               
055462,000631: 07,3567           13522                           TCF      LASTSEG    +1                         
055463,000632: 

Page 1317

055465,000634: 07,3570           50061        AUG2               INDEX    ITEMP1                                
055466,000635: 07,3571           55400                           TS       1400                                  
055467,000636: 07,3572           34736                           CAF      BIT14                                 
055468,000637: 07,3573           26047                           ADS      GYROCMD                               
055469,000638: 07,3574           13541                           TCF      AUG3                                  #  COMPUTE DT.
055470,000639: 

Page 1318

055472,000641: 07,3575           63511        MIN-               AD       -GYROMIN                              #  POSSIBLE NEGATIVE OUTPUT.
055473,000642: 07,3576           00006                           EXTEND                                         
055474,000643: 07,3577           63402                           BZMF     STRTGYR2                              
055475,000644: 
055476,000645: 07,3600           00006        MAJ-               EXTEND                                         #  DEFINITE NEGATIVE OUTPUT.
055477,000646: 07,3601           43621                           DCS      GYROFRAC                              
055478,000647: 07,3602           20071                           DAS      RUPTREG1                              
055479,000648: 
055480,000649: 07,3603           30064                           CA       ITEMP4                                #  SELECT NEGATIVE TORQUING FOR THIS GYRO.
055481,000650: 07,3604           64743                           AD       BIT9                                  
055482,000651: 07,3605           00006                           EXTEND                                         
055483,000652: 07,3606           05014                           WOR      CHAN14                                
055484,000653: 
055485,000654: 07,3607           40070                           CS       RUPTREG1                              #  SET UP RUPTREGS TO FALL INTO GMERGE.
055486,000655: 07,3610           54070                           TS       RUPTREG1                              #  ALL NUMBERS PUT INTO GYROCMD ARE
055487,000656: 07,3611           40071                           CS       RUPTREG2                              #  POSITIVE - BIT9 OF CHAN 14 DETERMINES
055488,000657: 07,3612           76077                           MASK     LOW7                                  #  THE SIGN OF THE COMMAND.
055489,000658: 07,3613           40000                           COM                                            
055490,000659: 07,3614           56071                           XCH      RUPTREG2                              
055491,000660: 07,3615           40000                           COM                                            
055492,000661: 07,3616           13471                           TCF      GMERGE                                
055493,000662: 
055494,000663: 07,3617           01700        GDESELCT           OCT      1700                                  #  TURN OFF SELECT AND ACTIVITY BITS.
055495,000664: 
055496,000665: 07,3620           00000 00034  GYROFRAC           2DEC     .215       B-21                       
055497,000666: 

Page 1319

055499,000668:                                                                                                  #  IMU MODE SWITCHING ROUTINES COME HERE WHEN ACTION COMPLETE.
055500,000669: 
055501,000670: 07,3622           00006        ENDIMU             EXTEND                                         #  MODE IS BAD IF CAGE HAS OCCURED OR IF
055502,000671: 07,3623           00011                           READ     DSALMOUT                              #  ISS WARNING IS ON.
055503,000672: 07,3624           74753                           MASK     BIT1                                  
055504,000673: 07,3625           10000                           CCS      A                                     
055505,000674: 07,3626           13630                           TCF      IMUBAD                                
055506,000675: 
055507,000676: 07,3627           13656        IMUGOOD            TCF      GOODEND                               #  WITH C(A) = 0.
055508,000677: 
055509,000678: 07,3630           34755        IMUBAD             CAF      ZERO                                  
055510,000679: 07,3631           13653                           TCF      BADEND                                
055511,000680: 
055512,000681: 07,3632           34746        CAGETEST           CAF      BIT6                                  #  SUBROUTINE TO TERMINATE IMU MODE
055513,000682: 07,3633           71277                           MASK     IMODES30                              #  SWITCH IF IMU HAS BEEN CAGED.
055514,000683: 07,3634           10000                           CCS      A                                     
055515,000684: 07,3635           13630                           TCF      IMUBAD                                #  DIRECTLY.
055516,000685: 07,3636           00002                           TC       Q                                     #  WITH C(A) = +0.
055517,000686: 
055518,000687: 07,3637           41277        CAGETSTQ           CS       IMODES30                              #  SKIP IF IMU NOT BEING CAGED.
055519,000688: 07,3640           74746                           MASK     BIT6                                  
055520,000689: 07,3641           10000                           CCS      A                                     
055521,000690: 07,3642           24002                           INCR     Q                                     
055522,000691: 07,3643           00002                           TC       Q                                     
055523,000692: 
055524,000693: 07,3644           41277        CAGETSTJ           CS       IMODES30                              #  IF DURING MODE SWITCH INITIALIZATION
055525,000694: 07,3645           74746                           MASK     BIT6                                  #  IT IS FOUND THAT THE IMU IS BEING CAGED,
055526,000695: 07,3646           10000                           CCS      A                                     #  SET IMUCADR TO -0 TO INDICATE OPERATION
055527,000696: 07,3647           00002                           TC       Q                                     #  COMPLETE BUT FAILED.  RETURN IMMEDIATELY
055528,000697: 07,3650           44755                           CS       ZERO                                  #  TO SWRETURN.
055529,000698: 07,3651           55301                           TS       IMUCADR                               
055530,000699: 07,3652           12746                           TCF      MODEEXIT                              
055531,000700: 

Page 1320

055533,000702:                                                                                                  #  GENERALIZED MODE SWITCHING TERMINATION.  ENTER AT GOODEND FOR SUCCESSFUL COMPLETION OF AN I/O OPERATION
055534,000703:                                                                                                  #  OR AT BADEND FOR AN UNSUCCESSFUL ONE.  C(A) OR ARRIVAL =0 FOR IMU, 1 FOR OPTICS.
055535,000704: 
055536,000705: 07,3653           54071        BADEND             TS       RUPTREG2                              #  DEVICE INDEX.
055537,000706: 07,3654           44755                           CS       ZERO                                  #  FOR FAILURE.
055538,000707: 07,3655           13660                           TCF      GOODEND    +2                         
055539,000708: 
055540,000709: 07,3656           54071        GOODEND            TS       RUPTREG2                              
055541,000710: 07,3657           44753                           CS       ONE                                   #  FOR SUCCESS.
055542,000711: 
055543,000712: 07,3660           54072                           TS       RUPTREG3                              
055544,000713: 07,3661           50071                           INDEX    RUPTREG2                              #  SEE IF USING PROGRAM ASLEEP.
055545,000714: 07,3662           11301                           CCS      MODECADR                              
055546,000715: 07,3663           13667                           TCF      +4                                    #  YES - WAKE IT UP.
055547,000716: 07,3664           13677                           TCF      ENDMODE                               #  IF 0, PROGRAM NOT IN YET.
055548,000717: 
055549,000718: 07,3665           00006                           EXTEND                                         
055550,000719: 07,3666           13700                           BZF      ENDMODE    +1                         #  BZF = TCF IF MODECADR = -0.
055551,000720: 
055552,000721: 07,3667           34755                           CAF      ZERO                                  #  WAKE SLEEPING PROGRAM.
055553,000722: 07,3670           50071                           INDEX    RUPTREG2                              
055554,000723: 07,3671           57301                           XCH      MODECADR                              
055555,000724: 07,3672           05137                           TC       JOBWAKE                               
055556,000725: 
055557,000726: 07,3673           40072                           CS       RUPTREG3                              #  ADVANCE LOC IF SUCCESSFUL.
055558,000727: 07,3674           50064                           INDEX    LOCCTR                                
055559,000728: 07,3675           26164                           ADS      LOC                                   
055560,000729: 
055561,000730: 07,3676           15261                           TCF      TASKOVER                              
055562,000731: 
055563,000732: 07,3677           30072        ENDMODE            CA       RUPTREG3                              #  -0 INDICATES OPERATION COMPLETE BUT
055564,000733: 07,3700           50071                 +1        INDEX    RUPTREG2                              #  UNSUCCESSFUL:  -1 INDICATES COMPLETE AND
055565,000734: 07,3701           55301                           TS       MODECADR                              #  SUCCESSFUL.
055566,000735: 07,3702           15261                           TCF      TASKOVER                              
055567,000736: 

Page 1321

055569,000738:                                                                                                  #  GENERAL STALLING ROUTINE.  USING PROGRAMS COME HERE TO WAIT FOR I/O COMPLETION.
055570,000739: 
055571,000740:                                                                                                  #  PROGRAM DESCRIPTION                           DATE - 21 FEB 1967
055572,000741:                                                                                                  #                                                LOG SECTION IMU MODE SWITCHING
055573,000742:                                                                                                  #  MOD BY - R. MELANSON TO ADD DOCUMENTATION     ASSEMBLY SUNDISK REV. 82
055574,000743: 
055575,000744:                                                                                                  #  FUNCTIONAL DESCRIPTION -
055576,000745:                                                                                                  #        TO DELAY FURTHER EXECUTION OF THE CALLING ROUTINE UNTIL ITS SELECTED
055577,000746:                                                                                                  #        I/O FUNCTION IS COMPLETE.  THE FOLLOWING CHECKS ON THE CALLING ROUTINE:S
055578,000747:                                                                                                  #        MODECADR ARE MADE AND ACTED UPON.
055579,000748:                                                                                                  #        1) +0 INDICATES INCOMPLETE I/O OPERATION.  CALLING ROUTINE IS PUT TO
055580,000749:                                                                                                  #           SLEEP.
055581,000750:                                                                                                  #        2) -1 INDICATES COMPLETED I/O OPERATION.  STALL BYPASSES JOBSLEEP
055582,000751:                                                                                                  #           CALL AND RETURNS TO CALLING ROUTINE AT L+3
055583,000752:                                                                                                  #        3) -0 INDICATES COMPLETED I/O WITH FAILURE.  STALL CLEARS MODECADR
055584,000753:                                                                                                  #           AND RETURNS TO CALLING ROUTINE AT L+2.
055585,000754:                                                                                                  #        4) VALUE GREATER THAN 0 INDICATES TWO ROUTINES CALLING FOR USE OF
055586,000755:                                                                                                  #           SAME DEVICE.  STALL EXITS TO ABORT WHICH EXECUTES A PROGRAM
055587,000756:                                                                                                  #           RESTART WHICH IN TURN CLEARS ALL MODECADR REGISTERS.
055588,000757: 
055589,000758:                                                                                                  #  CALLING SEQUENCE -
055590,000759:                                                                                                  #        L       TC      BANKCALL
055591,000760:                                                                                                  #        L+1     CADR    (ONE OF 5 STALL ADDRESSES I.E. IMUSTALL, OPTSTALL, RADSTALL,
055592,000761:                                                                                                  #                        AOTSTALL, OR ATTSTALL)
055593,000762: 
055594,000763:                                                                                                  #  NORMAL-EXIT MODE -
055595,000764:                                                                                                  #        TCF JOBSLEEP    OR      TCF MODEXIT
055596,000765: 
055597,000766:                                                                                                  #  ALARM OR ABORT EXIT MODE -
055598,000767:                                                                                                  #        TC      ABORT
055599,000768: 
055600,000769:                                                                                                  #  OUTPUT -
055601,000770:                                                                                                  #        MODECADR=CADR   IF JOBSLEEP
055602,000771:                                                                                                  #        MODECADR=+0     IF I/O COMPLETE
055603,000772:                                                                                                  #        BUF2=L+3        IF I/O COMPLETE AND GOOD.
055604,000773:                                                                                                  #        BUF2=L+2        IF I/O COMPLETE BUT FAILED.
055605,000774: 
055606,000775:                                                                                                  #  ERASABLE INITIALIZATION -
055607,000776:                                                                                                  #        BUF2 CONTAINS RETURN ADDRESS PLUS 1,(L+2)
055608,000777:                                                                                                  #        BUF2+1 CONTAINS FBANK VALUE OF CALLING ROUTINE.
055609,000778:                                                                                                  #        MODECADR OF CALLING ROUTINE CONTAINS +0,-1,-0 OR CADR RETURN ADDRESS.
055610,000779: 
055611,000780:                                                                                                  #  DEBRIS -
055612,000781:                                                                                                  #        RUPTREG2 AND CALLING ROUTINE MODECADR.
055613,000782: 
055614,000783: 07,3703           34753        AOTSTALL           CAF      ONE                                   #  AOT.
055615,000784: 07,3704           03710                           TC       STALL                                 
055616,000785: 
055617,000786: 07,3705           34752        RADSTALL           CAF      TWO                                   
055618,000787: 07,3706           13710                           TCF      STALL                                 
055619,000788: 

Page 1322

055621,000790: 07,3707  07,3703               OPTSTALL           EQUALS   AOTSTALL                              
055622,000791: 
055623,000792: 07,3707           34755        IMUSTALL           CAF      ZERO                                  #  IMU.
055624,000793: 
055625,000794: 07,3710           00004        STALL              INHINT                                         
055626,000795: 07,3711           54071                           TS       RUPTREG2                              #  SAVE DEVICE INDEX.
055627,000796: 07,3712           50000                           INDEX    A                                     #  SEE IF OPERATION COMPLETE.
055628,000797: 07,3713           11301                           CCS      MODECADR                              
055629,000798: 07,3714           13732                           TCF      MODABORT                              #  ALLOWABLE STATES ARE +0, -1, AND -0.
055630,000799: 07,3715           13726                           TCF      MODESLP                               #  OPERATION INCOMPLETE.
055631,000800: 07,3716           13722                           TCF      MODEGOOD                              #  COMPLETE AND GOOD IF = -1.
055632,000801: 
055633,000802: 07,3717           50071        MG2                INDEX    RUPTREG2                              #  COMPLETE AND FAILED IF -0.  RESET TO +0.
055634,000803: 07,3720           55301                           TS       MODECADR                              #  RETURN TO CALLER.
055635,000804: 07,3721           12746                           TCF      MODEEXIT                              
055636,000805: 
055637,000806: 07,3722           10000        MODEGOOD           CCS      A                                     #  MAKE SURE INITIAL STATE -1.
055638,000807: 07,3723           13732                           TCF      MODABORT                              
055639,000808: 
055640,000809: 07,3724           24133                           INCR     BUF2                                  #  IF SO, INCREMENT RETURN ADDRESS AND
055641,000810: 07,3725           13717                           TCF      MG2                                   #  RETURN IMMEDIATELY, SETTING CADR = +0.
055642,000811: 
055643,000812: 07,3726           04645        MODESLP            TC       MAKECADR                              #  CALL FROM SWITCHABLE FIXED ONLY.
055644,000813: 07,3727           50071                           INDEX    RUPTREG2                              
055645,000814: 07,3730           55301                           TS       MODECADR                              
055646,000815: 07,3731           15133                           TCF      JOBSLEEP                              
055647,000816: 
055648,000817: 07,3732           52134        MODABORT           DXCH     BUF2                                  
055649,000818: 07,3733           05706                           TC       BAILOUT1                              #  TWO PROGRAMS USING THE SAME DEVICE.
055650,000819: 07,3734           31210                           OCT      31210                                 
055651,000820: 

Page 1323

055653,000822:                                                                                                  #  CONSTANTS FOR MODE SWITCHING ROUTINES
055654,000823: 
055655,000824: 07,3735     5741               BITS3&4            =        OCT14                                 
055656,000825: 07,3735     4771               BITS4&6            =        OCT50                                 
055657,000826: 07,3735           00030        BITS4-5            OCT      00030                                 
055658,000827: 07,3736     4744               IMUSEFLG           EQUALS   BIT8                                  #  INTERPRETER SWITCH 7.
055659,000828: 07,3736           77500        -COMMAX            DEC      -191       B-14                       
055660,000829: 07,3737           77477        -COMMAX-           DEC      -192       B-14                       
055661,000830: 07,3740           00074        600MS              DEC      60         B-14                       
055662,000831: 07,3741  07,3201               IMUFIN20           =        IMUFINE                               
055663,000832: 07,3741           31304        GOMANUR            CA       ATTCADR                               #  IS KALCMANU FREE
055664,000833: 07,3742           00006                           EXTEND                                         
055665,000834: 07,3743           13745                           BZF      +2                                    
055666,000835: 07,3744           03732                           TC       MODABORT                              #  BAILOUT
055667,000836: 07,3745           00006                 +2        EXTEND                                         
055668,000837: 07,3746           30134                           DCA      BUF2                                  
055669,000838: 07,3747           53305                           DXCH     ATTCADR                               #  SAVE FINAL RETURN FOR KALCMAN3
055670,000839: 
055671,000840: 07,3750           30006                           CA       BBANK                                 
055672,000841: 07,3751           74757                           MASK     SEVEN                                 
055673,000842: 07,3752           27305                           ADS      ATTCADR    +1                         
055674,000843: 
055675,000844: 07,3753           30167                           CA       PRIORITY                              
055676,000845: 07,3754           77730                           MASK     PRIO37                                
055677,000846: 07,3755           55306                           TS       ATTPRIO                               #  SAVE USERS PRIO
055678,000847: 
055679,000848: 07,3756           33762                           CAF      KALEBCON                              #  SET EBANK FOR KALCMAN3
055680,000849: 07,3757           54003                           TS       EBANK                                 
055681,000850: 07,3760           04635                           TC       POSTJUMP                              
055682,000851: 07,3761           44004                           CADR     KALCMAN3                              
055683,000852: 07,3762           03275        KALEBCON           ECADR    BCDU                                  
055684,000853: 

Page 1324

055686,000855:                                                                                                  #  PROGRAM DESCRIPTION
055687,000856:                                                                                                  #  IMU STATUS CHECK ROUTINE R02 (SUBROUTINE UTILITY)
055688,000857:                                                                                                  #  MOD NO - 1
055689,000858:                                                                                                  #  MOD BY - N.BRODEUR
055690,000859: 
055691,000860:                                                                                                  #  FUNCTIONAL DESCRIPTION
055692,000861:                                                                                                  #        TO CHECK WHETHER IMU IS ON AND IF ON WHETHER IT IS ALIGNED TO AN
055693,000862:                                                                                                  #        ORIENTATION KNOWN BY THE CMC.  TO REQUEST SELECTION OF THE APPROPRIATE
055694,000863:                                                                                                  #        PROGRAM IF THE IMU IS OFF OR NOT ALIGNED TO AN ORIENTATION KNOWN BY THE
055695,000864:                                                                                                  #        CMC.  CALLED THROUGH BANKCALL
055696,000865: 
055697,000866:                                                                                                  #  CALLING SEQUENCE -
055698,000867:                                                                                                  #        L       TC      BANKCALL
055699,000868:                                                                                                  #        L+1     CADR    R02BOTH
055700,000869: 
055701,000870:                                                                                                  #  SUBROUTINES CALLED
055702,000871:                                                                                                  #        VARALARM
055703,000872:                                                                                                  #        FLAGUP
055704,000873: 
055705,000874:                                                                                                  #  NORMAL EXIT MODES
055706,000875:                                                                                                  #        AT L+2 OF CALLING SEQUENCE
055707,000876: 
055708,000877:                                                                                                  #  ALARM OR ABORT EXIT MODES
055709,000878:                                                                                                  #        GOTOPOOH, WITH ALARM
055710,000879: 
055711,000880:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED
055712,000881:                                                                                                  #        NONE
055713,000882: 
055714,000883:                                                                                                  #  DEBRIS
055715,000884:                                                                                                  #        CENTRALS-A,Q,L
055716,000885: 
055717,000886: 34,3706                                           BANK     34                                    
055718,000887: 04,2000                                           SETLOC   R02                                   
055719,000888: 04,2000                                           BANK                                           
055720,000889: 04,3232                                           COUNT*   $$/R02                                
055721,000890: 04,3232           00063        DEC51              DEC      51         B-14                       
055722,000891: 04,3233           34737        R02BOTH            CAF      REFSMBIT                              
055723,000892: 04,3234           70077                           MASK     FLAGWRD3                              
055724,000893: 04,3235           10000                           CCS      A                                     
055725,000894: 04,3236           03247                           TC       R02ZERO                               #  ZERO IMUS
055726,000895: 
055727,000896: 04,3237           31277                           CA       IMODES30                              
055728,000897: 04,3240           74743                           MASK     BIT9                                  #  IS ISS INITIALIZED
055729,000898: 04,3241           00006                           EXTEND                                         
055730,000899: 04,3242           13244                           BZF      +2                                    
055731,000900: 04,3243           44750                           CS       BIT4                                  #  SEND IMU ALARM CODE 210
055732,000901: 04,3244           63252                           AD       OCT220                                #  SEND REFSMM ALARM
055733,000902: 04,3245           05734                           TC       VARALARM                              
055734,000903: 
055735,000904: 04,3246           06001                           TC       GOTOPOOH                              
055736,000905: 
055737,000906: 04,3247           05504        R02ZERO            TC       UPFLAG                                

Page 1325

055739,000908: 04,3250           00007                           ADRES    IMUSE                                 
055740,000909: 04,3251           14631                           TCF      SWRETURN                              
055741,000910: 04,3252           00220        OCT220             OCT      220                                   
055742,000911: 

Page 1326

055744,000913:                                                                                                  #  PROGRAM DESCRIPTION   P06             10FEB67
055745,000914: 
055746,000915:                                                                                                  #  TRANSFER THE ISS/CMC FROM THE OPERATE TO THE STANDBY CONDITION.
055747,000916: 
055748,000917:                                                                                                  #  THE NORMAL CONDITION OF READINESS OF THE GNCS WHEN NOT IN USE IS STANDBY.  IN THIS CONDITION THE IMU
055749,000918:                                                                                                  #  HEATER POWER IS ON.  THE IMU OPERATE POWER IS OFF.  THE COMPUTER POWER IS ON.  THE OPTICS POWER IS OFF.  THE
055750,000919:                                                                                                  #  CMC STANDBY ON THE MAIN AND LEB DISKYS IS ON.
055751,000920: 
055752,000921:                                                                                                  #  CALLING SEQUENCE:
055753,000922:                                                                                                  #        ASTRONAUT REQUEST THROUGH DSKY  V37E 06E.
055754,000923: 
055755,000924:                                                                                                  #  SUBROUTINES CALLED:
055756,000925:                                                                                                  #        GOPERF1
055757,000926:                                                                                                  #        BANKCALL
055758,000927:                                                                                                  #        FLAGDOWN
055759,000928: 

Page 1327

055761,000930:                                                                                                  #  PRESTAND PREPARES FOR STANDBY BY SNAPSHOTTING THE SCALER AND TIME1 TIME2
055762,000931:                                                                                                  #  THE LOW 5 BITS OF THE SCALER ARE INSPECTED TO INSURE COMPATABILITY
055763,000932:                                                                                                  #  BETWEEN THE SCALER READING AND THE TIME1 TIME2 READING.
055764,000933: 
055765,000934: 37,2000                                           SETLOC   P05P06                                
055766,000935: 37,2000                                           BANK                                           
055767,000936: 
055768,000937: 37,3652     0314                                  EBANK=   TIME2SAV                              
055769,000938: 37,3652                                           COUNT*   $$/P06                                
055770,000939: 
055771,000940: 37,3652           05504        P06                TC       UPFLAG                                #  SET NODOV37 BIT
055772,000941: 37,3653           00054                           ADRES    NODOFLAG                              
055773,000942: 
055774,000943: 37,3654           00004        PRESTAND           INHINT                                         
055775,000944: 37,3655           00006                           EXTEND                                         
055776,000945: 37,3656           30025                           DCA      TIME2                                 #  SNAPSHOT TIME1 TIME2
055777,000946: 37,3657           52315                           DXCH     TIME2SAV                              
055778,000947: 37,3660           03711                           TC       SCALPREP                              
055779,000948: 37,3661           03654                           TC       PRESTAND                              #  T1,T2,SCALER NOT COMPATIBLE
055780,000949: 37,3662           52155                           DXCH     MPAC                                  #  T1,T2 AND SCALER OK
055781,000950: 37,3663           52317                           DXCH     SCALSAVE                              #  STORE SCALER
055782,000951: 37,3664           00004                           INHINT                                         
055783,000952: 37,3665           04616                           TC       BANKCALL                              
055784,000953: 37,3666           17166                           CADR     RNDREFDR                              #  REFSMM, DRIFT, TRACK FLAGS DOWN
055785,000954: 
055786,000955: 37,3667           05516                           TC       DOWNFLAG                              
055787,000956: 37,3670           00007                           ADRES    IMUSE                                 #  IMUSE DOWN
055788,000957: 37,3671           05516                           TC       DOWNFLAG                              
055789,000958: 37,3672           00010                           ADRES    RNDVZFLG                              #  RNDVZFLG DOWN
055790,000959: 
055791,000960: 37,3673           34741                           CAF      BIT11                                 
055792,000961: 37,3674           00006                           EXTEND                                         
055793,000962: 37,3675           05013                           WOR      CHAN13                                #  SET STANDBY ENABLE BIT
055794,000963: 
055795,000964: 37,3676           05353                           TC       PHASCHNG                              #  SET RESTART TO POSTAND WHEN STANDBY
055796,000965: 37,3677           07024                           OCT      07024                                 #        RECOVERS
055797,000966: 37,3700           20000                           OCT      20000                                 
055798,000967: 37,3701     0316                                  EBANK=   SCALSAVE                              
055799,000968: 37,3701           03731 76060                     2CADR    POSTAND                               
055800,000969: 
055801,000970: 37,3703           34774                           CAF      OCT62                                 
055802,000971: 37,3704           04616                           TC       BANKCALL                              
055803,000972: 37,3705           20624                           CADR     GOPERF1                               
055804,000973: 37,3706           13703                           TCF      -3                                    
055805,000974: 37,3707           13703                           TCF      -4                                    
055806,000975: 37,3710           13703                           TCF      -5                                    
055807,000976: 
055808,000977: 37,3711     4774               OCT62              EQUALS   .5SEC                                 #  DEC 50 = OCT 62
055809,000978: 
055810,000979:                                                                                                  #  THE LOW 5 BITS OF THE SCALER READS 10000 FOR THE FIRST INTERVAL AFTER A

Page 1328

055812,000981:                                                                                                  #  T1 INCREMENT.  IF SCALPREP DETECTS THIS INTERVAL THE T1,T2 AND SCALER
055813,000982:                                                                                                  #  DATA ARE NOT COMPATABLE AND RETURN IS TO L+1 FOR ANOTHER READING OF THE
055814,000983:                                                                                                  #  DATA.  OTHERWISE, THE RETURN IS TO L+2 TO PROCEED.  ROUTINE ALSO PREPARES
055815,000984:                                                                                                  #  THE SCALER READING FOR COMPUTATION OF THE INCREMENT TO UPDATE T1T2.  (THE
055816,000985:                                                                                                  #  10 MS BIT (BIT 6) OF THE SCALER IS INCREMENTED 5 MS OUT OF PHASE FROM
055817,000986:                                                                                                  #  T1.) ADDITION OF 5 MS (BIT 5) TO THE SCALER READING HAS THE EFFECT OF
055818,000987:                                                                                                  #  ADJUSTING BIT 6 IN THE SCALER TO BE IN PHASE WITH BIT 1 OF T1.  THE LOW 5
055819,000988:                                                                                                  #  BITS OF THE SCALER READING ARE THEN SET TO ZERO, TO TRUNCATE THE SCALER
055820,000989:                                                                                                  #  DATA TO 10 MS.  RESULTS ARE STORED IN MPAC, +1.
055821,000990: 
055822,000991: 37,3711           00006        SCALPREP           EXTEND                                         
055823,000992: 37,3712           22156                           QXCH     MPAC       +2                         
055824,000993: 37,3713           04103                           TC       FINETIME   +1                         
055825,000994: 37,3714           00003                           RELINT                                         
055826,000995: 37,3715           52155                           DXCH     MPAC                                  
055827,000996: 37,3716           34747                           CA       BIT5                                  #  ADD 5 MS TO THE SCALER READING.
055828,000997: 37,3717           54001                           TS       L                                     
055829,000998: 37,3720           34755                           CA       ZERO                                  
055830,000999: 37,3721           20155                           DAS      MPAC                                  
055831,001000: 37,3722           44346                           CS       LOW5                                  #  SET LOW 5 BITS OF (SCALER+5MS) TO ZERO
055832,001001: 37,3723           70155                           MASK     MPAC       +1                         #  AND STORE RESULTS IN MPAC,+1.
055833,001002: 37,3724           56155                           XCH      MPAC       +1                         
055834,001003: 37,3725           74346                           MASK     LOW5                                  #  TEST LOW 5 BITS OF SCALER FOR THE FIRST
055835,001004:                                                                                                  #  INTERVAL AFTER THE T1 INCREMENT
055836,001005:                                                                                                  #  (NOW = 00000, SINCE BIT 5 ADDED).
055837,001006: 37,3726           10000                           CCS      A                                     #  IS IT 1ST INTERVAL AFTER T1 INCREMENT
055838,001007: 37,3727           24156                           INCR     MPAC       +2                         #  NO
055839,001008: 37,3730           00156                           TC       MPAC       +2                         #  YES
055840,001009: 
055841,001010:                                                                                                  #  POSTAND RECOVERS TIME AFTER STANDBY.  THE SCALER IS SNAPSHOTTED AND THE
055842,001011:                                                                                                  #  TIME1 TIME2 COUNTER IS SET TO ZERO.  THE LOW 5 BITS OF THE SCALER ARE
055843,001012:                                                                                                  #  INSPECTED TO INSURE COMPATABILITY BETWEEN THE SCALER READING AND THE
055844,001013:                                                                                                  #  CLEARING OF THE TIME COUNTER.  IT THEN COMPUTES THE DIFFERENCE IN SCALER
055845,001014:                                                                                                  #  VALUES (IN DP) AND ADDS THIS TO THE PREVIOUSLY SNAPSHOTTED VALUES OF
055846,001015:                                                                                                  #  TIME1 TIME2 AND PLACES THIS NEW TIME INTO THE TIME1 TIME2 COUNTER.
055847,001016: 
055848,001017: 37,3731                                           COUNT*   $$/P05                                
055849,001018: 
055850,001019: 37,3731           44741        POSTAND            CS       BIT11                                 #  RECOVER TIME AFTER STANDBY.
055851,001020: 37,3732           00006                           EXTEND                                         
055852,001021: 37,3733           03013                           WAND     CHAN13                                #  CLEAR STANDBY ENABLE BIT
055853,001022: 37,3734           00004                           INHINT                                         
055854,001023: 37,3735           34755                           CA       ZERO                                  
055855,001024: 37,3736           54001                           TS       L                                     
055856,001025: 37,3737           52025                           DXCH     TIME2                                 #  CLEAR TIME1 TIME2
055857,001026: 37,3740           03711                           TC       SCALPREP                              #  STORE SCALER IN MPAC, MPAC+1
055858,001027: 37,3741           03734                           TC       POSTAND    +3                         #  T1,T2,SCALER NOT COMPATIBLE
055859,001028: 37,3742           00006                           EXTEND                                         #  T1,T2 AND SCALER OK
055860,001029: 37,3743           40317                           DCS      SCALSAVE                              
055861,001030: 37,3744           20155                           DAS      MPAC                                  #  FORM DP DIFFERENCE OF POSTSTANDBY SCALER

Page 1329

055863,001032: 37,3745           34742                           CAF      BIT10                                 #  MINUS PRESTANDBY SCALER AND SHIFT RIGHT
055864,001033: 37,3746           07312                           TC       SHORTMP                               #  5 TO ALIGN BITS WITH TIME1 TIME2.
055865,001034: 37,3747           34755                           CAF      ZERO                                  
055866,001035: 37,3750           54156                           TS       MPAC       +2                         #  NEEDED FOR TP AGREE
055867,001036: 37,3751           07262                           TC       TPAGREE                               #  MAKE DP DIFF AGREE
055868,001037: 37,3752           10154                           CCS      MPAC                                  
055869,001038: 37,3753           03760                           TC       POSTCOM                               #  IF DP DIFF NET +, NO SCALER OVERFLOW
055870,001039: 37,3754           03760                           TC       POSTCOM                               #  BETWEEN PRE AND POST STANDBY.
055871,001040: 37,3755           03756                           TC       +1                                    #  IF DP DIFF NET -, SCALER OVERFLOWED.  ADD
055872,001041: 37,3756           34742                           CAF      BIT10                                 #  BIT 10 TO HIGH DIFF TO CORRECT.
055873,001042: 37,3757           26154                           ADS      MPAC                                  
055874,001043: 37,3760           00006        POSTCOM            EXTEND                                         #  C(MPAC,+1) IS MAGNITUDE OF DELTA SCALER.
055875,001044: 37,3761           30315                           DCA      TIME2SAV                              #  PRESTANDBY TIME1 TIME2
055876,001045: 37,3762           20155                           DAS      MPAC                                  
055877,001046: 37,3763           07262                           TC       TPAGREE                               #  FORCE SIGN AGREEMENT
055878,001047: 37,3764           52155                           DXCH     MPAC                                  #  UPDATED VALUE FOR T1,T2.
055879,001048: 37,3765           20025                           DAS      TIME2                                 #  LOAD UPDATED VALUE INTO T1,T2, WITH
055880,001049: 37,3766           05516                           TC       DOWNFLAG                              #  CLEAR NODOFLAG
055881,001050: 37,3767           00054                           ADRES    NODOFLAG                              
055882,001051: 
055883,001052: 37,3770           06001                           TC       GOTOPOOH                              
055884,001053: 

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