Source Code

These source code files are a reconstruction of Sundance, the Apollo 9 LM (Lunar Module) AGC (Apollo Guidance Computer) flight software, created from binary dumps of original core rope program modules, as follows:
  • B1 — Revision 292
  • B2 — Revision 302
  • B3 — Revision 302
  • B4 — Revision 302
  • B5 — Revision 292
  • B6 — Revision 306
This means that source code does not represent a specific historical revision of Sundance, but rather a mixture of the three released versions. Nonetheless, it is capable of flying the whole Apollo 9 mission. This source code matches the binary dumps, as closely as feasible, but 100% match is not possible, due mostly to changes in memory addresses at which code and variables were allocated in different revisions of Sundance. Refer to this list of explanations for each binary mismatch.

Since only binary dumps (rather than listings) of Sundance are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing.

051301,000002:                                                                                                  ## Copyright:   Public domain.
051302,000003:                                                                                                  ## Filename:    IMU_MODE_SWITCHING_ROUTINES.agc
051303,000004:                                                                                                  ## Purpose:     A section of a reconstructed, mixed version of Sundance
051304,000005:                                                                                                  ##              It is part of the reconstructed source code for the Lunar
051305,000006:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 9.
051306,000007:                                                                                                  ##              No original listings of this program are available;
051307,000008:                                                                                                  ##              instead, this file was created via disassembly of dumps
051308,000009:                                                                                                  ##              of various revisions of Sundance core rope modules.
051309,000010:                                                                                                  ## Assembler:   yaYUL
051310,000011:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
051311,000012:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
051312,000013:                                                                                                  ## Mod history: 2020-06-17 MAS  Created from Luminary 69.
051313,000014: 
051314,000015:                                                                                                  ## Sundance 292
051315,000016: 
051316,000017:    5546                                           BLOCK    02                                    
051317,000018:    4000                                           SETLOC   FFTAG3                                
051318,000019:    4000                                           BANK                                           
051319,000020: 
051320,000021:    5546  E3,1471                                  EBANK=   COMMAND                               
051321,000022: 
051322,000023:                                                                                                  #  FIXED-FIXED ROUTINES.
051323,000024: 
051324,000025:    5546                                           COUNT*   $$/IMODE                              
051325,000026:    5546           35030        ZEROICDU           CAF      ZERO                                  #  ZERO ICDU COUNTERS.
051326,000027:    5547           54032                           TS       CDUX                                  
051327,000028:    5550           54033                           TS       CDUY                                  
051328,000029:    5551           54034                           TS       CDUZ                                  
051329,000030:    5552           00002                           TC       Q                                     
051330,000031: 
051331,000032:    5553     5016               SPSCODE            =        BIT9                                  
051332,000033: 

Sundance 302

051334,000035: 
051335,000036:                                                                                                  #  IMU ZEROING ROUTINE.
051336,000037: 
051337,000038: 11,3772                                           BANK     11                                    
051338,000039: 07,2000                                           SETLOC   MODESW                                
051339,000040: 07,2000                                           BANK                                           
051340,000041: 
051341,000042: 07,2622                                           COUNT*   $$/IMODE                              
051342,000043: 07,2622           00004        IMUZERO            INHINT                                         #  ROUTINE TO ZERO ICDUS.
051343,000044: 07,2623           41037                           CS       DSPTAB     +11D                       #  DONT ZERO CDUS IF IMU IN GIMBAL LOCK AND
051344,000045: 07,2624           75041                           MASK     BITS4&6                               #  COARSE ALIGN (GIMBAL RUNAWAY PROTECTION)
051345,000046: 07,2625           10000                           CCS      A                                     
051346,000047: 07,2626           12632                           TCF      IMUZEROA                              
051347,000048: 
051348,000049: 07,2627           05646                           TC       ALARM                                 #  IF SO.
051349,000050: 07,2630           00206                           OCT      00206                                 
051350,000051: 
051351,000052: 07,2631           13570                           TCF      CAGETSTJ   +4                         #  IMMEDIATE FAILURE.
051352,000053: 
051353,000054: 07,2632           03557        IMUZEROA           TC       CAGETSTQ                              #  IF IMU COMING UP, TURN-ON PROGRAM WILL
051354,000055: 07,2633           12664                           TCF      MODEEXIT                              #  DO ALL THE WORK.
051355,000056: 
051356,000057: 07,2634           41305                           CS       IMODES33                              #  DISABLE DAP AUTO AND HOLD MODES
051357,000058: 07,2635           75043                           MASK     SUPER011                              #      BIT5 FOR GROUND
051358,000059: 07,2636           27305                           ADS      IMODES33                              
051359,000060: 
051360,000061: 07,2637           41304                           CS       IMODES30                              #  INHIBIT ICDUFAIL AND IMUFAIL (IN CASE WE
051361,000062: 07,2640           75743                           MASK     BITS3&4                               #  JUST CAME OUT OF COARSE ALIGN).
051362,000063: 07,2641           27304                           ADS      IMODES30                              
051363,000064: 
051364,000065: 07,2642           45041                           CS       BITS4&6                               #  SEND ZERO ENCODE WITH COARSE AND ERROR
051365,000066: 07,2643           00006                           EXTEND                                         #  COUNTER DISABLED.
051366,000067: 07,2644           03012                           WAND     CHAN12                                
051367,000068: 
051368,000069: 07,2645           03177                           TC       NOATTOFF                              #  TURN OFF NO ATT LAMP.
051369,000070: 
051370,000071: 07,2646           35022                           CAF      BIT5                                  
051371,000072: 07,2647           00006                           EXTEND                                         
051372,000073: 07,2650           05012                           WOR      CHAN12                                
051373,000074: 
051374,000075: 07,2651           05546                           TC       ZEROICDU                              
051375,000076: 07,2652           35021                           CAF      BIT6                                  #  WAIT 320 MS TO GIVE AGS ADEQUATE TIME TO
051376,000077: 07,2653           05252                           TC       WAITLIST                              #  RECEIVE ITS PULSE TRAIN.
051377,000078: 07,2654  E3,1474                                  EBANK=   CDUIND                                
051378,000079: 07,2654           02666 16103                     2CADR    IMUZERO2                              
051379,000080: 
051380,000081: 07,2656           41304                           CS       IMODES30                              #  SEE IF IMU OPERATING AND ALARM IF NOT.
051381,000082: 07,2657           75016                           MASK     BIT9                                  
051382,000083: 07,2660           10000                           CCS      A                                     
051383,000084: 07,2661           12664                           TCF      MODEEXIT                              
051384,000085: 07,2662           05646                           TC       ALARM                                 
051385,000086: 07,2663           00210                           OCT      210                                   
051386,000087: 
051387,000088: 07,2664           00003        MODEEXIT           RELINT                                         #  GENERAL MODE-SWITCHING EXIT.
051388,000089: 07,2665           14670                           TCF      SWRETURN                              
051389,000090: 
051390,000091: 07,2666           03557        IMUZERO2           TC       CAGETSTQ                              #  POSSIBLY SWITCH TO TURN-ON PROGRAM.
051391,000092: 07,2667           15321                           TCF      TASKOVER                              
051392,000093: 07,2670           05546                           TC       ZEROICDU                              #  ZERO CDUX, CDUY, CDUZ
051393,000094: 
051394,000095: 07,2671           45022                           CS       BIT5                                  #  REMOVE ZERO DISCRETE.
051395,000096: 07,2672           00006                           EXTEND                                         
051396,000097: 07,2673           03012                           WAND     CHAN12                                
051397,000098: 
051398,000099: 07,2674           35014                           CAF      BIT11                                 #  WAIT 10 SECS FOR CTRS TO FIND GIMBALS
051399,000100: 07,2675           05274                           TC       VARDELAY                              
051400,000101: 
051401,000102: 07,2676           03557        IMUZERO3           TC       CAGETSTQ                              
051402,000103: 07,2677           15321                           TCF      TASKOVER                              
051403,000104: 
051404,000105: 07,2700           45743                           CS       BITS3&4                               #  REMOVE IMUFAIL AND ICDUFAIL INHIBIT.
051405,000106: 07,2701           71304                           MASK     IMODES30                              
051406,000107: 07,2702           55304                           TS       IMODES30                              
051407,000108: 
051408,000109: 07,2703           45043                           CS       SUPER011                              #  ENABLE DAP AUTO AND HOLD MODES
051409,000110: 07,2704           71305                           MASK     IMODES33                              #      BIT5 FOR GROUND
051410,000111: 07,2705           55305                           TS       IMODES33                              
051411,000112: 
051412,000113: 07,2706           04737                           TC       IBNKCALL                              #  SET ISS WARNING IF EITHER OF ABOVE ARE
051413,000114: 07,2707           14705                           CADR     SETISSW                               #  PRESENT.
051414,000115: 
051415,000116: 07,2710           13542                           TCF      ENDIMU                                
051416,000117: 
051417,000118:                                                                                                  #  IMU COARSE ALIGN MODE.
051418,000119: 
051419,000120: 07,2711           00004        IMUCOARS           INHINT                                         
051420,000121: 07,2712           03564                           TC       CAGETSTJ                              
051421,000122: 07,2713           03055                           TC       SETCOARS                              
051422,000123: 
051423,000124: 07,2714           36216                           CAF      SIX                                   
051424,000125: 07,2715           05252                           TC       WAITLIST                              
051425,000126: 07,2716  E3,1474                                  EBANK=   CDUIND                                
051426,000127: 07,2716           02721 16103                     2CADR    COARS                                 
051427,000128: 
051428,000129: 07,2720           12664                           TCF      MODEEXIT                              
051429,000130: 
051430,000131: 07,2721           03552        COARS              TC       CAGETEST                              
051431,000132: 07,2722           35021                           CAF      BIT6                                  #  ENABLE ALL THREE ISS CDU ERROR COUNTERS
051432,000133: 07,2723           00006                           EXTEND                                         
051433,000134: 07,2724           05012                           WOR      CHAN12                                
051434,000135: 
051435,000136: 07,2725           35025                           CAF      TWO                                   #  SET CDU INDICATOR
051436,000137: 07,2726           55474        COARS1             TS       CDUIND                                
051437,000138: 
051438,000139: 07,2727           51474                           INDEX    CDUIND                                #  COMPUTE THETAD - THETAA IN 1:S
051439,000140: 07,2730           31206                           CA       THETAD                                #    COMPLEMENT FORM
051440,000141: 07,2731           00006                           EXTEND                                         
051441,000142: 07,2732           51474                           INDEX    CDUIND                                
051442,000143: 07,2733           20032                           MSU      CDUX                                  
051443,000144: 07,2734           00006                           EXTEND                                         
051444,000145: 07,2735           75012                           MP       BIT13                                 #  SHIFT RIGHT 2
051445,000146: 07,2736           56001                           XCH      L                                     #  ROUND
051446,000147: 07,2737           60000                           DOUBLE                                         
051447,000148: 07,2740           54061                           TS       ITEMP1                                
051448,000149: 07,2741           12743                           TCF      +2                                    
051449,000150: 07,2742           26001                           ADS      L                                     
051450,000151: 
051451,000152: 07,2743           51474                           INDEX    CDUIND                                #  DIFFERENCE TO BE COMPUTED
051452,000153: 07,2744           23471                           LXCH     COMMAND                               
051453,000154: 07,2745           11474                           CCS      CDUIND                                
051454,000155: 07,2746           02726                           TC       COARS1                                
051455,000156: 
051456,000157: 07,2747           35025                           CAF      TWO                                   #  MINIMUM OF 4 MS WAIT
051457,000158: 07,2750           05274                           TC       VARDELAY                              
051458,000159: 
051459,000160: 07,2751           03552        COARS2             TC       CAGETEST                              #  DONT CONTINUE IF CAGED.
051460,000161: 07,2752           54061                           TS       ITEMP1                                #  SETS TO +0.
051461,000162: 07,2753           35025                           CAF      TWO                                   #  SET CDU INDICATOR
051462,000163: 07,2754           55474                 +3        TS       CDUIND                                
051463,000164: 
051464,000165: 07,2755           51474                           INDEX    CDUIND                                
051465,000166: 07,2756           11471                           CCS      COMMAND                               #  NUMBER OF PULSES REQUIRED
051466,000167: 07,2757           02763                           TC       COMPOS                                #  GREATER THAN MAX ALLOWED
051467,000168: 07,2760           02772                           TC       NEXTCDU    +1                         
051468,000169: 07,2761           03030                           TC       COMNEG                                
051469,000170: 07,2762           02772                           TC       NEXTCDU    +1                         
051470,000171: 
051471,000172: 07,2763           63653        COMPOS             AD       -COMMAX                               #  COMMAX = MAX NUMBER OF PULSES ALLOWED
051472,000173: 07,2764           00006                           EXTEND                                         #    MINUS ONE
051473,000174: 07,2765           63040                           BZMF     COMZERO                               
051474,000175: 07,2766           51474                           INDEX    CDUIND                                
051475,000176: 07,2767           55471                           TS       COMMAND                               #  REDUCE COMMAND BY MAX NUMBER OF PULSES
051476,000177: 07,2770           43654                           CS       -COMMAX-                              #    ALLOWED
051477,000178: 
051478,000179: 07,2771           24061        NEXTCDU            INCR     ITEMP1                                
051479,000180: 07,2772           65027                           AD       NEG0                                  
051480,000181: 07,2773           51474                           INDEX    CDUIND                                
051481,000182: 07,2774           54050                           TS       CDUXCMD                               #  SET UP COMMAND REGISTER.
051482,000183: 
051483,000184: 07,2775           11474                           CCS      CDUIND                                
051484,000185: 07,2776           02754                           TC       COARS2     +3                         
051485,000186: 
051486,000187: 07,2777           10061                           CCS      ITEMP1                                #  SEE IF ANY PULSES TO GO OUT.
051487,000188: 07,3000           13044                           TCF      SENDPULS                              
051488,000189: 
051489,000190: 07,3001           05271                           TC       FIXDELAY                              #  WAIT FOR GIMBALS TO SETTLE.
051490,000191: 07,3002           00226                           DEC      150        B-14                       
051491,000192: 
051492,000193: 07,3003           35025                           CAF      TWO                                   #  AT END OF COMMAND, CHECK TO SEE THAT
051493,000194: 07,3004           54061        CHKCORS            TS       ITEMP1                                #  GIMBALS ARE WITHIN 2 DEGREES OF THETAD.
051494,000195: 07,3005           50000                           INDEX    A                                     
051495,000196: 07,3006           30032                           CA       CDUX                                  
051496,000197: 07,3007           00006                           EXTEND                                         
051497,000198: 07,3010           50061                           INDEX    ITEMP1                                
051498,000199: 07,3011           21206                           MSU      THETAD                                
051499,000200: 07,3012           10000                           CCS      A                                     
051500,000201: 07,3013           13021                           TCF      COARSERR                              
051501,000202: 07,3014           13016                           TCF      CORSCHK2                              
051502,000203: 07,3015           13021                           TCF      COARSERR                              
051503,000204: 
051504,000205: 07,3016           10061        CORSCHK2           CCS      ITEMP1                                
051505,000206: 07,3017           13004                           TCF      CHKCORS                               
051506,000207: 07,3020           13542                           TCF      ENDIMU                                #  END OF COARSE ALIGNMENT.
051507,000208: 
051508,000209: 07,3021           63027        COARSERR           AD       COARSTOL                              #  2 DEGREES.
051509,000210: 07,3022           00006                           EXTEND                                         
051510,000211: 07,3023           63016                           BZMF     CORSCHK2                              
051511,000212: 
051512,000213: 07,3024           05646                           TC       ALARM                                 #  COARSE ALIGN ERROR.
051513,000214: 07,3025           00211                           OCT      211                                   
051514,000215: 
051515,000216: 07,3026           13550                           TCF      IMUBAD                                
051516,000217: 
051517,000218: 07,3027           77511        COARSTOL           DEC      -.01111                               #  2 DEGREES SCALED AT HALF-REVOLUTIONS
051518,000219: 
051519,000220: 07,3030           63653        COMNEG             AD       -COMMAX                               
051520,000221: 07,3031           00006                           EXTEND                                         
051521,000222: 07,3032           63040                           BZMF     COMZERO                               
051522,000223: 07,3033           40000                           COM                                            
051523,000224: 07,3034           51474                           INDEX    CDUIND                                
051524,000225: 07,3035           55471                           TS       COMMAND                               
051525,000226: 07,3036           33654                           CA       -COMMAX-                              
051526,000227: 07,3037           02771                           TC       NEXTCDU                               
051527,000228: 
051528,000229: 07,3040           35030        COMZERO            CAF      ZERO                                  
051529,000230: 07,3041           51474                           INDEX    CDUIND                                
051530,000231: 07,3042           57471                           XCH      COMMAND                               
051531,000232: 07,3043           02771                           TC       NEXTCDU                               
051532,000233: 
051533,000234: 07,3044           37711        SENDPULS           CAF      13,14,15                              
051534,000235: 07,3045           00006                           EXTEND                                         
051535,000236: 07,3046           05014                           WOR      CHAN14                                
051536,000237: 07,3047           33655                           CAF      600MS                                 
051537,000238: 07,3050           12750                           TCF      COARS2     -1                         #  THEN TO VARDELAY
051538,000239: 
051539,000240: 07,3051           35021        CA+ECE             CAF      BIT6                                  #  ENABLE ALL THREE ISS CDU ERROR COUNTERS
051540,000241: 07,3052           00006                           EXTEND                                         
051541,000242: 07,3053           05012                           WOR      CHAN12                                
051542,000243: 07,3054           05321                           TC       TASKOVER                              
051543,000244: 
051544,000245: 07,3055           35023        SETCOARS           CAF      BIT4                                  #  BYPASS IF ALREADY IN COARSE ALIGN
051545,000246: 07,3056           00006                           EXTEND                                         
051546,000247: 07,3057           02012                           RAND     CHAN12                                
051547,000248: 07,3060           10000                           CCS      A                                     
051548,000249: 07,3061           00002                           TC       Q                                     
051549,000250: 
051550,000251: 07,3062           45021                           CS       BIT6                                  #  CLEAR ISS ERROR COUNTERS
051551,000252: 07,3063           00006                           EXTEND                                         
051552,000253: 07,3064           03012                           WAND     CHAN12                                
051553,000254: 
051554,000255: 07,3065           45015                           CS       BIT10                                 #  KNOCK DOWN GYRO ACTIVITY
051555,000256: 07,3066           00006                           EXTEND                                         
051556,000257: 07,3067           03014                           WAND     CHAN14                                
051557,000258: 07,3070           45030                           CS       ZERO                                  
051558,000259: 07,3071           54047                           TS       GYROCMD                               
051559,000260: 
051560,000261: 07,3072           35023                           CAF      BIT4                                  #  PUT ISS IN COARSE ALIGN
051561,000262: 07,3073           00006                           EXTEND                                         
051562,000263: 07,3074           05012                           WOR      CHAN12                                
051563,000264: 
051564,000265: 07,3075           41037                           CS       DSPTAB     +11D                       #  TURN ON NO ATT LAMP
051565,000266: 07,3076           73120                           MASK     OCT40010                              
051566,000267: 07,3077           27037                           ADS      DSPTAB     +11D                       
051567,000268: 
051568,000269: 07,3100           41305                           CS       IMODES33                              #  DISABLE DAP AUTO AND HOLD MODES
051569,000270: 07,3101           75021                           MASK     BIT6                                  
051570,000271: 07,3102           27305                           ADS      IMODES33                              
051571,000272: 
051572,000273: 07,3103           41304                           CS       IMODES30                              #  DISABLE IMUFAIL
051573,000274: 07,3104           75023                           MASK     BIT4                                  
051574,000275: 07,3105           27304                           ADS      IMODES30                              
051575,000276: 
051576,000277: 07,3106           45022        RNDREFDR           CS       TRACKBIT                              #  CLEAR TRACK FLAG
051577,000278: 07,3107           70075                           MASK     FLAGWRD1                              
051578,000279: 07,3110           54075                           TS       FLAGWRD1                              
051579,000280: 
051580,000281: 07,3111           45010                           CS       DRFTBIT                               #  CLEAR DRIFT FLAG
051581,000282: 07,3112           70076                           MASK     FLAGWRD2                              
051582,000283: 07,3113           54076                           TS       FLAGWRD2                              
051583,000284: 
051584,000285: 07,3114           45012                           CS       REFSMBIT                              #  CLEAR REFSMMAT FLAG
051585,000286: 07,3115           70077                           MASK     FLAGWRD3                              
051586,000287: 07,3116           54077                           TS       FLAGWRD3                              
051587,000288: 
051588,000289: 07,3117           00002                           TC       Q                                     
051589,000290: 
051590,000291: 07,3120           40010        OCT40010           OCT      40010                                 
051591,000292: 
051592,000293:                                                                                                  #  IMU FINE ALIGN MODE SWITCH.
051593,000294: 
051594,000295: 07,3121           00004        IMUFINE            INHINT                                         
051595,000296: 07,3122           03564                           TC       CAGETSTJ                              #  SEE IF IMU BEING CAGED.
051596,000297: 
051597,000298: 07,3123           43652                           CS       BITS4-5                               #  RESET ZERO AND COARSE
051598,000299: 07,3124           00006                           EXTEND                                         
051599,000300: 07,3125           03012                           WAND     CHAN12                                
051600,000301: 
051601,000302: 07,3126           45021                           CS       BIT6                                  #  INSURE DAP AUTO AND HOLD MODES ENABLED
051602,000303: 07,3127           71305                           MASK     IMODES33                              
051603,000304: 07,3130           55305                           TS       IMODES33                              
051604,000305: 
051605,000306: 07,3131           03177                           TC       NOATTOFF                              
051606,000307: 
051607,000308: 07,3132           35015                           CAF      BIT10                                 #  IMU FAIL WAS INHIBITED DURING THE
051608,000309: 07,3133           05252                           TC       WAITLIST                              #  PRESUMABLY PRECEDING COARSE ALIGN. LEAVE
051609,000310: 07,3134  E3,1474                                  EBANK=   CDUIND                                
051610,000311: 07,3134           03145 16103                     2CADR    IFAILOK                               #  IT ON FOR THE FIRST 5 SECS OF FINE ALIGN
051611,000312: 
051612,000313: 07,3136           35050                           CAF      2SECS                                 
051613,000314: 07,3137           05252                           TC       WAITLIST                              
051614,000315: 07,3140  E3,1474                                  EBANK=   CDUIND                                
051615,000316: 07,3140           03143 16103                     2CADR    IMUFINED                              
051616,000317: 
051617,000318: 07,3142           12664                           TCF      MODEEXIT                              
051618,000319: 
051619,000320: 07,3143           03552        IMUFINED           TC       CAGETEST                              #  SEE THAT NO ONE HAS CAGED THE IMU.
051620,000321: 07,3144           13542                           TCF      ENDIMU                                
051621,000322: 
051622,000323: 07,3145           03557        IFAILOK            TC       CAGETSTQ                              #  ENABLE IMU FIAL UNLESS IMU BEING CAGED.
051623,000324: 07,3146           15321                           TCF      TASKOVER                              #  IT IS.
051624,000325: 
051625,000326: 07,3147           35023                           CAF      BIT4                                  #  DONT RESET IMU FAIL INHIBIT IF SOMEONE
051626,000327: 07,3150           00006                           EXTEND                                         #  HAS GONE INTO COARSE ALIGN.
051627,000328: 07,3151           02012                           RAND     CHAN12                                
051628,000329: 07,3152           10000                           CCS      A                                     
051629,000330: 07,3153           15321                           TCF      TASKOVER                              
051630,000331: 
051631,000332: 07,3154           41304                           CS       IMODES30                              #  RESET IMUFAIL.
051632,000333: 07,3155           75012                           MASK     BIT13                                 
051633,000334: 07,3156           27304                           ADS      IMODES30                              
051634,000335: 07,3157           45023                           CS       BIT4                                  
051635,000336: 07,3160           71304        PFAILOK2           MASK     IMODES30                              
051636,000337: 07,3161           55304                           TS       IMODES30                              
051637,000338: 07,3162           04737                           TC       IBNKCALL                              #  THE ISS WARNING LIGHT MAY COME ON NOW
051638,000339: 07,3163           14705                           CADR     SETISSW                               #  THAT THE INHIBIT HAS BEEN REMOVED.
051639,000340: 07,3164           15321                           TCF      TASKOVER                              
051640,000341: 
051641,000342: 07,3165           03557        PFAILOK            TC       CAGETSTQ                              #  ENABLE PIP FAIL PROG ALARM.
051642,000343: 07,3166           15321                           TCF      TASKOVER                              
051643,000344: 
051644,000345: 07,3167           41304                           CS       IMODES30                              #  RESET IMU AND PIPA FAIL BITS.
051645,000346: 07,3170           75015                           MASK     BIT10                                 
051646,000347: 07,3171           27304                           ADS      IMODES30                              
051647,000348: 
051648,000349: 07,3172           41305                           CS       IMODES33                              
051649,000350: 07,3173           75012                           MASK     BIT13                                 
051650,000351: 07,3174           27305                           ADS      IMODES33                              
051651,000352: 
051652,000353: 07,3175           45022                           CS       BIT5                                  
051653,000354: 07,3176           13160                           TCF      PFAILOK2                              
051654,000355: 
051655,000356: 07,3177           43120        NOATTOFF           CS       OCT40010                              #  SUBROUTINE TO TURN OFF NO ATT LAMP.
051656,000357: 07,3200           71037                           MASK     DSPTAB     +11D                       
051657,000358: 07,3201           65010                           AD       BIT15                                 
051658,000359: 07,3202           55037                           TS       DSPTAB     +11D                       
051659,000360: 07,3203           00002                           TC       Q                                     
051660,000361: 
051661,000362:                                                                                                  #  ROUITNES TO INITIATE AND TERMINATE PROGRAM USE OF THE PIPAS.  NO IMUSTALL REQUIRED IN EITHER CASE.
051662,000363: 
051663,000364: 07,3204           03557        PIPUSE             TC       CAGETSTQ                              #  DONT ENABLE PIPA FAIL IF IMU BEING CAGED
051664,000365: 07,3205           14670                           TCF      SWRETURN                              
051665,000366: 
051666,000367: 07,3206           00004                           INHINT                                         
051667,000368: 07,3207           35030                           CAF      ZERO                                  #  ZERO COUNTERS.
051668,000369: 07,3210           54037                           TS       PIPAX                                 
051669,000370: 07,3211           54040                           TS       PIPAY                                 
051670,000371: 07,3212           54041                           TS       PIPAZ                                 
051671,000372: 
051672,000373: 07,3213           45026                           CS       BIT1                                  #  IF PIPA FAILS FROM NOW ON (UNTIL
051673,000374: 07,3214           71304                           MASK     IMODES30                              #  PIPFREE), LIGHT ISS WARNING.
051674,000375: 07,3215           55304                           TS       IMODES30                              
051675,000376: 
051676,000377: 07,3216           04737        PIPFREE2           TC       IBNKCALL                              #  ISS WARNING MIGHT COME ON NOW.
051677,000378: 07,3217           14705                           CADR     SETISSW                               #  (OR GO OFF ON PIPFREE).
051678,000379: 
051679,000380: 07,3220           12664                           TCF      MODEEXIT                              
051680,000381: 
051681,000382: 07,3221           00004        PIPFREE            INHINT                                         #  PROGRAM DONE WITH PIPAS. DONT LIGHT
051682,000383: 07,3222           41304                           CS       IMODES30                              #  ISS WARNING.
051683,000384: 07,3223           75026                           MASK     BIT1                                  
051684,000385: 07,3224           27304                           ADS      IMODES30                              
051685,000386: 
051686,000387: 07,3225           75015                           MASK     BIT10                                 #  IF PIP FAIL ON, DO PROG ALSRM AND RESET
051687,000388: 07,3226           10000                           CCS      A                                     #  ISS WARNING.
051688,000389: 07,3227           12664                           TCF      MODEEXIT                              
051689,000390: 
051690,000391: 07,3230           05646                           TC       ALARM                                 
051691,000392: 07,3231           00212                           OCT      212                                   
051692,000393: 
051693,000394: 07,3232           00004                           INHINT                                         
051694,000395: 
051695,000396: 07,3233           13216                           TCF      PIPFREE2                              
051696,000397: 
051697,000398:                                                                                                  #           THE FOLLOWING ROUTINE TORQUES THE IRIGS ACCORDING TO DOUBLE PRECISION INPUTS IN THE SIX REGISTERS
051698,000399:                                                                                                  #  BEGINNING AT THE ECADR ARRIVING IN A.  THE MINIMUM SIZE OF ANY PULSE TRAIN IS 16 PULSES (.25 CDU COUNTS). THE
051699,000400:                                                                                                  #  UNSENT PORTION OF THE COMMAND IS LEFT INTACT IN THE INPUT COMMAND REGISTERS.
051700,000401: 
051701,000402: 07,3234  E3,1400                                  EBANK=   1400                                  #  VARIABLE, ACTUALLY.
051702,000403: 
051703,000404: 07,3234           54161        IMUPULSE           TS       MPAC       +5                         #  SAVE ARRIVING ECADR.
051704,000405: 07,3235           03564                           TC       CAGETSTJ                              #  DONT PROCEED IF IMU BEING CAGED.
051705,000406: 
051706,000407: 07,3236           11321                           CCS      LGYRO                                 #  SEE IF GYROS BUSY.
051707,000408: 07,3237           03300                           TC       GYROBUSY                              #  SLEEP.
051708,000409: 
051709,000410: 07,3240           54156                           TS       MPAC       +2                         
051710,000411: 07,3241           35021                           CAF      BIT6                                  #  ENABLE THE POWER SUPPLY.
051711,000412: 07,3242           00006                           EXTEND                                         
051712,000413: 07,3243           05014                           WOR      CHAN14                                
051713,000414: 
051714,000415: 07,3244           35024                           CAF      FOUR                                  
051715,000416: 07,3245           05252        GWAKE2             TC       WAITLIST                              #  (IF A JOB WAS PUT TO SLEEP, THE POWER
051716,000417: 07,3246  E3,1474                                  EBANK=   CDUIND                                #  SUPPLY IS LEFT ON BY THE WAKING JOB).
051717,000418: 07,3246           03316 16103                     2CADR    STRTGYRO                              
051718,000419: 
051719,000420: 07,3250           30161                           CA       MPAC       +5                         #  SET UP EBANK, SAVING CALLER'S EBANK FOR
051720,000421: 07,3251           56003                           XCH      EBANK                                 #  RESTORATION ON RETURN.
051721,000422: 07,3252           56161                           XCH      MPAC       +5                         
051722,000423: 07,3253           55321                           TS       LGYRO                                 #  RESERVES GYROS.
051723,000424: 07,3254           74371                           MASK     LOW8                                  
051724,000425: 07,3255           54061                           TS       ITEMP1                                
051725,000426: 
051726,000427: 07,3256           35025                           CAF      TWO                                   #  FORCE SIGN AGREEMENT ON INPUTS.
051727,000428: 07,3257           54157        GYROAGRE           TS       MPAC       +3                         
051728,000429: 07,3260           60000                           DOUBLE                                         
051729,000430: 07,3261           60061                           AD       ITEMP1                                
051730,000431: 07,3262           54160                           TS       MPAC       +4                         
051731,000432: 07,3263           00006                           EXTEND                                         
051732,000433: 07,3264           50000                           INDEX    A                                     
051733,000434: 07,3265           31401                           DCA      1400                                  
051734,000435: 07,3266           52155                           DXCH     MPAC                                  
051735,000436: 07,3267           07231                           TC       TPAGREE                               
051736,000437: 07,3270           52155                           DXCH     MPAC                                  
051737,000438: 07,3271           50160                           INDEX    MPAC       +4                         
051738,000439: 07,3272           53401                           DXCH     1400                                  
051739,000440: 
051740,000441: 07,3273           10157                           CCS      MPAC       +3                         
051741,000442: 07,3274           13257                           TCF      GYROAGRE                              
051742,000443: 
051743,000444: 07,3275           30161                           CA       MPAC       +5                         #  RESTORE CALLER'S EBANK.
051744,000445: 07,3276           54003                           TS       EBANK                                 
051745,000446: 07,3277           12664                           TCF      MODEEXIT                              
051746,000447: 
051747,000448:                                                                                                  #  ROUTINES TO ALLOW TORQUING BY ONLY ONE JOB AT A TIME.
051748,000449: 
051749,000450: 07,3300           00006        GYROBUSY           EXTEND                                         #  SAVE RETURN 2FCADR.
051750,000451: 07,3301           30134                           DCA      BUF2                                  
051751,000452: 07,3302           52155                           DXCH     MPAC                                  
051752,000453: 07,3303           33315        REGSLEEP           CAF      LGWAKE                                
051753,000454: 07,3304           15203                           TCF      JOBSLEEP                              
051754,000455: 
051755,000456: 07,3305           11321        GWAKE              CCS      LGYRO                                 #  WHEN AWAKENED, SEE IF GYROS STILL BUSY.
051756,000457: 07,3306           13303                           TCF      REGSLEEP                              #  IF SO, SLEEP SOME MORE.
051757,000458: 
051758,000459: 07,3307           54156                           TS       MPAC       +2                         
051759,000460: 07,3310           00006                           EXTEND                                         
051760,000461: 07,3311           30155                           DCA      MPAC                                  
051761,000462: 07,3312           52134                           DXCH     BUF2                                  #  RESTORE SWRETURN INFO.
051762,000463: 07,3313           35026                           CAF      ONE                                   
051763,000464: 07,3314           13245                           TCF      GWAKE2                                
051764,000465: 
051765,000466: 07,3315           17305        LGWAKE             CADR     GWAKE                                 
051766,000467: 
051767,000468:                                                                                                  #  GYRO-TORQUING WAITLIST TASKS.
051768,000469: 
051769,000470: 07,3316           43537        STRTGYRO           CS       GDESELCT                              #  DE-SELECT LAST GYRO.
051770,000471: 07,3317           00006                           EXTEND                                         
051771,000472: 07,3320           03014                           WAND     CHAN14                                
051772,000473: 
051773,000474: 07,3321           03552                           TC       CAGETEST                              
051774,000475: 
051775,000476: 07,3322           31321        STRTGYR2           CA       LGYRO                                 #  JUMP ON PHASE COUNTER IN BITS 13-14.
051776,000477: 07,3323           00006                           EXTEND                                         
051777,000478: 07,3324           75023                           MP       BIT4                                  
051778,000479: 07,3325           50000                           INDEX    A                                     
051779,000480: 07,3326           13327                           TCF      +1                                    
051780,000481: 07,3327           03344                           TC       GSELECT                               #  =0.  DO Y GYRO.
051781,000482: 07,3330           00202                           OCT      00202                                 
051782,000483: 
051783,000484: 07,3331           03344                           TC       GSELECT                               #  =1.  DO Z GYRO.
051784,000485: 07,3332           00302                           OCT      00302                                 
051785,000486: 
051786,000487: 07,3333           03342                           TC       GSELECT    -2                         #  =2.  DO X GYRO.
051787,000488: 07,3334           00100                           OCT      00100                                 
051788,000489: 
051789,000490: 07,3335           35030                           CAF      ZERO                                  #  =3.  DONE
051790,000491: 07,3336           55321                           TS       LGYRO                                 
051791,000492: 07,3337           33315                           CAF      LGWAKE                                #  WAKE A POSSIBLE SLEEPING JOB.
051792,000493: 07,3340           05207                           TC       JOBWAKE                               
051793,000494: 
051794,000495: 07,3341           13143        NORESET            TCF      IMUFINED                              #  DO NOT RESET POWER SUPPLY
051795,000496: 07,3342           45024                 -2        CS       FOUR                                  #  SPECIAL ENTRY TO REGRESS LGYRO FOR X.
051796,000497: 07,3343           27321                           ADS      LGYRO                                 
051797,000498: 
051798,000499: 07,3344           50002        GSELECT            INDEX    Q                                     #  SELECT GYRO.
051799,000500: 07,3345           30000                           CAF      0                                     #  PACKED WORD CONTAINS GYRO SELECT BITS
051800,000501: 07,3346           54064                           TS       ITEMP4                                #  AND INCREMENT TO LGYRO.
051801,000502: 07,3347           75032                           MASK     SEVEN                                 
051802,000503: 07,3350           65012                           AD       BIT13                                 
051803,000504: 07,3351           27321                           ADS      LGYRO                                 
051804,000505: 07,3352           54003                           TS       EBANK                                 
051805,000506: 07,3353           74371                           MASK     LOW8                                  
051806,000507: 07,3354           54061                           TS       ITEMP1                                
051807,000508: 
051808,000509: 07,3355           45032                           CS       SEVEN                                 
051809,000510: 07,3356           70064                           MASK     ITEMP4                                
051810,000511: 07,3357           54064                           TS       ITEMP4                                
051811,000512: 
051812,000513: 07,3360           00006                           EXTEND                                         #  MOVE DP COMMAND TO RUPTREGS FOR TESTING.
051813,000514: 07,3361           50061                           INDEX    ITEMP1                                
051814,000515: 07,3362           31401                           DCA      1400                                  
051815,000516: 07,3363           52071                           DXCH     RUPTREG1                              
051816,000517: 
051817,000518: 07,3364           10070                           CCS      RUPTREG1                              
051818,000519: 07,3365           13400                           TCF      MAJ+                                  
051819,000520: 07,3366           13370                           TCF      +2                                    
051820,000521: 07,3367           13520                           TCF      MAJ-                                  
051821,000522: 
051822,000523: 07,3370           10071                           CCS      RUPTREG2                              
051823,000524: 07,3371           13375                           TCF      MIN+                                  
051824,000525: 07,3372           13322                           TCF      STRTGYR2                              
051825,000526: 07,3373           13515                           TCF      MIN-                                  
051826,000527: 07,3374           13322                           TCF      STRTGYR2                              
051827,000528: 
051828,000529: 07,3375           63431        MIN+               AD       -GYROMIN                              #  SMALL POSITIVE COMMAND. SEE IF AT LEAST
051829,000530: 07,3376           00006                           EXTEND                                         #  16 GYRO PULSES.
051830,000531: 07,3377           63322                           BZMF     STRTGYR2                              
051831,000532: 
051832,000533: 07,3400           00006        MAJ+               EXTEND                                         #  DEFINITE POSITIVE OUTPUT.
051833,000534: 07,3401           33541                           DCA      GYROFRAC                              
051834,000535: 07,3402           20071                           DAS      RUPTREG1                              
051835,000536: 
051836,000537: 07,3403           30064                           CA       ITEMP4                                #  SELECT POSITIVE TORQUING FOR THIS GYRO.
051837,000538: 07,3404           00006                           EXTEND                                         
051838,000539: 07,3405           05014                           WOR      CHAN14                                
051839,000540: 
051840,000541: 07,3406           36050                           CAF      LOW7                                  #  LEAVE NUMBER OF POSSIBLE 8192 AUGMENTS
051841,000542: 07,3407           70071                           MASK     RUPTREG2                              #  TO INITIAL COMMAND IN MAJOR PART OF LONG
051842,000543: 07,3410           56071                           XCH      RUPTREG2                              #  TERM STORAGE AND TRUNCATED FRACTION
051843,000544: 07,3411           00006        GMERGE             EXTEND                                         #  IN MINOR PART. THE MAJOR PART WILL BE
051844,000545: 07,3412           75017                           MP       BIT8                                  #  COUNTED DOWN TO ZERO IN THE COURSE OF
051845,000546: 07,3413           54062                           TS       ITEMP2                                #  PUTTING OUT THE ENTIRE COMMAND.
051846,000547: 07,3414           30070                           CA       RUPTREG1                              
051847,000548: 07,3415           00006                           EXTEND                                         
051848,000549: 07,3416           75016                           MP       BIT9                                  
051849,000550: 07,3417           54070                           TS       RUPTREG1                              
051850,000551: 07,3420           30001                           CA       L                                     
051851,000552: 07,3421           00006                           EXTEND                                         
051852,000553: 07,3422           75011                           MP       BIT14                                 
051853,000554: 07,3423           26062                           ADS      ITEMP2                                #  INITIAL COMMAND.
051854,000555: 
051855,000556: 07,3424           00006                           EXTEND                                         #  SEE IF MORE THAN ONE PULSE TRAIN NEEDED
051856,000557: 07,3425           30071                           DCA      RUPTREG1                              #  (MORE THAN 16383 PULSES).
051857,000558: 07,3426           67721                           AD       MINUS1                                
051858,000559: 07,3427           10000                           CCS      A                                     
051859,000560: 07,3430           13461                           TCF      LONGGYRO                              
051860,000561: 07,3431           77601        -GYROMIN           OCT      -176                                  #  MAY BE ADJUSTED TO SPECIFY MINIMUM CMD
051861,000562: 07,3432           13436                           TCF      +4                                    
051862,000563: 
051863,000564: 07,3433           35011                           CAF      BIT14                                 
051864,000565: 07,3434           26062                           ADS      ITEMP2                                
051865,000566: 07,3435           35030                           CAF      ZERO                                  
051866,000567: 
051867,000568: 07,3436           50061                 +4        INDEX    ITEMP1                                
051868,000569: 07,3437           53401                           DXCH     1400                                  
051869,000570: 07,3440           30062                           CA       ITEMP2                                #  ENTIRE COMMAND.
051870,000571: 07,3441           54047        LASTSEG            TS       GYROCMD                               
051871,000572: 07,3442           00006                           EXTEND                                         
051872,000573: 07,3443           75015                           MP       BIT10                                 #  WAITLIST DT
051873,000574: 07,3444           66221                           AD       THREE                                 #  TRUNCATION AND PHASE UNCERTAINTIES.
051874,000575: 07,3445           05252                           TC       WAITLIST                              
051875,000576: 07,3446  E3,1474                                  EBANK=   CDUIND                                
051876,000577: 07,3446           03316 16103                     2CADR    STRTGYRO                              
051877,000578: 
051878,000579: 07,3450           35023        GYROEXIT           CAF      BIT4                                  
051879,000580: 07,3451           00006                           EXTEND                                         
051880,000581: 07,3452           02012                           RAND     CHAN12                                
051881,000582: 07,3453           10000                           CCS      A                                     
051882,000583: 07,3454           13550                           TCF      IMUBAD                                
051883,000584: 
051884,000585: 07,3455           35015                           CAF      BIT10                                 
051885,000586: 07,3456           00006                           EXTEND                                         
051886,000587: 07,3457           05014                           WOR      CHAN14                                
051887,000588: 07,3460           15321                           TCF      TASKOVER                              
051888,000589: 
051889,000590: 07,3461           50061        LONGGYRO           INDEX    ITEMP1                                
051890,000591: 07,3462           53401                           DXCH     1400                                  #  INITIAL COMMAND OUT PLUS N AUGMENTS OF
051891,000592: 07,3463           35011                           CAF      BIT14                                 #  8192. INITIAL COMMAND IS AT LEAST 8192.
051892,000593: 07,3464           60062                           AD       ITEMP2                                
051893,000594: 07,3465           54047                           TS       GYROCMD                               
051894,000595: 
051895,000596: 07,3466           00006        AUG3               EXTEND                                         #  GET WAITLIST DT TO TIME WHEN TRAIN IS
051896,000597: 07,3467           75015                           MP       BIT10                                 #  ALMOST OUT.
051897,000598: 07,3470           67717                           AD       NEG3                                  
051898,000599: 07,3471           05252                           TC       WAITLIST                              
051899,000600: 07,3472  E3,1474                                  EBANK=   CDUIND                                
051900,000601: 07,3472           03475 16103                     2CADR    8192AUG                               
051901,000602: 
051902,000603: 07,3474           13450                           TCF      GYROEXIT                              
051903,000604: 
051904,000605: 07,3475           03552        8192AUG            TC       CAGETEST                              
051905,000606: 
051906,000607: 07,3476           31321                           CA       LGYRO                                 #  ADD 8192 PULSES TO GYROCMD
051907,000608: 07,3477           54003                           TS       EBANK                                 
051908,000609: 07,3500           74371                           MASK     LOW8                                  
051909,000610: 07,3501           54061                           TS       ITEMP1                                
051910,000611: 
051911,000612: 07,3502           50061                           INDEX    ITEMP1                                #  SEE IF THIS IS THE LAST AUG.
051912,000613: 07,3503           11400                           CCS      1400                                  
051913,000614: 07,3504           13510                           TCF      AUG2                                  #  MORE TO COME.
051914,000615: 
051915,000616: 07,3505           35011                           CAF      BIT14                                 
051916,000617: 07,3506           26047                           ADS      GYROCMD                               
051917,000618: 07,3507           13442                           TCF      LASTSEG    +1                         
051918,000619: 
051919,000620: 07,3510           50061        AUG2               INDEX    ITEMP1                                
051920,000621: 07,3511           55400                           TS       1400                                  
051921,000622: 07,3512           35011                           CAF      BIT14                                 
051922,000623: 07,3513           26047                           ADS      GYROCMD                               
051923,000624: 07,3514           13466                           TCF      AUG3                                  #  COMPUTE DT.
051924,000625: 
051925,000626: 07,3515           63431        MIN-               AD       -GYROMIN                              #  POSSIBLE NEGATIVE OUTPUT.
051926,000627: 07,3516           00006                           EXTEND                                         
051927,000628: 07,3517           63322                           BZMF     STRTGYR2                              
051928,000629: 
051929,000630: 07,3520           00006        MAJ-               EXTEND                                         #  DEFINITE NEGATIVE OUTPUT.
051930,000631: 07,3521           43541                           DCS      GYROFRAC                              
051931,000632: 07,3522           20071                           DAS      RUPTREG1                              
051932,000633: 
051933,000634: 07,3523           30064                           CA       ITEMP4                                #  SELECT NEGATIVE TORQUING FOR THIS GYRO.
051934,000635: 07,3524           65016                           AD       BIT9                                  
051935,000636: 07,3525           00006                           EXTEND                                         
051936,000637: 07,3526           05014                           WOR      CHAN14                                
051937,000638: 
051938,000639: 07,3527           40070                           CS       RUPTREG1                              #  SET UP RUPTREGS TO FALL INTO GMERGE.
051939,000640: 07,3530           54070                           TS       RUPTREG1                              #  ALL NUMBERS PUT INTO GYROCMD ARE
051940,000641: 07,3531           40071                           CS       RUPTREG2                              #  POSITIVE - BIT9 OF CHAN 14 DETERMINES
051941,000642: 07,3532           76050                           MASK     LOW7                                  #  THE SIGN OF THE COMMAND.
051942,000643: 07,3533           40000                           COM                                            
051943,000644: 07,3534           56071                           XCH      RUPTREG2                              
051944,000645: 07,3535           40000                           COM                                            
051945,000646: 07,3536           13411                           TCF      GMERGE                                
051946,000647: 
051947,000648: 07,3537           01700        GDESELCT           OCT      1700                                  #  TURN OFF SELECT AND ACTIVITY BITS.
051948,000649: 
051949,000650: 07,3540           00000 00034  GYROFRAC           2DEC     .215       B-21                       
051950,000651: 
051951,000652:                                                                                                  #  IMU MODE SWITCHING ROUTINES COME HERE WHEN ACTION COMPLETE.
051952,000653: 
051953,000654: 07,3542           00006        ENDIMU             EXTEND                                         #  MODE IS BAD IF CAGE HAS OCCURED OR IF
051954,000655: 07,3543           00011                           READ     DSALMOUT                              #  ISS WARNING IS ON.
051955,000656: 07,3544           75026                           MASK     BIT1                                  
051956,000657: 07,3545           10000                           CCS      A                                     
051957,000658: 07,3546           13550                           TCF      IMUBAD                                
051958,000659: 
051959,000660: 07,3547           13576        IMUGOOD            TCF      GOODEND                               #  WITH C(A) = 0.
051960,000661: 
051961,000662: 07,3550           35030        IMUBAD             CAF      ZERO                                  
051962,000663: 07,3551           13573                           TCF      BADEND                                
051963,000664: 
051964,000665: 07,3552           35021        CAGETEST           CAF      BIT6                                  #  SUBROUTINE TO TERMINATE IMU MODE
051965,000666: 07,3553           71304                           MASK     IMODES30                              #  SWITCH IF IMU HAS BEEN CAGED.
051966,000667: 07,3554           10000                           CCS      A                                     
051967,000668: 07,3555           13550                           TCF      IMUBAD                                #  DIRECTLY.
051968,000669: 07,3556           00002                           TC       Q                                     #  WITH C(A) = +0.
051969,000670: 
051970,000671: 07,3557           41304        CAGETSTQ           CS       IMODES30                              #  SKIP IF IMU NOT BEING CAGED.
051971,000672: 07,3560           75021                           MASK     BIT6                                  
051972,000673: 07,3561           10000                           CCS      A                                     
051973,000674: 07,3562           24002                           INCR     Q                                     
051974,000675: 07,3563           00002                           TC       Q                                     
051975,000676: 
051976,000677: 07,3564           41304        CAGETSTJ           CS       IMODES30                              #  IF DURING MODE SWITCH INITIALIZATION
051977,000678: 07,3565           75021                           MASK     BIT6                                  #  IT IS FOUND THAT THE IMU IS BEING CAGED,
051978,000679: 07,3566           10000                           CCS      A                                     #  SET IMUCADR TO -0 TO INDICATE OPERATION
051979,000680: 07,3567           00002                           TC       Q                                     #  COMPLETE BUT FAILED. RETURN IMMEDIATELY
051980,000681: 
051981,000682: 07,3570           45030                           CS       ZERO                                  #  TO SWRETURN.
051982,000683: 07,3571           55306                           TS       IMUCADR                               
051983,000684: 07,3572           12664                           TCF      MODEEXIT                              
051984,000685: 
051985,000686:                                                                                                  #           GENERALIZED MODE SWITCHING TERMINATION. ENTER AT GOODEND FOR SUCCESSFUL COMPLETION OF AN I/O OPERATION
051986,000687:                                                                                                  #  OR AT BADEND FOR AN UNSUCCESSFUL ONE. C(A) OR ARRIVAL =0 FOR IMU, 1 FOR OPTICS.
051987,000688: 
051988,000689: 07,3573           54071        BADEND             TS       RUPTREG2                              #  DEVICE INDEX.
051989,000690: 07,3574           45030                           CS       ZERO                                  #  FOR FAILURE.
051990,000691: 07,3575           13600                           TCF      GOODEND    +2                         
051991,000692: 
051992,000693: 07,3576           54071        GOODEND            TS       RUPTREG2                              
051993,000694: 07,3577           45026                           CS       ONE                                   #  FOR SUCCESS.
051994,000695: 
051995,000696: 07,3600           54072                           TS       RUPTREG3                              
051996,000697: 07,3601           50071                           INDEX    RUPTREG2                              #  SEE IF USING PROGRAM ASLEEP.
051997,000698: 07,3602           11306                           CCS      MODECADR                              
051998,000699: 07,3603           13605                           TCF      +2                                    #  YES - WAKE IT UP.
051999,000700: 07,3604           13615                           TCF      ENDMODE                               #  IF 0, PROGRAM NOT IN YET.
052000,000701: 
052001,000702: 07,3605           35030                           CAF      ZERO                                  #  WAKE SLEEPING PROGRAM.
052002,000703: 07,3606           50071                           INDEX    RUPTREG2                              
052003,000704: 07,3607           57306                           XCH      MODECADR                              
052004,000705: 07,3610           05207                           TC       JOBWAKE                               
052005,000706: 
052006,000707: 07,3611           40072                           CS       RUPTREG3                              #  ADVANCE LOC IF SUCCESSFUL.
052007,000708: 07,3612           50064                           INDEX    LOCCTR                                
052008,000709: 07,3613           26164                           ADS      LOC                                   
052009,000710: 
052010,000711: 07,3614           15321                           TCF      TASKOVER                              
052011,000712: 
052012,000713: 07,3615           30072        ENDMODE            CA       RUPTREG3                              #  -0 INDICATES OPERATION COMPLETE BUT
052013,000714: 07,3616           50071                 +1        INDEX    RUPTREG2                              #  UNSUCCESSFUL: -1 INDICATES COMPLETE AND
052014,000715: 07,3617           55306                           TS       MODECADR                              #  SUCCESSFUL.
052015,000716: 07,3620           15321                           TCF      TASKOVER                              
052016,000717: 
052017,000718:                                                                                                  #           GENERAL STALLING ROUTINE. USING PROGRAMS COME HERE TO WAIT FOR I/O COMPLETION.
052018,000719: 
052019,000720:                                                                                                  #  PROGRAM DESCRIPTION                                     DATE- 21 FEB 1967
052020,000721:                                                                                                  #                                             LOG SECTION IMU MODE SWITCHING
052021,000722:                                                                                                  #  MOD BY- R. MELANSON TO ADD DOCUMENTATION       ASSEMBLY SUNDISK  REV.  82
052022,000723: 
052023,000724:                                                                                                  #  FUNCTIONAL DESCRIPTION-
052024,000725:                                                                                                  #    TO DELAY FURTHER EXECUTION OF THE CALLING ROUTINE UNTIL ITS SELECTED
052025,000726:                                                                                                  #    I/O FUNCTION IS COMPLETE.THE FOLLOWING CHECKS ON THE CALLING ROUTINE:S
052026,000727:                                                                                                  #    MODECADR ARE MADE AND ACTED UPON.
052027,000728:                                                                                                  #      1) +0 INDICATES INCOMPLETE I/O OPERATION.CALLING ROUTINE IS PUT TO
052028,000729:                                                                                                  #         SLEEP.
052029,000730:                                                                                                  #      2) -1 INDICATES COMPLETED I/O OPERATION. STALL BYPASSES JOBSLEEP
052030,000731:                                                                                                  #         CALL AND RETURNS TO CALLING ROUTINE AT L+3
052031,000732:                                                                                                  #      3) -0 INDICATES COMPLETED I/O WITH FAILURE. STALL CLEARS MODECADR
052032,000733:                                                                                                  #         AND RETURNS TO CALLING ROUTINE AT L+2.
052033,000734:                                                                                                  #      4) VALUE GREATER THAN 0 INDICATES TWO ROUTINES CALLING FOR USE OF
052034,000735:                                                                                                  #         SAME DEVICE. STALL EXITS TO ABORT WHICH EXECUTES A PROGRAM
052035,000736:                                                                                                  #         RESTART WHICH IN TURN CLEARS ALL MODECADR REGISTERS.
052036,000737: 
052037,000738:                                                                                                  #   CALLING SEQUENCE-
052038,000739:                                                                                                  #    L   TC   BANKCALL
052039,000740:                                                                                                  #    L+1 CADR (ONE OF 5 STALL ADDRESSES I.E. IMUSTALL, OPTSTALL, RADSTALL,
052040,000741:                                                                                                  #               AOTSTALL, OR ATTSTALL)
052041,000742: 
052042,000743:                                                                                                  #   NORMAL-EXIT MODE-
052043,000744:                                                                                                  #    TCF   JOBSLEEP OR TCF   MODEXIT
052044,000745: 
052045,000746:                                                                                                  #  ALARM OR ABORT EXIT MODE-
052046,000747:                                                                                                  #    TC   ABORT
052047,000748: 
052048,000749:                                                                                                  #  OUTPUT-
052049,000750:                                                                                                  #    MODECADR=CADR IF JOBSLEEP
052050,000751:                                                                                                  #    MODECADR=+0   IF I/O COMPLETE
052051,000752:                                                                                                  #    BUF2=L+3      IF I/O COMPLETE AND GOOD.
052052,000753:                                                                                                  #    BUF2=L+2 IF I/O COMPLETE BUT FAILED.
052053,000754: 
052054,000755:                                                                                                  #  ERASABLE INITIALIZATION-
052055,000756:                                                                                                  #    BUF2 CONTAINS RETURN ADDRESS PLUS 1,(L+2)
052056,000757:                                                                                                  #    BUF2+1 CONTAINS FBANK VALUE OF CALLING ROUTINE.
052057,000758:                                                                                                  #    MODECADR OF CALLING ROUTINE CONTAINS +0,-1,-0 OR CADR RETURN ADDRESS.
052058,000759: 
052059,000760:                                                                                                  #  DEBRIS-
052060,000761:                                                                                                  #    RUPTREG2 AND CALLING ROUTINE MODECADR.
052061,000762: 
052062,000763: 07,3621           35026        AOTSTALL           CAF      ONE                                   #  AOT.
052063,000764: 07,3622           03626                           TC       STALL                                 
052064,000765: 
052065,000766: 07,3623           35025        RADSTALL           CAF      TWO                                   
052066,000767: 07,3624           13626                           TCF      STALL                                 
052067,000768: 
052068,000769: 07,3625  07,3621               OPTSTALL           EQUALS   AOTSTALL                              
052069,000770: 
052070,000771: 07,3625           35030        IMUSTALL           CAF      ZERO                                  #  IMU.
052071,000772: 
052072,000773: 07,3626           00004        STALL              INHINT                                         
052073,000774: 07,3627           54071                           TS       RUPTREG2                              #  SAVE DEVICE INDEX.
052074,000775: 07,3630           50000                           INDEX    A                                     #  SEE IF OPERATION COMPLETE.
052075,000776: 07,3631           11306                           CCS      MODECADR                              
052076,000777: 07,3632           13650                           TCF      MODABORT                              #  ALLOWABLE STATES ARE +0, -1, AND -0.
052077,000778: 07,3633           13644                           TCF      MODESLP                               #  OPERATION INCOMPLETE.
052078,000779: 07,3634           13640                           TCF      MODEGOOD                              #  COMPLETE AND GOOD IF = -1.
052079,000780: 
052080,000781: 07,3635           50071        MG2                INDEX    RUPTREG2                              #  COMPLETE AND FAILED IF -0.  RESET TO +0.
052081,000782: 07,3636           55306                           TS       MODECADR                              #  RETURN TO CALLER.
052082,000783: 07,3637           12664                           TCF      MODEEXIT                              
052083,000784: 
052084,000785: 07,3640           10000        MODEGOOD           CCS      A                                     #  MAKE SURE INITIAL STATE -1.
052085,000786: 07,3641           13650                           TCF      MODABORT                              
052086,000787: 
052087,000788: 07,3642           24133                           INCR     BUF2                                  #  IF SO, INCREMENT RETURN ADDRESS AND
052088,000789: 07,3643           13635                           TCF      MG2                                   #  RETURN IMMEDIATELY, SETTING CADR = +0.
052089,000790: 
052090,000791: 07,3644           04704        MODESLP            TC       MAKECADR                              #  CALL FROM SWITCHABLE FIXED ONLY.
052091,000792: 07,3645           50071                           INDEX    RUPTREG2                              
052092,000793: 07,3646           55306                           TS       MODECADR                              
052093,000794: 07,3647           15203                           TCF      JOBSLEEP                              
052094,000795: 
052095,000796: 07,3650           05713        MODABORT           TC       ABORT                                 #  TWO PROGRAMS USING SAME DEVICE.
052096,000797: 07,3651           01210                           OCT      1210                                  
052097,000798: 
052098,000799:                                                                                                  #  CONSTANTS FOR MODE SWITCHING ROUTINES
052099,000800: 
052100,000801: 07,3652     5743               BITS3&4            =        OCT14                                 
052101,000802: 07,3652     5041               BITS4&6            =        OCT50                                 
052102,000803: 07,3652           00030        BITS4-5            OCT      00030                                 
052103,000804: 07,3653     5017               IMUSEFLG           EQUALS   BIT8                                  #  INTERPRETER SWITCH 7.
052104,000805: 07,3653           77500        -COMMAX            DEC      -191       B-14                       
052105,000806: 07,3654           77477        -COMMAX-           DEC      -192       B-14                       
052106,000807: 07,3655           00074        600MS              DEC      60         B-14                       
052107,000808: 07,3656  07,3121               IMUFIN20           =        IMUFINE                               
052108,000809: 07,3656           31311        GOMANUR            CA       ATTCADR                               #  IS KALCMANU FREE
052109,000810: 07,3657           00006                           EXTEND                                         
052110,000811: 07,3660           13663                           BZF      +3                                    
052111,000812: 
052112,000813: 07,3661           05713                           TC       ABORT                                 #  NO
052113,000814: 07,3662           01210                           OCT      1210                                  #  2 TRYING TO USE SAME DEVICE
052114,000815: 
052115,000816: 07,3663           00006                 +3        EXTEND                                         
052116,000817: 07,3664           30134                           DCA      BUF2                                  
052117,000818: 07,3665           53312                           DXCH     ATTCADR                               #  SAVE FINAL RETURN FOR KALCMAN3
052118,000819: 
052119,000820: 07,3666           30006                           CA       BBANK                                 
052120,000821: 07,3667           75032                           MASK     SEVEN                                 
052121,000822: 07,3670           27312                           ADS      ATTCADR    +1                         
052122,000823: 
052123,000824: 07,3671           30167                           CA       PRIORITY                              
052124,000825: 07,3672           77677                           MASK     PRIO37                                
052125,000826: 07,3673           55313                           TS       ATTPRIO                               #  SAVE USERS PRIO
052126,000827: 
052127,000828: 07,3674           33700                           CAF      KALEBCON                              #  SET EBANK FOR KALCMAN3
052128,000829: 07,3675           54003                           TS       EBANK                                 
052129,000830: 07,3676           04674                           TC       POSTJUMP                              
052130,000831: 07,3677           44000                           CADR     KALCMAN3                              
052131,000832: 07,3700           03273        KALEBCON           ECADR    BCDU                                  
052132,000833: 

Sundance 292

052134,000835: 
052135,000836:                                                                                                  #  PROGRAM DESCRIPTION
052136,000837:                                                                                                  #  IMU STATUS CHECK ROUTINE R02 (SUBROUTINE UTILITY)
052137,000838:                                                                                                  #  MOD NO - 1
052138,000839:                                                                                                  #  MOD BY - N.BRODEUR
052139,000840: 
052140,000841:                                                                                                  #  FUNCTIONAL DESCRIPTION
052141,000842:                                                                                                  #  TO CHECK WHETHER IMU IS ON AND IF ON WHETHER IT IS ALIGNED TO AN
052142,000843:                                                                                                  #  ORIENTATION KNOWN BY THE CMC. TO REQUEST SELECTION OF THE APPROPRIATE
052143,000844:                                                                                                  #  PROGRAM IF THE IMU IS OFF OR NOT ALIGNED TO AN ORIENTATION KNOWN BY THE
052144,000845:                                                                                                  #  CMC. CALLED THROUGH BANKCALL
052145,000846:                                                                                                  #  CALLING SEQUENCE-
052146,000847: 
052147,000848:                                                                                                  #  L        TC     BANKCALL
052148,000849:                                                                                                  #  L+1      CADR   R02BOTH
052149,000850:                                                                                                  #  SUBROUTINES CALLED
052150,000851: 
052151,000852:                                                                                                  #        VARALARM
052152,000853:                                                                                                  #        FLAGUP
052153,000854: 
052154,000855:                                                                                                  #  NORMAL EXIT MODES
052155,000856: 
052156,000857:                                                                                                  #  AT L+2 OF CALLING SEQUENCE
052157,000858:                                                                                                  #  ALARM OR ABORT EXIT MODES
052158,000859:                                                                                                  #        GOTOPOOH, WITH ALARM
052159,000860:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED
052160,000861: 
052161,000862:                                                                                                  #  NONE
052162,000863:                                                                                                  #  DEBRIS
052163,000864: 
052164,000865:                                                                                                  #  CENTRALS - A,Q,L
052165,000866: 
052166,000867: 34,3754                                           BANK     34                                    
052167,000868: 04,2000                                           SETLOC   R02                                   
052168,000869: 04,2000                                           BANK                                           
052169,000870: 04,3063                                           COUNT*   $$/R02                                
052170,000871: 04,3063           00063        DEC51              DEC      51         B-14                       
052171,000872: 04,3064           35012        R02BOTH            CAF      REFSMBIT                              
052172,000873: 04,3065           70077                           MASK     FLAGWRD3                              
052173,000874: 04,3066           10000                           CCS      A                                     
052174,000875: 04,3067           03100                           TC       R02ZERO                               #  ZERO IMUS
052175,000876: 
052176,000877: 04,3070           31304                           CA       IMODES30                              
052177,000878: 04,3071           75016                           MASK     BIT9                                  #  IS ISS INITIALIZED
052178,000879: 04,3072           00006                           EXTEND                                         
052179,000880: 04,3073           13075                           BZF      +2                                    
052180,000881: 04,3074           45023                           CS       BIT4                                  #  SEND IMU ALARM CODE 210
052181,000882: 04,3075           63103                           AD       OCT220                                #  SEND REFSMM ALARM
052182,000883: 04,3076           05736                           TC       VARALARM                              
052183,000884: 
052184,000885: 04,3077           04106                           TC       GOTOPOOH                              
052185,000886: 
052186,000887: 04,3100           05563        R02ZERO            TC       UPFLAG                                
052187,000888: 04,3101           00007                           ADRES    IMUSE                                 
052188,000889: 04,3102           14670                           TCF      SWRETURN                              
052189,000890: 04,3103           00220        OCT220             OCT      220                                   
052190,000891: 

Sundance 306

052192,000893: 
052193,000894:                                                                                                  #  PROGRAM DESCRIPTION   P06   10 FEB 67
052194,000895: 
052195,000896:                                                                                                  #  TRANSFER THE ISS/CMC FROM THE OPERATE TO THE STANDBY CONDITION.
052196,000897: 
052197,000898:                                                                                                  #  THE NORMAL CONDITION OF READINESS OF THE GNCS WHEN NOT IN USE IS STANDBY. IN THIS CONDITION THE IMU
052198,000899:                                                                                                  #  HEATER POWER IS ON. THE IMU OPERATE POWER IS OFF. THE COMPUTER POWER IS ON. THE OPTICS POWER IS OFF. THE
052199,000900:                                                                                                  #  CMC  STANDBY ON THE MAIN AND LEB DISKYS IS ON.
052200,000901: 
052201,000902:                                                                                                  #  CALLING SEQUENCE:
052202,000903:                                                                                                  #            ASTRONAUT REQUEST THROUGH DSKY    V37E 06E.
052203,000904: 
052204,000905:                                                                                                  #  SUBROUTINES CALLED:
052205,000906:                                                                                                  #           GOPERF1
052206,000907:                                                                                                  #           BANKCALL
052207,000908:                                                                                                  #           FLAGDOWN
052208,000909: 
052209,000910:                                                                                                  #  PRESTAND PREPARES FOR STANDBY BY SNAPSHOTTING THE SCALER AND TIME1 TIME2
052210,000911:                                                                                                  #  THE LOW 5 BITS OF THE SCALER ARE INSPECTED TO INSURE COMPATABILITY
052211,000912:                                                                                                  #  BETWEEN THE SCALER READING AND THE TIME1 TIME2 READING.
052212,000913: 
052213,000914: 37,2000                                           SETLOC   P05P06                                
052214,000915: 37,2000                                           BANK                                           
052215,000916: 
052216,000917: 37,3507     1201                                  EBANK=   TIME2SAV                              
052217,000918: 37,3507                                           COUNT*   $$/P06                                
052218,000919: 
052219,000920: 37,3507           05563        P06                TC       UPFLAG                                #  SET NODOV37 BIT
052220,000921: 37,3510           00054                           ADRES    NODOFLAG                              
052221,000922: 
052222,000923: 37,3511           00004        PRESTAND           INHINT                                         
052223,000924: 37,3512           00006                           EXTEND                                         
052224,000925: 37,3513           30025                           DCA      TIME2                                 #  SNAPSHOT TIME1 TIME2
052225,000926: 37,3514           53202                           DXCH     TIME2SAV                              
052226,000927: 37,3515           03546                           TC       SCALPREP                              
052227,000928: 37,3516           03511                           TC       PRESTAND                              #  T1,T2,SCALER NOT COMPATIBLE
052228,000929: 37,3517           52155                           DXCH     MPAC                                  #  T1,T2 AND SCALER OK
052229,000930: 37,3520           53204                           DXCH     SCALSAVE                              #  STORE SCALER
052230,000931: 37,3521           00004                           INHINT                                         
052231,000932: 37,3522           04655                           TC       BANKCALL                              
052232,000933: 37,3523           17106                           CADR     RNDREFDR                              #  REFSMM, DRIFT, TRACK FLAGS DOWN
052233,000934: 
052234,000935: 37,3524           05575                           TC       DOWNFLAG                              
052235,000936: 37,3525           00007                           ADRES    IMUSE                                 #  IMUSE DOWN
052236,000937: 37,3526           05575                           TC       DOWNFLAG                              
052237,000938: 37,3527           00010                           ADRES    RNDVZFLG                              #  RNDVZFLG DOWN
052238,000939: 
052239,000940: 37,3530           35014                           CAF      BIT11                                 
052240,000941: 37,3531           00006                           EXTEND                                         
052241,000942: 37,3532           05013                           WOR      CHAN13                                #  SET STANDBY ENABLE BIT
052242,000943: 
052243,000944: 37,3533           05413                           TC       PHASCHNG                              #  SET RESTART TO POSTAND WHEN STANDBY
052244,000945: 37,3534           07024                           OCT      07024                                 #    RECOVERS
052245,000946: 37,3535           20000                           OCT      20000                                 
052246,000947: 37,3536     1203                                  EBANK=   SCALSAVE                              
052247,000948: 37,3536           03566 76062                     2CADR    POSTAND                               
052248,000949: 
052249,000950: 37,3540           35044                           CAF      OCT62                                 
052250,000951: 37,3541           04655                           TC       BANKCALL                              
052251,000952: 37,3542           20532                           CADR     GOPERF1                               
052252,000953: 37,3543           13540                           TCF      -3                                    
052253,000954: 37,3544           13540                           TCF      -4                                    
052254,000955: 37,3545           13540                           TCF      -5                                    
052255,000956: 
052256,000957: 37,3546     5044               OCT62              EQUALS   .5SEC                                 #  DEC 50 = OCT 62
052257,000958: 
052258,000959:                                                                                                  #  THE LOW 5 BITS OF THE SCALER READS 10000 FOR THE FIRST INTERVAL AFTER A
052259,000960:                                                                                                  #  T1 INCREMENT. IF  SCALPREP DETECTS THIS INTERVAL THE T1,T2 AND SCALER
052260,000961:                                                                                                  #  DATA ARE NOT COMPATABLE AND RETURN IS TO L+1 FOR ANOTHER READING OF THE
052261,000962:                                                                                                  #  DATA. OTHERWISE, THE RETURN IS TO L+2 TO PROCEED. ROUTINE ALSO PREPARES
052262,000963:                                                                                                  #  THE SCALER READING FOR COMPUTATION OF THE INCREMENT TO UPDATE T1T2. (THE
052263,000964:                                                                                                  #  10 MS BIT (BIT 6) OF THE SCALER IS INCREMENTED 5 MS OUT OF PHASE FROM
052264,000965:                                                                                                  #  T1.) ADDITION OF 5 MS (BIT 5) TO THE SCALER READING HAS THE EFFECT OF
052265,000966:                                                                                                  #  ADJUSTING BIT 6 IN THE SCALER TO BE IN PHASE WITH BIT 1 OF T1. THE LOW 5
052266,000967:                                                                                                  #  BITS OF THE SCALER READING ARE THEN SET TO ZERO, TO TRUNCATE THE SCALER
052267,000968:                                                                                                  #  DATA TO 10 MS. RESULTS ARE STORED IN MPAC, +1.
052268,000969: 
052269,000970: 37,3546           00006        SCALPREP           EXTEND                                         
052270,000971: 37,3547           22156                           QXCH     MPAC       +2                         
052271,000972: 37,3550           04115                           TC       FINETIME   +1                         
052272,000973: 37,3551           00003                           RELINT                                         
052273,000974: 37,3552           52155                           DXCH     MPAC                                  
052274,000975: 37,3553           35022                           CA       BIT5                                  #  ADD 5 MS TO THE SCALER READING.
052275,000976: 37,3554           54001                           TS       L                                     
052276,000977: 37,3555           35030                           CA       ZERO                                  
052277,000978: 37,3556           20155                           DAS      MPAC                                  
052278,000979: 37,3557           44360                           CS       LOW5                                  #  SET LOW 5 BITS OF (SCALER+5MS) TO ZERO
052279,000980: 37,3560           70155                           MASK     MPAC       +1                         #  AND STORE RESULTS IN MPAC,+1.
052280,000981: 37,3561           56155                           XCH      MPAC       +1                         
052281,000982: 37,3562           74360                           MASK     LOW5                                  #  TEST LOW 5 BITS OF SCALER FOR THE FIRST
052282,000983:                                                                                                  #  INTERVAL AFTER THE T1 INCREMENT
052283,000984:                                                                                                  #  (NOW = 00000, SINCE BIT 5 ADDED).
052284,000985: 37,3563           10000                           CCS      A                                     #  IS IT 1ST INTERVAL AFTER T1 INCREMENT
052285,000986: 37,3564           24156                           INCR     MPAC       +2                         #  NO
052286,000987: 37,3565           00156                           TC       MPAC       +2                         #  YES
052287,000988: 
052288,000989:                                                                                                  #  POSTAND RECOVERS TIME AFTER STANDBY.THE SCALER IS SNAPSHOTTED AND THE
052289,000990:                                                                                                  #  TIME1 TIME2 COUNTER IS SET TO ZERO. THE LOW 5 BITS OF THE SCALER ARE
052290,000991:                                                                                                  #  INSPECTED TO INSURE COMPATABILITY BETWEEN THE SCALER READING AND THE
052291,000992:                                                                                                  #  CLEARING OF THE TIME COUNTER. IT THEN COMPUTES THE DIFFERENCE IN SCALER
052292,000993:                                                                                                  #  VALUES (IN DP) AND ADDS THIS TO THE PREVIOUSLY SNAPSHOTTED VALUES OF
052293,000994:                                                                                                  #  TIME1 TIME2 AND PLACES THIS NEW TIME INTO THE TIME1 TIME2 COUNTER.
052294,000995: 
052295,000996: 37,3566                                           COUNT*   $$/P05                                
052296,000997: 
052297,000998: 37,3566           45014        POSTAND            CS       BIT11                                 #  RECOVER TIME AFTER STANDBY.
052298,000999: 37,3567           00006                           EXTEND                                         
052299,001000: 37,3570           03013                           WAND     CHAN13                                #  CLEAR STANDBY ENABLE BIT
052300,001001: 37,3571           00004                           INHINT                                         
052301,001002: 37,3572           35030                           CA       ZERO                                  
052302,001003: 37,3573           54001                           TS       L                                     
052303,001004: 37,3574           52025                           DXCH     TIME2                                 #  CLEAR TIME1TIME2
052304,001005: 37,3575           03546                           TC       SCALPREP                              #  STORE SCALER IN MPAC, MPAC+1
052305,001006: 37,3576           03571                           TC       POSTAND    +3                         #  T1,T2,SCALER NOT COMPATIBLE
052306,001007: 37,3577           00006                           EXTEND                                         #  T1,T2 AND SCALER OK
052307,001008: 37,3600           41204                           DCS      SCALSAVE                              
052308,001009: 37,3601           20155                           DAS      MPAC                                  #  FORM DP DIFFERENCE OF POSTSTANDBY SCALER
052309,001010: 37,3602           35015                           CAF      BIT10                                 #  MINUS PRESTANDBY SCALER AND SHIFT RIGHT
052310,001011: 37,3603           07261                           TC       SHORTMP                               #  5 TO ALIGN BITS WITH TIME1 TIME2.
052311,001012: 37,3604           35030                           CAF      ZERO                                  
052312,001013: 37,3605           54156                           TS       MPAC       +2                         #  NEEDED FOR TP AGREE
052313,001014: 37,3606           07231                           TC       TPAGREE                               #  MAKE DP DIFF AGREE
052314,001015: 37,3607           10154                           CCS      MPAC                                  
052315,001016: 37,3610           03615                           TC       POSTCOM                               #  IF DP DIFF NET +, NO SCALER OVERFLOW
052316,001017: 37,3611           03615                           TC       POSTCOM                               #  BETWEEN PRE AND POST STANDBY.
052317,001018: 37,3612           03613                           TC       +1                                    #  IF DP DIFF NET -, SCALER OVERFLOWED. ADD
052318,001019: 37,3613           35015                           CAF      BIT10                                 #  BIT 10 TO HIGH DIFF TO CORRECT.
052319,001020: 37,3614           26154                           ADS      MPAC                                  
052320,001021: 37,3615           00006        POSTCOM            EXTEND                                         #  C(MPAC,+1) IS MAGNITUDE OF DELTA SCALER.
052321,001022: 37,3616           31202                           DCA      TIME2SAV                              #  PRESTANDBY TIME1TIME2
052322,001023: 37,3617           20155                           DAS      MPAC                                  
052323,001024: 37,3620           07231                           TC       TPAGREE                               #  FORCE SIGN AGREEMENT
052324,001025: 37,3621           52155                           DXCH     MPAC                                  #  UPDATED VALUE FOR T1,T2.
052325,001026: 37,3622           20025                           DAS      TIME2                                 #  LOAD UPDATED VALUE INTO T1,T2, WITH
052326,001027: 37,3623           05575                           TC       DOWNFLAG                              #  CLEAR NODOFLAG
052327,001028: 37,3624           00054                           ADRES    NODOFLAG                              
052328,001029: 
052329,001030: 37,3625           04106                           TC       GOTOPOOH                              
052330,001031: 

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