Source Code

These source-code files derive from a printout of Luminary 116 (the Apollo 12 Lunar Module guidance computer program), from the personal library of original AGC developer Don Eyles, digitally photographed at archive.org, financially sponsored by Ron Burkey, and transcribed to source code by a team of volunteers. This colorized, syntax-highlighted form was created by assembling that transcribed source code. Note that the full page images are available on the Virtual AGC project page at archive.org, while reduced-size images are presented at the VirtualAGC project website. Report or fix any transcription errors at the Virtual AGC project code repository.

Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 116 OF AGC PROGRAM LUMINARY BY NASA 2021112-071
	19:09 AUG. 11,1969
Note that the date is the date of the printout, not the date of the program revision.

055255,000002:                                                                                                  ## Copyright:   Public domain.
055256,000003:                                                                                                  ## Filename:    IMU_MODE_SWITCHING_ROUTINES.agc
055257,000004:                                                                                                  ## Purpose:     A section of Luminary revision 116.
055258,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
055259,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 12.
055260,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
055261,000008:                                                                                                  ##              that the code format has been changed to conform to the
055262,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
055263,000010:                                                                                                  ##              original YUL assembler.
055264,000011:                                                                                                  ## Reference:   pp. 1299-1327
055265,000012:                                                                                                  ## Assembler:   yaYUL
055266,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
055267,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
055268,000015:                                                                                                  ## Mod history: 2017-01-22 MAS  Created from Luminary 99.
055269,000016:                                                                                                  ##              2017-01-28 RSB Comment-text fixes identified for Luminary 69.
055270,000017:                                                                                                  ##              2017-02-07 RRB  Updated for Luminary 116.
055271,000018:                                                                                                  ##              2017-03-13 RSB  Proofed comment text via 3-way diff vs
055272,000019:                                                                                                  ##                              Luminary 99 and 131.
055273,000020:                                                                                                  ##              2017-03-15 RSB  Comment-text fixes identified in 6-way
055274,000021:                                                                                                  ##                              side-by-side diff of Sunburst 120 and Luminary
055275,000022:                                                                                                  ##                              69/99/116/131/210.
055276,000023:                                                                                                  ##              2017-03-19 HG   Fix value  OCT 1210 --> OCT 31210
055277,000024:                                                                                                  ##              2017-06-17 MAS  Globally removed all SBANK= workarounds.
055278,000025: 

Page 1299

055280,000027:    5457                                           BLOCK    02                                    
055281,000028:    4000                                           SETLOC   FFTAG3                                
055282,000029:    4000                                           BANK                                           
055283,000030: 
055284,000031:    5457  E3,1471                                  EBANK=   COMMAND                               
055285,000032: 
055286,000033:                                                                                                  #  FIXED-FIXED ROUTINES.
055287,000034: 
055288,000035:    5457                                           COUNT*   $$/IMODE                              
055289,000036:    5457           34755        ZEROICDU           CAF      ZERO                                  #  ZERO ICDU COUNTERS.
055290,000037:    5460           54032                           TS       CDUX                                  
055291,000038:    5461           54033                           TS       CDUY                                  
055292,000039:    5462           54034                           TS       CDUZ                                  
055293,000040:    5463           00002                           TC       Q                                     
055294,000041: 
055295,000042:    5464     4743               SPSCODE            =        BIT9                                  
055296,000043: 

Page 1300

055298,000045:                                                                                                  #  IMU ZEROING ROUTINE.
055299,000046: 
055300,000047: 11,3774                                           BANK     11                                    
055301,000048: 07,2000                                           SETLOC   MODESW                                
055302,000049: 07,2000                                           BANK                                           
055303,000050: 
055304,000051: 07,2706                                           COUNT*   $$/IMODE                              
055305,000052: 07,2706           00004        IMUZERO            INHINT                                         #  ROUTINE TO ZERO ICDUS.
055306,000053: 07,2707           41035                           CS       DSPTAB     +11D                       #  DONT ZERO CDUS IF IMU IN GIMBAL LOCK AND
055307,000054: 07,2710           74771                           MASK     BITS4&6                               #  COARSE ALIGN (GIMBAL RUNAWAY PROTECTION)
055308,000055: 07,2711           10000                           CCS      A                                     
055309,000056: 07,2712           12716                           TCF      IMUZEROA                              
055310,000057: 
055311,000058: 07,2713           05567                           TC       ALARM                                 #  IF SO.
055312,000059: 07,2714           00206                           OCT      00206                                 
055313,000060: 
055314,000061: 07,2715           13651                           TCF      CAGETSTJ   +4                         #  IMMEDIATE FAILURE.
055315,000062: 
055316,000063: 07,2716           03645        IMUZEROA           TC       CAGETSTJ                              
055317,000064:                                                                                                  #  DELETE
055318,000065: 07,2717           41300                           CS       IMODES33                              #  DISABLE DAP AUTO AND HOLD MODES
055319,000066: 07,2720           74773                           MASK     SUPER011                              #      BIT5 FOR GROUND
055320,000067: 07,2721           27300                           ADS      IMODES33                              
055321,000068: 
055322,000069: 07,2722           41277                           CS       IMODES30                              #  INHIBIT ICDUFAIL AND IMUFAIL (IN CASE WE
055323,000070: 07,2723           75741                           MASK     BITS3&4                               #  JUST CAME OUT OF COARSE ALIGN).
055324,000071: 07,2724           27277                           ADS      IMODES30                              
055325,000072: 
055326,000073: 07,2725           44771                           CS       BITS4&6                               #  SEND ZERO ENCODE WITH COARSE AND ERROR
055327,000074: 07,2726           00006                           EXTEND                                         #  COUNTER DISABLED.
055328,000075: 07,2727           03012                           WAND     CHAN12                                
055329,000076: 
055330,000077: 07,2730           03260                           TC       NOATTOFF                              #  TURN OFF NO ATT LAMP.
055331,000078: 
055332,000079: 07,2731           34747                           CAF      BIT5                                  
055333,000080: 07,2732           00006                           EXTEND                                         
055334,000081: 07,2733           05012                           WOR      CHAN12                                
055335,000082: 
055336,000083: 07,2734           05457                           TC       ZEROICDU                              
055337,000084: 07,2735           34746                           CAF      BIT6                                  #  WAIT 320 MS TO GIVE AGS ADEQUATE TIME TO
055338,000085: 07,2736           05203                           TC       WAITLIST                              #  RECEIVE ITS PULSE TRAIN.
055339,000086: 07,2737  E3,1474                                  EBANK=   CDUIND                                
055340,000087: 07,2737           02751 16103                     2CADR    IMUZERO2                              
055341,000088: 
055342,000089: 07,2741           41277                           CS       IMODES30                              #  SEE IF IMU OPERATING AND ALARM IF NOT.
055343,000090: 07,2742           74743                           MASK     BIT9                                  
055344,000091: 07,2743           10000                           CCS      A                                     
055345,000092: 07,2744           12747                           TCF      MODEEXIT                              

Page 1301

055347,000094: 07,2745           05567                           TC       ALARM                                 
055348,000095: 07,2746           00210                           OCT      210                                   
055349,000096: 
055350,000097: 07,2747           00003        MODEEXIT           RELINT                                         #  GENERAL MODE-SWITCHING EXIT.
055351,000098: 07,2750           14631                           TCF      SWRETURN                              
055352,000099: 
055353,000100: 07,2751           03633        IMUZERO2           TC       CAGETEST                              
055354,000101: 07,2752           05457                           TC       ZEROICDU                              #  ZERO CDUX, CDUY, CDUZ
055355,000102: 
055356,000103: 07,2753           44747                           CS       BIT5                                  #  REMOVE ZERO DISCRETE.
055357,000104: 07,2754           00006                           EXTEND                                         
055358,000105: 07,2755           03012                           WAND     CHAN12                                
055359,000106: 
055360,000107: 07,2756           34741                           CAF      BIT11                                 #  WAIT 10 SECS FOR CTRS TO FIND GIMBALS
055361,000108: 07,2757           05224                           TC       VARDELAY                              
055362,000109: 
055363,000110: 07,2760           03633        IMUZERO3           TC       CAGETEST                              
055364,000111: 07,2761           45741                           CS       BITS3&4                               #  REMOVE IMUFAIL AND ICDUFAIL INHIBIT.
055365,000112: 07,2762           71277                           MASK     IMODES30                              
055366,000113: 07,2763           55277                           TS       IMODES30                              
055367,000114: 
055368,000115: 07,2764           44773                           CS       SUPER011                              #  ENABLE DAP AUTO AND HOLD MODES
055369,000116: 07,2765           71300                           MASK     IMODES33                              #      BIT5 FOR GROUND
055370,000117: 07,2766           55300                           TS       IMODES33                              
055371,000118: 
055372,000119: 07,2767           04674                           TC       IBNKCALL                              #  SET ISS WARNING IF EITHER OF ABOVE ARE
055373,000120: 07,2770           14703                           CADR     SETISSW                               #  PRESENT.
055374,000121: 
055375,000122: 07,2771           13623                           TCF      ENDIMU                                
055376,000123: 

Page 1302

055378,000125:                                                                                                  #  IMU COARSE ALIGN MODE.
055379,000126: 
055380,000127: 07,2772           00004        IMUCOARS           INHINT                                         
055381,000128: 07,2773           03645                           TC       CAGETSTJ                              
055382,000129: 07,2774           03136                           TC       SETCOARS                              
055383,000130: 
055384,000131: 07,2775           36245                           CAF      SIX                                   
055385,000132: 07,2776           05203                           TC       WAITLIST                              
055386,000133: 07,2777  E3,1474                                  EBANK=   CDUIND                                
055387,000134: 07,2777           03002 16103                     2CADR    COARS                                 
055388,000135: 
055389,000136: 07,3001           12747                           TCF      MODEEXIT                              
055390,000137: 
055391,000138: 07,3002           03633        COARS              TC       CAGETEST                              
055392,000139: 07,3003           34746                           CAF      BIT6                                  #  ENABLE ALL THREE ISS CDU ERROR COUNTERS
055393,000140: 07,3004           00006                           EXTEND                                         
055394,000141: 07,3005           05012                           WOR      CHAN12                                
055395,000142: 
055396,000143: 07,3006           34752                           CAF      TWO                                   #  SET CDU INDICATOR
055397,000144: 07,3007           55474        COARS1             TS       CDUIND                                
055398,000145: 
055399,000146: 07,3010           51474                           INDEX    CDUIND                                #  COMPUTE THETAD - THETAA IN 1:S
055400,000147: 07,3011           30321                           CA       THETAD                                #    COMPLEMENT FORM
055401,000148: 07,3012           00006                           EXTEND                                         
055402,000149: 07,3013           51474                           INDEX    CDUIND                                
055403,000150: 07,3014           20032                           MSU      CDUX                                  
055404,000151: 07,3015           00006                           EXTEND                                         
055405,000152: 07,3016           74737                           MP       BIT13                                 #  SHIFT RIGHT 2
055406,000153: 07,3017           56001                           XCH      L                                     #  ROUND
055407,000154: 07,3020           60000                           DOUBLE                                         
055408,000155: 07,3021           54061                           TS       ITEMP1                                
055409,000156: 07,3022           13024                           TCF      +2                                    
055410,000157: 07,3023           26001                           ADS      L                                     
055411,000158: 
055412,000159: 07,3024           51474                           INDEX    CDUIND                                #  DIFFERENCE TO BE COMPUTED
055413,000160: 07,3025           23471                           LXCH     COMMAND                               
055414,000161: 07,3026           11474                           CCS      CDUIND                                
055415,000162: 07,3027           03007                           TC       COARS1                                
055416,000163: 
055417,000164: 07,3030           34752                           CAF      TWO                                   #  MINIMUM OF 4 MS WAIT
055418,000165: 07,3031           05224                           TC       VARDELAY                              
055419,000166: 

Page 1303

055421,000168: 07,3032           03633        COARS2             TC       CAGETEST                              #  DONT CONTINUE IF CAGED.
055422,000169: 07,3033           54061                           TS       ITEMP1                                #  SETS TO +0.
055423,000170: 07,3034           34752                           CAF      TWO                                   #  SET CDU INDICATOR
055424,000171: 07,3035           55474                 +3        TS       CDUIND                                
055425,000172: 
055426,000173: 07,3036           51474                           INDEX    CDUIND                                
055427,000174: 07,3037           11471                           CCS      COMMAND                               #  NUMBER OF PULSES REQUIRED
055428,000175: 07,3040           03044                           TC       COMPOS                                #  GREATER THAN MAX ALLOWED
055429,000176: 07,3041           03053                           TC       NEXTCDU    +1                         
055430,000177: 07,3042           03111                           TC       COMNEG                                
055431,000178: 07,3043           03053                           TC       NEXTCDU    +1                         
055432,000179: 
055433,000180: 07,3044           63737        COMPOS             AD       -COMMAX                               #  COMMAX = MAX NUMBER OF PULSES ALLOWED
055434,000181: 07,3045           00006                           EXTEND                                         #    MINUS ONE
055435,000182: 07,3046           63121                           BZMF     COMZERO                               
055436,000183: 07,3047           51474                           INDEX    CDUIND                                
055437,000184: 07,3050           55471                           TS       COMMAND                               #  REDUCE COMMAND BY MAX NUMBER OF PULSES
055438,000185: 07,3051           43740                           CS       -COMMAX-                              #    ALLOWED
055439,000186: 
055440,000187: 07,3052           24061        NEXTCDU            INCR     ITEMP1                                
055441,000188: 07,3053           64754                           AD       NEG0                                  
055442,000189: 07,3054           51474                           INDEX    CDUIND                                
055443,000190: 07,3055           54050                           TS       CDUXCMD                               #  SET UP COMMAND REGISTER.
055444,000191: 
055445,000192: 07,3056           11474                           CCS      CDUIND                                
055446,000193: 07,3057           03035                           TC       COARS2     +3                         
055447,000194: 
055448,000195: 07,3060           10061                           CCS      ITEMP1                                #  SEE IF ANY PULSES TO GO OUT.
055449,000196: 07,3061           13125                           TCF      SENDPULS                              
055450,000197: 
055451,000198: 07,3062           05221                           TC       FIXDELAY                              #  WAIT FOR GIMBALS TO SETTLE.
055452,000199: 07,3063           00226                           DEC      150        B-14                       
055453,000200: 
055454,000201: 07,3064           34752                           CAF      TWO                                   #  AT END OF COMMAND, CHECK TO SEE THAT
055455,000202: 07,3065           54061        CHKCORS            TS       ITEMP1                                #  GIMBALS ARE WITHIN 2 DEGREES OF THETAD.
055456,000203: 07,3066           50000                           INDEX    A                                     
055457,000204: 07,3067           30032                           CA       CDUX                                  
055458,000205: 07,3070           00006                           EXTEND                                         
055459,000206: 07,3071           50061                           INDEX    ITEMP1                                
055460,000207: 07,3072           20321                           MSU      THETAD                                
055461,000208: 07,3073           10000                           CCS      A                                     
055462,000209: 07,3074           13102                           TCF      COARSERR                              
055463,000210: 07,3075           13077                           TCF      CORSCHK2                              
055464,000211: 07,3076           13102                           TCF      COARSERR                              
055465,000212: 

Page 1304

055467,000214: 07,3077           10061        CORSCHK2           CCS      ITEMP1                                
055468,000215: 07,3100           13065                           TCF      CHKCORS                               
055469,000216: 07,3101           13623                           TCF      ENDIMU                                #  END OF COARSE ALIGNMENT.
055470,000217: 
055471,000218: 07,3102           63110        COARSERR           AD       COARSTOL                              #  2 DEGREES.
055472,000219: 07,3103           00006                           EXTEND                                         
055473,000220: 07,3104           63077                           BZMF     CORSCHK2                              
055474,000221: 
055475,000222: 07,3105           05567                           TC       ALARM                                 #  COARSE ALIGN ERROR.
055476,000223: 07,3106           00211                           OCT      211                                   
055477,000224: 
055478,000225: 07,3107           13631                           TCF      IMUBAD                                
055479,000226: 
055480,000227: 07,3110           77511        COARSTOL           DEC      -.01111                               #  2 DEGREES SCALED AT HALF-REVOLUTIONS
055481,000228: 
055482,000229: 07,3111           63737        COMNEG             AD       -COMMAX                               
055483,000230: 07,3112           00006                           EXTEND                                         
055484,000231: 07,3113           63121                           BZMF     COMZERO                               
055485,000232: 07,3114           40000                           COM                                            
055486,000233: 07,3115           51474                           INDEX    CDUIND                                
055487,000234: 07,3116           55471                           TS       COMMAND                               
055488,000235: 07,3117           33740                           CA       -COMMAX-                              
055489,000236: 07,3120           03052                           TC       NEXTCDU                               
055490,000237: 
055491,000238: 07,3121           34755        COMZERO            CAF      ZERO                                  
055492,000239: 07,3122           51474                           INDEX    CDUIND                                
055493,000240: 07,3123           57471                           XCH      COMMAND                               
055494,000241: 07,3124           03052                           TC       NEXTCDU                               
055495,000242: 
055496,000243: 07,3125           37743        SENDPULS           CAF      13,14,15                              
055497,000244: 07,3126           00006                           EXTEND                                         
055498,000245: 07,3127           05014                           WOR      CHAN14                                
055499,000246: 07,3130           33741                           CAF      600MS                                 
055500,000247: 07,3131           13031                           TCF      COARS2     -1                         #  THEN TO VARDELAY
055501,000248: 
055502,000249: 07,3132           34746        CA+ECE             CAF      BIT6                                  #  ENABLE ALL THREE ISS CDU ERROR COUNTERS
055503,000250: 07,3133           00006                           EXTEND                                         
055504,000251: 07,3134           05012                           WOR      CHAN12                                
055505,000252: 07,3135           05261                           TC       TASKOVER                              
055506,000253: 

Page 1305

055508,000255: 07,3136           34750        SETCOARS           CAF      BIT4                                  #  BYPASS IF ALREADY IN COARSE ALIGN
055509,000256: 07,3137           00006                           EXTEND                                         
055510,000257: 07,3140           02012                           RAND     CHAN12                                
055511,000258: 07,3141           10000                           CCS      A                                     
055512,000259: 07,3142           00002                           TC       Q                                     
055513,000260: 
055514,000261: 07,3143           44746                           CS       BIT6                                  #  CLEAR ISS ERROR COUNTERS
055515,000262: 07,3144           00006                           EXTEND                                         
055516,000263: 07,3145           03012                           WAND     CHAN12                                
055517,000264: 
055518,000265: 07,3146           44742                           CS       BIT10                                 #  KNOCK DOWN GYRO ACTIVITY
055519,000266: 07,3147           00006                           EXTEND                                         
055520,000267: 07,3150           03014                           WAND     CHAN14                                
055521,000268: 07,3151           44755                           CS       ZERO                                  
055522,000269: 07,3152           54047                           TS       GYROCMD                               
055523,000270: 
055524,000271: 07,3153           34750                           CAF      BIT4                                  #  PUT ISS IN COARSE ALIGN
055525,000272: 07,3154           00006                           EXTEND                                         
055526,000273: 07,3155           05012                           WOR      CHAN12                                
055527,000274: 
055528,000275: 07,3156           41035                           CS       DSPTAB     +11D                       #  TURN ON NO ATT LAMP
055529,000276: 07,3157           73201                           MASK     OCT40010                              
055530,000277: 07,3160           27035                           ADS      DSPTAB     +11D                       
055531,000278: 
055532,000279: 07,3161           41300                           CS       IMODES33                              #  DISABLE DAP AUTO AND HOLD MODES
055533,000280: 07,3162           74746                           MASK     BIT6                                  
055534,000281: 07,3163           27300                           ADS      IMODES33                              
055535,000282: 
055536,000283: 07,3164           41277                           CS       IMODES30                              #  DISABLE IMUFAIL
055537,000284: 07,3165           74750                           MASK     BIT4                                  
055538,000285: 07,3166           27277                           ADS      IMODES30                              
055539,000286: 
055540,000287: 07,3167           44747        RNDREFDR           CS       TRACKBIT                              #  CLEAR TRACK FLAG
055541,000288: 07,3170           70075                           MASK     FLAGWRD1                              
055542,000289: 07,3171           54075                           TS       FLAGWRD1                              
055543,000290: 
055544,000291: 07,3172           44735                           CS       DRFTBIT                               #  CLEAR DRIFT FLAG
055545,000292: 07,3173           70076                           MASK     FLAGWRD2                              
055546,000293: 07,3174           54076                           TS       FLAGWRD2                              
055547,000294: 
055548,000295: 07,3175           44737                           CS       REFSMBIT                              #  CLEAR REFSMMAT FLAG
055549,000296: 07,3176           70077                           MASK     FLAGWRD3                              
055550,000297: 07,3177           54077                           TS       FLAGWRD3                              
055551,000298: 
055552,000299: 07,3200           00002                           TC       Q                                     
055553,000300: 
055554,000301: 07,3201           40010        OCT40010           OCT      40010                                 
055555,000302: 

Page 1306

055557,000304:                                                                                                  #  IMU FINE ALIGN MODE SWITCH.
055558,000305: 
055559,000306: 07,3202           00004        IMUFINE            INHINT                                         
055560,000307: 07,3203           03645                           TC       CAGETSTJ                              #  SEE IF IMU BEING CAGED.
055561,000308: 
055562,000309: 07,3204           43736                           CS       BITS4-5                               #  RESET ZERO AND COARSE
055563,000310: 07,3205           00006                           EXTEND                                         
055564,000311: 07,3206           03012                           WAND     CHAN12                                
055565,000312: 
055566,000313: 07,3207           44746                           CS       BIT6                                  #  INSURE DAP AUTO AND HOLD MODES ENABLED
055567,000314: 07,3210           71300                           MASK     IMODES33                              
055568,000315: 07,3211           55300                           TS       IMODES33                              
055569,000316: 
055570,000317: 07,3212           03260                           TC       NOATTOFF                              
055571,000318: 
055572,000319: 07,3213           34742                           CAF      BIT10                                 #  IMU FAIL WAS INHIBITED DURING THE
055573,000320: 07,3214           05203                           TC       WAITLIST                              #  PRESUMABLY PRECEDING COARSE ALIGN.  LEAVE
055574,000321: 07,3215  E3,1474                                  EBANK=   CDUIND                                
055575,000322: 07,3215           03226 16103                     2CADR    IFAILOK                               #  IT ON FOR THE FIRST 5 SECS OF FINE ALIGN
055576,000323: 
055577,000324: 07,3217           35000                           CAF      2SECS                                 
055578,000325: 07,3220           05203                           TC       WAITLIST                              
055579,000326: 07,3221  E3,1474                                  EBANK=   CDUIND                                
055580,000327: 07,3221           03224 16103                     2CADR    IMUFINED                              
055581,000328: 
055582,000329: 07,3223           12747                           TCF      MODEEXIT                              
055583,000330: 
055584,000331: 07,3224           03633        IMUFINED           TC       CAGETEST                              #  SEE THAT NO ONE HAS CAGED THE IMU.
055585,000332: 07,3225           13623                           TCF      ENDIMU                                
055586,000333: 

Page 1307

055588,000335: 07,3226           03640        IFAILOK            TC       CAGETSTQ                              #  ENABLE IMU FIAL UNLESS IMU BEING CAGED.
055589,000336: 07,3227           15261                           TCF      TASKOVER                              #  IT IS.
055590,000337: 
055591,000338: 07,3230           34750                           CAF      BIT4                                  #  DONT RESET IMU FAIL INHIBIT IF SOMEONE
055592,000339: 07,3231           00006                           EXTEND                                         #  HAS GONE INTO COARSE ALIGN.
055593,000340: 07,3232           02012                           RAND     CHAN12                                
055594,000341: 07,3233           10000                           CCS      A                                     
055595,000342: 07,3234           15261                           TCF      TASKOVER                              
055596,000343: 
055597,000344: 07,3235           41277                           CS       IMODES30                              #  RESET IMUFAIL.
055598,000345: 07,3236           74737                           MASK     BIT13                                 
055599,000346: 07,3237           27277                           ADS      IMODES30                              
055600,000347: 07,3240           44750                           CS       BIT4                                  
055601,000348: 07,3241           71277        PFAILOK2           MASK     IMODES30                              
055602,000349: 07,3242           55277                           TS       IMODES30                              
055603,000350: 07,3243           04674                           TC       IBNKCALL                              #  THE ISS WARNING LIGHT MAY COME ON NOW
055604,000351: 07,3244           14703                           CADR     SETISSW                               #  THAT THE INHIBIT HAS BEEN REMOVED.
055605,000352: 07,3245           15261                           TCF      TASKOVER                              
055606,000353: 
055607,000354: 07,3246           03640        PFAILOK            TC       CAGETSTQ                              #  ENABLE PIP FAIL PROG ALARM.
055608,000355: 07,3247           15261                           TCF      TASKOVER                              
055609,000356: 
055610,000357: 07,3250           41277                           CS       IMODES30                              #  RESET IMU AND PIPA FAIL BITS.
055611,000358: 07,3251           74742                           MASK     BIT10                                 
055612,000359: 07,3252           27277                           ADS      IMODES30                              
055613,000360: 
055614,000361: 07,3253           41300                           CS       IMODES33                              
055615,000362: 07,3254           74737                           MASK     BIT13                                 
055616,000363: 07,3255           27300                           ADS      IMODES33                              
055617,000364: 
055618,000365: 07,3256           44747                           CS       BIT5                                  
055619,000366: 07,3257           13241                           TCF      PFAILOK2                              
055620,000367: 
055621,000368: 07,3260           43201        NOATTOFF           CS       OCT40010                              #  SUBROUTINE TO TURN OFF NO ATT LAMP.
055622,000369: 07,3261           71035                           MASK     DSPTAB     +11D                       
055623,000370: 07,3262           64735                           AD       BIT15                                 
055624,000371: 07,3263           55035                           TS       DSPTAB     +11D                       
055625,000372: 07,3264           00002                           TC       Q                                     
055626,000373: 

Page 1308

055628,000375:                                                                                                  #  ROUITNES TO INITIATE AND TERMINATE PROGRAM USE OF THE PIPAS. NO IMUSTALL REQUIRED IN EITHER CASE.
055629,000376: 
055630,000377: 07,3265           44755        PIPUSE             CS       ZERO                                  
055631,000378: 07,3266           54037                           TS       PIPAX                                 
055632,000379: 07,3267           54040                           TS       PIPAY                                 
055633,000380: 07,3270           54041                           TS       PIPAZ                                 
055634,000381: 
055635,000382: 07,3271           03640        PIPUSE1            TC       CAGETSTQ                              #  DO NOT ENABLE PIPA FAIL IF IMU IS CAGED
055636,000383: 07,3272           14631                           TCF      SWRETURN                              
055637,000384: 
055638,000385: 07,3273           00004                           INHINT                                         
055639,000386: 07,3274           44753                           CS       BIT1                                  #  IF PIPA FAILS FROM NOW ON (UNTIL
055640,000387: 07,3275           71277                           MASK     IMODES30                              #  PIPFREE), LIGHT ISS WARNING.
055641,000388: 07,3276           55277                           TS       IMODES30                              
055642,000389: 
055643,000390: 07,3277           04674        PIPFREE2           TC       IBNKCALL                              #  ISS WARNING MIGHT COME ON NOW.
055644,000391: 07,3300           14703                           CADR     SETISSW                               #  (OR GO OFF ON PIPFREE).
055645,000392: 
055646,000393: 07,3301           12747                           TCF      MODEEXIT                              
055647,000394: 
055648,000395: 07,3302           00004        PIPFREE            INHINT                                         #  PROGRAM DONE WITH PIPAS.  DONT LIGHT
055649,000396: 07,3303           41277                           CS       IMODES30                              #  ISS WARNING.
055650,000397: 07,3304           74753                           MASK     BIT1                                  
055651,000398: 07,3305           27277                           ADS      IMODES30                              
055652,000399: 
055653,000400: 07,3306           74742                           MASK     BIT10                                 #  IF PIP FAIL ON, DO PROG ALSRM AND RESET
055654,000401: 07,3307           10000                           CCS      A                                     #  ISS WARNING.
055655,000402: 07,3310           12747                           TCF      MODEEXIT                              
055656,000403: 
055657,000404: 07,3311           05567                           TC       ALARM                                 
055658,000405: 07,3312           00212                           OCT      212                                   
055659,000406: 
055660,000407: 07,3313           00004                           INHINT                                         
055661,000408: 
055662,000409: 07,3314           13277                           TCF      PIPFREE2                              
055663,000410: 

Page 1309

055665,000412:                                                                                                  #           THE FOLLOWING ROUTINE TORQUES THE IRIGS ACCORDING TO DOUBLE PRECISION INPUTS IN THE SIX REGISTERS
055666,000413:                                                                                                  #  BEGINNING AT THE ECADR ARRIVING IN A. THE MINIMUM SIZE OF ANY PULSE TRAIN IS 16 PULSES (.25 CDU COUNTS). THE
055667,000414:                                                                                                  #  UNSENT PORTION OF THE COMMAND IS LEFT INTACT IN THE INPUT COMMAND REGISTERS.
055668,000415: 
055669,000416: 07,3315  E3,1400                                  EBANK=   1400                                  #  VARIABLE, ACTUALLY.
055670,000417: 
055671,000418: 07,3315           54161        IMUPULSE           TS       MPAC       +5                         #  SAVE ARRIVING ECADR.
055672,000419: 07,3316           03645                           TC       CAGETSTJ                              #  DONT PROCEED IF IMU BEING CAGED.
055673,000420: 
055674,000421: 07,3317           11311                           CCS      LGYRO                                 #  SEE IF GYROS BUSY.
055675,000422: 07,3320           03361                           TC       GYROBUSY                              #  SLEEP.
055676,000423: 
055677,000424: 07,3321           54156                           TS       MPAC       +2                         
055678,000425: 07,3322           34746                           CAF      BIT6                                  #  ENABLE THE POWER SUPPLY.
055679,000426: 07,3323           00006                           EXTEND                                         
055680,000427: 07,3324           05014                           WOR      CHAN14                                
055681,000428: 
055682,000429: 07,3325           34751                           CAF      FOUR                                  
055683,000430: 07,3326           05203        GWAKE2             TC       WAITLIST                              #  (IF A JOB WAS PUT TO SLEEP, THE POWER
055684,000431: 07,3327  E3,1474                                  EBANK=   CDUIND                                #  SUPPLY IS LEFT ON BY THE WAKING JOB).
055685,000432: 07,3327           03377 16103                     2CADR    STRTGYRO                              
055686,000433: 
055687,000434: 07,3331           30161                           CA       MPAC       +5                         #  SET UP EBANK, SAVING CALLER'S EBANK FOR
055688,000435: 07,3332           56003                           XCH      EBANK                                 #  RESTORATION ON RETURN.
055689,000436: 07,3333           56161                           XCH      MPAC       +5                         
055690,000437: 07,3334           55311                           TS       LGYRO                                 #  RESERVES GYROS.
055691,000438: 07,3335           74357                           MASK     LOW8                                  
055692,000439: 07,3336           54061                           TS       ITEMP1                                
055693,000440: 
055694,000441: 07,3337           34752                           CAF      TWO                                   #  FORCE SIGN AGREEMENT ON INPUTS.
055695,000442: 07,3340           54157        GYROAGRE           TS       MPAC       +3                         
055696,000443: 07,3341           60000                           DOUBLE                                         
055697,000444: 07,3342           60061                           AD       ITEMP1                                
055698,000445: 07,3343           54160                           TS       MPAC       +4                         
055699,000446: 07,3344           00006                           EXTEND                                         
055700,000447: 07,3345           50000                           INDEX    A                                     
055701,000448: 07,3346           31401                           DCA      1400                                  
055702,000449: 07,3347           52155                           DXCH     MPAC                                  
055703,000450: 07,3350           07262                           TC       TPAGREE                               
055704,000451: 07,3351           52155                           DXCH     MPAC                                  
055705,000452: 07,3352           50160                           INDEX    MPAC       +4                         
055706,000453: 07,3353           53401                           DXCH     1400                                  
055707,000454: 
055708,000455: 07,3354           10157                           CCS      MPAC       +3                         
055709,000456: 07,3355           13340                           TCF      GYROAGRE                              
055710,000457: 
055711,000458: 07,3356           30161                           CA       MPAC       +5                         #  RESTORE CALLER'S EBANK.
055712,000459: 07,3357           54003                           TS       EBANK                                 
055713,000460: 07,3360           12747                           TCF      MODEEXIT                              
055714,000461: 

Page 1310

055716,000463:                                                                                                  #  ROUTINES TO ALLOW TORQUING BY ONLY ONE JOB AT A TIME.
055717,000464: 
055718,000465: 07,3361           00006        GYROBUSY           EXTEND                                         #  SAVE RETURN 2FCADR.
055719,000466: 07,3362           30134                           DCA      BUF2                                  
055720,000467: 07,3363           52155                           DXCH     MPAC                                  
055721,000468: 07,3364           33376        REGSLEEP           CAF      LGWAKE                                
055722,000469: 07,3365           15133                           TCF      JOBSLEEP                              
055723,000470: 
055724,000471: 07,3366           11311        GWAKE              CCS      LGYRO                                 #  WHEN AWAKENED, SEE IF GYROS STILL BUSY.
055725,000472: 07,3367           13364                           TCF      REGSLEEP                              #  IF SO, SLEEP SOME MORE.
055726,000473: 
055727,000474: 07,3370           54156                           TS       MPAC       +2                         
055728,000475: 07,3371           00006                           EXTEND                                         
055729,000476: 07,3372           30155                           DCA      MPAC                                  
055730,000477: 07,3373           52134                           DXCH     BUF2                                  #  RESTORE SWRETURN INFO.
055731,000478: 07,3374           34753                           CAF      ONE                                   
055732,000479: 07,3375           13326                           TCF      GWAKE2                                
055733,000480: 
055734,000481: 07,3376           17366        LGWAKE             CADR     GWAKE                                 
055735,000482: 

Page 1311

055737,000484:                                                                                                  #  GYRO-TORQUING WAITLIST TASKS.
055738,000485: 
055739,000486: 07,3377           43620        STRTGYRO           CS       GDESELCT                              #  DE-SELECT LAST GYRO.
055740,000487: 07,3400           00006                           EXTEND                                         
055741,000488: 07,3401           03014                           WAND     CHAN14                                
055742,000489: 
055743,000490: 07,3402           03633                           TC       CAGETEST                              
055744,000491: 
055745,000492: 07,3403           31311        STRTGYR2           CA       LGYRO                                 #  JUMP ON PHASE COUNTER IN BITS 13-14.
055746,000493: 07,3404           00006                           EXTEND                                         
055747,000494: 07,3405           74750                           MP       BIT4                                  
055748,000495: 07,3406           50000                           INDEX    A                                     
055749,000496: 07,3407           13410                           TCF      +1                                    
055750,000497: 07,3410           03425                           TC       GSELECT                               #  =0.  DO Y GYRO.
055751,000498: 07,3411           00202                           OCT      00202                                 
055752,000499: 
055753,000500: 07,3412           03425                           TC       GSELECT                               #  =1.  DO Z GYRO.
055754,000501: 07,3413           00302                           OCT      00302                                 
055755,000502: 
055756,000503: 07,3414           03423                           TC       GSELECT    -2                         #  =2.  DO X GYRO.
055757,000504: 07,3415           00100                           OCT      00100                                 
055758,000505: 
055759,000506: 07,3416           34755                           CAF      ZERO                                  #  =3.  DONE
055760,000507: 07,3417           55311                           TS       LGYRO                                 
055761,000508: 07,3420           33376                           CAF      LGWAKE                                #  WAKE A POSSIBLE SLEEPING JOB.
055762,000509: 07,3421           05137                           TC       JOBWAKE                               
055763,000510: 
055764,000511: 07,3422           13224        NORESET            TCF      IMUFINED                              #  DO NOT RESET POWER SUPPLY

Page 1312

055766,000513: 07,3423           44751                 -2        CS       FOUR                                  #  SPECIAL ENTRY TO REGRESS LGYRO FOR X.
055767,000514: 07,3424           27311                           ADS      LGYRO                                 
055768,000515: 
055769,000516: 07,3425           50002        GSELECT            INDEX    Q                                     #  SELECT GYRO.
055770,000517: 07,3426           30000                           CAF      0                                     #  PACKED WORD CONTAINS GYRO SELECT BITS
055771,000518: 07,3427           54064                           TS       ITEMP4                                #  AND INCREMENT TO LGYRO.
055772,000519: 07,3430           74757                           MASK     SEVEN                                 
055773,000520: 07,3431           64737                           AD       BIT13                                 
055774,000521: 07,3432           27311                           ADS      LGYRO                                 
055775,000522: 07,3433           54003                           TS       EBANK                                 
055776,000523: 07,3434           74357                           MASK     LOW8                                  
055777,000524: 07,3435           54061                           TS       ITEMP1                                
055778,000525: 
055779,000526: 07,3436           44757                           CS       SEVEN                                 
055780,000527: 07,3437           70064                           MASK     ITEMP4                                
055781,000528: 07,3440           54064                           TS       ITEMP4                                
055782,000529: 
055783,000530: 07,3441           00006                           EXTEND                                         #  MOVE DP COMMAND TO RUPTREGS FOR TESTING.
055784,000531: 07,3442           50061                           INDEX    ITEMP1                                
055785,000532: 07,3443           31401                           DCA      1400                                  
055786,000533: 07,3444           52071                           DXCH     RUPTREG1                              
055787,000534: 
055788,000535: 07,3445           10070                           CCS      RUPTREG1                              
055789,000536: 07,3446           13461                           TCF      MAJ+                                  
055790,000537: 07,3447           13451                           TCF      +2                                    
055791,000538: 07,3450           13601                           TCF      MAJ-                                  
055792,000539: 
055793,000540: 07,3451           10071                           CCS      RUPTREG2                              
055794,000541: 07,3452           13456                           TCF      MIN+                                  
055795,000542: 07,3453           13403                           TCF      STRTGYR2                              
055796,000543: 07,3454           13576                           TCF      MIN-                                  
055797,000544: 07,3455           13403                           TCF      STRTGYR2                              
055798,000545: 

Page 1313

055800,000547: 07,3456           63512        MIN+               AD       -GYROMIN                              #  SMALL POSITIVE COMMAND.  SEE IF AT LEAST
055801,000548: 07,3457           00006                           EXTEND                                         #  16 GYRO PULSES.
055802,000549: 07,3460           63403                           BZMF     STRTGYR2                              
055803,000550: 
055804,000551: 07,3461           00006        MAJ+               EXTEND                                         #  DEFINITE POSITIVE OUTPUT.
055805,000552: 07,3462           33622                           DCA      GYROFRAC                              
055806,000553: 07,3463           20071                           DAS      RUPTREG1                              
055807,000554: 
055808,000555: 07,3464           30064                           CA       ITEMP4                                #  SELECT POSITIVE TORQUING FOR THIS GYRO.
055809,000556: 07,3465           00006                           EXTEND                                         
055810,000557: 07,3466           05014                           WOR      CHAN14                                
055811,000558: 
055812,000559: 07,3467           36077                           CAF      LOW7                                  #  LEAVE NUMBER OF POSSIBLE 8192 AUGMENTS
055813,000560: 07,3470           70071                           MASK     RUPTREG2                              #  TO INITIAL COMMAND IN MAJOR PART OF LONG
055814,000561: 07,3471           56071                           XCH      RUPTREG2                              #  TERM STORAGE AND TRUNCATED FRACTION
055815,000562: 07,3472           00006        GMERGE             EXTEND                                         #  IN MINOR PART. THE MAJOR PART WILL BE
055816,000563: 07,3473           74744                           MP       BIT8                                  #  COUNTED DOWN TO ZERO IN THE COURSE OF
055817,000564: 07,3474           54062                           TS       ITEMP2                                #  PUTTING OUT THE ENTIRE COMMAND.
055818,000565: 07,3475           30070                           CA       RUPTREG1                              
055819,000566: 07,3476           00006                           EXTEND                                         
055820,000567: 07,3477           74743                           MP       BIT9                                  
055821,000568: 07,3500           54070                           TS       RUPTREG1                              
055822,000569: 07,3501           30001                           CA       L                                     
055823,000570: 07,3502           00006                           EXTEND                                         
055824,000571: 07,3503           74736                           MP       BIT14                                 
055825,000572: 07,3504           26062                           ADS      ITEMP2                                #  INITIAL COMMAND.
055826,000573: 
055827,000574: 07,3505           00006                           EXTEND                                         #  SEE IF MORE THAN ONE PULSE TRAIN NEEDED
055828,000575: 07,3506           30071                           DCA      RUPTREG1                              #  (MORE THAN 16383 PULSES).
055829,000576: 07,3507           67752                           AD       MINUS1                                
055830,000577: 07,3510           10000                           CCS      A                                     
055831,000578: 07,3511           13535                           TCF      LONGGYRO                              
055832,000579: 07,3512           77601        -GYROMIN           OCT      -176                                  #  MAY BE ADJUSTED TO SPECIFY MINIMUM CMD
055833,000580: 07,3513           13517                           TCF      +4                                    
055834,000581: 
055835,000582: 07,3514           34736                           CAF      BIT14                                 
055836,000583: 07,3515           26062                           ADS      ITEMP2                                
055837,000584: 07,3516           34755                           CAF      ZERO                                  
055838,000585: 
055839,000586: 07,3517           50061                 +4        INDEX    ITEMP1                                
055840,000587: 07,3520           53401                           DXCH     1400                                  

Page 1314

055842,000589: 07,3521           30062                           CA       ITEMP2                                #  ENTIRE COMMAND.
055843,000590: 07,3522           54047        LASTSEG            TS       GYROCMD                               
055844,000591: 07,3523           00006                           EXTEND                                         
055845,000592: 07,3524           74742                           MP       BIT10                                 #  WAITLIST DT
055846,000593: 07,3525           66250                           AD       THREE                                 #  TRUNCATION AND PHASE UNCERTAINTIES.
055847,000594: 07,3526           05203                           TC       WAITLIST                              
055848,000595: 07,3527  E3,1474                                  EBANK=   CDUIND                                
055849,000596: 07,3527           03377 16103                     2CADR    STRTGYRO                              
055850,000597: 
055851,000598: 07,3531           34742        GYROEXIT           CAF      BIT10                                 
055852,000599: 07,3532           00006                           EXTEND                                         
055853,000600: 07,3533           05014                           WOR      CHAN14                                
055854,000601: 07,3534           15261                           TCF      TASKOVER                              
055855,000602: 
055856,000603: 07,3535           50061        LONGGYRO           INDEX    ITEMP1                                
055857,000604: 07,3536           53401                           DXCH     1400                                  #  INITIAL COMMAND OUT PLUS N AUGMENTS OF
055858,000605: 07,3537           34736                           CAF      BIT14                                 #  8192. INITIAL COMMAND IS AT LEAST 8192.
055859,000606: 07,3540           60062                           AD       ITEMP2                                
055860,000607: 07,3541           54047                           TS       GYROCMD                               
055861,000608: 
055862,000609: 07,3542           00006        AUG3               EXTEND                                         #  GET WAITLIST DT TO TIME WHEN TRAIN IS
055863,000610: 07,3543           74742                           MP       BIT10                                 #  ALMOST OUT.
055864,000611: 07,3544           67750                           AD       NEG3                                  
055865,000612: 07,3545           05203                           TC       WAITLIST                              
055866,000613: 07,3546  E3,1474                                  EBANK=   CDUIND                                
055867,000614: 07,3546           03551 16103                     2CADR    8192AUG                               
055868,000615: 
055869,000616: 07,3550           13531                           TCF      GYROEXIT                              
055870,000617: 
055871,000618: 07,3551           03633        8192AUG            TC       CAGETEST                              
055872,000619: 
055873,000620: 07,3552           34750                           CAF      BIT4                                  
055874,000621: 07,3553           00006                           EXTEND                                         
055875,000622: 07,3554           02012                           RAND     CHAN12                                
055876,000623: 07,3555           10000                           CCS      A                                     
055877,000624: 07,3556           13631                           TCF      IMUBAD                                
055878,000625: 07,3557           31311                           CA       LGYRO                                 #  ADD 8192 PULSES TO GYROCMD
055879,000626: 07,3560           54003                           TS       EBANK                                 
055880,000627: 07,3561           74357                           MASK     LOW8                                  
055881,000628: 07,3562           54061                           TS       ITEMP1                                
055882,000629: 
055883,000630: 07,3563           50061                           INDEX    ITEMP1                                #  SEE IF THIS IS THE LAST AUG.
055884,000631: 07,3564           11400                           CCS      1400                                  
055885,000632: 07,3565           13571                           TCF      AUG2                                  #  MORE TO COME.
055886,000633: 
055887,000634: 07,3566           34736                           CAF      BIT14                                 
055888,000635: 07,3567           26047                           ADS      GYROCMD                               
055889,000636: 07,3570           13523                           TCF      LASTSEG    +1                         
055890,000637: 

Page 1315

055892,000639: 07,3571           50061        AUG2               INDEX    ITEMP1                                
055893,000640: 07,3572           55400                           TS       1400                                  
055894,000641: 07,3573           34736                           CAF      BIT14                                 
055895,000642: 07,3574           26047                           ADS      GYROCMD                               
055896,000643: 07,3575           13542                           TCF      AUG3                                  #  COMPUTE DT.
055897,000644: 

Page 1316

055899,000646: 07,3576           63512        MIN-               AD       -GYROMIN                              #  POSSIBLE NEGATIVE OUTPUT.
055900,000647: 07,3577           00006                           EXTEND                                         
055901,000648: 07,3600           63403                           BZMF     STRTGYR2                              
055902,000649: 
055903,000650: 07,3601           00006        MAJ-               EXTEND                                         #  DEFINITE NEGATIVE OUTPUT.
055904,000651: 07,3602           43622                           DCS      GYROFRAC                              
055905,000652: 07,3603           20071                           DAS      RUPTREG1                              
055906,000653: 
055907,000654: 07,3604           30064                           CA       ITEMP4                                #  SELECT NEGATIVE TORQUING FOR THIS GYRO.
055908,000655: 07,3605           64743                           AD       BIT9                                  
055909,000656: 07,3606           00006                           EXTEND                                         
055910,000657: 07,3607           05014                           WOR      CHAN14                                
055911,000658: 
055912,000659: 07,3610           40070                           CS       RUPTREG1                              #  SET UP RUPTREGS TO FALL INTO GMERGE.
055913,000660: 07,3611           54070                           TS       RUPTREG1                              #  ALL NUMBERS PUT INTO GYROCMD ARE
055914,000661: 07,3612           40071                           CS       RUPTREG2                              #  POSITIVE - BIT9 OF CHAN 14 DETERMINES
055915,000662: 07,3613           76077                           MASK     LOW7                                  #  THE SIGN OF THE COMMAND.
055916,000663: 07,3614           40000                           COM                                            
055917,000664: 07,3615           56071                           XCH      RUPTREG2                              
055918,000665: 07,3616           40000                           COM                                            
055919,000666: 07,3617           13472                           TCF      GMERGE                                
055920,000667: 
055921,000668: 07,3620           01700        GDESELCT           OCT      1700                                  #  TURN OFF SELECT AND ACTIVITY BITS.
055922,000669: 
055923,000670: 07,3621           00000 00034  GYROFRAC           2DEC     .215       B-21                       
055924,000671: 

Page 1317

055926,000673:                                                                                                  #  IMU MODE SWITCHING ROUTINES COME HERE WHEN ACTION COMPLETE.
055927,000674: 
055928,000675: 07,3623           00006        ENDIMU             EXTEND                                         #  MODE IS BAD IF CAGE HAS OCCURED OR IF
055929,000676: 07,3624           00011                           READ     DSALMOUT                              #  ISS WARNING IS ON.
055930,000677: 07,3625           74753                           MASK     BIT1                                  
055931,000678: 07,3626           10000                           CCS      A                                     
055932,000679: 07,3627           13631                           TCF      IMUBAD                                
055933,000680: 
055934,000681: 07,3630           13657        IMUGOOD            TCF      GOODEND                               #  WITH C(A) = 0.
055935,000682: 
055936,000683: 07,3631           34755        IMUBAD             CAF      ZERO                                  
055937,000684: 07,3632           13654                           TCF      BADEND                                
055938,000685: 
055939,000686: 07,3633           34746        CAGETEST           CAF      BIT6                                  #  SUBROUTINE TO TERMINATE IMU MODE
055940,000687: 07,3634           71277                           MASK     IMODES30                              #  SWITCH IF IMU HAS BEEN CAGED.
055941,000688: 07,3635           10000                           CCS      A                                     
055942,000689: 07,3636           13631                           TCF      IMUBAD                                #  DIRECTLY.
055943,000690: 07,3637           00002                           TC       Q                                     #  WITH C(A) = +0.
055944,000691: 
055945,000692: 07,3640           41277        CAGETSTQ           CS       IMODES30                              #  SKIP IF IMU NOT BEING CAGED.
055946,000693: 07,3641           74746                           MASK     BIT6                                  
055947,000694: 07,3642           10000                           CCS      A                                     
055948,000695: 07,3643           24002                           INCR     Q                                     
055949,000696: 07,3644           00002                           TC       Q                                     
055950,000697: 
055951,000698: 07,3645           41277        CAGETSTJ           CS       IMODES30                              #  IF DURING MODE SWITCH INITIALIZATION
055952,000699: 07,3646           74746                           MASK     BIT6                                  #  IT IS FOUND THAT THE IMU IS BEING CAGED,
055953,000700: 07,3647           10000                           CCS      A                                     #  SET IMUCADR TO -0 TO INDICATE OPERATION
055954,000701: 07,3650           00002                           TC       Q                                     #  COMPLETE BUT FAILED.  RETURN IMMEDIATELY
055955,000702: 
055956,000703: 07,3651           44755                           CS       ZERO                                  #  TO SWRETURN.
055957,000704: 07,3652           55301                           TS       IMUCADR                               
055958,000705: 07,3653           12747                           TCF      MODEEXIT                              
055959,000706: 

Page 1318

055961,000708:                                                                                                  #           GENERALIZED MODE SWITCHING TERMINATION. ENTER AT GOODEND FOR SUCCESSFUL COMPLETION OF AN I/O OPERATION
055962,000709:                                                                                                  #  OR AT BADEND FOR AN UNSUCCESSFUL ONE. C(A) OR ARRIVAL =0 FOR IMU, 1 FOR OPTICS.
055963,000710: 
055964,000711: 07,3654           54071        BADEND             TS       RUPTREG2                              #  DEVICE INDEX.
055965,000712: 07,3655           44755                           CS       ZERO                                  #  FOR FAILURE.
055966,000713: 07,3656           13661                           TCF      GOODEND    +2                         
055967,000714: 
055968,000715: 07,3657           54071        GOODEND            TS       RUPTREG2                              
055969,000716: 07,3660           44753                           CS       ONE                                   #  FOR SUCCESS.
055970,000717: 
055971,000718: 07,3661           54072                           TS       RUPTREG3                              
055972,000719: 07,3662           50071                           INDEX    RUPTREG2                              #  SEE IF USING PROGRAM ASLEEP.
055973,000720: 07,3663           11301                           CCS      MODECADR                              
055974,000721: 07,3664           13670                           TCF      +4                                    #  YES - WAKE IT UP.
055975,000722: 07,3665           13700                           TCF      ENDMODE                               #  IF 0, PROGRAM NOT IN YET.
055976,000723: 
055977,000724: 07,3666           00006                           EXTEND                                         
055978,000725: 07,3667           13701                           BZF      ENDMODE    +1                         #  BZF = TCF IF MODECADR = -0.
055979,000726: 
055980,000727: 07,3670           34755                           CAF      ZERO                                  #  WAKE SLEEPING PROGRAM.
055981,000728: 07,3671           50071                           INDEX    RUPTREG2                              
055982,000729: 07,3672           57301                           XCH      MODECADR                              
055983,000730: 07,3673           05137                           TC       JOBWAKE                               
055984,000731: 
055985,000732: 07,3674           40072                           CS       RUPTREG3                              #  ADVANCE LOC IF SUCCESSFUL.
055986,000733: 07,3675           50064                           INDEX    LOCCTR                                
055987,000734: 07,3676           26164                           ADS      LOC                                   
055988,000735: 
055989,000736: 07,3677           15261                           TCF      TASKOVER                              
055990,000737: 
055991,000738: 07,3700           30072        ENDMODE            CA       RUPTREG3                              #  -0 INDICATES OPERATION COMPLETE BUT
055992,000739: 07,3701           50071                 +1        INDEX    RUPTREG2                              #  UNSUCCESSFUL: -1 INDICATES COMPLETE AND
055993,000740: 07,3702           55301                           TS       MODECADR                              #  SUCCESSFUL.
055994,000741: 07,3703           15261                           TCF      TASKOVER                              
055995,000742: 

Page 1319

055997,000744:                                                                                                  #           GENERAL STALLING ROUTINE.  USING PROGRAMS COME HERE TO WAIT FOR I/O COMPLETION.
055998,000745: 
055999,000746:                                                                                                  #  PROGRAM DESCRIPTION                                     DATE - 21 FEB 1967
056000,000747:                                                                                                  #                                              LOG SECTION IMU MODE SWITCHING
056001,000748:                                                                                                  #  MOD BY- R.MELANSON TO ADD DOCUMENTATION         ASSEMBLY SUNDISK  REV.  82
056002,000749: 
056003,000750:                                                                                                  #  FUNCTIONAL DESCRIPTION-
056004,000751:                                                                                                  #    TO DELAY FURTHER EXECUTION OF THE CALLING ROUTINE UNTIL ITS SELECTED
056005,000752:                                                                                                  #    I/O FUNCTION IS COMPLETE.THE FOLLOWING CHECKS ON THE CALLING ROUTINE:S
056006,000753:                                                                                                  #    MODECADR ARE MADE AND ACTED UPON.
056007,000754:                                                                                                  #      1) +0 INDICATES INCOMPLETE I/O OPERATION.CALLING ROUTINE IS PUT TO
056008,000755:                                                                                                  #         SLEEP.
056009,000756:                                                                                                  #      2) -1 INDICATES COMPLETED I/O OPERATION. STALL BYPASSES JOBSLEEP
056010,000757:                                                                                                  #         CALL AND RETURNS TO CALLING ROUTINE AT L+3
056011,000758:                                                                                                  #      3) -0 INDICATES COMPLETED I/O WITH FAILURE. STALL CLEARS MODECADR
056012,000759:                                                                                                  #         AND RETURNS TO CALLING ROUTINE AT L+2.
056013,000760:                                                                                                  #      4) VALUE GREATER THAN 0 INDICATES TWO ROUTINES CALLING FOR USE OF
056014,000761:                                                                                                  #         SAME DEVICE. STALL EXITS TO ABORT WHICH EXECUTES A PROGRAM
056015,000762:                                                                                                  #         RESTART WHICH IN TURN CLEARS ALL MODECADR REGISTERS.
056016,000763: 
056017,000764:                                                                                                  #   CALLING SEQUENCE-
056018,000765:                                                                                                  #    L   TC   BANKCALL
056019,000766:                                                                                                  #    L+1 CADR (ONE OF 5 STALL ADDRESSES I.E. IMUSTALL,OPTSTALL,RADSTALL,
056020,000767:                                                                                                  #             AOTSTALL,OR ATTSTALL)
056021,000768: 
056022,000769:                                                                                                  #   NORMAL-EXIT MODE-
056023,000770:                                                                                                  #    TCF   JOBSLEEP OR TCF  MODEXIT
056024,000771: 
056025,000772:                                                                                                  #  ALARM OR ABORT EXIT MODE-
056026,000773:                                                                                                  #    TC    ABORT
056027,000774: 
056028,000775:                                                                                                  #  OUTPUT-
056029,000776:                                                                                                  #    MODECADR=CADR  IF JOBSLEEP
056030,000777:                                                                                                  #    MODECADR=+0    IF I/O COMPLETE
056031,000778:                                                                                                  #    BUF2=L+3       IF I/O COMPLETE AND GOOD.
056032,000779:                                                                                                  #    BUF2=L+2 IF I/O COMPLETE BUT FAILED.
056033,000780: 
056034,000781:                                                                                                  #  ERASABLE INITIALIZATION-
056035,000782:                                                                                                  #    BUF2 CONTAINS RETURN ADDRESS PLUS 1,(L+2)
056036,000783:                                                                                                  #    BUF2+1 CONTAINS FBANK VALUE OF CALLING ROUTINE.
056037,000784:                                                                                                  #    MODECADR OF CALLING ROUTINE CONTAINS +0,-1,-0 OR CADR RETURN ADDRESS.
056038,000785: 
056039,000786:                                                                                                  #  DEBRIS-
056040,000787:                                                                                                  #    RUPTREG2 AND CALLING ROUTINE MODECADR.
056041,000788: 
056042,000789: 07,3704           34753        AOTSTALL           CAF      ONE                                   #  AOT.
056043,000790: 07,3705           03711                           TC       STALL                                 
056044,000791: 
056045,000792: 07,3706           34752        RADSTALL           CAF      TWO                                   
056046,000793: 07,3707           13711                           TCF      STALL                                 
056047,000794: 

Page 1320

056049,000796: 07,3710  07,3704               OPTSTALL           EQUALS   AOTSTALL                              
056050,000797: 
056051,000798: 07,3710           34755        IMUSTALL           CAF      ZERO                                  #  IMU.
056052,000799: 
056053,000800: 07,3711           00004        STALL              INHINT                                         
056054,000801: 07,3712           54071                           TS       RUPTREG2                              #  SAVE DEVICE INDEX.
056055,000802: 07,3713           50000                           INDEX    A                                     #  SEE IF OPERATION COMPLETE.
056056,000803: 07,3714           11301                           CCS      MODECADR                              
056057,000804: 07,3715           13733                           TCF      MODABORT                              #  ALLOWABLE STATES ARE +0, -1, AND -0.
056058,000805: 07,3716           13727                           TCF      MODESLP                               #  OPERATION INCOMPLETE.
056059,000806: 07,3717           13723                           TCF      MODEGOOD                              #  COMPLETE AND GOOD IF = -1.
056060,000807: 
056061,000808: 07,3720           50071        MG2                INDEX    RUPTREG2                              #  COMPLETE AND FAILED IF -0. RESET TO +0.
056062,000809: 07,3721           55301                           TS       MODECADR                              #  RETURN TO CALLER.
056063,000810: 07,3722           12747                           TCF      MODEEXIT                              
056064,000811: 
056065,000812: 07,3723           10000        MODEGOOD           CCS      A                                     #  MAKE SURE INITIAL STATE -1.
056066,000813: 07,3724           13733                           TCF      MODABORT                              
056067,000814: 
056068,000815: 07,3725           24133                           INCR     BUF2                                  #  IF SO, INCREMENT RETURN ADDRESS AND
056069,000816: 07,3726           13720                           TCF      MG2                                   #  RETURN IMMEDIATELY, SETTING CADR = +0.
056070,000817: 
056071,000818: 07,3727           04645        MODESLP            TC       MAKECADR                              #  CALL FROM SWITCHABLE FIXED ONLY.
056072,000819: 07,3730           50071                           INDEX    RUPTREG2                              
056073,000820: 07,3731           55301                           TS       MODECADR                              
056074,000821: 07,3732           15133                           TCF      JOBSLEEP                              
056075,000822: 
056076,000823: 07,3733           52134        MODABORT           DXCH     BUF2                                  
056077,000824: 07,3734           05706                           TC       BAILOUT1                              #  TWO PROGRAMS USING THE SAME DEVICE.
056078,000825: 07,3735           31210                           OCT      31210                                 
056079,000826: 

Page 1321

056081,000828:                                                                                                  #  CONSTANTS FOR MODE SWITCHING ROUTINES
056082,000829: 
056083,000830: 07,3736     5741               BITS3&4            =        OCT14                                 
056084,000831: 07,3736     4771               BITS4&6            =        OCT50                                 
056085,000832: 07,3736           00030        BITS4-5            OCT      00030                                 
056086,000833: 07,3737     4744               IMUSEFLG           EQUALS   BIT8                                  #  INTERPRETER SWITCH 7.
056087,000834: 07,3737           77500        -COMMAX            DEC      -191       B-14                       
056088,000835: 07,3740           77477        -COMMAX-           DEC      -192       B-14                       
056089,000836: 07,3741           00074        600MS              DEC      60         B-14                       
056090,000837: 07,3742  07,3202               IMUFIN20           =        IMUFINE                               
056091,000838: 07,3742           31304        GOMANUR            CA       ATTCADR                               #  IS KALCMANU FREE
056092,000839: 07,3743           00006                           EXTEND                                         
056093,000840: 07,3744           13746                           BZF      +2                                    
056094,000841: 07,3745           03733                           TC       MODABORT                              
056095,000842: 07,3746           00006                 +2        EXTEND                                         
056096,000843: 07,3747           30134                           DCA      BUF2                                  
056097,000844: 07,3750           53305                           DXCH     ATTCADR                               #  SAVE FINAL RETURN FOR KALCMAN3
056098,000845: 
056099,000846: 07,3751           30006                           CA       BBANK                                 
056100,000847: 07,3752           74757                           MASK     SEVEN                                 
056101,000848: 07,3753           27305                           ADS      ATTCADR    +1                         
056102,000849: 
056103,000850: 07,3754           30167                           CA       PRIORITY                              
056104,000851: 07,3755           77730                           MASK     PRIO37                                
056105,000852: 07,3756           55306                           TS       ATTPRIO                               #  SAVE USERS PRIO
056106,000853: 
056107,000854: 07,3757           33763                           CAF      KALEBCON                              #  SET EBANK FOR KALCMAN3
056108,000855: 07,3760           54003                           TS       EBANK                                 
056109,000856: 07,3761           04635                           TC       POSTJUMP                              
056110,000857: 07,3762           44004                           CADR     KALCMAN3                              
056111,000858: 07,3763           03276        KALEBCON           ECADR    BCDU                                  
056112,000859: 

Page 1322

056114,000861:                                                                                                  #  PROGRAM DESCRIPTION
056115,000862:                                                                                                  #  IMU STATUS CHECK ROUTINE R02 (SUBROUTINE UTILITY)
056116,000863:                                                                                                  #  MOD NO - 1
056117,000864:                                                                                                  #  MOD BY - N.BRODEUR
056118,000865:                                                                                                  #  FUNCTIONAL DESCRIPTION
056119,000866: 
056120,000867:                                                                                                  #  TO CHECK WHETHER IMU IS ON AND IF ON WHETHER IT IS ALIGNED TO AN
056121,000868:                                                                                                  #  ORIENTATION KNOWN BY THE CMC. TO REQUEST SELECTION OF THE APPROPRIATE
056122,000869:                                                                                                  #  PROGRAM IF THE IMU IS OFF OR NOT ALIGNED TO AN ORIENTATION KNOWN BY THE
056123,000870:                                                                                                  #  CMC. CALLED THROUGH BANKCALL
056124,000871:                                                                                                  #  CALLING SEQUENCE-
056125,000872: 
056126,000873:                                                                                                  #  L        TC     BANKCALL
056127,000874:                                                                                                  #  L+1      CADR   R02BOTH
056128,000875:                                                                                                  #  SUBROUTINES CALLED
056129,000876: 
056130,000877:                                                                                                  #        VARALARM
056131,000878:                                                                                                  #        FLAGUP
056132,000879:                                                                                                  #  NORMAL EXIT MODES
056133,000880: 
056134,000881:                                                                                                  #  AT L+2 OF CALLING SEQUENCE
056135,000882:                                                                                                  #  ALARM OR ABORT EXIT MODES
056136,000883:                                                                                                  #        GOTOPOOH, WITH ALARM
056137,000884:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED
056138,000885: 
056139,000886:                                                                                                  #  NONE
056140,000887: 
056141,000888:                                                                                                  #  DEBRIS
056142,000889:                                                                                                  #  CENTRALS-A,Q,L
056143,000890: 
056144,000891: 34,3650                                           BANK     34                                    
056145,000892: 04,2000                                           SETLOC   R02                                   
056146,000893: 04,2000                                           BANK                                           
056147,000894: 04,3235                                           COUNT*   $$/R02                                
056148,000895: 04,3235           00063        DEC51              DEC      51         B-14                       
056149,000896: 04,3236           34737        R02BOTH            CAF      REFSMBIT                              
056150,000897: 04,3237           70077                           MASK     FLAGWRD3                              
056151,000898: 04,3240           10000                           CCS      A                                     
056152,000899: 04,3241           03252                           TC       R02ZERO                               #  ZERO IMUS
056153,000900: 
056154,000901: 04,3242           31277                           CA       IMODES30                              
056155,000902: 04,3243           74743                           MASK     BIT9                                  #  IS ISS INITIALIZED
056156,000903: 04,3244           00006                           EXTEND                                         
056157,000904: 04,3245           13247                           BZF      +2                                    
056158,000905: 04,3246           44750                           CS       BIT4                                  #  SEND IMU ALARM CODE 210
056159,000906: 04,3247           63255                           AD       OCT220                                #  SEND REFSMM ALARM
056160,000907: 04,3250           05734                           TC       VARALARM                              
056161,000908: 
056162,000909: 04,3251           06001                           TC       GOTOPOOH                              
056163,000910: 
056164,000911: 04,3252           05504        R02ZERO            TC       UPFLAG                                

Page 1323

056166,000913: 04,3253           00007                           ADRES    IMUSE                                 
056167,000914: 04,3254           14631                           TCF      SWRETURN                              
056168,000915: 04,3255           00220        OCT220             OCT      220                                   
056169,000916: 

Page 1324

056171,000918:                                                                                                  #  PROGRAM DESCRIPTION   P06   10 FEB 67
056172,000919: 
056173,000920:                                                                                                  #  TRANSFER THE ISS/CMC FROM THE OPERATE TO THE STANDBY CONDITION.
056174,000921: 
056175,000922:                                                                                                  #  THE NORMAL CONDITION OF READINESS OF THE GNCS WHEN NOT IN USE IS STANDBY. IN THIS CONDITION THE IMU
056176,000923:                                                                                                  #  HEATER POWER IS ON. THE IMU OPERATE POWER IS OFF. THE COMPUTER POWER IS ON. THE OPTICS POWER IS OFF.  THE
056177,000924:                                                                                                  #  CMC  STANDBY ON THE MAIN AND LEB DISKYS IS ON.
056178,000925: 
056179,000926:                                                                                                  #  CALLING SEQUENCE:
056180,000927:                                                                                                  #            ASTRONAUT REQUEST THROUGH DSKY  V37E 06E.
056181,000928: 
056182,000929:                                                                                                  #  SUBROUTINES CALLED:
056183,000930:                                                                                                  #           GOPERF1
056184,000931:                                                                                                  #           BANKCALL
056185,000932:                                                                                                  #           FLAGDOWN
056186,000933: 

Page 1325

056188,000935:                                                                                                  #  PRESTAND PREPARES FOR STANDBY BY SNAPSHOTTING THE SCALER AND TIME1 TIME2
056189,000936:                                                                                                  #  THE LOW 5 BITS OF THE SCALER ARE INSPECTED TO INSURE COMPATABILITY
056190,000937:                                                                                                  #  BETWEEN THE SCALER READING AND THE TIME1 TIME2 READING.
056191,000938: 
056192,000939: 37,2000                                           SETLOC   P05P06                                
056193,000940: 37,2000                                           BANK                                           
056194,000941: 
056195,000942: 37,3652     0314                                  EBANK=   TIME2SAV                              
056196,000943: 37,3652                                           COUNT*   $$/P06                                
056197,000944: 
056198,000945: 37,3652           05504        P06                TC       UPFLAG                                #  SET NODOV37 BIT
056199,000946: 37,3653           00054                           ADRES    NODOFLAG                              
056200,000947: 
056201,000948: 37,3654           00004        PRESTAND           INHINT                                         
056202,000949: 37,3655           00006                           EXTEND                                         
056203,000950: 37,3656           30025                           DCA      TIME2                                 #  SNAPSHOT TIME1 TIME2
056204,000951: 37,3657           52315                           DXCH     TIME2SAV                              
056205,000952: 37,3660           03711                           TC       SCALPREP                              
056206,000953: 37,3661           03654                           TC       PRESTAND                              #  T1,T2,SCALER NOT COMPATIBLE
056207,000954: 37,3662           52155                           DXCH     MPAC                                  #  T1,T2 AND SCALER OK
056208,000955: 37,3663           52317                           DXCH     SCALSAVE                              #  STORE SCALER
056209,000956: 37,3664           00004                           INHINT                                         
056210,000957: 37,3665           04616                           TC       BANKCALL                              
056211,000958: 37,3666           17167                           CADR     RNDREFDR                              #  REFSMM, DRIFT, TRACK FLAGS DOWN
056212,000959: 
056213,000960: 37,3667           05516                           TC       DOWNFLAG                              
056214,000961: 37,3670           00007                           ADRES    IMUSE                                 #  IMUSE DOWN
056215,000962: 37,3671           05516                           TC       DOWNFLAG                              
056216,000963: 37,3672           00010                           ADRES    RNDVZFLG                              #  RNDVZFLG DOWN
056217,000964: 
056218,000965: 37,3673           34741                           CAF      BIT11                                 
056219,000966: 37,3674           00006                           EXTEND                                         
056220,000967: 37,3675           05013                           WOR      CHAN13                                #  SET STANDBY ENABLE BIT
056221,000968: 
056222,000969: 37,3676           05353                           TC       PHASCHNG                              #  SET RESTART TO POSTAND WHEN STANDBY
056223,000970: 37,3677           07024                           OCT      07024                                 #    RECOVERS
056224,000971: 37,3700           20000                           OCT      20000                                 
056225,000972: 37,3701     0316                                  EBANK=   SCALSAVE                              
056226,000973: 37,3701           03731 76060                     2CADR    POSTAND                               
056227,000974: 
056228,000975: 37,3703           34774                           CAF      OCT62                                 
056229,000976: 37,3704           04616                           TC       BANKCALL                              
056230,000977: 37,3705           20624                           CADR     GOPERF1                               
056231,000978: 37,3706           13703                           TCF      -3                                    
056232,000979: 37,3707           13703                           TCF      -4                                    
056233,000980: 37,3710           13703                           TCF      -5                                    
056234,000981: 
056235,000982: 37,3711     4774               OCT62              EQUALS   .5SEC                                 #  DEC 50 = OCT 62
056236,000983: 
056237,000984:                                                                                                  #  THE LOW 5 BITS OF THE SCALER READS 10000 FOR THE FIRST INTERVAL AFTER A

Page 1326

056239,000986:                                                                                                  #  T1 INCREMENT. IF SCALPREP DETECTS THIS INTERVAL THE T1,T2 AND SCALER
056240,000987:                                                                                                  #  DATA ARE NOT COMPATABLE AND RETURN IS TO L+1 FOR ANOTHER READING OF THE
056241,000988:                                                                                                  #  DATA. OTHERWISE, THE RETURN IS TO L+2 TO PROCEED. ROUTINE ALSO PREPARES
056242,000989:                                                                                                  #  THE SCALER READING FOR COMPUTATION OF THE INCREMENT TO UPDATE T1T2. (THE
056243,000990:                                                                                                  #  10 MS BIT (BIT 6) OF THE SCALER IS INCREMENTED 5 MS OUT OF PHASE FROM
056244,000991:                                                                                                  #  T1.) ADDITION OF 5 MS (BIT 5) TO THE SCALER READING HAS THE EFFECT OF
056245,000992:                                                                                                  #  ADJUSTING BIT 6 IN THE SCALER TO BE IN PHASE WITH BIT 1 OF T1. THE LOW 5
056246,000993:                                                                                                  #  BITS OF THE SCALER READING ARE THEN SET TO ZERO, TO TRUNCATE THE SCALER
056247,000994:                                                                                                  #  DATA TO 10 MS. RESULTS ARE STORED IN MPAC, +1.
056248,000995: 
056249,000996: 37,3711           00006        SCALPREP           EXTEND                                         
056250,000997: 37,3712           22156                           QXCH     MPAC       +2                         
056251,000998: 37,3713           04103                           TC       FINETIME   +1                         
056252,000999: 37,3714           00003                           RELINT                                         
056253,001000: 37,3715           52155                           DXCH     MPAC                                  
056254,001001: 37,3716           34747                           CA       BIT5                                  #  ADD 5 MS TO THE SCALER READING.
056255,001002: 37,3717           54001                           TS       L                                     
056256,001003: 37,3720           34755                           CA       ZERO                                  
056257,001004: 37,3721           20155                           DAS      MPAC                                  
056258,001005: 37,3722           44346                           CS       LOW5                                  #  SET LOW 5 BITS OF (SCALER+5MS) TO ZERO
056259,001006: 37,3723           70155                           MASK     MPAC       +1                         #  AND STORE RESULTS IN MPAC,+1.
056260,001007: 37,3724           56155                           XCH      MPAC       +1                         
056261,001008: 37,3725           74346                           MASK     LOW5                                  #  TEST LOW 5 BITS OF SCALER FOR THE FIRST
056262,001009:                                                                                                  #  INTERVAL AFTER THE T1 INCREMENT
056263,001010:                                                                                                  #  (NOW = 00000, SINCE BIT 5 ADDED).
056264,001011: 37,3726           10000                           CCS      A                                     #  IS IT 1ST INTERVAL AFTER T1 INCREMENT
056265,001012: 37,3727           24156                           INCR     MPAC       +2                         #  NO
056266,001013: 37,3730           00156                           TC       MPAC       +2                         #  YES
056267,001014: 
056268,001015:                                                                                                  #  POSTAND RECOVERS TIME AFTER STANDBY.THE SCALER IS SNAPSHOTTED AND THE
056269,001016:                                                                                                  #  TIME1 TIME2 COUNTER IS SET TO ZERO. THE LOW 5 BITS OF THE SCALER ARE
056270,001017:                                                                                                  #  INSPECTED TO INSURE COMPATABILITY BETWEEN THE SCALER READING AND THE
056271,001018:                                                                                                  #  CLEARING OF THE TIME COUNTER. IT THEN COMPUTES THE DIFFERENCE IN SCALER
056272,001019:                                                                                                  #  VALUES (IN DP) AND ADDS THIS TO THE PREVIOUSLY SNAPSHOTTED VALUES OF
056273,001020:                                                                                                  #  TIME1 TIME2 AND PLACES THIS NEW TIME INTO THE TIME1 TIME2 COUNTER.
056274,001021: 
056275,001022: 37,3731                                           COUNT*   $$/P05                                
056276,001023: 
056277,001024: 37,3731           44741        POSTAND            CS       BIT11                                 #  RECOVER TIME AFTER STANDBY.
056278,001025: 37,3732           00006                           EXTEND                                         
056279,001026: 37,3733           03013                           WAND     CHAN13                                #  CLEAR STANDBY ENABLE BIT
056280,001027: 37,3734           00004                           INHINT                                         
056281,001028: 37,3735           34755                           CA       ZERO                                  
056282,001029: 37,3736           54001                           TS       L                                     
056283,001030: 37,3737           52025                           DXCH     TIME2                                 #  CLEAR TIME1TIME2
056284,001031: 37,3740           03711                           TC       SCALPREP                              #  STORE SCALER IN MPAC, MPAC+1
056285,001032: 37,3741           03734                           TC       POSTAND    +3                         #  T1,T2,SCALER NOT COMPATIBLE
056286,001033: 37,3742           00006                           EXTEND                                         #  T1,T2 AND SCALER OK
056287,001034: 37,3743           40317                           DCS      SCALSAVE                              
056288,001035: 37,3744           20155                           DAS      MPAC                                  #  FORM DP DIFFERENCE OF POSTSTANDBY SCALER

Page 1327

056290,001037: 37,3745           34742                           CAF      BIT10                                 #  MINUS PRESTANDBY SCALER AND SHIFT RIGHT
056291,001038: 37,3746           07312                           TC       SHORTMP                               #  5 TO ALIGN BITS WITH TIME1 TIME2.
056292,001039: 37,3747           34755                           CAF      ZERO                                  
056293,001040: 37,3750           54156                           TS       MPAC       +2                         #  NEEDED FOR TP AGREE
056294,001041: 37,3751           07262                           TC       TPAGREE                               #  MAKE DP DIFF AGREE
056295,001042: 37,3752           10154                           CCS      MPAC                                  
056296,001043: 37,3753           03760                           TC       POSTCOM                               #  IF DP DIFF NET +, NO SCALER OVERFLOW
056297,001044: 37,3754           03760                           TC       POSTCOM                               #  BETWEEN PRE AND POST STANDBY.
056298,001045: 37,3755           03756                           TC       +1                                    #  IF DP DIFF NET -, SCALER OVERFLOWED.  ADD
056299,001046: 37,3756           34742                           CAF      BIT10                                 #  BIT 10 TO HIGH DIFF TO CORRECT.
056300,001047: 37,3757           26154                           ADS      MPAC                                  
056301,001048: 37,3760           00006        POSTCOM            EXTEND                                         #  C(MPAC,+1) IS MAGNITUDE OF DELTA SCALER.
056302,001049: 37,3761           30315                           DCA      TIME2SAV                              #  PRESTANDBY TIME1TIME2
056303,001050: 37,3762           20155                           DAS      MPAC                                  
056304,001051: 37,3763           07262                           TC       TPAGREE                               #  FORCE SIGN AGREEMENT
056305,001052: 37,3764           52155                           DXCH     MPAC                                  #  UPDATED VALUE FOR T1,T2.
056306,001053: 37,3765           20025                           DAS      TIME2                                 #  LOAD UPDATED VALUE INTO T1,T2, WITH
056307,001054: 37,3766           05516                           TC       DOWNFLAG                              #  CLEAR NODOFLAG
056308,001055: 37,3767           00054                           ADRES    NODOFLAG                              
056309,001056: 
056310,001057: 37,3770           06001                           TC       GOTOPOOH                              
056311,001058: 

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