Source Code

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

The reconstruction began with reconstructed source code for Luminary 97. Changes between revisions 96 and 97 were backed out, as described by anomal report LNY-59. transcribed from a digitized copy of that program. The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152D. Note that page numbers in the reconstructed code match those on the Luminary 099 revision 001 printout, although the added code would likely have changed page numbers for a real Luminary 96 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.

055029,000002:                                                                                                  ## Copyright:   Public domain.
055030,000003:                                                                                                  ## Filename:    IMU_MODE_SWITCHING_ROUTINES.agc
055031,000004:                                                                                                  ## Purpose:     A section of Luminary revision 96.
055032,000005:                                                                                                  ##              It is part of the reconstructed source code for the
055033,000006:                                                                                                  ##              original release of the flight software for the Lunar 
055034,000007:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 11.
055035,000008:                                                                                                  ##              The code has been recreated from a previously reconstructed
055036,000009:                                                                                                  ##              copy of Luminary 97 by undoing changes described in anomaly
055037,000010:                                                                                                  ##              report LNY-59. The code has been adapted such that the
055038,000011:                                                                                                  ##              resulting bugger words exactly match those specified for
055039,000012:                                                                                                  ##              Luminary 96 in NASA drawing 2021152D, which gives relatively
055040,000013:                                                                                                  ##              high confidence that the reconstruction is correct.
055041,000014:                                                                                                  ## Reference:   pp. 1309-1337
055042,000015:                                                                                                  ## Assembler:   yaYUL
055043,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
055044,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
055045,000018:                                                                                                  ## Mod history: 2019-08-04 MAS  Created from Luminary 97.
055046,000019: 

Page 1309

055048,000021:    5457                                           BLOCK    02                                    
055049,000022:    4000                                           SETLOC   FFTAG3                                
055050,000023:    4000                                           BANK                                           
055051,000024: 
055052,000025:    5457  E3,1471                                  EBANK=   COMMAND                               
055053,000026: 
055054,000027:                                                                                                  #  FIXED-FIXED ROUTINES.
055055,000028: 
055056,000029:    5457                                           COUNT*   $$/IMODE                              
055057,000030:    5457           34755        ZEROICDU           CAF      ZERO                                  #  ZERO ICDU COUNTERS.
055058,000031:    5460           54032                           TS       CDUX                                  
055059,000032:    5461           54033                           TS       CDUY                                  
055060,000033:    5462           54034                           TS       CDUZ                                  
055061,000034:    5463           00002                           TC       Q                                     
055062,000035: 
055063,000036:    5464     4743               SPSCODE            =        BIT9                                  
055064,000037: 

Page 1310

055066,000039:                                                                                                  #  IMU ZEROING ROUTINE.
055067,000040: 
055068,000041: 11,3765                                           BANK     11                                    
055069,000042: 07,2000                                           SETLOC   MODESW                                
055070,000043: 07,2000                                           BANK                                           
055071,000044: 
055072,000045: 07,2714                                           COUNT*   $$/IMODE                              
055073,000046: 07,2714           00004        IMUZERO            INHINT                                         #  ROUTINE TO ZERO ICDUS.
055074,000047: 07,2715           41036                           CS       DSPTAB     +11D                       #  DONT ZERO CDUS IF IMU IN GIMBAL LOCK AND
055075,000048: 07,2716           74771                           MASK     BITS4&6                               #  COARSE ALIGN (GIMBAL RUNAWAY PROTECTION)
055076,000049: 07,2717           10000                           CCS      A                                     
055077,000050: 07,2720           12724                           TCF      IMUZEROA                              
055078,000051: 
055079,000052: 07,2721           05567                           TC       ALARM                                 #  IF SO.
055080,000053: 07,2722           00206                           OCT      00206                                 
055081,000054: 
055082,000055: 07,2723           13657                           TCF      CAGETSTJ   +4                         #  IMMEDIATE FAILURE.
055083,000056: 
055084,000057: 07,2724           03653        IMUZEROA           TC       CAGETSTJ                              
055085,000058:                                                                                                  #  DELETE
055086,000059: 07,2725           41303                           CS       IMODES33                              #  DISABLE DAP AUTO AND HOLD MODES
055087,000060: 07,2726           74773                           MASK     SUPER011                              #        BIT5 FOR GROUND
055088,000061: 07,2727           27303                           ADS      IMODES33                              
055089,000062: 
055090,000063: 07,2730           41302                           CS       IMODES30                              #  INHIBIT ICDUFAIL AND IMUFAIL (IN CASE WE
055091,000064: 07,2731           75751                           MASK     BITS3&4                               #  JUST CAME OUT OF COARSE ALIGN).
055092,000065: 07,2732           27302                           ADS      IMODES30                              
055093,000066: 
055094,000067: 07,2733           44771                           CS       BITS4&6                               #  SEND ZERO ENCODE WITH COARSE AND ERROR
055095,000068: 07,2734           00006                           EXTEND                                         #  COUNTER DISABLED.
055096,000069: 07,2735           03012                           WAND     CHAN12                                
055097,000070: 
055098,000071: 07,2736           03266                           TC       NOATTOFF                              #  TURN OFF NO ATT LAMP.
055099,000072: 
055100,000073: 07,2737           34747                           CAF      BIT5                                  
055101,000074: 07,2740           00006                           EXTEND                                         
055102,000075: 07,2741           05012                           WOR      CHAN12                                
055103,000076: 
055104,000077: 07,2742           05457                           TC       ZEROICDU                              
055105,000078: 07,2743           34746                           CAF      BIT6                                  #  WAIT 320 MS TO GIVE AGS ADEQUATE TIME TO
055106,000079: 07,2744           05203                           TC       WAITLIST                              #  RECEIVE ITS PULSE TRAIN.
055107,000080: 07,2745  E3,1474                                  EBANK=   CDUIND                                
055108,000081: 07,2745           02757 16103                     2CADR    IMUZERO2                              
055109,000082: 
055110,000083: 07,2747           41302                           CS       IMODES30                              #  SEE IF IMU OPERATING AND ALARM IF NOT.
055111,000084: 07,2750           74743                           MASK     BIT9                                  
055112,000085: 07,2751           10000                           CCS      A                                     
055113,000086: 07,2752           12755                           TCF      MODEEXIT                              

Page 1311

055115,000088: 07,2753           05567                           TC       ALARM                                 
055116,000089: 07,2754           00210                           OCT      210                                   
055117,000090: 
055118,000091: 07,2755           00003        MODEEXIT           RELINT                                         #  GENERAL MODE-SWITCHING EXIT.
055119,000092: 07,2756           14631                           TCF      SWRETURN                              
055120,000093: 
055121,000094: 07,2757           03641        IMUZERO2           TC       CAGETEST                              
055122,000095: 07,2760           05457                           TC       ZEROICDU                              #  ZERO CDUX, CDUY, CDUZ
055123,000096: 
055124,000097: 07,2761           44747                           CS       BIT5                                  #  REMOVE ZERO DISCRETE.
055125,000098: 07,2762           00006                           EXTEND                                         
055126,000099: 07,2763           03012                           WAND     CHAN12                                
055127,000100: 
055128,000101: 07,2764           34741                           CAF      BIT11                                 #  WAIT 10 SECS FOR CTRS TO FIND GIMBALS
055129,000102: 07,2765           05224                           TC       VARDELAY                              
055130,000103: 
055131,000104: 07,2766           03641        IMUZERO3           TC       CAGETEST                              
055132,000105: 07,2767           45751                           CS       BITS3&4                               #  REMOVE IMUFAIL AND ICDUFAIL INHIBIT.
055133,000106: 07,2770           71302                           MASK     IMODES30                              
055134,000107: 07,2771           55302                           TS       IMODES30                              
055135,000108: 
055136,000109: 07,2772           44773                           CS       SUPER011                              #  ENABLE DAP AUTO AND HOLD MODES
055137,000110: 07,2773           71303                           MASK     IMODES33                              #        BIT5 FOR GROUND
055138,000111: 07,2774           55303                           TS       IMODES33                              
055139,000112: 
055140,000113: 07,2775           04674                           TC       IBNKCALL                              #  SET ISS WARNING IF EITHER OF ABOVE ARE
055141,000114: 07,2776           14703                           CADR     SETISSW                               #  PRESENT.
055142,000115: 
055143,000116: 07,2777           13631                           TCF      ENDIMU                                
055144,000117: 

Page 1312

055146,000119:                                                                                                  #  IMU COARSE ALIGN MODE.
055147,000120: 
055148,000121: 07,3000           00004        IMUCOARS           INHINT                                         
055149,000122: 07,3001           03653                           TC       CAGETSTJ                              
055150,000123: 07,3002           03144                           TC       SETCOARS                              
055151,000124: 
055152,000125: 07,3003           36242                           CAF      SIX                                   
055153,000126: 07,3004           05203                           TC       WAITLIST                              
055154,000127: 07,3005  E3,1474                                  EBANK=   CDUIND                                
055155,000128: 07,3005           03010 16103                     2CADR    COARS                                 
055156,000129: 
055157,000130: 07,3007           12755                           TCF      MODEEXIT                              
055158,000131: 
055159,000132: 07,3010           03641        COARS              TC       CAGETEST                              
055160,000133: 07,3011           34746                           CAF      BIT6                                  #  ENABLE ALL THREE ISS CDU ERROR COUNTERS
055161,000134: 07,3012           00006                           EXTEND                                         
055162,000135: 07,3013           05012                           WOR      CHAN12                                
055163,000136: 
055164,000137: 07,3014           34752                           CAF      TWO                                   #  SET CDU INDICATOR
055165,000138: 07,3015           55474        COARS1             TS       CDUIND                                
055166,000139: 
055167,000140: 07,3016           51474                           INDEX    CDUIND                                #  COMPUTE THETAD - THETAA IN 1:S
055168,000141: 07,3017           30321                           CA       THETAD                                #        COMPLEMENT FORM
055169,000142: 07,3020           00006                           EXTEND                                         
055170,000143: 07,3021           51474                           INDEX    CDUIND                                
055171,000144: 07,3022           20032                           MSU      CDUX                                  
055172,000145: 07,3023           00006                           EXTEND                                         
055173,000146: 07,3024           74737                           MP       BIT13                                 #  SHIFT RIGHT 2
055174,000147: 07,3025           56001                           XCH      L                                     #  ROUND
055175,000148: 07,3026           60000                           DOUBLE                                         
055176,000149: 07,3027           54061                           TS       ITEMP1                                
055177,000150: 07,3030           13032                           TCF      +2                                    
055178,000151: 07,3031           26001                           ADS      L                                     
055179,000152: 
055180,000153: 07,3032           51474                           INDEX    CDUIND                                #  DIFFERENCE TO BE COMPUTED
055181,000154: 07,3033           23471                           LXCH     COMMAND                               
055182,000155: 07,3034           11474                           CCS      CDUIND                                
055183,000156: 07,3035           03015                           TC       COARS1                                
055184,000157: 
055185,000158: 07,3036           34752                           CAF      TWO                                   #  MINIMUM OF 4 MS WAIT
055186,000159: 07,3037           05224                           TC       VARDELAY                              
055187,000160: 

Page 1313

055189,000162: 07,3040           03641        COARS2             TC       CAGETEST                              #  DONT CONTINUE IF CAGED.
055190,000163: 07,3041           54061                           TS       ITEMP1                                #  SETS TO +0.
055191,000164: 07,3042           34752                           CAF      TWO                                   #  SET CDU INDICATOR
055192,000165: 07,3043           55474                 +3        TS       CDUIND                                
055193,000166: 
055194,000167: 07,3044           51474                           INDEX    CDUIND                                
055195,000168: 07,3045           11471                           CCS      COMMAND                               #  NUMBER OF PULSES REQUIRED
055196,000169: 07,3046           03052                           TC       COMPOS                                #  GREATER THAN MAX ALLOWED
055197,000170: 07,3047           03061                           TC       NEXTCDU    +1                         
055198,000171: 07,3050           03117                           TC       COMNEG                                
055199,000172: 07,3051           03061                           TC       NEXTCDU    +1                         
055200,000173: 
055201,000174: 07,3052           63745        COMPOS             AD       -COMMAX                               #  COMMAX = MAX NUMBER OF PULSES ALLOWED
055202,000175: 07,3053           00006                           EXTEND                                         #        MINUS ONE
055203,000176: 07,3054           63127                           BZMF     COMZERO                               
055204,000177: 07,3055           51474                           INDEX    CDUIND                                
055205,000178: 07,3056           55471                           TS       COMMAND                               #  REDUCE COMMAND BY MAX NUMBER OF PULSES
055206,000179: 07,3057           43746                           CS       -COMMAX-                              #        ALLOWED
055207,000180: 
055208,000181: 07,3060           24061        NEXTCDU            INCR     ITEMP1                                
055209,000182: 07,3061           64754                           AD       NEG0                                  
055210,000183: 07,3062           51474                           INDEX    CDUIND                                
055211,000184: 07,3063           54050                           TS       CDUXCMD                               #  SET UP COMMAND REGISTER.
055212,000185: 
055213,000186: 07,3064           11474                           CCS      CDUIND                                
055214,000187: 07,3065           03043                           TC       COARS2     +3                         
055215,000188: 
055216,000189: 07,3066           10061                           CCS      ITEMP1                                #  SEE IF ANY PULSES TO GO OUT.
055217,000190: 07,3067           13133                           TCF      SENDPULS                              
055218,000191: 
055219,000192: 07,3070           05221                           TC       FIXDELAY                              #  WAIT FOR GIMBALS TO SETTLE.
055220,000193: 07,3071           00226                           DEC      150        B-14                       
055221,000194: 
055222,000195: 07,3072           34752                           CAF      TWO                                   #  AT END OF COMMAND, CHECK TO SEE THAT
055223,000196: 07,3073           54061        CHKCORS            TS       ITEMP1                                #  GIMBALS ARE WITHIN 2 DEGREES OF THETAD.
055224,000197: 07,3074           50000                           INDEX    A                                     
055225,000198: 07,3075           30032                           CA       CDUX                                  
055226,000199: 07,3076           00006                           EXTEND                                         
055227,000200: 07,3077           50061                           INDEX    ITEMP1                                
055228,000201: 07,3100           20321                           MSU      THETAD                                
055229,000202: 07,3101           10000                           CCS      A                                     
055230,000203: 07,3102           13110                           TCF      COARSERR                              
055231,000204: 07,3103           13105                           TCF      CORSCHK2                              
055232,000205: 07,3104           13110                           TCF      COARSERR                              
055233,000206: 

Page 1314

055235,000208: 07,3105           10061        CORSCHK2           CCS      ITEMP1                                
055236,000209: 07,3106           13073                           TCF      CHKCORS                               
055237,000210: 07,3107           13631                           TCF      ENDIMU                                #  END OF COARSE ALIGNMENT.
055238,000211: 
055239,000212: 07,3110           63116        COARSERR           AD       COARSTOL                              #  2 DEGREES.
055240,000213: 07,3111           00006                           EXTEND                                         
055241,000214: 07,3112           63105                           BZMF     CORSCHK2                              
055242,000215: 
055243,000216: 07,3113           05567                           TC       ALARM                                 #  COARSE ALIGN ERROR.
055244,000217: 07,3114           00211                           OCT      211                                   
055245,000218: 
055246,000219: 07,3115           13637                           TCF      IMUBAD                                
055247,000220: 
055248,000221: 07,3116           77511        COARSTOL           DEC      -.01111                               #  2 DEGREES SCALED AT HALF-REVOLUTIONS
055249,000222: 
055250,000223: 07,3117           63745        COMNEG             AD       -COMMAX                               
055251,000224: 07,3120           00006                           EXTEND                                         
055252,000225: 07,3121           63127                           BZMF     COMZERO                               
055253,000226: 07,3122           40000                           COM                                            
055254,000227: 07,3123           51474                           INDEX    CDUIND                                
055255,000228: 07,3124           55471                           TS       COMMAND                               
055256,000229: 07,3125           33746                           CA       -COMMAX-                              
055257,000230: 07,3126           03060                           TC       NEXTCDU                               
055258,000231: 
055259,000232: 07,3127           34755        COMZERO            CAF      ZERO                                  
055260,000233: 07,3130           51474                           INDEX    CDUIND                                
055261,000234: 07,3131           57471                           XCH      COMMAND                               
055262,000235: 07,3132           03060                           TC       NEXTCDU                               
055263,000236: 
055264,000237: 07,3133           37740        SENDPULS           CAF      13,14,15                              
055265,000238: 07,3134           00006                           EXTEND                                         
055266,000239: 07,3135           05014                           WOR      CHAN14                                
055267,000240: 07,3136           33747                           CAF      600MS                                 
055268,000241: 07,3137           13037                           TCF      COARS2     -1                         #  THEN TO VARDELAY
055269,000242: 
055270,000243: 07,3140           34746        CA+ECE             CAF      BIT6                                  #  ENABLE ALL THREE ISS CDU ERROR COUNTERS
055271,000244: 07,3141           00006                           EXTEND                                         
055272,000245: 07,3142           05012                           WOR      CHAN12                                
055273,000246: 07,3143           05261                           TC       TASKOVER                              
055274,000247: 

Page 1315

055276,000249: 07,3144           34750        SETCOARS           CAF      BIT4                                  #  BYPASS IF ALREADY IN COARSE ALIGN
055277,000250: 07,3145           00006                           EXTEND                                         
055278,000251: 07,3146           02012                           RAND     CHAN12                                
055279,000252: 07,3147           10000                           CCS      A                                     
055280,000253: 07,3150           00002                           TC       Q                                     
055281,000254: 
055282,000255: 07,3151           44746                           CS       BIT6                                  #  CLEAR ISS ERROR COUNTERS
055283,000256: 07,3152           00006                           EXTEND                                         
055284,000257: 07,3153           03012                           WAND     CHAN12                                
055285,000258: 
055286,000259: 07,3154           44742                           CS       BIT10                                 #  KNOCK DOWN GYRO ACTIVITY
055287,000260: 07,3155           00006                           EXTEND                                         
055288,000261: 07,3156           03014                           WAND     CHAN14                                
055289,000262: 07,3157           44755                           CS       ZERO                                  
055290,000263: 07,3160           54047                           TS       GYROCMD                               
055291,000264: 
055292,000265: 07,3161           34750                           CAF      BIT4                                  #  PUT ISS IN COARSE ALIGN
055293,000266: 07,3162           00006                           EXTEND                                         
055294,000267: 07,3163           05012                           WOR      CHAN12                                
055295,000268: 
055296,000269: 07,3164           41036                           CS       DSPTAB     +11D                       #  TURN ON NO ATT LAMP
055297,000270: 07,3165           73207                           MASK     OCT40010                              
055298,000271: 07,3166           27036                           ADS      DSPTAB     +11D                       
055299,000272: 
055300,000273: 07,3167           41303                           CS       IMODES33                              #  DISABLE DAP AUTO AND HOLD MODES
055301,000274: 07,3170           74746                           MASK     BIT6                                  
055302,000275: 07,3171           27303                           ADS      IMODES33                              
055303,000276: 
055304,000277: 07,3172           41302                           CS       IMODES30                              #  DISABLE IMUFAIL
055305,000278: 07,3173           74750                           MASK     BIT4                                  
055306,000279: 07,3174           27302                           ADS      IMODES30                              
055307,000280: 
055308,000281: 07,3175           44747        RNDREFDR           CS       TRACKBIT                              #  CLEAR TRACK FLAG
055309,000282: 07,3176           70075                           MASK     FLAGWRD1                              
055310,000283: 07,3177           54075                           TS       FLAGWRD1                              
055311,000284: 
055312,000285: 07,3200           44735                           CS       DRFTBIT                               #  CLEAR DRIFT FLAG
055313,000286: 07,3201           70076                           MASK     FLAGWRD2                              
055314,000287: 07,3202           54076                           TS       FLAGWRD2                              
055315,000288: 
055316,000289: 07,3203           44737                           CS       REFSMBIT                              #  CLEAR REFSMMAT FLAG
055317,000290: 07,3204           70077                           MASK     FLAGWRD3                              
055318,000291: 07,3205           54077                           TS       FLAGWRD3                              
055319,000292: 
055320,000293: 07,3206           00002                           TC       Q                                     
055321,000294: 
055322,000295: 07,3207           40010        OCT40010           OCT      40010                                 
055323,000296: 

Page 1316

055325,000298:                                                                                                  #  IMU FINE ALIGN MODE SWITCH.
055326,000299: 
055327,000300: 07,3210           00004        IMUFINE            INHINT                                         
055328,000301: 07,3211           03653                           TC       CAGETSTJ                              #  SEE IF IMU BEING CAGED.
055329,000302: 
055330,000303: 07,3212           43744                           CS       BITS4-5                               #  RESET ZERO AND COARSE
055331,000304: 07,3213           00006                           EXTEND                                         
055332,000305: 07,3214           03012                           WAND     CHAN12                                
055333,000306: 
055334,000307: 07,3215           44746                           CS       BIT6                                  #  INSURE DAP AUTO AND HOLD MODES ENABLED
055335,000308: 07,3216           71303                           MASK     IMODES33                              
055336,000309: 07,3217           55303                           TS       IMODES33                              
055337,000310: 
055338,000311: 07,3220           03266                           TC       NOATTOFF                              
055339,000312: 
055340,000313: 07,3221           34742                           CAF      BIT10                                 #  IMU FAIL WAS INHIBITED DURING THE
055341,000314: 07,3222           05203                           TC       WAITLIST                              #  PRESUMABLY PRECEDING COARSE ALIGN.  LEAVE
055342,000315: 07,3223  E3,1474                                  EBANK=   CDUIND                                
055343,000316: 07,3223           03234 16103                     2CADR    IFAILOK                               #  IT ON FOR THE FIRST 5 SECS OF FINE ALIGN
055344,000317: 
055345,000318: 07,3225           35000                           CAF      2SECS                                 
055346,000319: 07,3226           05203                           TC       WAITLIST                              
055347,000320: 07,3227  E3,1474                                  EBANK=   CDUIND                                
055348,000321: 07,3227           03232 16103                     2CADR    IMUFINED                              
055349,000322: 
055350,000323: 07,3231           12755                           TCF      MODEEXIT                              
055351,000324: 
055352,000325: 07,3232           03641        IMUFINED           TC       CAGETEST                              #  SEE THAT NO ONE HAS CAGED THE IMU.
055353,000326: 07,3233           13631                           TCF      ENDIMU                                
055354,000327: 

Page 1317

055356,000329: 07,3234           03646        IFAILOK            TC       CAGETSTQ                              #  ENABLE IMU FIAL UNLESS IMU BEING CAGED.
055357,000330: 07,3235           15261                           TCF      TASKOVER                              #  IT IS.
055358,000331: 
055359,000332: 07,3236           34750                           CAF      BIT4                                  #  DONT RESET IMU FAIL INHIBIT IF SOMEONE
055360,000333: 07,3237           00006                           EXTEND                                         #  HAS GONE INTO COARSE ALIGN.
055361,000334: 07,3240           02012                           RAND     CHAN12                                
055362,000335: 07,3241           10000                           CCS      A                                     
055363,000336: 07,3242           15261                           TCF      TASKOVER                              
055364,000337: 
055365,000338: 07,3243           41302                           CS       IMODES30                              #  RESET IMUFAIL.
055366,000339: 07,3244           74737                           MASK     BIT13                                 
055367,000340: 07,3245           27302                           ADS      IMODES30                              
055368,000341: 07,3246           44750                           CS       BIT4                                  
055369,000342: 07,3247           71302        PFAILOK2           MASK     IMODES30                              
055370,000343: 07,3250           55302                           TS       IMODES30                              
055371,000344: 07,3251           04674                           TC       IBNKCALL                              #  THE ISS WARNING LIGHT MAY COME ON NOW
055372,000345: 07,3252           14703                           CADR     SETISSW                               #  THAT THE INHIBIT HAS BEEN REMOVED.
055373,000346: 07,3253           15261                           TCF      TASKOVER                              
055374,000347: 
055375,000348: 07,3254           03646        PFAILOK            TC       CAGETSTQ                              #  ENABLE PIP FAIL PROG ALARM.
055376,000349: 07,3255           15261                           TCF      TASKOVER                              
055377,000350: 
055378,000351: 07,3256           41302                           CS       IMODES30                              #  RESET IMU AND PIPA FAIL BITS.
055379,000352: 07,3257           74742                           MASK     BIT10                                 
055380,000353: 07,3260           27302                           ADS      IMODES30                              
055381,000354: 
055382,000355: 07,3261           41303                           CS       IMODES33                              
055383,000356: 07,3262           74737                           MASK     BIT13                                 
055384,000357: 07,3263           27303                           ADS      IMODES33                              
055385,000358: 
055386,000359: 07,3264           44747                           CS       BIT5                                  
055387,000360: 07,3265           13247                           TCF      PFAILOK2                              
055388,000361: 
055389,000362: 07,3266           43207        NOATTOFF           CS       OCT40010                              #  SUBROUTINE TO TURN OFF NO ATT LAMP.
055390,000363: 07,3267           71036                           MASK     DSPTAB     +11D                       
055391,000364: 07,3270           64735                           AD       BIT15                                 
055392,000365: 07,3271           55036                           TS       DSPTAB     +11D                       
055393,000366: 07,3272           00002                           TC       Q                                     
055394,000367: 

Page 1318

055396,000369:                                                                                                  #  ROUITNES TO INITIATE AND TERMINATE PROGRAM USE OF THE PIPAS.  NO IMUSTALL REQUIRED IN EITHER CASE.
055397,000370: 
055398,000371: 07,3273           44755        PIPUSE             CS       ZERO                                  
055399,000372: 07,3274           54037                           TS       PIPAX                                 
055400,000373: 07,3275           54040                           TS       PIPAY                                 
055401,000374: 07,3276           54041                           TS       PIPAZ                                 
055402,000375: 
055403,000376: 07,3277           03646        PIPUSE1            TC       CAGETSTQ                              #  DO NOT ENABLE PIPA FAIL IF IMU IS CAGED
055404,000377: 07,3300           14631                           TCF      SWRETURN                              
055405,000378: 
055406,000379: 07,3301           00004                           INHINT                                         
055407,000380: 07,3302           44753                           CS       BIT1                                  #  IF PIPA FAILS FROM NOW ON (UNTIL
055408,000381: 07,3303           71302                           MASK     IMODES30                              #  PIPFREE), LIGHT ISS WARNING.
055409,000382: 07,3304           55302                           TS       IMODES30                              
055410,000383: 
055411,000384: 07,3305           04674        PIPFREE2           TC       IBNKCALL                              #  ISS WARNING MIGHT COME ON NOW.
055412,000385: 07,3306           14703                           CADR     SETISSW                               #  (OR GO OFF ON PIPFREE).
055413,000386: 
055414,000387: 07,3307           12755                           TCF      MODEEXIT                              
055415,000388: 
055416,000389: 07,3310           00004        PIPFREE            INHINT                                         #  PROGRAM DONE WITH PIPAS.  DONT LIGHT
055417,000390: 07,3311           41302                           CS       IMODES30                              #  ISS WARNING.
055418,000391: 07,3312           74753                           MASK     BIT1                                  
055419,000392: 07,3313           27302                           ADS      IMODES30                              
055420,000393: 
055421,000394: 07,3314           74742                           MASK     BIT10                                 #  IF PIP FAIL ON, DO PROG ALSRM AND RESET
055422,000395: 07,3315           10000                           CCS      A                                     #  ISS WARNING.
055423,000396: 07,3316           12755                           TCF      MODEEXIT                              
055424,000397: 
055425,000398: 07,3317           05567                           TC       ALARM                                 
055426,000399: 07,3320           00212                           OCT      212                                   
055427,000400: 
055428,000401: 07,3321           00004                           INHINT                                         
055429,000402: 
055430,000403: 07,3322           13305                           TCF      PIPFREE2                              
055431,000404: 

Page 1319

055433,000406:                                                                                                  #  THE FOLLOWING ROUTINE TORQUES THE IRIGS ACCORDING TO DOUBLE PRECISION INPUTS IN THE SIX REGISTERS
055434,000407:                                                                                                  #  BEGINNING AT THE ECADR ARRIVING IN A.  THE MINIMUM SIZE OF ANY PULSE TRAIN IS 16 PULSES (.25 CDU COUNTS).  THE
055435,000408:                                                                                                  #  UNSENT PORTION OF THE COMMAND IS LEFT INTACT IN THE INPUT COMMAND REGISTERS.
055436,000409: 
055437,000410: 07,3323  E3,1400                                  EBANK=   1400                                  #  VARIABLE, ACTUALLY.
055438,000411: 
055439,000412: 07,3323           54161        IMUPULSE           TS       MPAC       +5                         #  SAVE ARRIVING ECADR.
055440,000413: 07,3324           03653                           TC       CAGETSTJ                              #  DONT PROCEED IF IMU BEING CAGED.
055441,000414: 
055442,000415: 07,3325           11314                           CCS      LGYRO                                 #  SEE IF GYROS BUSY.
055443,000416: 07,3326           03367                           TC       GYROBUSY                              #  SLEEP.
055444,000417: 
055445,000418: 07,3327           54156                           TS       MPAC       +2                         
055446,000419: 07,3330           34746                           CAF      BIT6                                  #  ENABLE THE POWER SUPPLY.
055447,000420: 07,3331           00006                           EXTEND                                         
055448,000421: 07,3332           05014                           WOR      CHAN14                                
055449,000422: 
055450,000423: 07,3333           34751                           CAF      FOUR                                  
055451,000424: 07,3334           05203        GWAKE2             TC       WAITLIST                              #  (IF A JOB WAS PUT TO SLEEP, THE POWER
055452,000425: 07,3335  E3,1474                                  EBANK=   CDUIND                                #  SUPPLY IS LEFT ON BY THE WAKING JOB).
055453,000426: 07,3335           03405 16103                     2CADR    STRTGYRO                              
055454,000427: 
055455,000428: 07,3337           30161                           CA       MPAC       +5                         #  SET UP EBANK, SAVING CALLER'S EBANK FOR
055456,000429: 07,3340           56003                           XCH      EBANK                                 #  RESTORATION ON RETURN.
055457,000430: 07,3341           56161                           XCH      MPAC       +5                         
055458,000431: 07,3342           55314                           TS       LGYRO                                 #  RESERVES GYROS.
055459,000432: 07,3343           74357                           MASK     LOW8                                  
055460,000433: 07,3344           54061                           TS       ITEMP1                                
055461,000434: 
055462,000435: 07,3345           34752                           CAF      TWO                                   #  FORCE SIGN AGREEMENT ON INPUTS.
055463,000436: 07,3346           54157        GYROAGRE           TS       MPAC       +3                         
055464,000437: 07,3347           60000                           DOUBLE                                         
055465,000438: 07,3350           60061                           AD       ITEMP1                                
055466,000439: 07,3351           54160                           TS       MPAC       +4                         
055467,000440: 07,3352           00006                           EXTEND                                         
055468,000441: 07,3353           50000                           INDEX    A                                     
055469,000442: 07,3354           31401                           DCA      1400                                  
055470,000443: 07,3355           52155                           DXCH     MPAC                                  
055471,000444: 07,3356           07257                           TC       TPAGREE                               
055472,000445: 07,3357           52155                           DXCH     MPAC                                  
055473,000446: 07,3360           50160                           INDEX    MPAC       +4                         
055474,000447: 07,3361           53401                           DXCH     1400                                  
055475,000448: 
055476,000449: 07,3362           10157                           CCS      MPAC       +3                         
055477,000450: 07,3363           13346                           TCF      GYROAGRE                              
055478,000451: 
055479,000452: 07,3364           30161                           CA       MPAC       +5                         #  RESTORE CALLER'S EBANK.
055480,000453: 07,3365           54003                           TS       EBANK                                 
055481,000454: 07,3366           12755                           TCF      MODEEXIT                              
055482,000455: 

Page 1320

055484,000457:                                                                                                  #  ROUTINES TO ALLOW TORQUING BY ONLY ONE JOB AT A TIME.
055485,000458: 
055486,000459: 07,3367           00006        GYROBUSY           EXTEND                                         #  SAVE RETURN 2FCADR.
055487,000460: 07,3370           30134                           DCA      BUF2                                  
055488,000461: 07,3371           52155                           DXCH     MPAC                                  
055489,000462: 07,3372           33404        REGSLEEP           CAF      LGWAKE                                
055490,000463: 07,3373           15133                           TCF      JOBSLEEP                              
055491,000464: 
055492,000465: 07,3374           11314        GWAKE              CCS      LGYRO                                 #  WHEN AWAKENED, SEE IF GYROS STILL BUSY.
055493,000466: 07,3375           13372                           TCF      REGSLEEP                              #  IF SO, SLEEP SOME MORE.
055494,000467: 
055495,000468: 07,3376           54156                           TS       MPAC       +2                         
055496,000469: 07,3377           00006                           EXTEND                                         
055497,000470: 07,3400           30155                           DCA      MPAC                                  
055498,000471: 07,3401           52134                           DXCH     BUF2                                  #  RESTORE SWRETURN INFO.
055499,000472: 07,3402           34753                           CAF      ONE                                   
055500,000473: 07,3403           13334                           TCF      GWAKE2                                
055501,000474: 
055502,000475: 07,3404           17374        LGWAKE             CADR     GWAKE                                 
055503,000476: 

Page 1321

055505,000478:                                                                                                  #  GYRO-TORQUING WAITLIST TASKS.
055506,000479: 
055507,000480: 07,3405           43626        STRTGYRO           CS       GDESELCT                              #  DE-SELECT LAST GYRO.
055508,000481: 07,3406           00006                           EXTEND                                         
055509,000482: 07,3407           03014                           WAND     CHAN14                                
055510,000483: 
055511,000484: 07,3410           03641                           TC       CAGETEST                              
055512,000485: 
055513,000486: 07,3411           31314        STRTGYR2           CA       LGYRO                                 #  JUMP ON PHASE COUNTER IN BITS 13-14.
055514,000487: 07,3412           00006                           EXTEND                                         
055515,000488: 07,3413           74750                           MP       BIT4                                  
055516,000489: 07,3414           50000                           INDEX    A                                     
055517,000490: 07,3415           13416                           TCF      +1                                    
055518,000491: 07,3416           03433                           TC       GSELECT                               #  =0.  DO Y GYRO.
055519,000492: 07,3417           00202                           OCT      00202                                 
055520,000493: 
055521,000494: 07,3420           03433                           TC       GSELECT                               #  =1.  DO Z GYRO.
055522,000495: 07,3421           00302                           OCT      00302                                 
055523,000496: 
055524,000497: 07,3422           03431                           TC       GSELECT    -2                         #  =2.  DO X GYRO.
055525,000498: 07,3423           00100                           OCT      00100                                 
055526,000499: 
055527,000500: 07,3424           34755                           CAF      ZERO                                  #  =3.  DONE
055528,000501: 07,3425           55314                           TS       LGYRO                                 
055529,000502: 07,3426           33404                           CAF      LGWAKE                                #  WAKE A POSSIBLE SLEEPING JOB.
055530,000503: 07,3427           05137                           TC       JOBWAKE                               
055531,000504: 
055532,000505: 07,3430           13232        NORESET            TCF      IMUFINED                              #  DO NOT RESET POWER SUPPLY

Page 1322

055534,000507: 07,3431           44751                 -2        CS       FOUR                                  #  SPECIAL ENTRY TO REGRESS LGYRO FOR X.
055535,000508: 07,3432           27314                           ADS      LGYRO                                 
055536,000509: 
055537,000510: 07,3433           50002        GSELECT            INDEX    Q                                     #  SELECT GYRO.
055538,000511: 07,3434           30000                           CAF      0                                     #  PACKED WORD CONTAINS GYRO SELECT BITS
055539,000512: 07,3435           54064                           TS       ITEMP4                                #  AND INCREMENT TO LGYRO.
055540,000513: 07,3436           74757                           MASK     SEVEN                                 
055541,000514: 07,3437           64737                           AD       BIT13                                 
055542,000515: 07,3440           27314                           ADS      LGYRO                                 
055543,000516: 07,3441           54003                           TS       EBANK                                 
055544,000517: 07,3442           74357                           MASK     LOW8                                  
055545,000518: 07,3443           54061                           TS       ITEMP1                                
055546,000519: 
055547,000520: 07,3444           44757                           CS       SEVEN                                 
055548,000521: 07,3445           70064                           MASK     ITEMP4                                
055549,000522: 07,3446           54064                           TS       ITEMP4                                
055550,000523: 
055551,000524: 07,3447           00006                           EXTEND                                         #  MOVE DP COMMAND TO RUPTREGS FOR TESTING.
055552,000525: 07,3450           50061                           INDEX    ITEMP1                                
055553,000526: 07,3451           31401                           DCA      1400                                  
055554,000527: 07,3452           52071                           DXCH     RUPTREG1                              
055555,000528: 
055556,000529: 07,3453           10070                           CCS      RUPTREG1                              
055557,000530: 07,3454           13467                           TCF      MAJ+                                  
055558,000531: 07,3455           13457                           TCF      +2                                    
055559,000532: 07,3456           13607                           TCF      MAJ-                                  
055560,000533: 
055561,000534: 07,3457           10071                           CCS      RUPTREG2                              
055562,000535: 07,3460           13464                           TCF      MIN+                                  
055563,000536: 07,3461           13411                           TCF      STRTGYR2                              
055564,000537: 07,3462           13604                           TCF      MIN-                                  
055565,000538: 07,3463           13411                           TCF      STRTGYR2                              
055566,000539: 

Page 1323

055568,000541: 07,3464           63520        MIN+               AD       -GYROMIN                              #  SMALL POSITIVE COMMAND.  SEE IF AT LEAST
055569,000542: 07,3465           00006                           EXTEND                                         #  16 GYRO PULSES.
055570,000543: 07,3466           63411                           BZMF     STRTGYR2                              
055571,000544: 
055572,000545: 07,3467           00006        MAJ+               EXTEND                                         #  DEFINITE POSITIVE OUTPUT.
055573,000546: 07,3470           33630                           DCA      GYROFRAC                              
055574,000547: 07,3471           20071                           DAS      RUPTREG1                              
055575,000548: 
055576,000549: 07,3472           30064                           CA       ITEMP4                                #  SELECT POSITIVE TORQUING FOR THIS GYRO.
055577,000550: 07,3473           00006                           EXTEND                                         
055578,000551: 07,3474           05014                           WOR      CHAN14                                
055579,000552: 
055580,000553: 07,3475           36074                           CAF      LOW7                                  #  LEAVE NUMBER OF POSSIBLE 8192 AUGMENTS
055581,000554: 07,3476           70071                           MASK     RUPTREG2                              #  TO INITIAL COMMAND IN MAJOR PART OF LONG
055582,000555: 07,3477           56071                           XCH      RUPTREG2                              #  TERM STORAGE AND TRUNCATED FRACTION
055583,000556: 07,3500           00006        GMERGE             EXTEND                                         #  IN MINOR PART.  THE MAJOR PART WILL BE
055584,000557: 07,3501           74744                           MP       BIT8                                  #  COUNTED DOWN TO ZERO IN THE COURSE OF
055585,000558: 07,3502           54062                           TS       ITEMP2                                #  PUTTING OUT THE ENTIRE COMMAND.
055586,000559: 07,3503           30070                           CA       RUPTREG1                              
055587,000560: 07,3504           00006                           EXTEND                                         
055588,000561: 07,3505           74743                           MP       BIT9                                  
055589,000562: 07,3506           54070                           TS       RUPTREG1                              
055590,000563: 07,3507           30001                           CA       L                                     
055591,000564: 07,3510           00006                           EXTEND                                         
055592,000565: 07,3511           74736                           MP       BIT14                                 
055593,000566: 07,3512           26062                           ADS      ITEMP2                                #  INITIAL COMMAND.
055594,000567: 
055595,000568: 07,3513           00006                           EXTEND                                         #  SEE IF MORE THAN ONE PULSE TRAIN NEEDED
055596,000569: 07,3514           30071                           DCA      RUPTREG1                              #  (MORE THAN 16383 PULSES).
055597,000570: 07,3515           67747                           AD       MINUS1                                
055598,000571: 07,3516           10000                           CCS      A                                     
055599,000572: 07,3517           13543                           TCF      LONGGYRO                              
055600,000573: 07,3520           77601        -GYROMIN           OCT      -176                                  #  MAY BE ADJUSTED TO SPECIFY MINIMUM CMD
055601,000574: 07,3521           13525                           TCF      +4                                    
055602,000575: 
055603,000576: 07,3522           34736                           CAF      BIT14                                 
055604,000577: 07,3523           26062                           ADS      ITEMP2                                
055605,000578: 07,3524           34755                           CAF      ZERO                                  
055606,000579: 
055607,000580: 07,3525           50061                 +4        INDEX    ITEMP1                                
055608,000581: 07,3526           53401                           DXCH     1400                                  

Page 1324

055610,000583: 07,3527           30062                           CA       ITEMP2                                #  ENTIRE COMMAND.
055611,000584: 07,3530           54047        LASTSEG            TS       GYROCMD                               
055612,000585: 07,3531           00006                           EXTEND                                         
055613,000586: 07,3532           74742                           MP       BIT10                                 #  WAITLIST DT
055614,000587: 07,3533           66245                           AD       THREE                                 #  TRUNCATION AND PHASE UNCERTAINTIES.
055615,000588: 07,3534           05203                           TC       WAITLIST                              
055616,000589: 07,3535  E3,1474                                  EBANK=   CDUIND                                
055617,000590: 07,3535           03405 16103                     2CADR    STRTGYRO                              
055618,000591: 
055619,000592: 07,3537           34742        GYROEXIT           CAF      BIT10                                 
055620,000593: 07,3540           00006                           EXTEND                                         
055621,000594: 07,3541           05014                           WOR      CHAN14                                
055622,000595: 07,3542           15261                           TCF      TASKOVER                              
055623,000596: 
055624,000597: 07,3543           50061        LONGGYRO           INDEX    ITEMP1                                
055625,000598: 07,3544           53401                           DXCH     1400                                  #  INITIAL COMMAND OUT PLUS N AUGMENTS OF
055626,000599: 07,3545           34736                           CAF      BIT14                                 #  8192.  INITIAL COMMAND IS AT LEAST 8192.
055627,000600: 07,3546           60062                           AD       ITEMP2                                
055628,000601: 07,3547           54047                           TS       GYROCMD                               
055629,000602: 
055630,000603: 07,3550           00006        AUG3               EXTEND                                         #  GET WAITLIST DT TO TIME WHEN TRAIN IS
055631,000604: 07,3551           74742                           MP       BIT10                                 #  ALMOST OUT.
055632,000605: 07,3552           67745                           AD       NEG3                                  
055633,000606: 07,3553           05203                           TC       WAITLIST                              
055634,000607: 07,3554  E3,1474                                  EBANK=   CDUIND                                
055635,000608: 07,3554           03557 16103                     2CADR    8192AUG                               
055636,000609: 
055637,000610: 07,3556           13537                           TCF      GYROEXIT                              
055638,000611: 
055639,000612: 07,3557           03641        8192AUG            TC       CAGETEST                              
055640,000613: 
055641,000614: 07,3560           34750                           CAF      BIT4                                  
055642,000615: 07,3561           00006                           EXTEND                                         
055643,000616: 07,3562           02012                           RAND     CHAN12                                
055644,000617: 07,3563           10000                           CCS      A                                     
055645,000618: 07,3564           13637                           TCF      IMUBAD                                
055646,000619: 07,3565           31314                           CA       LGYRO                                 #  ADD 8192 PULSES TO GYROCMD
055647,000620: 07,3566           54003                           TS       EBANK                                 
055648,000621: 07,3567           74357                           MASK     LOW8                                  
055649,000622: 07,3570           54061                           TS       ITEMP1                                
055650,000623: 
055651,000624: 07,3571           50061                           INDEX    ITEMP1                                #  SEE IF THIS IS THE LAST AUG.
055652,000625: 07,3572           11400                           CCS      1400                                  
055653,000626: 07,3573           13577                           TCF      AUG2                                  #  MORE TO COME.
055654,000627: 
055655,000628: 07,3574           34736                           CAF      BIT14                                 
055656,000629: 07,3575           26047                           ADS      GYROCMD                               
055657,000630: 07,3576           13531                           TCF      LASTSEG    +1                         
055658,000631: 

Page 1325

055660,000633: 07,3577           50061        AUG2               INDEX    ITEMP1                                
055661,000634: 07,3600           55400                           TS       1400                                  
055662,000635: 07,3601           34736                           CAF      BIT14                                 
055663,000636: 07,3602           26047                           ADS      GYROCMD                               
055664,000637: 07,3603           13550                           TCF      AUG3                                  #  COMPUTE DT.
055665,000638: 

Page 1326

055667,000640: 07,3604           63520        MIN-               AD       -GYROMIN                              #  POSSIBLE NEGATIVE OUTPUT.
055668,000641: 07,3605           00006                           EXTEND                                         
055669,000642: 07,3606           63411                           BZMF     STRTGYR2                              
055670,000643: 
055671,000644: 07,3607           00006        MAJ-               EXTEND                                         #  DEFINITE NEGATIVE OUTPUT.
055672,000645: 07,3610           43630                           DCS      GYROFRAC                              
055673,000646: 07,3611           20071                           DAS      RUPTREG1                              
055674,000647: 
055675,000648: 07,3612           30064                           CA       ITEMP4                                #  SELECT NEGATIVE TORQUING FOR THIS GYRO.
055676,000649: 07,3613           64743                           AD       BIT9                                  
055677,000650: 07,3614           00006                           EXTEND                                         
055678,000651: 07,3615           05014                           WOR      CHAN14                                
055679,000652: 
055680,000653: 07,3616           40070                           CS       RUPTREG1                              #  SET UP RUPTREGS TO FALL INTO GMERGE.
055681,000654: 07,3617           54070                           TS       RUPTREG1                              #  ALL NUMBERS PUT INTO GYROCMD ARE
055682,000655: 07,3620           40071                           CS       RUPTREG2                              #  POSITIVE - BIT9 OF CHAN 14 DETERMINES
055683,000656: 07,3621           76074                           MASK     LOW7                                  #  THE SIGN OF THE COMMAND.
055684,000657: 07,3622           40000                           COM                                            
055685,000658: 07,3623           56071                           XCH      RUPTREG2                              
055686,000659: 07,3624           40000                           COM                                            
055687,000660: 07,3625           13500                           TCF      GMERGE                                
055688,000661: 
055689,000662: 07,3626           01700        GDESELCT           OCT      1700                                  #  TURN OFF SELECT AND ACTIVITY BITS.
055690,000663: 
055691,000664: 07,3627           00000 00034  GYROFRAC           2DEC     .215       B-21                       
055692,000665: 

Page 1327

055694,000667:                                                                                                  #  IMU MODE SWITCHING ROUTINES COME HERE WHEN ACTION COMPLETE.
055695,000668: 
055696,000669: 07,3631           00006        ENDIMU             EXTEND                                         #  MODE IS BAD IF CAGE HAS OCCURED OR IF
055697,000670: 07,3632           00011                           READ     DSALMOUT                              #  ISS WARNING IS ON.
055698,000671: 07,3633           74753                           MASK     BIT1                                  
055699,000672: 07,3634           10000                           CCS      A                                     
055700,000673: 07,3635           13637                           TCF      IMUBAD                                
055701,000674: 
055702,000675: 07,3636           13665        IMUGOOD            TCF      GOODEND                               #  WITH C(A) = 0.
055703,000676: 
055704,000677: 07,3637           34755        IMUBAD             CAF      ZERO                                  
055705,000678: 07,3640           13662                           TCF      BADEND                                
055706,000679: 
055707,000680: 07,3641           34746        CAGETEST           CAF      BIT6                                  #  SUBROUTINE TO TERMINATE IMU MODE
055708,000681: 07,3642           71302                           MASK     IMODES30                              #  SWITCH IF IMU HAS BEEN CAGED.
055709,000682: 07,3643           10000                           CCS      A                                     
055710,000683: 07,3644           13637                           TCF      IMUBAD                                #  DIRECTLY.
055711,000684: 07,3645           00002                           TC       Q                                     #  WITH C(A) = +0.
055712,000685: 
055713,000686: 07,3646           41302        CAGETSTQ           CS       IMODES30                              #  SKIP IF IMU NOT BEING CAGED.
055714,000687: 07,3647           74746                           MASK     BIT6                                  
055715,000688: 07,3650           10000                           CCS      A                                     
055716,000689: 07,3651           24002                           INCR     Q                                     
055717,000690: 07,3652           00002                           TC       Q                                     
055718,000691: 
055719,000692: 07,3653           41302        CAGETSTJ           CS       IMODES30                              #  IF DURING MODE SWITCH INITIALIZATION
055720,000693: 07,3654           74746                           MASK     BIT6                                  #  IT IS FOUND THAT THE IMU IS BEING CAGED,
055721,000694: 07,3655           10000                           CCS      A                                     #  SET IMUCADR TO -0 TO INDICATE OPERATION
055722,000695: 07,3656           00002                           TC       Q                                     #  COMPLETE BUT FAILED.  RETURN IMMEDIATELY
055723,000696: 
055724,000697: 07,3657           44755                           CS       ZERO                                  #  TO SWRETURN.
055725,000698: 07,3660           55304                           TS       IMUCADR                               
055726,000699: 07,3661           12755                           TCF      MODEEXIT                              
055727,000700: 

Page 1328

055729,000702:                                                                                                  #  GENERALIZED MODE SWITCHING TERMINATION.  ENTER AT GOODEND FOR SUCCESSFUL COMPLETION OF AN I/O OPERATION
055730,000703:                                                                                                  #  OR AT BADEND FOR AN UNSUCCESSFUL ONE.  C(A) OR ARRIVAL =0 FOR IMU, 1 FOR OPTICS.
055731,000704: 
055732,000705: 07,3662           54071        BADEND             TS       RUPTREG2                              #  DEVICE INDEX.
055733,000706: 07,3663           44755                           CS       ZERO                                  #  FOR FAILURE.
055734,000707: 07,3664           13667                           TCF      GOODEND    +2                         
055735,000708: 
055736,000709: 07,3665           54071        GOODEND            TS       RUPTREG2                              
055737,000710: 07,3666           44753                           CS       ONE                                   #  FOR SUCCESS.
055738,000711: 
055739,000712: 07,3667           54072                           TS       RUPTREG3                              
055740,000713: 07,3670           50071                           INDEX    RUPTREG2                              #  SEE IF USING PROGRAM ASLEEP.
055741,000714: 07,3671           11304                           CCS      MODECADR                              
055742,000715: 07,3672           13676                           TCF      +4                                    #  YES - WAKE IT UP.
055743,000716: 07,3673           13706                           TCF      ENDMODE                               #  IF 0, PROGRAM NOT IN YET.
055744,000717: 
055745,000718: 07,3674           00006                           EXTEND                                         
055746,000719: 07,3675           13707                           BZF      ENDMODE    +1                         #  BZF = TCF IF MODECADR = -0.
055747,000720: 
055748,000721: 07,3676           34755                           CAF      ZERO                                  #  WAKE SLEEPING PROGRAM.
055749,000722: 07,3677           50071                           INDEX    RUPTREG2                              
055750,000723: 07,3700           57304                           XCH      MODECADR                              
055751,000724: 07,3701           05137                           TC       JOBWAKE                               
055752,000725: 
055753,000726: 07,3702           40072                           CS       RUPTREG3                              #  ADVANCE LOC IF SUCCESSFUL.
055754,000727: 07,3703           50064                           INDEX    LOCCTR                                
055755,000728: 07,3704           26164                           ADS      LOC                                   
055756,000729: 
055757,000730: 07,3705           15261                           TCF      TASKOVER                              
055758,000731: 
055759,000732: 07,3706           30072        ENDMODE            CA       RUPTREG3                              #  -0 INDICATES OPERATION COMPLETE BUT
055760,000733: 07,3707           50071                 +1        INDEX    RUPTREG2                              #  UNSUCCESSFUL:  -1 INDICATES COMPLETE AND
055761,000734: 07,3710           55304                           TS       MODECADR                              #  SUCCESSFUL.
055762,000735: 07,3711           15261                           TCF      TASKOVER                              
055763,000736: 

Page 1329

055765,000738:                                                                                                  #  GENERAL STALLING ROUTINE.  USING PROGRAMS COME HERE TO WAIT FOR I/O COMPLETION.
055766,000739: 
055767,000740:                                                                                                  #  PROGRAM DESCRIPTION                           DATE - 21 FEB 1967
055768,000741:                                                                                                  #                                                LOG SECTION IMU MODE SWITCHING
055769,000742:                                                                                                  #  MOD BY - R. MELANSON TO ADD DOCUMENTATION     ASSEMBLY SUNDISK REV. 82
055770,000743: 
055771,000744:                                                                                                  #  FUNCTIONAL DESCRIPTION -
055772,000745:                                                                                                  #        TO DELAY FURTHER EXECUTION OF THE CALLING ROUTINE UNTIL ITS SELECTED
055773,000746:                                                                                                  #        I/O FUNCTION IS COMPLETE.  THE FOLLOWING CHECKS ON THE CALLING ROUTINE:S
055774,000747:                                                                                                  #        MODECADR ARE MADE AND ACTED UPON.
055775,000748:                                                                                                  #        1) +0 INDICATES INCOMPLETE I/O OPERATION.  CALLING ROUTINE IS PUT TO
055776,000749:                                                                                                  #           SLEEP.
055777,000750:                                                                                                  #        2) -1 INDICATES COMPLETED I/O OPERATION.  STALL BYPASSES JOBSLEEP
055778,000751:                                                                                                  #           CALL AND RETURNS TO CALLING ROUTINE AT L+3
055779,000752:                                                                                                  #        3) -0 INDICATES COMPLETED I/O WITH FAILURE.  STALL CLEARS MODECADR
055780,000753:                                                                                                  #           AND RETURNS TO CALLING ROUTINE AT L+2.
055781,000754:                                                                                                  #        4) VALUE GREATER THAN 0 INDICATES TWO ROUTINES CALLING FOR USE OF
055782,000755:                                                                                                  #           SAME DEVICE.  STALL EXITS TO ABORT WHICH EXECUTES A PROGRAM
055783,000756:                                                                                                  #           RESTART WHICH IN TURN CLEARS ALL MODECADR REGISTERS.
055784,000757: 
055785,000758:                                                                                                  #  CALLING SEQUENCE -
055786,000759:                                                                                                  #        L       TC      BANKCALL
055787,000760:                                                                                                  #        L+1     CADR    (ONE OF 5 STALL ADDRESSES I.E. IMUSTALL, OPTSTALL, RADSTALL,
055788,000761:                                                                                                  #                        AOTSTALL, OR ATTSTALL)
055789,000762: 
055790,000763:                                                                                                  #  NORMAL-EXIT MODE -
055791,000764:                                                                                                  #        TCF JOBSLEEP    OR      TCF MODEXIT
055792,000765: 
055793,000766:                                                                                                  #  ALARM OR ABORT EXIT MODE -
055794,000767:                                                                                                  #        TC      ABORT
055795,000768: 
055796,000769:                                                                                                  #  OUTPUT -
055797,000770:                                                                                                  #        MODECADR=CADR   IF JOBSLEEP
055798,000771:                                                                                                  #        MODECADR=+0     IF I/O COMPLETE
055799,000772:                                                                                                  #        BUF2=L+3        IF I/O COMPLETE AND GOOD.
055800,000773:                                                                                                  #        BUF2=L+2        IF I/O COMPLETE BUT FAILED.
055801,000774: 
055802,000775:                                                                                                  #  ERASABLE INITIALIZATION -
055803,000776:                                                                                                  #        BUF2 CONTAINS RETURN ADDRESS PLUS 1,(L+2)
055804,000777:                                                                                                  #        BUF2+1 CONTAINS FBANK VALUE OF CALLING ROUTINE.
055805,000778:                                                                                                  #        MODECADR OF CALLING ROUTINE CONTAINS +0,-1,-0 OR CADR RETURN ADDRESS.
055806,000779: 
055807,000780:                                                                                                  #  DEBRIS -
055808,000781:                                                                                                  #        RUPTREG2 AND CALLING ROUTINE MODECADR.
055809,000782: 
055810,000783: 07,3712           34753        AOTSTALL           CAF      ONE                                   #  AOT.
055811,000784: 07,3713           03717                           TC       STALL                                 
055812,000785: 
055813,000786: 07,3714           34752        RADSTALL           CAF      TWO                                   
055814,000787: 07,3715           13717                           TCF      STALL                                 
055815,000788: 

Page 1330

055817,000790: 07,3716  07,3712               OPTSTALL           EQUALS   AOTSTALL                              
055818,000791: 
055819,000792: 07,3716           34755        IMUSTALL           CAF      ZERO                                  #  IMU.
055820,000793: 
055821,000794: 07,3717           00004        STALL              INHINT                                         
055822,000795: 07,3720           54071                           TS       RUPTREG2                              #  SAVE DEVICE INDEX.
055823,000796: 07,3721           50000                           INDEX    A                                     #  SEE IF OPERATION COMPLETE.
055824,000797: 07,3722           11304                           CCS      MODECADR                              
055825,000798: 07,3723           13741                           TCF      MODABORT                              #  ALLOWABLE STATES ARE +0, -1, AND -0.
055826,000799: 07,3724           13735                           TCF      MODESLP                               #  OPERATION INCOMPLETE.
055827,000800: 07,3725           13731                           TCF      MODEGOOD                              #  COMPLETE AND GOOD IF = -1.
055828,000801: 
055829,000802: 07,3726           50071        MG2                INDEX    RUPTREG2                              #  COMPLETE AND FAILED IF -0.  RESET TO +0.
055830,000803: 07,3727           55304                           TS       MODECADR                              #  RETURN TO CALLER.
055831,000804: 07,3730           12755                           TCF      MODEEXIT                              
055832,000805: 
055833,000806: 07,3731           10000        MODEGOOD           CCS      A                                     #  MAKE SURE INITIAL STATE -1.
055834,000807: 07,3732           13741                           TCF      MODABORT                              
055835,000808: 
055836,000809: 07,3733           24133                           INCR     BUF2                                  #  IF SO, INCREMENT RETURN ADDRESS AND
055837,000810: 07,3734           13726                           TCF      MG2                                   #  RETURN IMMEDIATELY, SETTING CADR = +0.
055838,000811: 
055839,000812: 07,3735           04645        MODESLP            TC       MAKECADR                              #  CALL FROM SWITCHABLE FIXED ONLY.
055840,000813: 07,3736           50071                           INDEX    RUPTREG2                              
055841,000814: 07,3737           55304                           TS       MODECADR                              
055842,000815: 07,3740           15133                           TCF      JOBSLEEP                              
055843,000816: 
055844,000817: 07,3741           52134        MODABORT           DXCH     BUF2                                  
055845,000818: 07,3742           05716                           TC       BAILOUT1                              #  TWO PROGRAMS USING THE SAME DEVICE.
055846,000819: 07,3743           01210                           OCT      1210                                  
055847,000820: 

Page 1331

055849,000822:                                                                                                  #  CONSTANTS FOR MODE SWITCHING ROUTINES
055850,000823: 
055851,000824: 07,3744     5751               BITS3&4            =        OCT14                                 
055852,000825: 07,3744     4771               BITS4&6            =        OCT50                                 
055853,000826: 07,3744           00030        BITS4-5            OCT      00030                                 
055854,000827: 07,3745     4744               IMUSEFLG           EQUALS   BIT8                                  #  INTERPRETER SWITCH 7.
055855,000828: 07,3745           77500        -COMMAX            DEC      -191       B-14                       
055856,000829: 07,3746           77477        -COMMAX-           DEC      -192       B-14                       
055857,000830: 07,3747           00074        600MS              DEC      60         B-14                       
055858,000831: 07,3750  07,3210               IMUFIN20           =        IMUFINE                               
055859,000832: 07,3750           31307        GOMANUR            CA       ATTCADR                               #  IS KALCMANU FREE
055860,000833: 07,3751           00006                           EXTEND                                         
055861,000834: 07,3752           13755                           BZF      +3                                    
055862,000835: 
055863,000836: 07,3753           05652                           TC       POODOO                                #  NO
055864,000837: 07,3754           01210                           OCT      1210                                  #  2 TRYING TO USE SAME DEVICE
055865,000838: 
055866,000839: 07,3755           00006                 +3        EXTEND                                         
055867,000840: 07,3756           30134                           DCA      BUF2                                  
055868,000841: 07,3757           53310                           DXCH     ATTCADR                               #  SAVE FINAL RETURN FOR KALCMAN3
055869,000842: 
055870,000843: 07,3760           30006                           CA       BBANK                                 
055871,000844: 07,3761           74757                           MASK     SEVEN                                 
055872,000845: 07,3762           27310                           ADS      ATTCADR    +1                         
055873,000846: 
055874,000847: 07,3763           30167                           CA       PRIORITY                              
055875,000848: 07,3764           77725                           MASK     PRIO37                                
055876,000849: 07,3765           55311                           TS       ATTPRIO                               #  SAVE USERS PRIO
055877,000850: 
055878,000851: 07,3766           33772                           CAF      KALEBCON                              #  SET EBANK FOR KALCMAN3
055879,000852: 07,3767           54003                           TS       EBANK                                 
055880,000853: 07,3770           04635                           TC       POSTJUMP                              
055881,000854: 07,3771           44004                           CADR     KALCMAN3                              
055882,000855: 07,3772           03276        KALEBCON           ECADR    BCDU                                  
055883,000856: 

Page 1332

055885,000858:                                                                                                  #  PROGRAM DESCRIPTION
055886,000859:                                                                                                  #  IMU STATUS CHECK ROUTINE R02 (SUBROUTINE UTILITY)
055887,000860:                                                                                                  #  MOD NO - 1
055888,000861:                                                                                                  #  MOD BY - N.BRODEUR
055889,000862: 
055890,000863:                                                                                                  #  FUNCTIONAL DESCRIPTION
055891,000864:                                                                                                  #        TO CHECK WHETHER IMU IS ON AND IF ON WHETHER IT IS ALIGNED TO AN
055892,000865:                                                                                                  #        ORIENTATION KNOWN BY THE CMC.  TO REQUEST SELECTION OF THE APPROPRIATE
055893,000866:                                                                                                  #        PROGRAM IF THE IMU IS OFF OR NOT ALIGNED TO AN ORIENTATION KNOWN BY THE
055894,000867:                                                                                                  #        CMC.  CALLED THROUGH BANKCALL
055895,000868: 
055896,000869:                                                                                                  #  CALLING SEQUENCE -
055897,000870:                                                                                                  #        L       TC      BANKCALL
055898,000871:                                                                                                  #        L+1     CADR    R02BOTH
055899,000872: 
055900,000873:                                                                                                  #  SUBROUTINES CALLED
055901,000874:                                                                                                  #        VARALARM
055902,000875:                                                                                                  #        FLAGUP
055903,000876: 
055904,000877:                                                                                                  #  NORMAL EXIT MODES
055905,000878:                                                                                                  #        AT L+2 OF CALLING SEQUENCE
055906,000879: 
055907,000880:                                                                                                  #  ALARM OR ABORT EXIT MODES
055908,000881:                                                                                                  #        GOTOPOOH, WITH ALARM
055909,000882: 
055910,000883:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED
055911,000884:                                                                                                  #        NONE
055912,000885: 
055913,000886:                                                                                                  #  DEBRIS
055914,000887:                                                                                                  #        CENTRALS - A,Q,L
055915,000888: 
055916,000889: 34,3775                                           BANK     34                                    
055917,000890: 04,2000                                           SETLOC   R02                                   
055918,000891: 04,2000                                           BANK                                           
055919,000892: 04,3253                                           COUNT*   $$/R02                                
055920,000893: 04,3253           00063        DEC51              DEC      51         B-14                       
055921,000894: 04,3254           34737        R02BOTH            CAF      REFSMBIT                              
055922,000895: 04,3255           70077                           MASK     FLAGWRD3                              
055923,000896: 04,3256           10000                           CCS      A                                     
055924,000897: 04,3257           03270                           TC       R02ZERO                               #  ZERO IMUS
055925,000898: 
055926,000899: 04,3260           31302                           CA       IMODES30                              
055927,000900: 04,3261           74743                           MASK     BIT9                                  #  IS ISS INITIALIZED
055928,000901: 04,3262           00006                           EXTEND                                         
055929,000902: 04,3263           13265                           BZF      +2                                    
055930,000903: 04,3264           44750                           CS       BIT4                                  #  SEND IMU ALARM CODE 210
055931,000904: 04,3265           63273                           AD       OCT220                                #  SEND REFSMM ALARM
055932,000905: 04,3266           05744                           TC       VARALARM                              
055933,000906: 
055934,000907: 04,3267           06001                           TC       GOTOPOOH                              
055935,000908: 
055936,000909: 04,3270           05504        R02ZERO            TC       UPFLAG                                

Page 1333

055938,000911: 04,3271           00007                           ADRES    IMUSE                                 
055939,000912: 04,3272           14631                           TCF      SWRETURN                              
055940,000913: 04,3273           00220        OCT220             OCT      220                                   
055941,000914: 

Page 1334

055943,000916:                                                                                                  #  PROGRAM DESCRIPTION           P06             10 FEB 67
055944,000917: 
055945,000918:                                                                                                  #  TRANSFER THE ISS/CMC FROM THE OPERATE TO THE STANDBY CONDITION.
055946,000919: 
055947,000920:                                                                                                  #  THE NORMAL CONDITION OF READINESS OF THE GNCS WHEN NOT IN USE IS STANDBY.  IN THIS CONDITION THE IMU
055948,000921:                                                                                                  #  HEATER POWER IS ON.  THE IMU OPERATE POWER IS OFF.  THE COMPUTER POWER IS ON.  THE OPTICS POWER IS OFF.  THE
055949,000922:                                                                                                  #  CMC STANDBY ON THE MAIN AND LEB DISKYS IS ON.
055950,000923: 
055951,000924:                                                                                                  #  CALLING SEQUENCE:
055952,000925:                                                                                                  #        ASTRONAUT REQUEST THROUGH DSKY  V37E 06E.
055953,000926: 
055954,000927:                                                                                                  #  SUBROUTINES CALLED:
055955,000928:                                                                                                  #        GOPERF1
055956,000929:                                                                                                  #        BANKCALL
055957,000930:                                                                                                  #        FLAGDOWN
055958,000931: 

Page 1335

055960,000933:                                                                                                  #  PRESTAND PREPARES FOR STANDBY BY SNAPSHOTTING THE SCALER AND TIME1 TIME2
055961,000934:                                                                                                  #  THE LOW 5 BITS OF THE SCALER ARE INSPECTED TO INSURE COMPATABILITY
055962,000935:                                                                                                  #  BETWEEN THE SCALER READING AND THE TIME1 TIME2 READING.
055963,000936: 
055964,000937: 37,2000                                           SETLOC   P05P06                                
055965,000938: 37,2000                                           BANK                                           
055966,000939: 
055967,000940: 37,3655     0314                                  EBANK=   TIME2SAV                              
055968,000941: 37,3655                                           COUNT*   $$/P06                                
055969,000942: 
055970,000943: 37,3655           05504        P06                TC       UPFLAG                                #  SET NODOV37 BIT
055971,000944: 37,3656           00054                           ADRES    NODOFLAG                              
055972,000945: 
055973,000946: 37,3657           00004        PRESTAND           INHINT                                         
055974,000947: 37,3660           00006                           EXTEND                                         
055975,000948: 37,3661           30025                           DCA      TIME2                                 #  SNAPSHOT TIME1 TIME2
055976,000949: 37,3662           52315                           DXCH     TIME2SAV                              
055977,000950: 37,3663           03714                           TC       SCALPREP                              
055978,000951: 37,3664           03657                           TC       PRESTAND                              #  T1,T2,SCALER NOT COMPATIBLE
055979,000952: 37,3665           52155                           DXCH     MPAC                                  #  T1,T2 AND SCALER OK
055980,000953: 37,3666           52317                           DXCH     SCALSAVE                              #  STORE SCALER
055981,000954: 37,3667           00004                           INHINT                                         
055982,000955: 37,3670           04616                           TC       BANKCALL                              
055983,000956: 37,3671           17175                           CADR     RNDREFDR                              #  REFSMM, DRIFT, TRACK FLAGS DOWN
055984,000957: 
055985,000958: 37,3672           05516                           TC       DOWNFLAG                              
055986,000959: 37,3673           00007                           ADRES    IMUSE                                 #  IMUSE DOWN
055987,000960: 37,3674           05516                           TC       DOWNFLAG                              
055988,000961: 37,3675           00010                           ADRES    RNDVZFLG                              #  RNDVZFLG DOWN
055989,000962: 
055990,000963: 37,3676           34741                           CAF      BIT11                                 
055991,000964: 37,3677           00006                           EXTEND                                         
055992,000965: 37,3700           05013                           WOR      CHAN13                                #  SET STANDBY ENABLE BIT
055993,000966: 
055994,000967: 37,3701           05353                           TC       PHASCHNG                              #  SET RESTART TO POSTAND WHEN STANDBY
055995,000968: 37,3702           07024                           OCT      07024                                 #        RECOVERS
055996,000969: 37,3703           20000                           OCT      20000                                 
055997,000970: 37,3704     0316                                  EBANK=   SCALSAVE                              
055998,000971: 37,3704           03734 76060                     2CADR    POSTAND                               
055999,000972: 
056000,000973: 37,3706           34774                           CAF      OCT62                                 
056001,000974: 37,3707           04616                           TC       BANKCALL                              
056002,000975: 37,3710           20623                           CADR     GOPERF1                               
056003,000976: 37,3711           13706                           TCF      -3                                    
056004,000977: 37,3712           13706                           TCF      -4                                    
056005,000978: 37,3713           13706                           TCF      -5                                    
056006,000979: 
056007,000980: 37,3714     4774               OCT62              EQUALS   .5SEC                                 #  DEC 50 = OCT 62
056008,000981: 
056009,000982:                                                                                                  #  THE LOW 5 BITS OF THE SCALER READS 10000 FOR THE FIRST INTERVAL AFTER A

Page 1336

056011,000984:                                                                                                  #  T1 INCREMENT.  IF SCALPREP DETECTS THIS INTERVAL THE T1,T2 AND SCALER
056012,000985:                                                                                                  #  DATA ARE NOT COMPATABLE AND RETURN IS TO L+1 FOR ANOTHER READING OF THE
056013,000986:                                                                                                  #  DATA.  OTHERWISE, THE RETURN IS TO L+2 TO PROCEED.  ROUTINE ALSO PREPARES
056014,000987:                                                                                                  #  THE SCALER READING FOR COMPUTATION OF THE INCREMENT TO UPDATE T1T2.  (THE
056015,000988:                                                                                                  #  10 MS BIT (BIT 6) OF THE SCALER IS INCREMENTED 5 MS OUT OF PHASE FROM
056016,000989:                                                                                                  #  T1.) ADDITION OF 5 MS (BIT 5) TO THE SCALER READING HAS THE EFFECT OF
056017,000990:                                                                                                  #  ADJUSTING BIT 6 IN THE SCALER TO BE IN PHASE WITH BIT 1 OF T1.  THE LOW 5
056018,000991:                                                                                                  #  BITS OF THE SCALER READING ARE THEN SET TO ZERO, TO TRUNCATE THE SCALER
056019,000992:                                                                                                  #  DATA TO 10 MS.  RESULTS ARE STORED IN MPAC, +1.
056020,000993: 
056021,000994: 37,3714           00006        SCALPREP           EXTEND                                         
056022,000995: 37,3715           22156                           QXCH     MPAC       +2                         
056023,000996: 37,3716           04103                           TC       FINETIME   +1                         
056024,000997: 37,3717           00003                           RELINT                                         
056025,000998: 37,3720           52155                           DXCH     MPAC                                  
056026,000999: 37,3721           34747                           CA       BIT5                                  #  ADD 5 MS TO THE SCALER READING.
056027,001000: 37,3722           54001                           TS       L                                     
056028,001001: 37,3723           34755                           CA       ZERO                                  
056029,001002: 37,3724           20155                           DAS      MPAC                                  
056030,001003: 37,3725           44346                           CS       LOW5                                  #  SET LOW 5 BITS OF (SCALER+5MS) TO ZERO
056031,001004: 37,3726           70155                           MASK     MPAC       +1                         #  AND STORE RESULTS IN MPAC,+1.
056032,001005: 37,3727           56155                           XCH      MPAC       +1                         
056033,001006: 37,3730           74346                           MASK     LOW5                                  #  TEST LOW 5 BITS OF SCALER FOR THE FIRST
056034,001007:                                                                                                  #  INTERVAL AFTER THE T1 INCREMENT
056035,001008:                                                                                                  #  (NOW = 00000, SINCE BIT 5 ADDED).
056036,001009: 37,3731           10000                           CCS      A                                     #  IS IT 1ST INTERVAL AFTER T1 INCREMENT
056037,001010: 37,3732           24156                           INCR     MPAC       +2                         #  NO
056038,001011: 37,3733           00156                           TC       MPAC       +2                         #  YES
056039,001012: 
056040,001013:                                                                                                  #  POSTAND RECOVERS TIME AFTER STANDBY.  THE SCALER IS SNAPSHOTTED AND THE
056041,001014:                                                                                                  #  TIME1 TIME2 COUNTER IS SET TO ZERO.  THE LOW 5 BITS OF THE SCALER ARE
056042,001015:                                                                                                  #  INSPECTED TO INSURE COMPATABILITY BETWEEN THE SCALER READING AND THE
056043,001016:                                                                                                  #  CLEARING OF THE TIME COUNTER.  IT THEN COMPUTES THE DIFFERENCE IN SCALER
056044,001017:                                                                                                  #  VALUES (IN DP) AND ADDS THIS TO THE PREVIOUSLY SNAPSHOTTED VALUES OF
056045,001018:                                                                                                  #  TIME1 TIME2 AND PLACES THIS NEW TIME INTO THE TIME1 TIME2 COUNTER.
056046,001019: 
056047,001020: 37,3734                                           COUNT*   $$/P05                                
056048,001021: 
056049,001022: 37,3734           44741        POSTAND            CS       BIT11                                 #  RECOVER TIME AFTER STANDBY.
056050,001023: 37,3735           00006                           EXTEND                                         
056051,001024: 37,3736           03013                           WAND     CHAN13                                #  CLEAR STANDBY ENABLE BIT
056052,001025: 37,3737           00004                           INHINT                                         
056053,001026: 37,3740           34755                           CA       ZERO                                  
056054,001027: 37,3741           54001                           TS       L                                     
056055,001028: 37,3742           52025                           DXCH     TIME2                                 #  CLEAR TIME1TIME2
056056,001029: 37,3743           03714                           TC       SCALPREP                              #  STORE SCALER IN MPAC, MPAC+1
056057,001030: 37,3744           03737                           TC       POSTAND    +3                         #  T1,T2,SCALER NOT COMPATIBLE
056058,001031: 37,3745           00006                           EXTEND                                         #  T1,T2 AND SCALER OK
056059,001032: 37,3746           40317                           DCS      SCALSAVE                              
056060,001033: 37,3747           20155                           DAS      MPAC                                  #  FORM DP DIFFERENCE OF POSTSTANDBY SCALER

Page 1337

056062,001035: 37,3750           34742                           CAF      BIT10                                 #  MINUS PRESTANDBY SCALER AND SHIFT RIGHT
056063,001036: 37,3751           07307                           TC       SHORTMP                               #  5 TO ALIGN BITS WITH TIME1 TIME2.
056064,001037: 37,3752           34755                           CAF      ZERO                                  
056065,001038: 37,3753           54156                           TS       MPAC       +2                         #  NEEDED FOR TP AGREE
056066,001039: 37,3754           07257                           TC       TPAGREE                               #  MAKE DP DIFF AGREE
056067,001040: 37,3755           10154                           CCS      MPAC                                  
056068,001041: 37,3756           03763                           TC       POSTCOM                               #  IF DP DIFF NET +, NO SCALER OVERFLOW
056069,001042: 37,3757           03763                           TC       POSTCOM                               #  BETWEEN PRE AND POST STANDBY.
056070,001043: 37,3760           03761                           TC       +1                                    #  IF DP DIFF NET -, SCALER OVERFLOWED.  ADD
056071,001044: 37,3761           34742                           CAF      BIT10                                 #  BIT 10 TO HIGH DIFF TO CORRECT.
056072,001045: 37,3762           26154                           ADS      MPAC                                  
056073,001046: 37,3763           00006        POSTCOM            EXTEND                                         #  C(MPAC,+1) IS MAGNITUDE OF DELTA SCALER.
056074,001047: 37,3764           30315                           DCA      TIME2SAV                              #  PRESTANDBY TIME1TIME2
056075,001048: 37,3765           20155                           DAS      MPAC                                  
056076,001049: 37,3766           07257                           TC       TPAGREE                               #  FORCE SIGN AGREEMENT
056077,001050: 37,3767           52155                           DXCH     MPAC                                  #  UPDATED VALUE FOR T1,T2.
056078,001051: 37,3770           20025                           DAS      TIME2                                 #  LOAD UPDATED VALUE INTO T1,T2, WITH
056079,001052: 37,3771           05516                           TC       DOWNFLAG                              #  CLEAR NODOFLAG
056080,001053: 37,3772           00054                           ADRES    NODOFLAG                              
056081,001054: 
056082,001055: 37,3773           06001                           TC       GOTOPOOH                              
056083,001056: 

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