Source Code

This is a reconstructed version of Luminary 130, the initial AGC program released in November 1969 for the Apollo 13 LM. Three more releases followed before the flown revision was finally manufactured in February 1970.

This reconstruction was created from a previous transcription of the original listing of Luminary 131, combined with Luminary memo #129 which describes the small difference between the Luminary 130 and 131. The reconstructed source code was verified by matching memory-bank checksums to those listed for Luminary 130 in drawing 2021152G.

In this source code, program comments from the original (Luminary 131) code are prefixed with '#', while those added later by the Virtual AGC project are prefixed with '##'.

055286,000002:                                                                                                  ## Copyright:   Public domain.
055287,000003:                                                                                                  ## Filename:    IMU_MODE_SWITCHING_ROUTINES.agc
055288,000004:                                                                                                  ## Purpose:     A section of the reconstructed source code for Luminary 130.
055289,000005:                                                                                                  ##              This was the original program released for the Apollo 13 LM,
055290,000006:                                                                                                  ##              although several more revisions would follow. It has been
055291,000007:                                                                                                  ##              reconstructed from a listing of Luminary 131, from which it
055292,000008:                                                                                                  ##              differs on only two lines in P70-P71. The difference is
055293,000009:                                                                                                  ##              described in detail in Luminary memo #129, which was used
055294,000010:                                                                                                  ##              to perform the reconstruction. This file is intended to be a
055295,000011:                                                                                                  ##              faithful reconstruction, except that the code format has been
055296,000012:                                                                                                  ##              changed to conform to the requirements of the yaYUL assembler
055297,000013:                                                                                                  ##              rather than the original YUL assembler.
055298,000014:                                                                                                  ## Reference:   pp. 1301-1329
055299,000015:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
055300,000016:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
055301,000017:                                                                                                  ## Mod history: 06/05/03 RSB.   Began transcribing.
055302,000018:                                                                                                  ##              05/14/05 RSB    Corrected website reference above.
055303,000019:                                                                                                  ##              2010-08-24 JL   Fixed page number comment.
055304,000020:                                                                                                  ##              2010-10-25 JL   Indentation fixes.
055305,000021:                                                                                                  ##              2011-05-07 JL   Removed workaround. Flagged SBANK= workaround
055306,000022:                                                                                                  ##                              for future removal.
055307,000023:                                                                                                  ##              2017-01-06 RSB  Page numbers now agree with those on the
055308,000024:                                                                                                  ##                              original hardcopy, as opposed to the PDF page
055309,000025:                                                                                                  ##                              numbers in 1701.pdf.
055310,000026:                                                                                                  ##              2017-01-28 RSB  Comment-text fixes identified for Luminary 69.
055311,000027:                                                                                                  ##              2017-02-27 RSB  Proofed comment text using octopus/ProoferComments.
055312,000028:                                                                                                  ##              2017-03-01 RSB  Fixed lingering comment-text typos.
055313,000029:                                                                                                  ##              2017-03-13 RSB  Comment-text fixes noted in proofing Luminary 116.
055314,000030:                                                                                                  ##              2017-03-15 RSB  Comment-text fixes identified in 6-way
055315,000031:                                                                                                  ##                              side-by-side diff of Sunburst 120 and Luminary 
055316,000032:                                                                                                  ##                              69/99/116/131/210.
055317,000033:                                                                                                  ##              2017-06-17 MAS  Globally removed all SBANK= workarounds.
055318,000034:                                                                                                  ##              2018-09-04 MAS  Copied from Luminary 131 for Luminary 130.
055319,000035: 

Page 1301

055321,000037:    5457                                           BLOCK    02                                    
055322,000038:    4000                                           SETLOC   FFTAG3                                
055323,000039:    4000                                           BANK                                           
055324,000040: 
055325,000041:    5457  E3,1471                                  EBANK=   COMMAND                               
055326,000042: 
055327,000043:                                                                                                  #  FIXED-FIXED ROUTINES.
055328,000044: 
055329,000045:    5457                                           COUNT*   $$/IMODE                              
055330,000046:    5457           34755        ZEROICDU           CAF      ZERO                                  #  ZERO ICDU COUNTERS.
055331,000047:    5460           54032                           TS       CDUX                                  
055332,000048:    5461           54033                           TS       CDUY                                  
055333,000049:    5462           54034                           TS       CDUZ                                  
055334,000050:    5463           00002                           TC       Q                                     
055335,000051: 
055336,000052:    5464     4743               SPSCODE            =        BIT9                                  
055337,000053: 

Page 1302

055339,000055:                                                                                                  #  IMU ZEROING ROUTINE.
055340,000056: 
055341,000057: 11,3774                                           BANK     11                                    
055342,000058: 07,2000                                           SETLOC   MODESW                                
055343,000059: 07,2000                                           BANK                                           
055344,000060: 
055345,000061: 07,2705                                           COUNT*   $$/IMODE                              
055346,000062: 07,2705           00004        IMUZERO            INHINT                                         #  ROUTINE TO ZERO ICDUS.
055347,000063: 07,2706           41035                           CS       DSPTAB     +11D                       #  DONT ZERO CDUS IF IMU IN GIMBAL LOCK AND
055348,000064: 07,2707           74771                           MASK     BITS4&6                               #  COARSE ALIGN (GIMBAL RUNAWAY PROTECTION)
055349,000065: 07,2710           10000                           CCS      A                                     
055350,000066: 07,2711           12715                           TCF      IMUZEROA                              
055351,000067: 
055352,000068: 07,2712           05567                           TC       ALARM                                 #  IF SO.
055353,000069: 07,2713           00206                           OCT      00206                                 
055354,000070: 
055355,000071: 07,2714           13650                           TCF      CAGETSTJ   +4                         #  IMMEDIATE FAILURE.
055356,000072: 
055357,000073: 07,2715           03644        IMUZEROA           TC       CAGETSTJ                              
055358,000074:                                                                                                  #           DELETE
055359,000075: 07,2716           41300                           CS       IMODES33                              #  DISABLE DAP AUTO AND HOLD MODES
055360,000076: 07,2717           74773                           MASK     SUPER011                              #        BIT5 FOR GROUND
055361,000077: 07,2720           27300                           ADS      IMODES33                              
055362,000078: 
055363,000079: 07,2721           41277                           CS       IMODES30                              #  INHIBIT ICDUFAIL AND IMUFAIL (IN CASE WE
055364,000080: 07,2722           75741                           MASK     BITS3&4                               #  JUST CAME OUT OF COARSE ALIGN).
055365,000081: 07,2723           27277                           ADS      IMODES30                              
055366,000082: 
055367,000083: 07,2724           44771                           CS       BITS4&6                               #  SEND ZERO ENCODE WITH COARSE AND ERROR
055368,000084: 07,2725           00006                           EXTEND                                         #  COUNTER DISABLED.
055369,000085: 07,2726           03012                           WAND     CHAN12                                
055370,000086: 
055371,000087: 07,2727           03257                           TC       NOATTOFF                              #  TURN OFF NO ATT LAMP.
055372,000088: 
055373,000089: 07,2730           34747                           CAF      BIT5                                  
055374,000090: 07,2731           00006                           EXTEND                                         
055375,000091: 07,2732           05012                           WOR      CHAN12                                
055376,000092: 
055377,000093: 07,2733           05457                           TC       ZEROICDU                              
055378,000094: 07,2734           34746                           CAF      BIT6                                  #  WAIT 320 MS TO GIVE AGS ADEQUATE TIME TO
055379,000095: 07,2735           05203                           TC       WAITLIST                              #  RECEIVE ITS PULSE TRAIN.
055380,000096: 07,2736  E3,1474                                  EBANK=   CDUIND                                
055381,000097: 07,2736           02750 16103                     2CADR    IMUZERO2                              
055382,000098: 
055383,000099: 07,2740           41277                           CS       IMODES30                              #  SEE IF IMU OPERATING AND ALARM IF NOT.
055384,000100: 07,2741           74743                           MASK     BIT9                                  
055385,000101: 07,2742           10000                           CCS      A                                     
055386,000102: 07,2743           12746                           TCF      MODEEXIT                              

Page 1303

055388,000104: 07,2744           05567                           TC       ALARM                                 
055389,000105: 07,2745           00210                           OCT      210                                   
055390,000106: 
055391,000107: 07,2746           00003        MODEEXIT           RELINT                                         #  GENERAL MODE-SWITCHING EXIT.
055392,000108: 07,2747           14631                           TCF      SWRETURN                              
055393,000109: 
055394,000110: 07,2750           03632        IMUZERO2           TC       CAGETEST                              
055395,000111: 07,2751           05457                           TC       ZEROICDU                              #  ZERO CDUX, CDUY, CDUZ
055396,000112: 
055397,000113: 07,2752           44747                           CS       BIT5                                  #  REMOVE ZERO DISCRETE.
055398,000114: 07,2753           00006                           EXTEND                                         
055399,000115: 07,2754           03012                           WAND     CHAN12                                
055400,000116: 
055401,000117: 07,2755           34741                           CAF      BIT11                                 #  WAIT 10 SECS FOR CTRS TO FIND GIMBALS
055402,000118: 07,2756           05224                           TC       VARDELAY                              
055403,000119: 
055404,000120: 07,2757           03632        IMUZERO3           TC       CAGETEST                              
055405,000121: 07,2760           45741                           CS       BITS3&4                               #  REMOVE IMUFAIL AND ICDUFAIL INHIBIT.
055406,000122: 07,2761           71277                           MASK     IMODES30                              
055407,000123: 07,2762           55277                           TS       IMODES30                              
055408,000124: 
055409,000125: 07,2763           44773                           CS       SUPER011                              #  ENABLE DAP AUTO AND HOLD MODES
055410,000126: 07,2764           71300                           MASK     IMODES33                              #        BIT5 FOR GROUND
055411,000127: 07,2765           55300                           TS       IMODES33                              
055412,000128: 
055413,000129: 07,2766           04674                           TC       IBNKCALL                              #  SET ISS WARNING IF EITHER OF ABOVE ARE
055414,000130: 07,2767           14703                           CADR     SETISSW                               #  PRESENT.
055415,000131: 
055416,000132: 07,2770           13622                           TCF      ENDIMU                                
055417,000133: 

Page 1304

055419,000135:                                                                                                  #  IMU COARSE ALIGN MODE.
055420,000136: 
055421,000137: 07,2771           00004        IMUCOARS           INHINT                                         
055422,000138: 07,2772           03644                           TC       CAGETSTJ                              
055423,000139: 07,2773           03135                           TC       SETCOARS                              
055424,000140: 
055425,000141: 07,2774           36245                           CAF      SIX                                   
055426,000142: 07,2775           05203                           TC       WAITLIST                              
055427,000143: 07,2776  E3,1474                                  EBANK=   CDUIND                                
055428,000144: 07,2776           03001 16103                     2CADR    COARS                                 
055429,000145: 
055430,000146: 07,3000           12746                           TCF      MODEEXIT                              
055431,000147: 
055432,000148: 07,3001           03632        COARS              TC       CAGETEST                              
055433,000149: 07,3002           34746                           CAF      BIT6                                  #  ENABLE ALL THREE ISS CDU ERROR COUNTERS
055434,000150: 07,3003           00006                           EXTEND                                         
055435,000151: 07,3004           05012                           WOR      CHAN12                                
055436,000152: 
055437,000153: 07,3005           34752                           CAF      TWO                                   #  SET CDU INDICATOR
055438,000154: 07,3006           55474        COARS1             TS       CDUIND                                
055439,000155: 
055440,000156: 07,3007           51474                           INDEX    CDUIND                                #  COMPUTE THETAD - THETAA IN 1:S
055441,000157: 07,3010           30321                           CA       THETAD                                #        COMPLEMENT FORM
055442,000158: 07,3011           00006                           EXTEND                                         
055443,000159: 07,3012           51474                           INDEX    CDUIND                                
055444,000160: 07,3013           20032                           MSU      CDUX                                  
055445,000161: 07,3014           00006                           EXTEND                                         
055446,000162: 07,3015           74737                           MP       BIT13                                 #  SHIFT RIGHT 2
055447,000163: 07,3016           56001                           XCH      L                                     #  ROUND
055448,000164: 07,3017           60000                           DOUBLE                                         
055449,000165: 07,3020           54061                           TS       ITEMP1                                
055450,000166: 07,3021           13023                           TCF      +2                                    
055451,000167: 07,3022           26001                           ADS      L                                     
055452,000168: 
055453,000169: 07,3023           51474                           INDEX    CDUIND                                #  DIFFERENCE TO BE COMPUTED
055454,000170: 07,3024           23471                           LXCH     COMMAND                               
055455,000171: 07,3025           11474                           CCS      CDUIND                                
055456,000172: 07,3026           03006                           TC       COARS1                                
055457,000173: 
055458,000174: 07,3027           34752                           CAF      TWO                                   #  MINIMUM OF 4 MS WAIT
055459,000175: 07,3030           05224                           TC       VARDELAY                              
055460,000176: 

Page 1305

055462,000178: 07,3031           03632        COARS2             TC       CAGETEST                              #  DONT CONTINUE IF CAGED.
055463,000179: 07,3032           54061                           TS       ITEMP1                                #  SETS TO +0.
055464,000180: 07,3033           34752                           CAF      TWO                                   #  SET CDU INDICATOR
055465,000181: 07,3034           55474                 +3        TS       CDUIND                                
055466,000182: 
055467,000183: 07,3035           51474                           INDEX    CDUIND                                
055468,000184: 07,3036           11471                           CCS      COMMAND                               #  NUMBER OF PULSES REQUIRED
055469,000185: 07,3037           03043                           TC       COMPOS                                #  GREATER THAN MAX ALLOWED
055470,000186: 07,3040           03052                           TC       NEXTCDU    +1                         
055471,000187: 07,3041           03110                           TC       COMNEG                                
055472,000188: 07,3042           03052                           TC       NEXTCDU    +1                         
055473,000189: 
055474,000190: 07,3043           63736        COMPOS             AD       -COMMAX                               #  COMMAX = MAX NUMBER OF PULSES ALLOWED
055475,000191: 07,3044           00006                           EXTEND                                         #        MINUS ONE
055476,000192: 07,3045           63120                           BZMF     COMZERO                               
055477,000193: 07,3046           51474                           INDEX    CDUIND                                
055478,000194: 07,3047           55471                           TS       COMMAND                               #  REDUCE COMMAND BY MAX NUMBER OF PULSES
055479,000195: 07,3050           43737                           CS       -COMMAX-                              #        ALLOWED
055480,000196: 
055481,000197: 07,3051           24061        NEXTCDU            INCR     ITEMP1                                
055482,000198: 07,3052           64754                           AD       NEG0                                  
055483,000199: 07,3053           51474                           INDEX    CDUIND                                
055484,000200: 07,3054           54050                           TS       CDUXCMD                               #  SET UP COMMAND REGISTER.
055485,000201: 
055486,000202: 07,3055           11474                           CCS      CDUIND                                
055487,000203: 07,3056           03034                           TC       COARS2     +3                         
055488,000204: 
055489,000205: 07,3057           10061                           CCS      ITEMP1                                #  SEE IF ANY PULSES TO GO OUT.
055490,000206: 07,3060           13124                           TCF      SENDPULS                              
055491,000207: 
055492,000208: 07,3061           05221                           TC       FIXDELAY                              #  WAIT FOR GIMBALS TO SETTLE.
055493,000209: 07,3062           00226                           DEC      150        B-14                       
055494,000210: 
055495,000211: 07,3063           34752                           CAF      TWO                                   #  AT END OF COMMAND, CHECK TO SEE THAT
055496,000212: 07,3064           54061        CHKCORS            TS       ITEMP1                                #  GIMBALS ARE WITHIN 2 DEGREES OF THETAD.
055497,000213: 07,3065           50000                           INDEX    A                                     
055498,000214: 07,3066           30032                           CA       CDUX                                  
055499,000215: 07,3067           00006                           EXTEND                                         
055500,000216: 07,3070           50061                           INDEX    ITEMP1                                
055501,000217: 07,3071           20321                           MSU      THETAD                                
055502,000218: 07,3072           10000                           CCS      A                                     
055503,000219: 07,3073           13101                           TCF      COARSERR                              
055504,000220: 07,3074           13076                           TCF      CORSCHK2                              
055505,000221: 07,3075           13101                           TCF      COARSERR                              
055506,000222: 

Page 1306

055508,000224: 07,3076           10061        CORSCHK2           CCS      ITEMP1                                
055509,000225: 07,3077           13064                           TCF      CHKCORS                               
055510,000226: 07,3100           13622                           TCF      ENDIMU                                #  END OF COARSE ALIGNMENT.
055511,000227: 
055512,000228: 07,3101           63107        COARSERR           AD       COARSTOL                              #  2 DEGREES.
055513,000229: 07,3102           00006                           EXTEND                                         
055514,000230: 07,3103           63076                           BZMF     CORSCHK2                              
055515,000231: 
055516,000232: 07,3104           05567                           TC       ALARM                                 #  COARSE ALIGN ERROR.
055517,000233: 07,3105           00211                           OCT      211                                   
055518,000234: 
055519,000235: 07,3106           13630                           TCF      IMUBAD                                
055520,000236: 
055521,000237: 07,3107           77511        COARSTOL           DEC      -.01111                               #  2 DEGREES SCALED AT HALF-REVOLUTIONS
055522,000238: 
055523,000239: 07,3110           63736        COMNEG             AD       -COMMAX                               
055524,000240: 07,3111           00006                           EXTEND                                         
055525,000241: 07,3112           63120                           BZMF     COMZERO                               
055526,000242: 07,3113           40000                           COM                                            
055527,000243: 07,3114           51474                           INDEX    CDUIND                                
055528,000244: 07,3115           55471                           TS       COMMAND                               
055529,000245: 07,3116           33737                           CA       -COMMAX-                              
055530,000246: 07,3117           03051                           TC       NEXTCDU                               
055531,000247: 
055532,000248: 07,3120           34755        COMZERO            CAF      ZERO                                  
055533,000249: 07,3121           51474                           INDEX    CDUIND                                
055534,000250: 07,3122           57471                           XCH      COMMAND                               
055535,000251: 07,3123           03051                           TC       NEXTCDU                               
055536,000252: 
055537,000253: 07,3124           37743        SENDPULS           CAF      13,14,15                              
055538,000254: 07,3125           00006                           EXTEND                                         
055539,000255: 07,3126           05014                           WOR      CHAN14                                
055540,000256: 07,3127           33740                           CAF      600MS                                 
055541,000257: 07,3130           13030                           TCF      COARS2     -1                         #  THEN TO VARDELAY
055542,000258: 
055543,000259: 07,3131           34746        CA+ECE             CAF      BIT6                                  #  ENABLE ALL THREE ISS CDU ERROR COUNTERS
055544,000260: 07,3132           00006                           EXTEND                                         
055545,000261: 07,3133           05012                           WOR      CHAN12                                
055546,000262: 07,3134           05261                           TC       TASKOVER                              
055547,000263: 

Page 1307

055549,000265: 07,3135           34750        SETCOARS           CAF      BIT4                                  #  BYPASS IF ALREADY IN COARSE ALIGN
055550,000266: 07,3136           00006                           EXTEND                                         
055551,000267: 07,3137           02012                           RAND     CHAN12                                
055552,000268: 07,3140           10000                           CCS      A                                     
055553,000269: 07,3141           00002                           TC       Q                                     
055554,000270: 
055555,000271: 07,3142           44746                           CS       BIT6                                  #  CLEAR ISS ERROR COUNTERS
055556,000272: 07,3143           00006                           EXTEND                                         
055557,000273: 07,3144           03012                           WAND     CHAN12                                
055558,000274: 
055559,000275: 07,3145           44742                           CS       BIT10                                 #  KNOCK DOWN GYRO ACTIVITY
055560,000276: 07,3146           00006                           EXTEND                                         
055561,000277: 07,3147           03014                           WAND     CHAN14                                
055562,000278: 07,3150           44755                           CS       ZERO                                  
055563,000279: 07,3151           54047                           TS       GYROCMD                               
055564,000280: 
055565,000281: 07,3152           34750                           CAF      BIT4                                  #  PUT ISS IN COARSE ALIGN
055566,000282: 07,3153           00006                           EXTEND                                         
055567,000283: 07,3154           05012                           WOR      CHAN12                                
055568,000284: 
055569,000285: 07,3155           41035                           CS       DSPTAB     +11D                       #  TURN ON NO ATT LAMP
055570,000286: 07,3156           73200                           MASK     OCT40010                              
055571,000287: 07,3157           27035                           ADS      DSPTAB     +11D                       
055572,000288: 
055573,000289: 07,3160           41300                           CS       IMODES33                              #  DISABLE DAP AUTO AND HOLD MODES
055574,000290: 07,3161           74746                           MASK     BIT6                                  
055575,000291: 07,3162           27300                           ADS      IMODES33                              
055576,000292: 
055577,000293: 07,3163           41277                           CS       IMODES30                              #  DISABLE IMUFAIL
055578,000294: 07,3164           74750                           MASK     BIT4                                  
055579,000295: 07,3165           27277                           ADS      IMODES30                              
055580,000296: 
055581,000297: 07,3166           44747        RNDREFDR           CS       TRACKBIT                              #  CLEAR TRACK FLAG
055582,000298: 07,3167           70075                           MASK     FLAGWRD1                              
055583,000299: 07,3170           54075                           TS       FLAGWRD1                              
055584,000300: 
055585,000301: 07,3171           44735                           CS       DRFTBIT                               #  CLEAR DRIFT FLAG
055586,000302: 07,3172           70076                           MASK     FLAGWRD2                              
055587,000303: 07,3173           54076                           TS       FLAGWRD2                              
055588,000304: 
055589,000305: 07,3174           44737                           CS       REFSMBIT                              #  CLEAR REFSMMAT FLAG
055590,000306: 07,3175           70077                           MASK     FLAGWRD3                              
055591,000307: 07,3176           54077                           TS       FLAGWRD3                              
055592,000308: 
055593,000309: 07,3177           00002                           TC       Q                                     
055594,000310: 
055595,000311: 07,3200           40010        OCT40010           OCT      40010                                 
055596,000312: 

Page 1308

055598,000314:                                                                                                  #  IMU FINE ALIGN MODE SWITCH.
055599,000315: 
055600,000316: 07,3201           00004        IMUFINE            INHINT                                         
055601,000317: 07,3202           03644                           TC       CAGETSTJ                              #  SEE IF IMU BEING CAGED.
055602,000318: 
055603,000319: 07,3203           43735                           CS       BITS4-5                               #  RESET ZERO AND COARSE
055604,000320: 07,3204           00006                           EXTEND                                         
055605,000321: 07,3205           03012                           WAND     CHAN12                                
055606,000322: 
055607,000323: 07,3206           44746                           CS       BIT6                                  #  INSURE DAP AUTO AND HOLD MODES ENABLED
055608,000324: 07,3207           71300                           MASK     IMODES33                              
055609,000325: 07,3210           55300                           TS       IMODES33                              
055610,000326: 
055611,000327: 07,3211           03257                           TC       NOATTOFF                              
055612,000328: 
055613,000329: 07,3212           34742                           CAF      BIT10                                 #  IMU FAIL WAS INHIBITED DURING THE
055614,000330: 07,3213           05203                           TC       WAITLIST                              #  PRESUMABLY PRECEDING COARSE ALIGN.  LEAVE
055615,000331: 07,3214  E3,1474                                  EBANK=   CDUIND                                
055616,000332: 07,3214           03225 16103                     2CADR    IFAILOK                               #  IT ON FOR THE FIRST 5 SECS OF FINE ALIGN
055617,000333: 
055618,000334: 07,3216           35000                           CAF      2SECS                                 
055619,000335: 07,3217           05203                           TC       WAITLIST                              
055620,000336: 07,3220  E3,1474                                  EBANK=   CDUIND                                
055621,000337: 07,3220           03223 16103                     2CADR    IMUFINED                              
055622,000338: 
055623,000339: 07,3222           12746                           TCF      MODEEXIT                              
055624,000340: 
055625,000341: 07,3223           03632        IMUFINED           TC       CAGETEST                              #  SEE THAT NO ONE HAS CAGED THE IMU.
055626,000342: 07,3224           13622                           TCF      ENDIMU                                
055627,000343: 

Page 1309

055629,000345: 07,3225           03637        IFAILOK            TC       CAGETSTQ                              #  ENABLE IMU FIAL UNLESS IMU BEING CAGED.
055630,000346: 07,3226           15261                           TCF      TASKOVER                              #  IT IS.
055631,000347: 
055632,000348: 07,3227           34750                           CAF      BIT4                                  #  DONT RESET IMU FAIL INHIBIT IF SOMEONE
055633,000349: 07,3230           00006                           EXTEND                                         #  HAS GONE INTO COARSE ALIGN.
055634,000350: 07,3231           02012                           RAND     CHAN12                                
055635,000351: 07,3232           10000                           CCS      A                                     
055636,000352: 07,3233           15261                           TCF      TASKOVER                              
055637,000353: 
055638,000354: 07,3234           41277                           CS       IMODES30                              #  RESET IMUFAIL.
055639,000355: 07,3235           74737                           MASK     BIT13                                 
055640,000356: 07,3236           27277                           ADS      IMODES30                              
055641,000357: 07,3237           44750                           CS       BIT4                                  
055642,000358: 07,3240           71277        PFAILOK2           MASK     IMODES30                              
055643,000359: 07,3241           55277                           TS       IMODES30                              
055644,000360: 07,3242           04674                           TC       IBNKCALL                              #  THE ISS WARNING LIGHT MAY COME ON NOW
055645,000361: 07,3243           14703                           CADR     SETISSW                               #  THAT THE INHIBIT HAS BEEN REMOVED.
055646,000362: 07,3244           15261                           TCF      TASKOVER                              
055647,000363: 
055648,000364: 07,3245           03637        PFAILOK            TC       CAGETSTQ                              #  ENABLE PIP FAIL PROG ALARM.
055649,000365: 07,3246           15261                           TCF      TASKOVER                              
055650,000366: 
055651,000367: 07,3247           41277                           CS       IMODES30                              #  RESET IMU AND PIPA FAIL BITS.
055652,000368: 07,3250           74742                           MASK     BIT10                                 
055653,000369: 07,3251           27277                           ADS      IMODES30                              
055654,000370: 
055655,000371: 07,3252           41300                           CS       IMODES33                              
055656,000372: 07,3253           74737                           MASK     BIT13                                 
055657,000373: 07,3254           27300                           ADS      IMODES33                              
055658,000374: 
055659,000375: 07,3255           44747                           CS       BIT5                                  
055660,000376: 07,3256           13240                           TCF      PFAILOK2                              
055661,000377: 
055662,000378: 07,3257           43200        NOATTOFF           CS       OCT40010                              #  SUBROUTINE TO TURN OFF NO ATT LAMP.
055663,000379: 07,3260           71035                           MASK     DSPTAB     +11D                       
055664,000380: 07,3261           64735                           AD       BIT15                                 
055665,000381: 07,3262           55035                           TS       DSPTAB     +11D                       
055666,000382: 07,3263           00002                           TC       Q                                     
055667,000383: 

Page 1310

055669,000385:                                                                                                  #  ROUITNES TO INITIATE AND TERMINATE PROGRAM USE OF THE PIPAS.  NO IMUSTALL REQUIRED IN EITHER CASE.
055670,000386: 
055671,000387: 07,3264           44755        PIPUSE             CS       ZERO                                  
055672,000388: 07,3265           54037                           TS       PIPAX                                 
055673,000389: 07,3266           54040                           TS       PIPAY                                 
055674,000390: 07,3267           54041                           TS       PIPAZ                                 
055675,000391: 
055676,000392: 07,3270           03637        PIPUSE1            TC       CAGETSTQ                              #  DO NOT ENABLE PIPA FAIL IF IMU IS CAGED
055677,000393: 07,3271           14631                           TCF      SWRETURN                              
055678,000394: 
055679,000395: 07,3272           00004                           INHINT                                         
055680,000396: 07,3273           44753                           CS       BIT1                                  #  IF PIPA FAILS FROM NOW ON (UNTIL
055681,000397: 07,3274           71277                           MASK     IMODES30                              #  PIPFREE), LIGHT ISS WARNING.
055682,000398: 07,3275           55277                           TS       IMODES30                              
055683,000399: 
055684,000400: 07,3276           04674        PIPFREE2           TC       IBNKCALL                              #  ISS WARNING MIGHT COME ON NOW.
055685,000401: 07,3277           14703                           CADR     SETISSW                               #  (OR GO OFF ON PIPFREE).
055686,000402: 
055687,000403: 07,3300           12746                           TCF      MODEEXIT                              
055688,000404: 
055689,000405: 07,3301           00004        PIPFREE            INHINT                                         #  PROGRAM DONE WITH PIPAS.  DONT LIGHT
055690,000406: 07,3302           41277                           CS       IMODES30                              #  ISS WARNING.
055691,000407: 07,3303           74753                           MASK     BIT1                                  
055692,000408: 07,3304           27277                           ADS      IMODES30                              
055693,000409: 
055694,000410: 07,3305           74742                           MASK     BIT10                                 #  IF PIP FAIL ON, DO PROG ALSRM AND RESET
055695,000411: 07,3306           10000                           CCS      A                                     #  ISS WARNING.
055696,000412: 07,3307           12746                           TCF      MODEEXIT                              
055697,000413: 
055698,000414: 07,3310           05567                           TC       ALARM                                 
055699,000415: 07,3311           00212                           OCT      212                                   
055700,000416: 
055701,000417: 07,3312           00004                           INHINT                                         
055702,000418: 
055703,000419: 07,3313           13276                           TCF      PIPFREE2                              
055704,000420: 

Page 1311

055706,000422:                                                                                                  #  THE FOLLOWING ROUTINE TORQUES THE IRIGS ACCORDING TO DOUBLE PRECISION INPUTS IN THE SIX REGISTERS
055707,000423:                                                                                                  #  BEGINNING AT THE ECADR ARRIVING IN A.  THE MINIMUM SIZE OF ANY PULSE TRAIN IS 16 PULSES (.25 CDU COUNTS).  THE
055708,000424:                                                                                                  #  UNSENT PORTION OF THE COMMAND IS LEFT INTACT IN THE INPUT COMMAND REGISTERS.
055709,000425: 
055710,000426: 07,3314  E3,1400                                  EBANK=   1400                                  #  VARIABLE, ACTUALLY.
055711,000427: 
055712,000428: 07,3314           54161        IMUPULSE           TS       MPAC       +5                         #  SAVE ARRIVING ECADR.
055713,000429: 07,3315           03644                           TC       CAGETSTJ                              #  DONT PROCEED IF IMU BEING CAGED.
055714,000430: 
055715,000431: 07,3316           11311                           CCS      LGYRO                                 #  SEE IF GYROS BUSY.
055716,000432: 07,3317           03360                           TC       GYROBUSY                              #  SLEEP.
055717,000433: 
055718,000434: 07,3320           54156                           TS       MPAC       +2                         
055719,000435: 07,3321           34746                           CAF      BIT6                                  #  ENABLE THE POWER SUPPLY.
055720,000436: 07,3322           00006                           EXTEND                                         
055721,000437: 07,3323           05014                           WOR      CHAN14                                
055722,000438: 
055723,000439: 07,3324           34751                           CAF      FOUR                                  
055724,000440: 07,3325           05203        GWAKE2             TC       WAITLIST                              #  (IF A JOB WAS PUT TO SLEEP, THE POWER
055725,000441: 07,3326  E3,1474                                  EBANK=   CDUIND                                #  SUPPLY IS LEFT ON BY THE WAKING JOB).
055726,000442: 07,3326           03376 16103                     2CADR    STRTGYRO                              
055727,000443: 
055728,000444: 07,3330           30161                           CA       MPAC       +5                         #  SET UP EBANK, SAVING CALLER'S EBANK FOR
055729,000445: 07,3331           56003                           XCH      EBANK                                 #  RESTORATION ON RETURN.
055730,000446: 07,3332           56161                           XCH      MPAC       +5                         
055731,000447: 07,3333           55311                           TS       LGYRO                                 #  RESERVES GYROS.
055732,000448: 07,3334           74357                           MASK     LOW8                                  
055733,000449: 07,3335           54061                           TS       ITEMP1                                
055734,000450: 
055735,000451: 07,3336           34752                           CAF      TWO                                   #  FORCE SIGN AGREEMENT ON INPUTS.
055736,000452: 07,3337           54157        GYROAGRE           TS       MPAC       +3                         
055737,000453: 07,3340           60000                           DOUBLE                                         
055738,000454: 07,3341           60061                           AD       ITEMP1                                
055739,000455: 07,3342           54160                           TS       MPAC       +4                         
055740,000456: 07,3343           00006                           EXTEND                                         
055741,000457: 07,3344           50000                           INDEX    A                                     
055742,000458: 07,3345           31401                           DCA      1400                                  
055743,000459: 07,3346           52155                           DXCH     MPAC                                  
055744,000460: 07,3347           07262                           TC       TPAGREE                               
055745,000461: 07,3350           52155                           DXCH     MPAC                                  
055746,000462: 07,3351           50160                           INDEX    MPAC       +4                         
055747,000463: 07,3352           53401                           DXCH     1400                                  
055748,000464: 
055749,000465: 07,3353           10157                           CCS      MPAC       +3                         
055750,000466: 07,3354           13337                           TCF      GYROAGRE                              
055751,000467: 
055752,000468: 07,3355           30161                           CA       MPAC       +5                         #  RESTORE CALLER'S EBANK.
055753,000469: 07,3356           54003                           TS       EBANK                                 
055754,000470: 07,3357           12746                           TCF      MODEEXIT                              
055755,000471: 

Page 1312

055757,000473:                                                                                                  #  ROUTINES TO ALLOW TORQUING BY ONLY ONE JOB AT A TIME.
055758,000474: 
055759,000475: 07,3360           00006        GYROBUSY           EXTEND                                         #  SAVE RETURN 2FCADR.
055760,000476: 07,3361           30134                           DCA      BUF2                                  
055761,000477: 07,3362           52155                           DXCH     MPAC                                  
055762,000478: 07,3363           33375        REGSLEEP           CAF      LGWAKE                                
055763,000479: 07,3364           15133                           TCF      JOBSLEEP                              
055764,000480: 
055765,000481: 07,3365           11311        GWAKE              CCS      LGYRO                                 #  WHEN AWAKENED, SEE IF GYROS STILL BUSY.
055766,000482: 07,3366           13363                           TCF      REGSLEEP                              #  IF SO, SLEEP SOME MORE.
055767,000483: 
055768,000484: 07,3367           54156                           TS       MPAC       +2                         
055769,000485: 07,3370           00006                           EXTEND                                         
055770,000486: 07,3371           30155                           DCA      MPAC                                  
055771,000487: 07,3372           52134                           DXCH     BUF2                                  #  RESTORE SWRETURN INFO.
055772,000488: 07,3373           34753                           CAF      ONE                                   
055773,000489: 07,3374           13325                           TCF      GWAKE2                                
055774,000490: 
055775,000491: 07,3375           17365        LGWAKE             CADR     GWAKE                                 
055776,000492: 

Page 1313

055778,000494:                                                                                                  #  GYRO-TORQUING WAITLIST TASKS.
055779,000495: 
055780,000496: 07,3376           43617        STRTGYRO           CS       GDESELCT                              #  DE-SELECT LAST GYRO.
055781,000497: 07,3377           00006                           EXTEND                                         
055782,000498: 07,3400           03014                           WAND     CHAN14                                
055783,000499: 
055784,000500: 07,3401           03632                           TC       CAGETEST                              
055785,000501: 
055786,000502: 07,3402           31311        STRTGYR2           CA       LGYRO                                 #  JUMP ON PHASE COUNTER IN BITS 13-14.
055787,000503: 07,3403           00006                           EXTEND                                         
055788,000504: 07,3404           74750                           MP       BIT4                                  
055789,000505: 07,3405           50000                           INDEX    A                                     
055790,000506: 07,3406           13407                           TCF      +1                                    
055791,000507: 07,3407           03424                           TC       GSELECT                               #  =0.  DO Y GYRO.
055792,000508: 07,3410           00202                           OCT      00202                                 
055793,000509: 
055794,000510: 07,3411           03424                           TC       GSELECT                               #  =1.  DO Z GYRO.
055795,000511: 07,3412           00302                           OCT      00302                                 
055796,000512: 
055797,000513: 07,3413           03422                           TC       GSELECT    -2                         #  =2.  DO X GYRO.
055798,000514: 07,3414           00100                           OCT      00100                                 
055799,000515: 
055800,000516: 07,3415           34755                           CAF      ZERO                                  #  =3.  DONE
055801,000517: 07,3416           55311                           TS       LGYRO                                 
055802,000518: 07,3417           33375                           CAF      LGWAKE                                #  WAKE A POSSIBLE SLEEPING JOB.
055803,000519: 07,3420           05137                           TC       JOBWAKE                               
055804,000520: 
055805,000521: 07,3421           13223        NORESET            TCF      IMUFINED                              #  DO NOT RESET POWER SUPPLY

Page 1314

055807,000523: 07,3422           44751                 -2        CS       FOUR                                  #  SPECIAL ENTRY TO REGRESS LGYRO FOR X.
055808,000524: 07,3423           27311                           ADS      LGYRO                                 
055809,000525: 
055810,000526: 07,3424           50002        GSELECT            INDEX    Q                                     #  SELECT GYRO.
055811,000527: 07,3425           30000                           CAF      0                                     #  PACKED WORD CONTAINS GYRO SELECT BITS
055812,000528: 07,3426           54064                           TS       ITEMP4                                #  AND INCREMENT TO LGYRO.
055813,000529: 07,3427           74757                           MASK     SEVEN                                 
055814,000530: 07,3430           64737                           AD       BIT13                                 
055815,000531: 07,3431           27311                           ADS      LGYRO                                 
055816,000532: 07,3432           54003                           TS       EBANK                                 
055817,000533: 07,3433           74357                           MASK     LOW8                                  
055818,000534: 07,3434           54061                           TS       ITEMP1                                
055819,000535: 
055820,000536: 07,3435           44757                           CS       SEVEN                                 
055821,000537: 07,3436           70064                           MASK     ITEMP4                                
055822,000538: 07,3437           54064                           TS       ITEMP4                                
055823,000539: 
055824,000540: 07,3440           00006                           EXTEND                                         #  MOVE DP COMMAND TO RUPTREGS FOR TESTING.
055825,000541: 07,3441           50061                           INDEX    ITEMP1                                
055826,000542: 07,3442           31401                           DCA      1400                                  
055827,000543: 07,3443           52071                           DXCH     RUPTREG1                              
055828,000544: 
055829,000545: 07,3444           10070                           CCS      RUPTREG1                              
055830,000546: 07,3445           13460                           TCF      MAJ+                                  
055831,000547: 07,3446           13450                           TCF      +2                                    
055832,000548: 07,3447           13600                           TCF      MAJ-                                  
055833,000549: 
055834,000550: 07,3450           10071                           CCS      RUPTREG2                              
055835,000551: 07,3451           13455                           TCF      MIN+                                  
055836,000552: 07,3452           13402                           TCF      STRTGYR2                              
055837,000553: 07,3453           13575                           TCF      MIN-                                  
055838,000554: 07,3454           13402                           TCF      STRTGYR2                              
055839,000555: 

Page 1315

055841,000557: 07,3455           63511        MIN+               AD       -GYROMIN                              #  SMALL POSITIVE COMMAND.  SEE IF AT LEAST
055842,000558: 07,3456           00006                           EXTEND                                         #  16 GYRO PULSES.
055843,000559: 07,3457           63402                           BZMF     STRTGYR2                              
055844,000560: 
055845,000561: 07,3460           00006        MAJ+               EXTEND                                         #  DEFINITE POSITIVE OUTPUT.
055846,000562: 07,3461           33621                           DCA      GYROFRAC                              
055847,000563: 07,3462           20071                           DAS      RUPTREG1                              
055848,000564: 
055849,000565: 07,3463           30064                           CA       ITEMP4                                #  SELECT POSITIVE TORQUING FOR THIS GYRO.
055850,000566: 07,3464           00006                           EXTEND                                         
055851,000567: 07,3465           05014                           WOR      CHAN14                                
055852,000568: 
055853,000569: 07,3466           36077                           CAF      LOW7                                  #  LEAVE NUMBER OF POSSIBLE 8192 AUGMENTS
055854,000570: 07,3467           70071                           MASK     RUPTREG2                              #  TO INITIAL COMMAND IN MAJOR PART OF LONG
055855,000571: 07,3470           56071                           XCH      RUPTREG2                              #  TERM STORAGE AND TRUNCATED FRACTION
055856,000572: 07,3471           00006        GMERGE             EXTEND                                         #  IN MINOR PART.  THE MAJOR PART WILL BE
055857,000573: 07,3472           74744                           MP       BIT8                                  #  COUNTED DOWN TO ZERO IN THE COURSE OF
055858,000574: 07,3473           54062                           TS       ITEMP2                                #  PUTTING OUT THE ENTIRE COMMAND.
055859,000575: 07,3474           30070                           CA       RUPTREG1                              
055860,000576: 07,3475           00006                           EXTEND                                         
055861,000577: 07,3476           74743                           MP       BIT9                                  
055862,000578: 07,3477           54070                           TS       RUPTREG1                              
055863,000579: 07,3500           30001                           CA       L                                     
055864,000580: 07,3501           00006                           EXTEND                                         
055865,000581: 07,3502           74736                           MP       BIT14                                 
055866,000582: 07,3503           26062                           ADS      ITEMP2                                #  INITIAL COMMAND.
055867,000583: 
055868,000584: 07,3504           00006                           EXTEND                                         #  SEE IF MORE THAN ONE PULSE TRAIN NEEDED
055869,000585: 07,3505           30071                           DCA      RUPTREG1                              #  (MORE THAN 16383 PULSES).
055870,000586: 07,3506           67752                           AD       MINUS1                                
055871,000587: 07,3507           10000                           CCS      A                                     
055872,000588: 07,3510           13534                           TCF      LONGGYRO                              
055873,000589: 07,3511           77601        -GYROMIN           OCT      -176                                  #  MAY BE ADJUSTED TO SPECIFY MINIMUM CMD
055874,000590: 07,3512           13516                           TCF      +4                                    
055875,000591: 
055876,000592: 07,3513           34736                           CAF      BIT14                                 
055877,000593: 07,3514           26062                           ADS      ITEMP2                                
055878,000594: 07,3515           34755                           CAF      ZERO                                  
055879,000595: 
055880,000596: 07,3516           50061                 +4        INDEX    ITEMP1                                
055881,000597: 07,3517           53401                           DXCH     1400                                  

Page 1316

055883,000599: 07,3520           30062                           CA       ITEMP2                                #  ENTIRE COMMAND.
055884,000600: 07,3521           54047        LASTSEG            TS       GYROCMD                               
055885,000601: 07,3522           00006                           EXTEND                                         
055886,000602: 07,3523           74742                           MP       BIT10                                 #  WAITLIST DT
055887,000603: 07,3524           66250                           AD       THREE                                 #  TRUNCATION AND PHASE UNCERTAINTIES.
055888,000604: 07,3525           05203                           TC       WAITLIST                              
055889,000605: 07,3526  E3,1474                                  EBANK=   CDUIND                                
055890,000606: 07,3526           03376 16103                     2CADR    STRTGYRO                              
055891,000607: 
055892,000608: 07,3530           34742        GYROEXIT           CAF      BIT10                                 
055893,000609: 07,3531           00006                           EXTEND                                         
055894,000610: 07,3532           05014                           WOR      CHAN14                                
055895,000611: 07,3533           15261                           TCF      TASKOVER                              
055896,000612: 
055897,000613: 07,3534           50061        LONGGYRO           INDEX    ITEMP1                                
055898,000614: 07,3535           53401                           DXCH     1400                                  #  INITIAL COMMAND OUT PLUS N AUGMENTS OF
055899,000615: 07,3536           34736                           CAF      BIT14                                 #  8192.  INITIAL COMMAND IS AT LEAST 8192.
055900,000616: 07,3537           60062                           AD       ITEMP2                                
055901,000617: 07,3540           54047                           TS       GYROCMD                               
055902,000618: 
055903,000619: 07,3541           00006        AUG3               EXTEND                                         #  GET WAITLIST DT TO TIME WHEN TRAIN IS
055904,000620: 07,3542           74742                           MP       BIT10                                 #  ALMOST OUT.
055905,000621: 07,3543           67750                           AD       NEG3                                  
055906,000622: 07,3544           05203                           TC       WAITLIST                              
055907,000623: 07,3545  E3,1474                                  EBANK=   CDUIND                                
055908,000624: 07,3545           03550 16103                     2CADR    8192AUG                               
055909,000625: 
055910,000626: 07,3547           13530                           TCF      GYROEXIT                              
055911,000627: 
055912,000628: 07,3550           03632        8192AUG            TC       CAGETEST                              
055913,000629: 
055914,000630: 07,3551           34750                           CAF      BIT4                                  
055915,000631: 07,3552           00006                           EXTEND                                         
055916,000632: 07,3553           02012                           RAND     CHAN12                                
055917,000633: 07,3554           10000                           CCS      A                                     
055918,000634: 07,3555           13630                           TCF      IMUBAD                                
055919,000635: 07,3556           31311                           CA       LGYRO                                 #  ADD 8192 PULSES TO GYROCMD
055920,000636: 07,3557           54003                           TS       EBANK                                 
055921,000637: 07,3560           74357                           MASK     LOW8                                  
055922,000638: 07,3561           54061                           TS       ITEMP1                                
055923,000639: 
055924,000640: 07,3562           50061                           INDEX    ITEMP1                                #  SEE IF THIS IS THE LAST AUG.
055925,000641: 07,3563           11400                           CCS      1400                                  
055926,000642: 07,3564           13570                           TCF      AUG2                                  #  MORE TO COME.
055927,000643: 
055928,000644: 07,3565           34736                           CAF      BIT14                                 
055929,000645: 07,3566           26047                           ADS      GYROCMD                               
055930,000646: 07,3567           13522                           TCF      LASTSEG    +1                         
055931,000647: 

Page 1317

055933,000649: 07,3570           50061        AUG2               INDEX    ITEMP1                                
055934,000650: 07,3571           55400                           TS       1400                                  
055935,000651: 07,3572           34736                           CAF      BIT14                                 
055936,000652: 07,3573           26047                           ADS      GYROCMD                               
055937,000653: 07,3574           13541                           TCF      AUG3                                  #  COMPUTE DT.
055938,000654: 

Page 1318

055940,000656: 07,3575           63511        MIN-               AD       -GYROMIN                              #  POSSIBLE NEGATIVE OUTPUT.
055941,000657: 07,3576           00006                           EXTEND                                         
055942,000658: 07,3577           63402                           BZMF     STRTGYR2                              
055943,000659: 
055944,000660: 07,3600           00006        MAJ-               EXTEND                                         #  DEFINITE NEGATIVE OUTPUT.
055945,000661: 07,3601           43621                           DCS      GYROFRAC                              
055946,000662: 07,3602           20071                           DAS      RUPTREG1                              
055947,000663: 
055948,000664: 07,3603           30064                           CA       ITEMP4                                #  SELECT NEGATIVE TORQUING FOR THIS GYRO.
055949,000665: 07,3604           64743                           AD       BIT9                                  
055950,000666: 07,3605           00006                           EXTEND                                         
055951,000667: 07,3606           05014                           WOR      CHAN14                                
055952,000668: 
055953,000669: 07,3607           40070                           CS       RUPTREG1                              #  SET UP RUPTREGS TO FALL INTO GMERGE.
055954,000670: 07,3610           54070                           TS       RUPTREG1                              #  ALL NUMBERS PUT INTO GYROCMD ARE
055955,000671: 07,3611           40071                           CS       RUPTREG2                              #  POSITIVE - BIT9 OF CHAN 14 DETERMINES
055956,000672: 07,3612           76077                           MASK     LOW7                                  #  THE SIGN OF THE COMMAND.
055957,000673: 07,3613           40000                           COM                                            
055958,000674: 07,3614           56071                           XCH      RUPTREG2                              
055959,000675: 07,3615           40000                           COM                                            
055960,000676: 07,3616           13471                           TCF      GMERGE                                
055961,000677: 
055962,000678: 07,3617           01700        GDESELCT           OCT      1700                                  #  TURN OFF SELECT AND ACTIVITY BITS.
055963,000679: 
055964,000680: 07,3620           00000 00034  GYROFRAC           2DEC     .215       B-21                       
055965,000681: 

Page 1319

055967,000683:                                                                                                  #  IMU MODE SWITCHING ROUTINES COME HERE WHEN ACTION COMPLETE.
055968,000684: 
055969,000685: 07,3622           00006        ENDIMU             EXTEND                                         #  MODE IS BAD IF CAGE HAS OCCURED OR IF
055970,000686: 07,3623           00011                           READ     DSALMOUT                              #  ISS WARNING IS ON.
055971,000687: 07,3624           74753                           MASK     BIT1                                  
055972,000688: 07,3625           10000                           CCS      A                                     
055973,000689: 07,3626           13630                           TCF      IMUBAD                                
055974,000690: 
055975,000691: 07,3627           13656        IMUGOOD            TCF      GOODEND                               #  WITH C(A) = 0.
055976,000692: 
055977,000693: 07,3630           34755        IMUBAD             CAF      ZERO                                  
055978,000694: 07,3631           13653                           TCF      BADEND                                
055979,000695: 
055980,000696: 07,3632           34746        CAGETEST           CAF      BIT6                                  #  SUBROUTINE TO TERMINATE IMU MODE
055981,000697: 07,3633           71277                           MASK     IMODES30                              #  SWITCH IF IMU HAS BEEN CAGED.
055982,000698: 07,3634           10000                           CCS      A                                     
055983,000699: 07,3635           13630                           TCF      IMUBAD                                #  DIRECTLY.
055984,000700: 07,3636           00002                           TC       Q                                     #  WITH C(A) = +0.
055985,000701: 
055986,000702: 07,3637           41277        CAGETSTQ           CS       IMODES30                              #  SKIP IF IMU NOT BEING CAGED.
055987,000703: 07,3640           74746                           MASK     BIT6                                  
055988,000704: 07,3641           10000                           CCS      A                                     
055989,000705: 07,3642           24002                           INCR     Q                                     
055990,000706: 07,3643           00002                           TC       Q                                     
055991,000707: 
055992,000708: 07,3644           41277        CAGETSTJ           CS       IMODES30                              #  IF DURING MODE SWITCH INITIALIZATION
055993,000709: 07,3645           74746                           MASK     BIT6                                  #  IT IS FOUND THAT THE IMU IS BEING CAGED,
055994,000710: 07,3646           10000                           CCS      A                                     #  SET IMUCADR TO -0 TO INDICATE OPERATION
055995,000711: 07,3647           00002                           TC       Q                                     #  COMPLETE BUT FAILED.  RETURN IMMEDIATELY
055996,000712: 07,3650           44755                           CS       ZERO                                  #  TO SWRETURN.
055997,000713: 07,3651           55301                           TS       IMUCADR                               
055998,000714: 07,3652           12746                           TCF      MODEEXIT                              
055999,000715: 

Page 1320

056001,000717:                                                                                                  #  GENERALIZED MODE SWITCHING TERMINATION.  ENTER AT GOODEND FOR SUCCESSFUL COMPLETION OF AN I/O OPERATION
056002,000718:                                                                                                  #  OR AT BADEND FOR AN UNSUCCESSFUL ONE.  C(A) OR ARRIVAL =0 FOR IMU, 1 FOR OPTICS.
056003,000719: 
056004,000720: 07,3653           54071        BADEND             TS       RUPTREG2                              #  DEVICE INDEX.
056005,000721: 07,3654           44755                           CS       ZERO                                  #  FOR FAILURE.
056006,000722: 07,3655           13660                           TCF      GOODEND    +2                         
056007,000723: 
056008,000724: 07,3656           54071        GOODEND            TS       RUPTREG2                              
056009,000725: 07,3657           44753                           CS       ONE                                   #  FOR SUCCESS.
056010,000726: 
056011,000727: 07,3660           54072                           TS       RUPTREG3                              
056012,000728: 07,3661           50071                           INDEX    RUPTREG2                              #  SEE IF USING PROGRAM ASLEEP.
056013,000729: 07,3662           11301                           CCS      MODECADR                              
056014,000730: 07,3663           13667                           TCF      +4                                    #  YES - WAKE IT UP.
056015,000731: 07,3664           13677                           TCF      ENDMODE                               #  IF 0, PROGRAM NOT IN YET.
056016,000732: 
056017,000733: 07,3665           00006                           EXTEND                                         
056018,000734: 07,3666           13700                           BZF      ENDMODE    +1                         #  BZF = TCF IF MODECADR = -0.
056019,000735: 
056020,000736: 07,3667           34755                           CAF      ZERO                                  #  WAKE SLEEPING PROGRAM.
056021,000737: 07,3670           50071                           INDEX    RUPTREG2                              
056022,000738: 07,3671           57301                           XCH      MODECADR                              
056023,000739: 07,3672           05137                           TC       JOBWAKE                               
056024,000740: 
056025,000741: 07,3673           40072                           CS       RUPTREG3                              #  ADVANCE LOC IF SUCCESSFUL.
056026,000742: 07,3674           50064                           INDEX    LOCCTR                                
056027,000743: 07,3675           26164                           ADS      LOC                                   
056028,000744: 
056029,000745: 07,3676           15261                           TCF      TASKOVER                              
056030,000746: 
056031,000747: 07,3677           30072        ENDMODE            CA       RUPTREG3                              #  -0 INDICATES OPERATION COMPLETE BUT
056032,000748: 07,3700           50071                 +1        INDEX    RUPTREG2                              #  UNSUCCESSFUL:  -1 INDICATES COMPLETE AND
056033,000749: 07,3701           55301                           TS       MODECADR                              #  SUCCESSFUL.
056034,000750: 07,3702           15261                           TCF      TASKOVER                              
056035,000751: 

Page 1321

056037,000753:                                                                                                  #  GENERAL STALLING ROUTINE.  USING PROGRAMS COME HERE TO WAIT FOR I/O COMPLETION.
056038,000754: 
056039,000755:                                                                                                  #  PROGRAM DESCRIPTION                           DATE - 21 FEB 1967
056040,000756:                                                                                                  #                                                LOG SECTION IMU MODE SWITCHING
056041,000757:                                                                                                  #  MOD BY - R. MELANSON TO ADD DOCUMENTATION     ASSEMBLY SUNDISK REV. 82
056042,000758: 
056043,000759:                                                                                                  #  FUNCTIONAL DESCRIPTION -
056044,000760:                                                                                                  #        TO DELAY FURTHER EXECUTION OF THE CALLING ROUTINE UNTIL ITS SELECTED
056045,000761:                                                                                                  #        I/O FUNCTION IS COMPLETE.  THE FOLLOWING CHECKS ON THE CALLING ROUTINE:S
056046,000762:                                                                                                  #        MODECADR ARE MADE AND ACTED UPON.
056047,000763:                                                                                                  #        1) +0 INDICATES INCOMPLETE I/O OPERATION.  CALLING ROUTINE IS PUT TO
056048,000764:                                                                                                  #           SLEEP.
056049,000765:                                                                                                  #        2) -1 INDICATES COMPLETED I/O OPERATION.  STALL BYPASSES JOBSLEEP
056050,000766:                                                                                                  #           CALL AND RETURNS TO CALLING ROUTINE AT L+3
056051,000767:                                                                                                  #        3) -0 INDICATES COMPLETED I/O WITH FAILURE.  STALL CLEARS MODECADR
056052,000768:                                                                                                  #           AND RETURNS TO CALLING ROUTINE AT L+2.
056053,000769:                                                                                                  #        4) VALUE GREATER THAN 0 INDICATES TWO ROUTINES CALLING FOR USE OF
056054,000770:                                                                                                  #           SAME DEVICE.  STALL EXITS TO ABORT WHICH EXECUTES A PROGRAM
056055,000771:                                                                                                  #           RESTART WHICH IN TURN CLEARS ALL MODECADR REGISTERS.
056056,000772: 
056057,000773:                                                                                                  #  CALLING SEQUENCE -
056058,000774:                                                                                                  #        L       TC      BANKCALL
056059,000775:                                                                                                  #        L+1     CADR    (ONE OF 5 STALL ADDRESSES I.E. IMUSTALL, OPTSTALL, RADSTALL,
056060,000776:                                                                                                  #                        AOTSTALL, OR ATTSTALL)
056061,000777: 
056062,000778:                                                                                                  #  NORMAL-EXIT MODE -
056063,000779:                                                                                                  #        TCF JOBSLEEP    OR      TCF MODEXIT
056064,000780: 
056065,000781:                                                                                                  #  ALARM OR ABORT EXIT MODE -
056066,000782:                                                                                                  #        TC      ABORT
056067,000783: 
056068,000784:                                                                                                  #  OUTPUT -
056069,000785:                                                                                                  #        MODECADR=CADR   IF JOBSLEEP
056070,000786:                                                                                                  #        MODECADR=+0     IF I/O COMPLETE
056071,000787:                                                                                                  #        BUF2=L+3        IF I/O COMPLETE AND GOOD.
056072,000788:                                                                                                  #        BUF2=L+2        IF I/O COMPLETE BUT FAILED.
056073,000789: 
056074,000790:                                                                                                  #  ERASABLE INITIALIZATION -
056075,000791:                                                                                                  #        BUF2 CONTAINS RETURN ADDRESS PLUS 1,(L+2)
056076,000792:                                                                                                  #        BUF2+1 CONTAINS FBANK VALUE OF CALLING ROUTINE.
056077,000793:                                                                                                  #        MODECADR OF CALLING ROUTINE CONTAINS +0,-1,-0 OR CADR RETURN ADDRESS.
056078,000794: 
056079,000795:                                                                                                  #  DEBRIS -
056080,000796:                                                                                                  #        RUPTREG2 AND CALLING ROUTINE MODECADR.
056081,000797: 
056082,000798: 07,3703           34753        AOTSTALL           CAF      ONE                                   #  AOT.
056083,000799: 07,3704           03710                           TC       STALL                                 
056084,000800: 
056085,000801: 07,3705           34752        RADSTALL           CAF      TWO                                   
056086,000802: 07,3706           13710                           TCF      STALL                                 
056087,000803: 

Page 1322

056089,000805: 07,3707  07,3703               OPTSTALL           EQUALS   AOTSTALL                              
056090,000806: 
056091,000807: 07,3707           34755        IMUSTALL           CAF      ZERO                                  #  IMU.
056092,000808: 
056093,000809: 07,3710           00004        STALL              INHINT                                         
056094,000810: 07,3711           54071                           TS       RUPTREG2                              #  SAVE DEVICE INDEX.
056095,000811: 07,3712           50000                           INDEX    A                                     #  SEE IF OPERATION COMPLETE.
056096,000812: 07,3713           11301                           CCS      MODECADR                              
056097,000813: 07,3714           13732                           TCF      MODABORT                              #  ALLOWABLE STATES ARE +0, -1, AND -0.
056098,000814: 07,3715           13726                           TCF      MODESLP                               #  OPERATION INCOMPLETE.
056099,000815: 07,3716           13722                           TCF      MODEGOOD                              #  COMPLETE AND GOOD IF = -1.
056100,000816: 
056101,000817: 07,3717           50071        MG2                INDEX    RUPTREG2                              #  COMPLETE AND FAILED IF -0.  RESET TO +0.
056102,000818: 07,3720           55301                           TS       MODECADR                              #  RETURN TO CALLER.
056103,000819: 07,3721           12746                           TCF      MODEEXIT                              
056104,000820: 
056105,000821: 07,3722           10000        MODEGOOD           CCS      A                                     #  MAKE SURE INITIAL STATE -1.
056106,000822: 07,3723           13732                           TCF      MODABORT                              
056107,000823: 
056108,000824: 07,3724           24133                           INCR     BUF2                                  #  IF SO, INCREMENT RETURN ADDRESS AND
056109,000825: 07,3725           13717                           TCF      MG2                                   #  RETURN IMMEDIATELY, SETTING CADR = +0.
056110,000826: 
056111,000827: 07,3726           04645        MODESLP            TC       MAKECADR                              #  CALL FROM SWITCHABLE FIXED ONLY.
056112,000828: 07,3727           50071                           INDEX    RUPTREG2                              
056113,000829: 07,3730           55301                           TS       MODECADR                              
056114,000830: 07,3731           15133                           TCF      JOBSLEEP                              
056115,000831: 
056116,000832: 07,3732           52134        MODABORT           DXCH     BUF2                                  
056117,000833: 07,3733           05706                           TC       BAILOUT1                              #  TWO PROGRAMS USING THE SAME DEVICE.
056118,000834: 07,3734           31210                           OCT      31210                                 
056119,000835: 

Page 1323

056121,000837:                                                                                                  #  CONSTANTS FOR MODE SWITCHING ROUTINES
056122,000838: 
056123,000839: 07,3735     5741               BITS3&4            =        OCT14                                 
056124,000840: 07,3735     4771               BITS4&6            =        OCT50                                 
056125,000841: 07,3735           00030        BITS4-5            OCT      00030                                 
056126,000842: 07,3736     4744               IMUSEFLG           EQUALS   BIT8                                  #  INTERPRETER SWITCH 7.
056127,000843: 07,3736           77500        -COMMAX            DEC      -191       B-14                       
056128,000844: 07,3737           77477        -COMMAX-           DEC      -192       B-14                       
056129,000845: 07,3740           00074        600MS              DEC      60         B-14                       
056130,000846: 07,3741  07,3201               IMUFIN20           =        IMUFINE                               
056131,000847: 07,3741           31304        GOMANUR            CA       ATTCADR                               #  IS KALCMANU FREE
056132,000848: 07,3742           00006                           EXTEND                                         
056133,000849: 07,3743           13745                           BZF      +2                                    
056134,000850: 07,3744           03732                           TC       MODABORT                              #  BAILOUT
056135,000851: 07,3745           00006                 +2        EXTEND                                         
056136,000852: 07,3746           30134                           DCA      BUF2                                  
056137,000853: 07,3747           53305                           DXCH     ATTCADR                               #  SAVE FINAL RETURN FOR KALCMAN3
056138,000854: 
056139,000855: 07,3750           30006                           CA       BBANK                                 
056140,000856: 07,3751           74757                           MASK     SEVEN                                 
056141,000857: 07,3752           27305                           ADS      ATTCADR    +1                         
056142,000858: 
056143,000859: 07,3753           30167                           CA       PRIORITY                              
056144,000860: 07,3754           77730                           MASK     PRIO37                                
056145,000861: 07,3755           55306                           TS       ATTPRIO                               #  SAVE USERS PRIO
056146,000862: 
056147,000863: 07,3756           33762                           CAF      KALEBCON                              #  SET EBANK FOR KALCMAN3
056148,000864: 07,3757           54003                           TS       EBANK                                 
056149,000865: 07,3760           04635                           TC       POSTJUMP                              
056150,000866: 07,3761           44004                           CADR     KALCMAN3                              
056151,000867: 07,3762           03275        KALEBCON           ECADR    BCDU                                  
056152,000868: 

Page 1324

056154,000870:                                                                                                  #  PROGRAM DESCRIPTION
056155,000871:                                                                                                  #  IMU STATUS CHECK ROUTINE R02 (SUBROUTINE UTILITY)
056156,000872:                                                                                                  #  MOD NO - 1
056157,000873:                                                                                                  #  MOD BY - N.BRODEUR
056158,000874: 
056159,000875:                                                                                                  #  FUNCTIONAL DESCRIPTION
056160,000876:                                                                                                  #        TO CHECK WHETHER IMU IS ON AND IF ON WHETHER IT IS ALIGNED TO AN
056161,000877:                                                                                                  #        ORIENTATION KNOWN BY THE CMC.  TO REQUEST SELECTION OF THE APPROPRIATE
056162,000878:                                                                                                  #        PROGRAM IF THE IMU IS OFF OR NOT ALIGNED TO AN ORIENTATION KNOWN BY THE
056163,000879:                                                                                                  #        CMC.  CALLED THROUGH BANKCALL
056164,000880: 
056165,000881:                                                                                                  #  CALLING SEQUENCE -
056166,000882:                                                                                                  #        L       TC      BANKCALL
056167,000883:                                                                                                  #        L+1     CADR    R02BOTH
056168,000884: 
056169,000885:                                                                                                  #  SUBROUTINES CALLED
056170,000886:                                                                                                  #        VARALARM
056171,000887:                                                                                                  #        FLAGUP
056172,000888: 
056173,000889:                                                                                                  #  NORMAL EXIT MODES
056174,000890:                                                                                                  #        AT L+2 OF CALLING SEQUENCE
056175,000891: 
056176,000892:                                                                                                  #  ALARM OR ABORT EXIT MODES
056177,000893:                                                                                                  #        GOTOPOOH, WITH ALARM
056178,000894: 
056179,000895:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED
056180,000896:                                                                                                  #        NONE
056181,000897: 
056182,000898:                                                                                                  #  DEBRIS
056183,000899:                                                                                                  #        CENTRALS-A,Q,L
056184,000900: 
056185,000901: 34,3650                                           BANK     34                                    
056186,000902: 04,2000                                           SETLOC   R02                                   
056187,000903: 04,2000                                           BANK                                           
056188,000904: 04,3232                                           COUNT*   $$/R02                                
056189,000905: 04,3232           00063        DEC51              DEC      51         B-14                       
056190,000906: 04,3233           34737        R02BOTH            CAF      REFSMBIT                              
056191,000907: 04,3234           70077                           MASK     FLAGWRD3                              
056192,000908: 04,3235           10000                           CCS      A                                     
056193,000909: 04,3236           03247                           TC       R02ZERO                               #  ZERO IMUS
056194,000910: 
056195,000911: 04,3237           31277                           CA       IMODES30                              
056196,000912: 04,3240           74743                           MASK     BIT9                                  #  IS ISS INITIALIZED
056197,000913: 04,3241           00006                           EXTEND                                         
056198,000914: 04,3242           13244                           BZF      +2                                    
056199,000915: 04,3243           44750                           CS       BIT4                                  #  SEND IMU ALARM CODE 210
056200,000916: 04,3244           63252                           AD       OCT220                                #  SEND REFSMM ALARM
056201,000917: 04,3245           05734                           TC       VARALARM                              
056202,000918: 
056203,000919: 04,3246           06001                           TC       GOTOPOOH                              
056204,000920: 
056205,000921: 04,3247           05504        R02ZERO            TC       UPFLAG                                

Page 1325

056207,000923: 04,3250           00007                           ADRES    IMUSE                                 
056208,000924: 04,3251           14631                           TCF      SWRETURN                              
056209,000925: 04,3252           00220        OCT220             OCT      220                                   
056210,000926: 

Page 1326

056212,000928:                                                                                                  #  PROGRAM DESCRIPTION   P06             10FEB67
056213,000929: 
056214,000930:                                                                                                  #  TRANSFER THE ISS/CMC FROM THE OPERATE TO THE STANDBY CONDITION.
056215,000931: 
056216,000932:                                                                                                  #  THE NORMAL CONDITION OF READINESS OF THE GNCS WHEN NOT IN USE IS STANDBY.  IN THIS CONDITION THE IMU
056217,000933:                                                                                                  #  HEATER POWER IS ON.  THE IMU OPERATE POWER IS OFF.  THE COMPUTER POWER IS ON.  THE OPTICS POWER IS OFF.  THE
056218,000934:                                                                                                  #  CMC STANDBY ON THE MAIN AND LEB DISKYS IS ON.
056219,000935: 
056220,000936:                                                                                                  #  CALLING SEQUENCE:
056221,000937:                                                                                                  #        ASTRONAUT REQUEST THROUGH DSKY  V37E 06E.
056222,000938: 
056223,000939:                                                                                                  #  SUBROUTINES CALLED:
056224,000940:                                                                                                  #        GOPERF1
056225,000941:                                                                                                  #        BANKCALL
056226,000942:                                                                                                  #        FLAGDOWN
056227,000943: 

Page 1327

056229,000945:                                                                                                  #  PRESTAND PREPARES FOR STANDBY BY SNAPSHOTTING THE SCALER AND TIME1 TIME2
056230,000946:                                                                                                  #  THE LOW 5 BITS OF THE SCALER ARE INSPECTED TO INSURE COMPATABILITY
056231,000947:                                                                                                  #  BETWEEN THE SCALER READING AND THE TIME1 TIME2 READING.
056232,000948: 
056233,000949: 37,2000                                           SETLOC   P05P06                                
056234,000950: 37,2000                                           BANK                                           
056235,000951: 
056236,000952: 37,3652     0314                                  EBANK=   TIME2SAV                              
056237,000953: 37,3652                                           COUNT*   $$/P06                                
056238,000954: 
056239,000955: 37,3652           05504        P06                TC       UPFLAG                                #  SET NODOV37 BIT
056240,000956: 37,3653           00054                           ADRES    NODOFLAG                              
056241,000957: 
056242,000958: 37,3654           00004        PRESTAND           INHINT                                         
056243,000959: 37,3655           00006                           EXTEND                                         
056244,000960: 37,3656           30025                           DCA      TIME2                                 #  SNAPSHOT TIME1 TIME2
056245,000961: 37,3657           52315                           DXCH     TIME2SAV                              
056246,000962: 37,3660           03711                           TC       SCALPREP                              
056247,000963: 37,3661           03654                           TC       PRESTAND                              #  T1,T2,SCALER NOT COMPATIBLE
056248,000964: 37,3662           52155                           DXCH     MPAC                                  #  T1,T2 AND SCALER OK
056249,000965: 37,3663           52317                           DXCH     SCALSAVE                              #  STORE SCALER
056250,000966: 37,3664           00004                           INHINT                                         
056251,000967: 37,3665           04616                           TC       BANKCALL                              
056252,000968: 37,3666           17166                           CADR     RNDREFDR                              #  REFSMM, DRIFT, TRACK FLAGS DOWN
056253,000969: 
056254,000970: 37,3667           05516                           TC       DOWNFLAG                              
056255,000971: 37,3670           00007                           ADRES    IMUSE                                 #  IMUSE DOWN
056256,000972: 37,3671           05516                           TC       DOWNFLAG                              
056257,000973: 37,3672           00010                           ADRES    RNDVZFLG                              #  RNDVZFLG DOWN
056258,000974: 
056259,000975: 37,3673           34741                           CAF      BIT11                                 
056260,000976: 37,3674           00006                           EXTEND                                         
056261,000977: 37,3675           05013                           WOR      CHAN13                                #  SET STANDBY ENABLE BIT
056262,000978: 
056263,000979: 37,3676           05353                           TC       PHASCHNG                              #  SET RESTART TO POSTAND WHEN STANDBY
056264,000980: 37,3677           07024                           OCT      07024                                 #        RECOVERS
056265,000981: 37,3700           20000                           OCT      20000                                 
056266,000982: 37,3701     0316                                  EBANK=   SCALSAVE                              
056267,000983: 37,3701           03731 76060                     2CADR    POSTAND                               
056268,000984: 
056269,000985: 37,3703           34774                           CAF      OCT62                                 
056270,000986: 37,3704           04616                           TC       BANKCALL                              
056271,000987: 37,3705           20624                           CADR     GOPERF1                               
056272,000988: 37,3706           13703                           TCF      -3                                    
056273,000989: 37,3707           13703                           TCF      -4                                    
056274,000990: 37,3710           13703                           TCF      -5                                    
056275,000991: 
056276,000992: 37,3711     4774               OCT62              EQUALS   .5SEC                                 #  DEC 50 = OCT 62
056277,000993: 
056278,000994:                                                                                                  #  THE LOW 5 BITS OF THE SCALER READS 10000 FOR THE FIRST INTERVAL AFTER A

Page 1328

056280,000996:                                                                                                  #  T1 INCREMENT.  IF SCALPREP DETECTS THIS INTERVAL THE T1,T2 AND SCALER
056281,000997:                                                                                                  #  DATA ARE NOT COMPATABLE AND RETURN IS TO L+1 FOR ANOTHER READING OF THE
056282,000998:                                                                                                  #  DATA.  OTHERWISE, THE RETURN IS TO L+2 TO PROCEED.  ROUTINE ALSO PREPARES
056283,000999:                                                                                                  #  THE SCALER READING FOR COMPUTATION OF THE INCREMENT TO UPDATE T1T2.  (THE
056284,001000:                                                                                                  #  10 MS BIT (BIT 6) OF THE SCALER IS INCREMENTED 5 MS OUT OF PHASE FROM
056285,001001:                                                                                                  #  T1.) ADDITION OF 5 MS (BIT 5) TO THE SCALER READING HAS THE EFFECT OF
056286,001002:                                                                                                  #  ADJUSTING BIT 6 IN THE SCALER TO BE IN PHASE WITH BIT 1 OF T1.  THE LOW 5
056287,001003:                                                                                                  #  BITS OF THE SCALER READING ARE THEN SET TO ZERO, TO TRUNCATE THE SCALER
056288,001004:                                                                                                  #  DATA TO 10 MS.  RESULTS ARE STORED IN MPAC, +1.
056289,001005: 
056290,001006: 37,3711           00006        SCALPREP           EXTEND                                         
056291,001007: 37,3712           22156                           QXCH     MPAC       +2                         
056292,001008: 37,3713           04103                           TC       FINETIME   +1                         
056293,001009: 37,3714           00003                           RELINT                                         
056294,001010: 37,3715           52155                           DXCH     MPAC                                  
056295,001011: 37,3716           34747                           CA       BIT5                                  #  ADD 5 MS TO THE SCALER READING.
056296,001012: 37,3717           54001                           TS       L                                     
056297,001013: 37,3720           34755                           CA       ZERO                                  
056298,001014: 37,3721           20155                           DAS      MPAC                                  
056299,001015: 37,3722           44346                           CS       LOW5                                  #  SET LOW 5 BITS OF (SCALER+5MS) TO ZERO
056300,001016: 37,3723           70155                           MASK     MPAC       +1                         #  AND STORE RESULTS IN MPAC,+1.
056301,001017: 37,3724           56155                           XCH      MPAC       +1                         
056302,001018: 37,3725           74346                           MASK     LOW5                                  #  TEST LOW 5 BITS OF SCALER FOR THE FIRST
056303,001019:                                                                                                  #  INTERVAL AFTER THE T1 INCREMENT
056304,001020:                                                                                                  #  (NOW = 00000, SINCE BIT 5 ADDED).
056305,001021: 37,3726           10000                           CCS      A                                     #  IS IT 1ST INTERVAL AFTER T1 INCREMENT
056306,001022: 37,3727           24156                           INCR     MPAC       +2                         #  NO
056307,001023: 37,3730           00156                           TC       MPAC       +2                         #  YES
056308,001024: 
056309,001025:                                                                                                  #  POSTAND RECOVERS TIME AFTER STANDBY.  THE SCALER IS SNAPSHOTTED AND THE
056310,001026:                                                                                                  #  TIME1 TIME2 COUNTER IS SET TO ZERO.  THE LOW 5 BITS OF THE SCALER ARE
056311,001027:                                                                                                  #  INSPECTED TO INSURE COMPATABILITY BETWEEN THE SCALER READING AND THE
056312,001028:                                                                                                  #  CLEARING OF THE TIME COUNTER.  IT THEN COMPUTES THE DIFFERENCE IN SCALER
056313,001029:                                                                                                  #  VALUES (IN DP) AND ADDS THIS TO THE PREVIOUSLY SNAPSHOTTED VALUES OF
056314,001030:                                                                                                  #  TIME1 TIME2 AND PLACES THIS NEW TIME INTO THE TIME1 TIME2 COUNTER.
056315,001031: 
056316,001032: 37,3731                                           COUNT*   $$/P05                                
056317,001033: 
056318,001034: 37,3731           44741        POSTAND            CS       BIT11                                 #  RECOVER TIME AFTER STANDBY.
056319,001035: 37,3732           00006                           EXTEND                                         
056320,001036: 37,3733           03013                           WAND     CHAN13                                #  CLEAR STANDBY ENABLE BIT
056321,001037: 37,3734           00004                           INHINT                                         
056322,001038: 37,3735           34755                           CA       ZERO                                  
056323,001039: 37,3736           54001                           TS       L                                     
056324,001040: 37,3737           52025                           DXCH     TIME2                                 #  CLEAR TIME1 TIME2
056325,001041: 37,3740           03711                           TC       SCALPREP                              #  STORE SCALER IN MPAC, MPAC+1
056326,001042: 37,3741           03734                           TC       POSTAND    +3                         #  T1,T2,SCALER NOT COMPATIBLE
056327,001043: 37,3742           00006                           EXTEND                                         #  T1,T2 AND SCALER OK
056328,001044: 37,3743           40317                           DCS      SCALSAVE                              
056329,001045: 37,3744           20155                           DAS      MPAC                                  #  FORM DP DIFFERENCE OF POSTSTANDBY SCALER

Page 1329

056331,001047: 37,3745           34742                           CAF      BIT10                                 #  MINUS PRESTANDBY SCALER AND SHIFT RIGHT
056332,001048: 37,3746           07312                           TC       SHORTMP                               #  5 TO ALIGN BITS WITH TIME1 TIME2.
056333,001049: 37,3747           34755                           CAF      ZERO                                  
056334,001050: 37,3750           54156                           TS       MPAC       +2                         #  NEEDED FOR TP AGREE
056335,001051: 37,3751           07262                           TC       TPAGREE                               #  MAKE DP DIFF AGREE
056336,001052: 37,3752           10154                           CCS      MPAC                                  
056337,001053: 37,3753           03760                           TC       POSTCOM                               #  IF DP DIFF NET +, NO SCALER OVERFLOW
056338,001054: 37,3754           03760                           TC       POSTCOM                               #  BETWEEN PRE AND POST STANDBY.
056339,001055: 37,3755           03756                           TC       +1                                    #  IF DP DIFF NET -, SCALER OVERFLOWED.  ADD
056340,001056: 37,3756           34742                           CAF      BIT10                                 #  BIT 10 TO HIGH DIFF TO CORRECT.
056341,001057: 37,3757           26154                           ADS      MPAC                                  
056342,001058: 37,3760           00006        POSTCOM            EXTEND                                         #  C(MPAC,+1) IS MAGNITUDE OF DELTA SCALER.
056343,001059: 37,3761           30315                           DCA      TIME2SAV                              #  PRESTANDBY TIME1 TIME2
056344,001060: 37,3762           20155                           DAS      MPAC                                  
056345,001061: 37,3763           07262                           TC       TPAGREE                               #  FORCE SIGN AGREEMENT
056346,001062: 37,3764           52155                           DXCH     MPAC                                  #  UPDATED VALUE FOR T1,T2.
056347,001063: 37,3765           20025                           DAS      TIME2                                 #  LOAD UPDATED VALUE INTO T1,T2, WITH
056348,001064: 37,3766           05516                           TC       DOWNFLAG                              #  CLEAR NODOFLAG
056349,001065: 37,3767           00054                           ADRES    NODOFLAG                              
056350,001066: 
056351,001067: 37,3770           06001                           TC       GOTOPOOH                              
056352,001068: 

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