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.

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

Page 1299

055261,000027:    5457                                           BLOCK    02                                    
055262,000028:    4000                                           SETLOC   FFTAG3                                
055263,000029:    4000                                           BANK                                           
055264,000030: 
055265,000031:    5457  E3,1471                                  EBANK=   COMMAND                               
055266,000032: 
055267,000033:                                                                                                  #  FIXED-FIXED ROUTINES.
055268,000034: 
055269,000035:    5457                                           COUNT*   $$/IMODE                              
055270,000036:    5457           34755        ZEROICDU           CAF      ZERO                                  #  ZERO ICDU COUNTERS.
055271,000037:    5460           54032                           TS       CDUX                                  
055272,000038:    5461           54033                           TS       CDUY                                  
055273,000039:    5462           54034                           TS       CDUZ                                  
055274,000040:    5463           00002                           TC       Q                                     
055275,000041: 
055276,000042:    5464     4743               SPSCODE            =        BIT9                                  
055277,000043: 

Page 1300

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

Page 1301

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

Page 1302

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

Page 1303

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

Page 1304

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

Page 1305

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

Page 1306

055538,000304:                                                                                                  #  IMU FINE ALIGN MODE SWITCH.
055539,000305: 
055540,000306: 07,3202           00004        IMUFINE            INHINT                                         
055541,000307: 07,3203           03645                           TC       CAGETSTJ                              #  SEE IF IMU BEING CAGED.
055542,000308: 
055543,000309: 07,3204           43736                           CS       BITS4-5                               #  RESET ZERO AND COARSE
055544,000310: 07,3205           00006                           EXTEND                                         
055545,000311: 07,3206           03012                           WAND     CHAN12                                
055546,000312: 
055547,000313: 07,3207           44746                           CS       BIT6                                  #  INSURE DAP AUTO AND HOLD MODES ENABLED
055548,000314: 07,3210           71300                           MASK     IMODES33                              
055549,000315: 07,3211           55300                           TS       IMODES33                              
055550,000316: 
055551,000317: 07,3212           03260                           TC       NOATTOFF                              
055552,000318: 
055553,000319: 07,3213           34742                           CAF      BIT10                                 #  IMU FAIL WAS INHIBITED DURING THE
055554,000320: 07,3214           05203                           TC       WAITLIST                              #  PRESUMABLY PRECEDING COARSE ALIGN.  LEAVE
055555,000321: 07,3215  E3,1474                                  EBANK=   CDUIND                                
055556,000322: 07,3215           03226 16103                     2CADR    IFAILOK                               #  IT ON FOR THE FIRST 5 SECS OF FINE ALIGN
055557,000323: 
055558,000324: 07,3217           35000                           CAF      2SECS                                 
055559,000325: 07,3220           05203                           TC       WAITLIST                              
055560,000326: 07,3221  E3,1474                                  EBANK=   CDUIND                                
055561,000327: 07,3221           03224 16103                     2CADR    IMUFINED                              
055562,000328: 
055563,000329: 07,3223           12747                           TCF      MODEEXIT                              
055564,000330: 
055565,000331: 07,3224           03633        IMUFINED           TC       CAGETEST                              #  SEE THAT NO ONE HAS CAGED THE IMU.
055566,000332: 07,3225           13623                           TCF      ENDIMU                                
055567,000333: 

Page 1307

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

Page 1308

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

Page 1309

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

Page 1310

055697,000463:                                                                                                  #  ROUTINES TO ALLOW TORQUING BY ONLY ONE JOB AT A TIME.
055698,000464: 
055699,000465: 07,3361           00006        GYROBUSY           EXTEND                                         #  SAVE RETURN 2FCADR.
055700,000466: 07,3362           30134                           DCA      BUF2                                  
055701,000467: 07,3363           52155                           DXCH     MPAC                                  
055702,000468: 07,3364           33376        REGSLEEP           CAF      LGWAKE                                
055703,000469: 07,3365           15133                           TCF      JOBSLEEP                              
055704,000470: 
055705,000471: 07,3366           11311        GWAKE              CCS      LGYRO                                 #  WHEN AWAKENED, SEE IF GYROS STILL BUSY.
055706,000472: 07,3367           13364                           TCF      REGSLEEP                              #  IF SO, SLEEP SOME MORE.
055707,000473: 
055708,000474: 07,3370           54156                           TS       MPAC       +2                         
055709,000475: 07,3371           00006                           EXTEND                                         
055710,000476: 07,3372           30155                           DCA      MPAC                                  
055711,000477: 07,3373           52134                           DXCH     BUF2                                  #  RESTORE SWRETURN INFO.
055712,000478: 07,3374           34753                           CAF      ONE                                   
055713,000479: 07,3375           13326                           TCF      GWAKE2                                
055714,000480: 
055715,000481: 07,3376           17366        LGWAKE             CADR     GWAKE                                 
055716,000482: 

Page 1311

055718,000484:                                                                                                  #  GYRO-TORQUING WAITLIST TASKS.
055719,000485: 
055720,000486: 07,3377           43620        STRTGYRO           CS       GDESELCT                              #  DE-SELECT LAST GYRO.
055721,000487: 07,3400           00006                           EXTEND                                         
055722,000488: 07,3401           03014                           WAND     CHAN14                                
055723,000489: 
055724,000490: 07,3402           03633                           TC       CAGETEST                              
055725,000491: 
055726,000492: 07,3403           31311        STRTGYR2           CA       LGYRO                                 #  JUMP ON PHASE COUNTER IN BITS 13-14.
055727,000493: 07,3404           00006                           EXTEND                                         
055728,000494: 07,3405           74750                           MP       BIT4                                  
055729,000495: 07,3406           50000                           INDEX    A                                     
055730,000496: 07,3407           13410                           TCF      +1                                    
055731,000497: 07,3410           03425                           TC       GSELECT                               #  =0.  DO Y GYRO.
055732,000498: 07,3411           00202                           OCT      00202                                 
055733,000499: 
055734,000500: 07,3412           03425                           TC       GSELECT                               #  =1.  DO Z GYRO.
055735,000501: 07,3413           00302                           OCT      00302                                 
055736,000502: 
055737,000503: 07,3414           03423                           TC       GSELECT    -2                         #  =2.  DO X GYRO.
055738,000504: 07,3415           00100                           OCT      00100                                 
055739,000505: 
055740,000506: 07,3416           34755                           CAF      ZERO                                  #  =3.  DONE
055741,000507: 07,3417           55311                           TS       LGYRO                                 
055742,000508: 07,3420           33376                           CAF      LGWAKE                                #  WAKE A POSSIBLE SLEEPING JOB.
055743,000509: 07,3421           05137                           TC       JOBWAKE                               
055744,000510: 
055745,000511: 07,3422           13224        NORESET            TCF      IMUFINED                              #  DO NOT RESET POWER SUPPLY

Page 1312

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

Page 1313

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

Page 1314

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

Page 1315

055873,000639: 07,3571           50061        AUG2               INDEX    ITEMP1                                
055874,000640: 07,3572           55400                           TS       1400                                  
055875,000641: 07,3573           34736                           CAF      BIT14                                 
055876,000642: 07,3574           26047                           ADS      GYROCMD                               
055877,000643: 07,3575           13542                           TCF      AUG3                                  #  COMPUTE DT.
055878,000644: 

Page 1316

055880,000646: 07,3576           63512        MIN-               AD       -GYROMIN                              #  POSSIBLE NEGATIVE OUTPUT.
055881,000647: 07,3577           00006                           EXTEND                                         
055882,000648: 07,3600           63403                           BZMF     STRTGYR2                              
055883,000649: 
055884,000650: 07,3601           00006        MAJ-               EXTEND                                         #  DEFINITE NEGATIVE OUTPUT.
055885,000651: 07,3602           43622                           DCS      GYROFRAC                              
055886,000652: 07,3603           20071                           DAS      RUPTREG1                              
055887,000653: 
055888,000654: 07,3604           30064                           CA       ITEMP4                                #  SELECT NEGATIVE TORQUING FOR THIS GYRO.
055889,000655: 07,3605           64743                           AD       BIT9                                  
055890,000656: 07,3606           00006                           EXTEND                                         
055891,000657: 07,3607           05014                           WOR      CHAN14                                
055892,000658: 
055893,000659: 07,3610           40070                           CS       RUPTREG1                              #  SET UP RUPTREGS TO FALL INTO GMERGE.
055894,000660: 07,3611           54070                           TS       RUPTREG1                              #  ALL NUMBERS PUT INTO GYROCMD ARE
055895,000661: 07,3612           40071                           CS       RUPTREG2                              #  POSITIVE - BIT9 OF CHAN 14 DETERMINES
055896,000662: 07,3613           76077                           MASK     LOW7                                  #  THE SIGN OF THE COMMAND.
055897,000663: 07,3614           40000                           COM                                            
055898,000664: 07,3615           56071                           XCH      RUPTREG2                              
055899,000665: 07,3616           40000                           COM                                            
055900,000666: 07,3617           13472                           TCF      GMERGE                                
055901,000667: 
055902,000668: 07,3620           01700        GDESELCT           OCT      1700                                  #  TURN OFF SELECT AND ACTIVITY BITS.
055903,000669: 
055904,000670: 07,3621           00000 00034  GYROFRAC           2DEC     .215       B-21                       
055905,000671: 

Page 1317

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

Page 1318

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

Page 1319

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

Page 1320

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

Page 1321

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

Page 1322

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

Page 1323

056147,000913: 04,3253           00007                           ADRES    IMUSE                                 
056148,000914: 04,3254           14631                           TCF      SWRETURN                              
056149,000915: 04,3255           00220        OCT220             OCT      220                                   
056150,000916: 

Page 1324

056152,000918:                                                                                                  #  PROGRAM DESCRIPTION   P06   10 FEB 67
056153,000919: 
056154,000920:                                                                                                  #  TRANSFER THE ISS/CMC FROM THE OPERATE TO THE STANDBY CONDITION.
056155,000921: 
056156,000922:                                                                                                  #  THE NORMAL CONDITION OF READINESS OF THE GNCS WHEN NOT IN USE IS STANDBY. IN THIS CONDITION THE IMU
056157,000923:                                                                                                  #  HEATER POWER IS ON. THE IMU OPERATE POWER IS OFF. THE COMPUTER POWER IS ON. THE OPTICS POWER IS OFF.  THE
056158,000924:                                                                                                  #  CMC  STANDBY ON THE MAIN AND LEB DISKYS IS ON.
056159,000925: 
056160,000926:                                                                                                  #  CALLING SEQUENCE:
056161,000927:                                                                                                  #            ASTRONAUT REQUEST THROUGH DSKY  V37E 06E.
056162,000928: 
056163,000929:                                                                                                  #  SUBROUTINES CALLED:
056164,000930:                                                                                                  #           GOPERF1
056165,000931:                                                                                                  #           BANKCALL
056166,000932:                                                                                                  #           FLAGDOWN
056167,000933: 

Page 1325

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

Page 1326

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

Page 1327

056271,001037: 37,3745           34742                           CAF      BIT10                                 #  MINUS PRESTANDBY SCALER AND SHIFT RIGHT
056272,001038: 37,3746           07312                           TC       SHORTMP                               #  5 TO ALIGN BITS WITH TIME1 TIME2.
056273,001039: 37,3747           34755                           CAF      ZERO                                  
056274,001040: 37,3750           54156                           TS       MPAC       +2                         #  NEEDED FOR TP AGREE
056275,001041: 37,3751           07262                           TC       TPAGREE                               #  MAKE DP DIFF AGREE
056276,001042: 37,3752           10154                           CCS      MPAC                                  
056277,001043: 37,3753           03760                           TC       POSTCOM                               #  IF DP DIFF NET +, NO SCALER OVERFLOW
056278,001044: 37,3754           03760                           TC       POSTCOM                               #  BETWEEN PRE AND POST STANDBY.
056279,001045: 37,3755           03756                           TC       +1                                    #  IF DP DIFF NET -, SCALER OVERFLOWED.  ADD
056280,001046: 37,3756           34742                           CAF      BIT10                                 #  BIT 10 TO HIGH DIFF TO CORRECT.
056281,001047: 37,3757           26154                           ADS      MPAC                                  
056282,001048: 37,3760           00006        POSTCOM            EXTEND                                         #  C(MPAC,+1) IS MAGNITUDE OF DELTA SCALER.
056283,001049: 37,3761           30315                           DCA      TIME2SAV                              #  PRESTANDBY TIME1TIME2
056284,001050: 37,3762           20155                           DAS      MPAC                                  
056285,001051: 37,3763           07262                           TC       TPAGREE                               #  FORCE SIGN AGREEMENT
056286,001052: 37,3764           52155                           DXCH     MPAC                                  #  UPDATED VALUE FOR T1,T2.
056287,001053: 37,3765           20025                           DAS      TIME2                                 #  LOAD UPDATED VALUE INTO T1,T2, WITH
056288,001054: 37,3766           05516                           TC       DOWNFLAG                              #  CLEAR NODOFLAG
056289,001055: 37,3767           00054                           ADRES    NODOFLAG                              
056290,001056: 
056291,001057: 37,3770           06001                           TC       GOTOPOOH                              
056292,001058: 

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