Source Code

These source-code files were transcribed from scans made from Don Eyles's personal copy of Luminary 069. They were scanned at archive.org's Boston facility, and the scanning was sponsored by Onno Hommes. The code was transcribed from these scans by a team of volunteers who are referenced in the program comments. Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". In some cases, where similar code blocks exist in previously-transcribed AGC programs (primarily Luminary 99, from Apollo 11) those code blocks were used as a starting point and then corrected to agree with the Luminary 69 scans. The full scans are available at the Virtual AGC project's collection at archive.org, while more-convenient reduced-size (but reduced-quality) images are available at the main Virtual AGC website. Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository. Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 069 OF AGC PROGRAM LUMINARY BY NASA 2021112-011
	19:02 NOV. 25,1968
Note that the date is the date of the printout, not the date of the program revision.

056565,000002:                                                                                                  ## Copyright:   Public domain.
056566,000003:                                                                                                  ## Filename:    IMU_MODE_SWITCHING_ROUTINES.agc
056567,000004:                                                                                                  ## Purpose:     The main source file for Luminary revision 069.
056568,000005:                                                                                                  ##              It is part of the source code for the original release
056569,000006:                                                                                                  ##              of the flight software for the Lunar Module's (LM) Apollo
056570,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 10. The actual flown
056571,000008:                                                                                                  ##              version was Luminary 69 revision 2, which included a
056572,000009:                                                                                                  ##              newer lunar gravity model and only affected module 2.
056573,000010:                                                                                                  ##              This file is intended to be a faithful transcription, except
056574,000011:                                                                                                  ##              that the code format has been changed to conform to the
056575,000012:                                                                                                  ##              requirements of the yaYUL assembler rather than the
056576,000013:                                                                                                  ##              original YUL assembler.
056577,000014:                                                                                                  ## Reference:   pp. 1303-1331
056578,000015:                                                                                                  ## Assembler:   yaYUL
056579,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
056580,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
056581,000018:                                                                                                  ## Mod history: 2016-12-13 MAS  Created from Luminary 99.
056582,000019:                                                                                                  ##              2016-12-18 MAS  Updated from comment-proofed Luminary 99 version.
056583,000020:                                                                                                  ##              2017-01-18 RRB  Updated for Luminary 69.
056584,000021:                                                                                                  ##              2017-01-28 RSB  Proofed comment text using octopus/prooferComments
056585,000022:                                                                                                  ##                              and fixed errors found.
056586,000023:                                                                                                  ##              2017-03-13 RSB  Comment-text fixes noted in proofing Luminary 116.
056587,000024:                                                                                                  ##              2017-03-15 RSB  Comment-text fixes identified in 6-way
056588,000025:                                                                                                  ##                              side-by-side diff of Sunburst 120 and Luminary 
056589,000026:                                                                                                  ##                              69/99/116/131/210.
056590,000027:                                                                                                  ##              2017-06-17 MAS  Globally removed all SBANK= workarounds.
056591,000028: 

Page 1303

056593,000030:    5457                                           BLOCK    02                                    
056594,000031:    4000                                           SETLOC   FFTAG3                                
056595,000032:    4000                                           BANK                                           
056596,000033: 
056597,000034:    5457  E3,1471                                  EBANK=   COMMAND                               
056598,000035: 
056599,000036:                                                                                                  #  FIXED-FIXED ROUTINES.
056600,000037: 
056601,000038:    5457                                           COUNT*   $$/IMODE                              
056602,000039:    5457           34755        ZEROICDU           CAF      ZERO                                  #  ZERO ICDU COUNTERS.
056603,000040:    5460           54032                           TS       CDUX                                  
056604,000041:    5461           54033                           TS       CDUY                                  
056605,000042:    5462           54034                           TS       CDUZ                                  
056606,000043:    5463           00002                           TC       Q                                     
056607,000044: 
056608,000045:    5464     4743               SPSCODE            =        BIT9                                  
056609,000046: 

Page 1304

056611,000048:                                                                                                  #  IMU ZEROING ROUTINE.
056612,000049: 
056613,000050: 11,3722                                           BANK     11                                    
056614,000051: 07,2000                                           SETLOC   MODESW                                
056615,000052: 07,2000                                           BANK                                           
056616,000053: 
056617,000054: 07,2667                                           COUNT*   $$/IMODE                              
056618,000055: 07,2667           00004        IMUZERO            INHINT                                         #  ROUTINE TO ZERO ICDUS.
056619,000056: 07,2670           41036                           CS       DSPTAB     +11D                       #  DONT ZERO CDUS IF IMU IN GIMBAL LOCK AND
056620,000057: 07,2671           74771                           MASK     BITS4&6                               #  COARSE ALIGN (GIMBAL RUNAWAY PROTECTION)
056621,000058: 07,2672           10000                           CCS      A                                     
056622,000059: 07,2673           12677                           TCF      IMUZEROA                              
056623,000060: 
056624,000061: 07,2674           05567                           TC       ALARM                                 #  IF SO.
056625,000062: 07,2675           00206                           OCT      00206                                 
056626,000063: 
056627,000064: 07,2676           13632                           TCF      CAGETSTJ   +4                         #  IMMEDIATE FAILURE.
056628,000065: 
056629,000066: 07,2677           03626        IMUZEROA           TC       CAGETSTJ                              
056630,000067:                                                                                                  #  DELETE
056631,000068: 07,2700           41303                           CS       IMODES33                              #  DISABLE DAP AUTO AND HOLD MODES
056632,000069: 07,2701           74773                           MASK     SUPER011                              #      BIT5 FOR GROUND
056633,000070: 07,2702           27303                           ADS      IMODES33                              
056634,000071: 
056635,000072: 07,2703           41302                           CS       IMODES30                              #  INHIBIT ICDUFAIL AND IMUFAIL (IN CASE WE
056636,000073: 07,2704           75742                           MASK     BITS3&4                               #  JUST CAME OUT OF COARSE ALIGN).
056637,000074: 07,2705           27302                           ADS      IMODES30                              
056638,000075: 
056639,000076: 07,2706           44771                           CS       BITS4&6                               #  SEND ZERO ENCODE WITH COARSE AND ERROR
056640,000077: 07,2707           00006                           EXTEND                                         #  COUNTER DISABLED.
056641,000078: 07,2710           03012                           WAND     CHAN12                                
056642,000079: 
056643,000080: 07,2711           03241                           TC       NOATTOFF                              #  TURN OFF NO ATT LAMP.
056644,000081: 
056645,000082: 07,2712           34747                           CAF      BIT5                                  
056646,000083: 07,2713           00006                           EXTEND                                         
056647,000084: 07,2714           05012                           WOR      CHAN12                                
056648,000085: 
056649,000086: 07,2715           05457                           TC       ZEROICDU                              
056650,000087: 07,2716           34746                           CAF      BIT6                                  #  WAIT 320 MS TO GIVE AGS ADEQUATE TIME TO
056651,000088: 07,2717           05203                           TC       WAITLIST                              #  RECEIVE ITS PULSE TRAIN.
056652,000089: 07,2720  E3,1474                                  EBANK=   CDUIND                                
056653,000090: 07,2720           02732 16103                     2CADR    IMUZERO2                              
056654,000091: 
056655,000092: 07,2722           41302                           CS       IMODES30                              #  SEE IF IMU OPERATING AND ALARM IF NOT.
056656,000093: 07,2723           74743                           MASK     BIT9                                  
056657,000094: 07,2724           10000                           CCS      A                                     
056658,000095: 07,2725           12730                           TCF      MODEEXIT                              

Page 1305

056660,000097: 07,2726           05567                           TC       ALARM                                 
056661,000098: 07,2727           00210                           OCT      210                                   
056662,000099: 
056663,000100: 07,2730           00003        MODEEXIT           RELINT                                         #  GENERAL MODE-SWITCHING EXIT.
056664,000101: 07,2731           14631                           TCF      SWRETURN                              
056665,000102: 
056666,000103: 07,2732           03614        IMUZERO2           TC       CAGETEST                              
056667,000104: 07,2733           05457                           TC       ZEROICDU                              #  ZERO CDUX, CDUY, CDUZ
056668,000105: 
056669,000106: 07,2734           44747                           CS       BIT5                                  #  REMOVE ZERO DISCRETE.
056670,000107: 07,2735           00006                           EXTEND                                         
056671,000108: 07,2736           03012                           WAND     CHAN12                                
056672,000109: 
056673,000110: 07,2737           34741                           CAF      BIT11                                 #  WAIT 10 SECS FOR CTRS TO FIND GIMBALS
056674,000111: 07,2740           05224                           TC       VARDELAY                              
056675,000112: 
056676,000113: 07,2741           03614        IMUZERO3           TC       CAGETEST                              
056677,000114: 07,2742           45742                           CS       BITS3&4                               #  REMOVE IMUFAIL AND ICDUFAIL INHIBIT.
056678,000115: 07,2743           71302                           MASK     IMODES30                              
056679,000116: 07,2744           55302                           TS       IMODES30                              
056680,000117: 
056681,000118: 07,2745           44773                           CS       SUPER011                              #  ENABLE DAP AUTO AND HOLD MODES
056682,000119: 07,2746           71303                           MASK     IMODES33                              #      BIT5 FOR GROUND
056683,000120: 07,2747           55303                           TS       IMODES33                              
056684,000121: 
056685,000122: 07,2750           04674                           TC       IBNKCALL                              #  SET ISS WARNING IF EITHER OF ABOVE ARE
056686,000123: 07,2751           14703                           CADR     SETISSW                               #  PRESENT.
056687,000124: 
056688,000125: 07,2752           13604                           TCF      ENDIMU                                
056689,000126: 

Page 1306

056691,000128:                                                                                                  #  IMU COARSE ALIGN MODE.
056692,000129: 
056693,000130: 07,2753           00004        IMUCOARS           INHINT                                         
056694,000131: 07,2754           03626                           TC       CAGETSTJ                              
056695,000132: 07,2755           03117                           TC       SETCOARS                              
056696,000133: 
056697,000134: 07,2756           36241                           CAF      SIX                                   
056698,000135: 07,2757           05203                           TC       WAITLIST                              
056699,000136: 07,2760  E3,1474                                  EBANK=   CDUIND                                
056700,000137: 07,2760           02763 16103                     2CADR    COARS                                 
056701,000138: 
056702,000139: 07,2762           12730                           TCF      MODEEXIT                              
056703,000140: 
056704,000141: 07,2763           03614        COARS              TC       CAGETEST                              
056705,000142: 07,2764           34746                           CAF      BIT6                                  #  ENABLE ALL THREE ISS CDU ERROR COUNTERS
056706,000143: 07,2765           00006                           EXTEND                                         
056707,000144: 07,2766           05012                           WOR      CHAN12                                
056708,000145: 
056709,000146: 07,2767           34752                           CAF      TWO                                   #  SET CDU INDICATOR
056710,000147: 07,2770           55474        COARS1             TS       CDUIND                                
056711,000148: 
056712,000149: 07,2771           51474                           INDEX    CDUIND                                #  COMPUTE THETAD - THETAA IN 1:S
056713,000150: 07,2772           30321                           CA       THETAD                                #    COMPLEMENT FORM
056714,000151: 07,2773           00006                           EXTEND                                         
056715,000152: 07,2774           51474                           INDEX    CDUIND                                
056716,000153: 07,2775           20032                           MSU      CDUX                                  
056717,000154: 07,2776           00006                           EXTEND                                         
056718,000155: 07,2777           74737                           MP       BIT13                                 #  SHIFT RIGHT 2
056719,000156: 07,3000           56001                           XCH      L                                     #  ROUND
056720,000157: 07,3001           60000                           DOUBLE                                         
056721,000158: 07,3002           54061                           TS       ITEMP1                                
056722,000159: 07,3003           13005                           TCF      +2                                    
056723,000160: 07,3004           26001                           ADS      L                                     
056724,000161: 
056725,000162: 07,3005           51474                           INDEX    CDUIND                                #  DIFFERENCE TO BE COMPUTED
056726,000163: 07,3006           23471                           LXCH     COMMAND                               
056727,000164: 07,3007           11474                           CCS      CDUIND                                
056728,000165: 07,3010           02770                           TC       COARS1                                
056729,000166: 
056730,000167: 07,3011           34752                           CAF      TWO                                   #  MINIMUM OF 4 MS WAIT
056731,000168: 07,3012           05224                           TC       VARDELAY                              
056732,000169: 

Page 1307

056734,000171: 07,3013           03614        COARS2             TC       CAGETEST                              #  DONT CONTINUE IF CAGED.
056735,000172: 07,3014           54061                           TS       ITEMP1                                #  SETS TO +0.
056736,000173: 07,3015           34752                           CAF      TWO                                   #  SET CDU INDICATOR
056737,000174: 07,3016           55474                 +3        TS       CDUIND                                
056738,000175: 
056739,000176: 07,3017           51474                           INDEX    CDUIND                                
056740,000177: 07,3020           11471                           CCS      COMMAND                               #  NUMBER OF PULSES REQUIRED
056741,000178: 07,3021           03025                           TC       COMPOS                                #  GREATER THAN MAX ALLOWED
056742,000179: 07,3022           03034                           TC       NEXTCDU    +1                         
056743,000180: 07,3023           03072                           TC       COMNEG                                
056744,000181: 07,3024           03034                           TC       NEXTCDU    +1                         
056745,000182: 
056746,000183: 07,3025           63720        COMPOS             AD       -COMMAX                               #  COMMAX = MAX NUMBER OF PULSES ALLOWED
056747,000184: 07,3026           00006                           EXTEND                                         #    MINUS ONE
056748,000185: 07,3027           63102                           BZMF     COMZERO                               
056749,000186: 07,3030           51474                           INDEX    CDUIND                                
056750,000187: 07,3031           55471                           TS       COMMAND                               #  REDUCE COMMAND BY MAX NUMBER OF PULSES
056751,000188: 07,3032           43721                           CS       -COMMAX-                              #    ALLOWED
056752,000189: 
056753,000190: 07,3033           24061        NEXTCDU            INCR     ITEMP1                                
056754,000191: 07,3034           64754                           AD       NEG0                                  
056755,000192: 07,3035           51474                           INDEX    CDUIND                                
056756,000193: 07,3036           54050                           TS       CDUXCMD                               #  SET UP COMMAND REGISTER.
056757,000194: 
056758,000195: 07,3037           11474                           CCS      CDUIND                                
056759,000196: 07,3040           03016                           TC       COARS2     +3                         
056760,000197: 
056761,000198: 07,3041           10061                           CCS      ITEMP1                                #  SEE IF ANY PULSES TO GO OUT.
056762,000199: 07,3042           13106                           TCF      SENDPULS                              
056763,000200: 
056764,000201: 07,3043           05221                           TC       FIXDELAY                              #  WAIT FOR GIMBALS TO SETTLE.
056765,000202: 07,3044           00226                           DEC      150        B-14                       
056766,000203: 
056767,000204: 07,3045           34752                           CAF      TWO                                   #  AT END OF COMMAND, CHECK TO SEE THAT
056768,000205: 07,3046           54061        CHKCORS            TS       ITEMP1                                #  GIMBALS ARE WITHIN 2 DEGREES OF THETAD.
056769,000206: 07,3047           50000                           INDEX    A                                     
056770,000207: 07,3050           30032                           CA       CDUX                                  
056771,000208: 07,3051           00006                           EXTEND                                         
056772,000209: 07,3052           50061                           INDEX    ITEMP1                                
056773,000210: 07,3053           20321                           MSU      THETAD                                
056774,000211: 07,3054           10000                           CCS      A                                     
056775,000212: 07,3055           13063                           TCF      COARSERR                              
056776,000213: 07,3056           13060                           TCF      CORSCHK2                              
056777,000214: 07,3057           13063                           TCF      COARSERR                              
056778,000215: 

Page 1308

056780,000217: 07,3060           10061        CORSCHK2           CCS      ITEMP1                                
056781,000218: 07,3061           13046                           TCF      CHKCORS                               
056782,000219: 07,3062           13604                           TCF      ENDIMU                                #  END OF COARSE ALIGNMENT.
056783,000220: 
056784,000221: 07,3063           63071        COARSERR           AD       COARSTOL                              #  2 DEGREES.
056785,000222: 07,3064           00006                           EXTEND                                         
056786,000223: 07,3065           63060                           BZMF     CORSCHK2                              
056787,000224: 
056788,000225: 07,3066           05567                           TC       ALARM                                 #  COARSE ALIGN ERROR.
056789,000226: 07,3067           00211                           OCT      211                                   
056790,000227: 
056791,000228: 07,3070           13612                           TCF      IMUBAD                                
056792,000229: 
056793,000230: 07,3071           77511        COARSTOL           DEC      -.01111                               #  2 DEGREES SCALED AT HALF-REVOLUTIONS
056794,000231: 
056795,000232: 07,3072           63720        COMNEG             AD       -COMMAX                               
056796,000233: 07,3073           00006                           EXTEND                                         
056797,000234: 07,3074           63102                           BZMF     COMZERO                               
056798,000235: 07,3075           40000                           COM                                            
056799,000236: 07,3076           51474                           INDEX    CDUIND                                
056800,000237: 07,3077           55471                           TS       COMMAND                               
056801,000238: 07,3100           33721                           CA       -COMMAX-                              
056802,000239: 07,3101           03033                           TC       NEXTCDU                               
056803,000240: 
056804,000241: 07,3102           34755        COMZERO            CAF      ZERO                                  
056805,000242: 07,3103           51474                           INDEX    CDUIND                                
056806,000243: 07,3104           57471                           XCH      COMMAND                               
056807,000244: 07,3105           03033                           TC       NEXTCDU                               
056808,000245: 
056809,000246: 07,3106           37737        SENDPULS           CAF      13,14,15                              
056810,000247: 07,3107           00006                           EXTEND                                         
056811,000248: 07,3110           05014                           WOR      CHAN14                                
056812,000249: 07,3111           33722                           CAF      600MS                                 
056813,000250: 07,3112           13012                           TCF      COARS2     -1                         #  THEN TO VARDELAY
056814,000251: 
056815,000252: 07,3113           34746        CA+ECE             CAF      BIT6                                  #  ENABLE ALL THREE ISS CDU ERROR COUNTERS
056816,000253: 07,3114           00006                           EXTEND                                         
056817,000254: 07,3115           05012                           WOR      CHAN12                                
056818,000255: 07,3116           05261                           TC       TASKOVER                              
056819,000256: 

Page 1309

056821,000258: 07,3117           34750        SETCOARS           CAF      BIT4                                  #  BYPASS IF ALREADY IN COARSE ALIGN
056822,000259: 07,3120           00006                           EXTEND                                         
056823,000260: 07,3121           02012                           RAND     CHAN12                                
056824,000261: 07,3122           10000                           CCS      A                                     
056825,000262: 07,3123           00002                           TC       Q                                     
056826,000263: 
056827,000264: 07,3124           44746                           CS       BIT6                                  #  CLEAR ISS ERROR COUNTERS
056828,000265: 07,3125           00006                           EXTEND                                         
056829,000266: 07,3126           03012                           WAND     CHAN12                                
056830,000267: 
056831,000268: 07,3127           44742                           CS       BIT10                                 #  KNOCK DOWN GYRO ACTIVITY
056832,000269: 07,3130           00006                           EXTEND                                         
056833,000270: 07,3131           03014                           WAND     CHAN14                                
056834,000271: 07,3132           44755                           CS       ZERO                                  
056835,000272: 07,3133           54047                           TS       GYROCMD                               
056836,000273: 
056837,000274: 07,3134           34750                           CAF      BIT4                                  #  PUT ISS IN COARSE ALIGN
056838,000275: 07,3135           00006                           EXTEND                                         
056839,000276: 07,3136           05012                           WOR      CHAN12                                
056840,000277: 
056841,000278: 07,3137           41036                           CS       DSPTAB     +11D                       #  TURN ON NO ATT LAMP
056842,000279: 07,3140           73162                           MASK     OCT40010                              
056843,000280: 07,3141           27036                           ADS      DSPTAB     +11D                       
056844,000281: 
056845,000282: 07,3142           41303                           CS       IMODES33                              #  DISABLE DAP AUTO AND HOLD MODES
056846,000283: 07,3143           74746                           MASK     BIT6                                  
056847,000284: 07,3144           27303                           ADS      IMODES33                              
056848,000285: 
056849,000286: 07,3145           41302                           CS       IMODES30                              #  DISABLE IMUFAIL
056850,000287: 07,3146           74750                           MASK     BIT4                                  
056851,000288: 07,3147           27302                           ADS      IMODES30                              
056852,000289: 
056853,000290: 07,3150           44747        RNDREFDR           CS       TRACKBIT                              #  CLEAR TRACK FLAG
056854,000291: 07,3151           70075                           MASK     FLAGWRD1                              
056855,000292: 07,3152           54075                           TS       FLAGWRD1                              
056856,000293: 
056857,000294: 07,3153           44735                           CS       DRFTBIT                               #  CLEAR DRIFT FLAG
056858,000295: 07,3154           70076                           MASK     FLAGWRD2                              
056859,000296: 07,3155           54076                           TS       FLAGWRD2                              
056860,000297: 
056861,000298: 07,3156           44737                           CS       REFSMBIT                              #  CLEAR REFSMMAT FLAG
056862,000299: 07,3157           70077                           MASK     FLAGWRD3                              
056863,000300: 07,3160           54077                           TS       FLAGWRD3                              
056864,000301: 
056865,000302: 07,3161           00002                           TC       Q                                     
056866,000303: 
056867,000304: 07,3162           40010        OCT40010           OCT      40010                                 
056868,000305: 

Page 1310

056870,000307:                                                                                                  #  IMU FINE ALIGN MODE SWITCH.
056871,000308: 
056872,000309: 07,3163           00004        IMUFINE            INHINT                                         
056873,000310: 07,3164           03626                           TC       CAGETSTJ                              #  SEE IF IMU BEING CAGED.
056874,000311: 
056875,000312: 07,3165           43717                           CS       BITS4-5                               #  RESET ZERO AND COARSE
056876,000313: 07,3166           00006                           EXTEND                                         
056877,000314: 07,3167           03012                           WAND     CHAN12                                
056878,000315: 
056879,000316: 07,3170           44746                           CS       BIT6                                  #  INSURE DAP AUTO AND HOLD MODES ENABLED
056880,000317: 07,3171           71303                           MASK     IMODES33                              
056881,000318: 07,3172           55303                           TS       IMODES33                              
056882,000319: 
056883,000320: 07,3173           03241                           TC       NOATTOFF                              
056884,000321: 
056885,000322: 07,3174           34742                           CAF      BIT10                                 #  IMU FAIL WAS INHIBITED DURING THE
056886,000323: 07,3175           05203                           TC       WAITLIST                              #  PRESUMABLY PRECEDING COARSE ALIGN. LEAVE
056887,000324: 07,3176  E3,1474                                  EBANK=   CDUIND                                
056888,000325: 07,3176           03207 16103                     2CADR    IFAILOK                               #  IT ON FOR THE FIRST 5 SECS OF FINE ALIGN
056889,000326: 
056890,000327: 07,3200           35000                           CAF      2SECS                                 
056891,000328: 07,3201           05203                           TC       WAITLIST                              
056892,000329: 07,3202  E3,1474                                  EBANK=   CDUIND                                
056893,000330: 07,3202           03205 16103                     2CADR    IMUFINED                              
056894,000331: 
056895,000332: 07,3204           12730                           TCF      MODEEXIT                              
056896,000333: 
056897,000334: 07,3205           03614        IMUFINED           TC       CAGETEST                              #  SEE THAT NO ONE HAS CAGED THE IMU.
056898,000335: 07,3206           13604                           TCF      ENDIMU                                
056899,000336: 

Page 1311

056901,000338: 07,3207           03621        IFAILOK            TC       CAGETSTQ                              #  ENABLE IMU FIAL UNLESS IMU BEING CAGED.
056902,000339: 07,3210           15261                           TCF      TASKOVER                              #  IT IS.
056903,000340: 
056904,000341: 07,3211           34750                           CAF      BIT4                                  #  DONT RESET IMU FAIL INHIBIT IF SOMEONE
056905,000342: 07,3212           00006                           EXTEND                                         #  HAS GONE INTO COARSE ALIGN.
056906,000343: 07,3213           02012                           RAND     CHAN12                                
056907,000344: 07,3214           10000                           CCS      A                                     
056908,000345: 07,3215           15261                           TCF      TASKOVER                              
056909,000346: 
056910,000347: 07,3216           41302                           CS       IMODES30                              #  RESET IMUFAIL.
056911,000348: 07,3217           74737                           MASK     BIT13                                 
056912,000349: 07,3220           27302                           ADS      IMODES30                              
056913,000350: 07,3221           44750                           CS       BIT4                                  
056914,000351: 07,3222           71302        PFAILOK2           MASK     IMODES30                              
056915,000352: 07,3223           55302                           TS       IMODES30                              
056916,000353: 07,3224           04674                           TC       IBNKCALL                              #  THE ISS WARNING LIGHT MAY COME ON NOW
056917,000354: 07,3225           14703                           CADR     SETISSW                               #  THAT THE INHIBIT HAS BEEN REMOVED.
056918,000355: 07,3226           15261                           TCF      TASKOVER                              
056919,000356: 
056920,000357: 07,3227           03621        PFAILOK            TC       CAGETSTQ                              #  ENABLE PIP FAIL PROG ALARM.
056921,000358: 07,3230           15261                           TCF      TASKOVER                              
056922,000359: 
056923,000360: 07,3231           41302                           CS       IMODES30                              #  RESET IMU AND PIPA FAIL BITS.
056924,000361: 07,3232           74742                           MASK     BIT10                                 
056925,000362: 07,3233           27302                           ADS      IMODES30                              
056926,000363: 
056927,000364: 07,3234           41303                           CS       IMODES33                              
056928,000365: 07,3235           74737                           MASK     BIT13                                 
056929,000366: 07,3236           27303                           ADS      IMODES33                              
056930,000367: 
056931,000368: 07,3237           44747                           CS       BIT5                                  
056932,000369: 07,3240           13222                           TCF      PFAILOK2                              
056933,000370: 
056934,000371: 07,3241           43162        NOATTOFF           CS       OCT40010                              #  SUBROUTINE TO TURN OFF NO ATT LAMP.
056935,000372: 07,3242           71036                           MASK     DSPTAB     +11D                       
056936,000373: 07,3243           64735                           AD       BIT15                                 
056937,000374: 07,3244           55036                           TS       DSPTAB     +11D                       
056938,000375: 07,3245           00002                           TC       Q                                     
056939,000376: 

Page 1312

056941,000378:                                                                                                  #  ROUITNES TO INITIATE AND TERMINATE PROGRAM USE OF THE PIPAS.  NO IMUSTALL REQUIRED IN EITHER CASE.
056942,000379: 
056943,000380: 07,3246           44755        PIPUSE             CS       ZERO                                  
056944,000381: 07,3247           54037                           TS       PIPAX                                 
056945,000382: 07,3250           54040                           TS       PIPAY                                 
056946,000383: 07,3251           54041                           TS       PIPAZ                                 
056947,000384: 
056948,000385: 07,3252           03621        PIPUSE1            TC       CAGETSTQ                              #  DO NOT ENABLE PIPA FAIL IF IMU IS CAGED
056949,000386: 07,3253           14631                           TCF      SWRETURN                              
056950,000387: 
056951,000388: 07,3254           00004                           INHINT                                         
056952,000389: 07,3255           44753                           CS       BIT1                                  #  IF PIPA FAILS FROM NOW ON (UNTIL
056953,000390: 07,3256           71302                           MASK     IMODES30                              #  PIPFREE), LIGHT ISS WARNING.
056954,000391: 07,3257           55302                           TS       IMODES30                              
056955,000392: 
056956,000393: 07,3260           04674        PIPFREE2           TC       IBNKCALL                              #  ISS WARNING MIGHT COME ON NOW.
056957,000394: 07,3261           14703                           CADR     SETISSW                               #  (OR GO OFF ON PIPFREE).
056958,000395: 
056959,000396: 07,3262           12730                           TCF      MODEEXIT                              
056960,000397: 
056961,000398: 07,3263           00004        PIPFREE            INHINT                                         #  PROGRAM DONE WITH PIPAS. DONT LIGHT
056962,000399: 07,3264           41302                           CS       IMODES30                              #  ISS WARNING.
056963,000400: 07,3265           74753                           MASK     BIT1                                  
056964,000401: 07,3266           27302                           ADS      IMODES30                              
056965,000402: 
056966,000403: 07,3267           74742                           MASK     BIT10                                 #  IF PIP FAIL ON, DO PROG ALSRM AND RESET
056967,000404: 07,3270           10000                           CCS      A                                     #  ISS WARNING.
056968,000405: 07,3271           12730                           TCF      MODEEXIT                              
056969,000406: 
056970,000407: 07,3272           05567                           TC       ALARM                                 
056971,000408: 07,3273           00212                           OCT      212                                   
056972,000409: 
056973,000410: 07,3274           00004                           INHINT                                         
056974,000411: 
056975,000412: 07,3275           13260                           TCF      PIPFREE2                              
056976,000413: 

Page 1313

056978,000415:                                                                                                  #           THE FOLLOWING ROUTINE TORQUES THE IRIGS ACCORDING TO DOUBLE PRECISION INPUTS IN THE SIX REGISTERS
056979,000416:                                                                                                  #  BEGINNING AT THE ECADR ARRIVING IN A.  THE MINIMUM SIZE OF ANY PULSE TRAIN IS 16 PULSES (.25 CDU COUNTS). THE
056980,000417:                                                                                                  #  UNSENT PORTION OF THE COMMAND IS LEFT INTACT IN THE INPUT COMMAND REGISTERS.
056981,000418: 
056982,000419: 07,3276  E3,1400                                  EBANK=   1400                                  #  VARIABLE, ACTUALLY.
056983,000420: 
056984,000421: 07,3276           54161        IMUPULSE           TS       MPAC       +5                         #  SAVE ARRIVING ECADR.
056985,000422: 07,3277           03626                           TC       CAGETSTJ                              #  DONT PROCEED IF IMU BEING CAGED.
056986,000423: 
056987,000424: 07,3300           11314                           CCS      LGYRO                                 #  SEE IF GYROS BUSY.
056988,000425: 07,3301           03342                           TC       GYROBUSY                              #  SLEEP.
056989,000426: 
056990,000427: 07,3302           54156                           TS       MPAC       +2                         
056991,000428: 07,3303           34746                           CAF      BIT6                                  #  ENABLE THE POWER SUPPLY.
056992,000429: 07,3304           00006                           EXTEND                                         
056993,000430: 07,3305           05014                           WOR      CHAN14                                
056994,000431: 
056995,000432: 07,3306           34751                           CAF      FOUR                                  
056996,000433: 07,3307           05203        GWAKE2             TC       WAITLIST                              #  (IF A JOB WAS PUT TO SLEEP, THE POWER
056997,000434: 07,3310  E3,1474                                  EBANK=   CDUIND                                #  SUPPLY IS LEFT ON BY THE WAKING JOB).
056998,000435: 07,3310           03360 16103                     2CADR    STRTGYRO                              
056999,000436: 
057000,000437: 07,3312           30161                           CA       MPAC       +5                         #  SET UP EBANK, SAVING CALLER'S EBANK FOR
057001,000438: 07,3313           56003                           XCH      EBANK                                 #  RESTORATION ON RETURN.
057002,000439: 07,3314           56161                           XCH      MPAC       +5                         
057003,000440: 07,3315           55314                           TS       LGYRO                                 #  RESERVES GYROS.
057004,000441: 07,3316           74357                           MASK     LOW8                                  
057005,000442: 07,3317           54061                           TS       ITEMP1                                
057006,000443: 
057007,000444: 07,3320           34752                           CAF      TWO                                   #  FORCE SIGN AGREEMENT ON INPUTS.
057008,000445: 07,3321           54157        GYROAGRE           TS       MPAC       +3                         
057009,000446: 07,3322           60000                           DOUBLE                                         
057010,000447: 07,3323           60061                           AD       ITEMP1                                
057011,000448: 07,3324           54160                           TS       MPAC       +4                         
057012,000449: 07,3325           00006                           EXTEND                                         
057013,000450: 07,3326           50000                           INDEX    A                                     
057014,000451: 07,3327           31401                           DCA      1400                                  
057015,000452: 07,3330           52155                           DXCH     MPAC                                  
057016,000453: 07,3331           07256                           TC       TPAGREE                               
057017,000454: 07,3332           52155                           DXCH     MPAC                                  
057018,000455: 07,3333           50160                           INDEX    MPAC       +4                         
057019,000456: 07,3334           53401                           DXCH     1400                                  
057020,000457: 
057021,000458: 07,3335           10157                           CCS      MPAC       +3                         
057022,000459: 07,3336           13321                           TCF      GYROAGRE                              
057023,000460: 
057024,000461: 07,3337           30161                           CA       MPAC       +5                         #  RESTORE CALLER'S EBANK.
057025,000462: 07,3340           54003                           TS       EBANK                                 
057026,000463: 07,3341           12730                           TCF      MODEEXIT                              
057027,000464: 

Page 1314

057029,000466:                                                                                                  #  ROUTINES TO ALLOW TORQUING BY ONLY ONE JOB AT A TIME.
057030,000467: 
057031,000468: 07,3342           00006        GYROBUSY           EXTEND                                         #  SAVE RETURN 2FCADR.
057032,000469: 07,3343           30134                           DCA      BUF2                                  
057033,000470: 07,3344           52155                           DXCH     MPAC                                  
057034,000471: 07,3345           33357        REGSLEEP           CAF      LGWAKE                                
057035,000472: 07,3346           15133                           TCF      JOBSLEEP                              
057036,000473: 
057037,000474: 07,3347           11314        GWAKE              CCS      LGYRO                                 #  WHEN AWAKENED, SEE IF GYROS STILL BUSY.
057038,000475: 07,3350           13345                           TCF      REGSLEEP                              #  IF SO, SLEEP SOME MORE.
057039,000476: 
057040,000477: 07,3351           54156                           TS       MPAC       +2                         
057041,000478: 07,3352           00006                           EXTEND                                         
057042,000479: 07,3353           30155                           DCA      MPAC                                  
057043,000480: 07,3354           52134                           DXCH     BUF2                                  #  RESTORE SWRETURN INFO.
057044,000481: 07,3355           34753                           CAF      ONE                                   
057045,000482: 07,3356           13307                           TCF      GWAKE2                                
057046,000483: 
057047,000484: 07,3357           17347        LGWAKE             CADR     GWAKE                                 
057048,000485: 

Page 1315

057050,000487:                                                                                                  #  GYRO-TORQUING WAITLIST TASKS.
057051,000488: 
057052,000489: 07,3360           43601        STRTGYRO           CS       GDESELCT                              #  DE-SELECT LAST GYRO.
057053,000490: 07,3361           00006                           EXTEND                                         
057054,000491: 07,3362           03014                           WAND     CHAN14                                
057055,000492: 
057056,000493: 07,3363           03614                           TC       CAGETEST                              
057057,000494: 
057058,000495: 07,3364           31314        STRTGYR2           CA       LGYRO                                 #  JUMP ON PHASE COUNTER IN BITS 13-14.
057059,000496: 07,3365           00006                           EXTEND                                         
057060,000497: 07,3366           74750                           MP       BIT4                                  
057061,000498: 07,3367           50000                           INDEX    A                                     
057062,000499: 07,3370           13371                           TCF      +1                                    
057063,000500: 07,3371           03406                           TC       GSELECT                               #  =0.  DO Y GYRO.
057064,000501: 07,3372           00202                           OCT      00202                                 
057065,000502: 
057066,000503: 07,3373           03406                           TC       GSELECT                               #  =1.  DO Z GYRO.
057067,000504: 07,3374           00302                           OCT      00302                                 
057068,000505: 
057069,000506: 07,3375           03404                           TC       GSELECT    -2                         #  =2.  DO X GYRO.
057070,000507: 07,3376           00100                           OCT      00100                                 
057071,000508: 
057072,000509: 07,3377           34755                           CAF      ZERO                                  #  =3.  DONE
057073,000510: 07,3400           55314                           TS       LGYRO                                 
057074,000511: 07,3401           33357                           CAF      LGWAKE                                #  WAKE A POSSIBLE SLEEPING JOB.
057075,000512: 07,3402           05137                           TC       JOBWAKE                               
057076,000513: 
057077,000514: 07,3403           13205        NORESET            TCF      IMUFINED                              #  DO NOT RESET POWER SUPPLY

Page 1316

057079,000516: 07,3404           44751                 -2        CS       FOUR                                  #  SPECIAL ENTRY TO REGRESS LGYRO FOR X.
057080,000517: 07,3405           27314                           ADS      LGYRO                                 
057081,000518: 
057082,000519: 07,3406           50002        GSELECT            INDEX    Q                                     #  SELECT GYRO.
057083,000520: 07,3407           30000                           CAF      0                                     #  PACKED WORD CONTAINS GYRO SELECT BITS
057084,000521: 07,3410           54064                           TS       ITEMP4                                #  AND INCREMENT TO LGYRO.
057085,000522: 07,3411           74757                           MASK     SEVEN                                 
057086,000523: 07,3412           64737                           AD       BIT13                                 
057087,000524: 07,3413           27314                           ADS      LGYRO                                 
057088,000525: 07,3414           54003                           TS       EBANK                                 
057089,000526: 07,3415           74357                           MASK     LOW8                                  
057090,000527: 07,3416           54061                           TS       ITEMP1                                
057091,000528: 
057092,000529: 07,3417           44757                           CS       SEVEN                                 
057093,000530: 07,3420           70064                           MASK     ITEMP4                                
057094,000531: 07,3421           54064                           TS       ITEMP4                                
057095,000532: 
057096,000533: 07,3422           00006                           EXTEND                                         #  MOVE DP COMMAND TO RUPTREGS FOR TESTING.
057097,000534: 07,3423           50061                           INDEX    ITEMP1                                
057098,000535: 07,3424           31401                           DCA      1400                                  
057099,000536: 07,3425           52071                           DXCH     RUPTREG1                              
057100,000537: 
057101,000538: 07,3426           10070                           CCS      RUPTREG1                              
057102,000539: 07,3427           13442                           TCF      MAJ+                                  
057103,000540: 07,3430           13432                           TCF      +2                                    
057104,000541: 07,3431           13562                           TCF      MAJ-                                  
057105,000542: 
057106,000543: 07,3432           10071                           CCS      RUPTREG2                              
057107,000544: 07,3433           13437                           TCF      MIN+                                  
057108,000545: 07,3434           13364                           TCF      STRTGYR2                              
057109,000546: 07,3435           13557                           TCF      MIN-                                  
057110,000547: 07,3436           13364                           TCF      STRTGYR2                              
057111,000548: 

Page 1317

057113,000550: 07,3437           63473        MIN+               AD       -GYROMIN                              #  SMALL POSITIVE COMMAND. SEE IF AT LEAST
057114,000551: 07,3440           00006                           EXTEND                                         #  16 GYRO PULSES.
057115,000552: 07,3441           63364                           BZMF     STRTGYR2                              
057116,000553: 
057117,000554: 07,3442           00006        MAJ+               EXTEND                                         #  DEFINITE POSITIVE OUTPUT.
057118,000555: 07,3443           33603                           DCA      GYROFRAC                              
057119,000556: 07,3444           20071                           DAS      RUPTREG1                              
057120,000557: 
057121,000558: 07,3445           30064                           CA       ITEMP4                                #  SELECT POSITIVE TORQUING FOR THIS GYRO.
057122,000559: 07,3446           00006                           EXTEND                                         
057123,000560: 07,3447           05014                           WOR      CHAN14                                
057124,000561: 
057125,000562: 07,3450           36073                           CAF      LOW7                                  #  LEAVE NUMBER OF POSSIBLE 8192 AUGMENTS
057126,000563: 07,3451           70071                           MASK     RUPTREG2                              #  TO INITIAL COMMAND IN MAJOR PART OF LONG
057127,000564: 07,3452           56071                           XCH      RUPTREG2                              #  TERM STORAGE AND TRUNCATED FRACTION
057128,000565: 07,3453           00006        GMERGE             EXTEND                                         #  IN MINOR PART. THE MAJOR PART WILL BE
057129,000566: 07,3454           74744                           MP       BIT8                                  #  COUNTED DOWN TO ZERO IN THE COURSE OF
057130,000567: 07,3455           54062                           TS       ITEMP2                                #  PUTTING OUT THE ENTIRE COMMAND.
057131,000568: 07,3456           30070                           CA       RUPTREG1                              
057132,000569: 07,3457           00006                           EXTEND                                         
057133,000570: 07,3460           74743                           MP       BIT9                                  
057134,000571: 07,3461           54070                           TS       RUPTREG1                              
057135,000572: 07,3462           30001                           CA       L                                     
057136,000573: 07,3463           00006                           EXTEND                                         
057137,000574: 07,3464           74736                           MP       BIT14                                 
057138,000575: 07,3465           26062                           ADS      ITEMP2                                #  INITIAL COMMAND.
057139,000576: 
057140,000577: 07,3466           00006                           EXTEND                                         #  SEE IF MORE THAN ONE PULSE TRAIN NEEDED
057141,000578: 07,3467           30071                           DCA      RUPTREG1                              #  (MORE THAN 16383 PULSES).
057142,000579: 07,3470           67746                           AD       MINUS1                                
057143,000580: 07,3471           10000                           CCS      A                                     
057144,000581: 07,3472           13516                           TCF      LONGGYRO                              
057145,000582: 07,3473           77601        -GYROMIN           OCT      -176                                  #  MAY BE ADJUSTED TO SPECIFY MINIMUM CMD
057146,000583: 07,3474           13500                           TCF      +4                                    
057147,000584: 
057148,000585: 07,3475           34736                           CAF      BIT14                                 
057149,000586: 07,3476           26062                           ADS      ITEMP2                                
057150,000587: 07,3477           34755                           CAF      ZERO                                  
057151,000588: 
057152,000589: 07,3500           50061                 +4        INDEX    ITEMP1                                
057153,000590: 07,3501           53401                           DXCH     1400                                  

Page 1318

057155,000592: 07,3502           30062                           CA       ITEMP2                                #  ENTIRE COMMAND.
057156,000593: 07,3503           54047        LASTSEG            TS       GYROCMD                               
057157,000594: 07,3504           00006                           EXTEND                                         
057158,000595: 07,3505           74742                           MP       BIT10                                 #  WAITLIST DT
057159,000596: 07,3506           66244                           AD       THREE                                 #  TRUNCATION AND PHASE UNCERTAINTIES.
057160,000597: 07,3507           05203                           TC       WAITLIST                              
057161,000598: 07,3510  E3,1474                                  EBANK=   CDUIND                                
057162,000599: 07,3510           03360 16103                     2CADR    STRTGYRO                              
057163,000600: 
057164,000601: 07,3512           34742        GYROEXIT           CAF      BIT10                                 
057165,000602: 07,3513           00006                           EXTEND                                         
057166,000603: 07,3514           05014                           WOR      CHAN14                                
057167,000604: 07,3515           15261                           TCF      TASKOVER                              
057168,000605: 
057169,000606: 07,3516           50061        LONGGYRO           INDEX    ITEMP1                                
057170,000607: 07,3517           53401                           DXCH     1400                                  #  INITIAL COMMAND OUT PLUS N AUGMENTS OF
057171,000608: 07,3520           34736                           CAF      BIT14                                 #  8192. INITIAL COMMAND IS AT LEAST 8192.
057172,000609: 07,3521           60062                           AD       ITEMP2                                
057173,000610: 07,3522           54047                           TS       GYROCMD                               
057174,000611: 
057175,000612: 07,3523           00006        AUG3               EXTEND                                         #  GET WAITLIST DT TO TIME WHEN TRAIN IS
057176,000613: 07,3524           74742                           MP       BIT10                                 #  ALMOST OUT.
057177,000614: 07,3525           67744                           AD       NEG3                                  
057178,000615: 07,3526           05203                           TC       WAITLIST                              
057179,000616: 07,3527  E3,1474                                  EBANK=   CDUIND                                
057180,000617: 07,3527           03532 16103                     2CADR    8192AUG                               
057181,000618: 
057182,000619: 07,3531           13512                           TCF      GYROEXIT                              
057183,000620: 
057184,000621: 07,3532           03614        8192AUG            TC       CAGETEST                              
057185,000622: 
057186,000623: 07,3533           34750                           CAF      BIT4                                  
057187,000624: 07,3534           00006                           EXTEND                                         
057188,000625: 07,3535           02012                           RAND     CHAN12                                
057189,000626: 07,3536           10000                           CCS      A                                     
057190,000627: 07,3537           13612                           TCF      IMUBAD                                
057191,000628: 07,3540           31314                           CA       LGYRO                                 #  ADD 8192 PULSES TO GYROCMD
057192,000629: 07,3541           54003                           TS       EBANK                                 
057193,000630: 07,3542           74357                           MASK     LOW8                                  
057194,000631: 07,3543           54061                           TS       ITEMP1                                
057195,000632: 
057196,000633: 07,3544           50061                           INDEX    ITEMP1                                #  SEE IF THIS IS THE LAST AUG.
057197,000634: 07,3545           11400                           CCS      1400                                  
057198,000635: 07,3546           13552                           TCF      AUG2                                  #  MORE TO COME.
057199,000636: 
057200,000637: 07,3547           34736                           CAF      BIT14                                 
057201,000638: 07,3550           26047                           ADS      GYROCMD                               
057202,000639: 07,3551           13504                           TCF      LASTSEG    +1                         
057203,000640: 

Page 1319

057205,000642: 07,3552           50061        AUG2               INDEX    ITEMP1                                
057206,000643: 07,3553           55400                           TS       1400                                  
057207,000644: 07,3554           34736                           CAF      BIT14                                 
057208,000645: 07,3555           26047                           ADS      GYROCMD                               
057209,000646: 07,3556           13523                           TCF      AUG3                                  #  COMPUTE DT.
057210,000647: 

Page 1320

057212,000649: 07,3557           63473        MIN-               AD       -GYROMIN                              #  POSSIBLE NEGATIVE OUTPUT.
057213,000650: 07,3560           00006                           EXTEND                                         
057214,000651: 07,3561           63364                           BZMF     STRTGYR2                              
057215,000652: 
057216,000653: 07,3562           00006        MAJ-               EXTEND                                         #  DEFINITE NEGATIVE OUTPUT.
057217,000654: 07,3563           43603                           DCS      GYROFRAC                              
057218,000655: 07,3564           20071                           DAS      RUPTREG1                              
057219,000656: 
057220,000657: 07,3565           30064                           CA       ITEMP4                                #  SELECT NEGATIVE TORQUING FOR THIS GYRO.
057221,000658: 07,3566           64743                           AD       BIT9                                  
057222,000659: 07,3567           00006                           EXTEND                                         
057223,000660: 07,3570           05014                           WOR      CHAN14                                
057224,000661: 
057225,000662: 07,3571           40070                           CS       RUPTREG1                              #  SET UP RUPTREGS TO FALL INTO GMERGE.
057226,000663: 07,3572           54070                           TS       RUPTREG1                              #  ALL NUMBERS PUT INTO GYROCMD ARE
057227,000664: 07,3573           40071                           CS       RUPTREG2                              #  POSITIVE - BIT9 OF CHAN 14 DETERMINES
057228,000665: 07,3574           76073                           MASK     LOW7                                  #  THE SIGN OF THE COMMAND.
057229,000666: 07,3575           40000                           COM                                            
057230,000667: 07,3576           56071                           XCH      RUPTREG2                              
057231,000668: 07,3577           40000                           COM                                            
057232,000669: 07,3600           13453                           TCF      GMERGE                                
057233,000670: 
057234,000671: 07,3601           01700        GDESELCT           OCT      1700                                  #  TURN OFF SELECT AND ACTIVITY BITS.
057235,000672: 
057236,000673: 07,3602           00000 00034  GYROFRAC           2DEC     .215       B-21                       
057237,000674: 

Page 1321

057239,000676:                                                                                                  #  IMU MODE SWITCHING ROUTINES COME HERE WHEN ACTION COMPLETE.
057240,000677: 
057241,000678: 07,3604           00006        ENDIMU             EXTEND                                         #  MODE IS BAD IF CAGE HAS OCCURED OR IF
057242,000679: 07,3605           00011                           READ     DSALMOUT                              #  ISS WARNING IS ON.
057243,000680: 07,3606           74753                           MASK     BIT1                                  
057244,000681: 07,3607           10000                           CCS      A                                     
057245,000682: 07,3610           13612                           TCF      IMUBAD                                
057246,000683: 
057247,000684: 07,3611           13640        IMUGOOD            TCF      GOODEND                               #  WITH C(A) = 0.
057248,000685: 
057249,000686: 07,3612           34755        IMUBAD             CAF      ZERO                                  
057250,000687: 07,3613           13635                           TCF      BADEND                                
057251,000688: 
057252,000689: 07,3614           34746        CAGETEST           CAF      BIT6                                  #  SUBROUTINE TO TERMINATE IMU MODE
057253,000690: 07,3615           71302                           MASK     IMODES30                              #  SWITCH IF IMU HAS BEEN CAGED.
057254,000691: 07,3616           10000                           CCS      A                                     
057255,000692: 07,3617           13612                           TCF      IMUBAD                                #  DIRECTLY.
057256,000693: 07,3620           00002                           TC       Q                                     #  WITH C(A) = +0.
057257,000694: 
057258,000695: 07,3621           41302        CAGETSTQ           CS       IMODES30                              #  SKIP IF IMU NOT BEING CAGED.
057259,000696: 07,3622           74746                           MASK     BIT6                                  
057260,000697: 07,3623           10000                           CCS      A                                     
057261,000698: 07,3624           24002                           INCR     Q                                     
057262,000699: 07,3625           00002                           TC       Q                                     
057263,000700: 
057264,000701: 07,3626           41302        CAGETSTJ           CS       IMODES30                              #  IF DURING MODE SWITCH INITIALIZATION
057265,000702: 07,3627           74746                           MASK     BIT6                                  #  IT IS FOUND THAT THE IMU IS BEING CAGED,
057266,000703: 07,3630           10000                           CCS      A                                     #  SET IMUCADR TO -0 TO INDICATE OPERATION
057267,000704: 07,3631           00002                           TC       Q                                     #  COMPLETE BUT FAILED. RETURN IMMEDIATELY
057268,000705: 
057269,000706: 07,3632           44755                           CS       ZERO                                  #  TO SWRETURN.
057270,000707: 07,3633           55304                           TS       IMUCADR                               
057271,000708: 07,3634           12730                           TCF      MODEEXIT                              
057272,000709: 

Page 1322

057274,000711:                                                                                                  #           GENERALIZED MODE SWITCHING TERMINATION. ENTER AT GOODEND FOR SUCCESSFUL COMPLETION OF AN I/O OPERATION
057275,000712:                                                                                                  #  OR AT BADEND FOR AN UNSUCCESSFUL ONE. C(A) OR ARRIVAL =0 FOR IMU, 1 FOR OPTICS.
057276,000713: 
057277,000714: 07,3635           54071        BADEND             TS       RUPTREG2                              #  DEVICE INDEX.
057278,000715: 07,3636           44755                           CS       ZERO                                  #  FOR FAILURE.
057279,000716: 07,3637           13642                           TCF      GOODEND    +2                         
057280,000717: 
057281,000718: 07,3640           54071        GOODEND            TS       RUPTREG2                              
057282,000719: 07,3641           44753                           CS       ONE                                   #  FOR SUCCESS.
057283,000720: 
057284,000721: 07,3642           54072                           TS       RUPTREG3                              
057285,000722: 07,3643           50071                           INDEX    RUPTREG2                              #  SEE IF USING PROGRAM ASLEEP.
057286,000723: 07,3644           11304                           CCS      MODECADR                              
057287,000724: 07,3645           13651                           TCF      +4                                    #  YES - WAKE IT UP.
057288,000725: 07,3646           13661                           TCF      ENDMODE                               #  IF 0, PROGRAM NOT IN YET.
057289,000726: 
057290,000727: 07,3647           00006                           EXTEND                                         
057291,000728: 07,3650           13662                           BZF      ENDMODE    +1                         #  BZF = TCF IF MODECADR = -0.
057292,000729: 
057293,000730: 07,3651           34755                           CAF      ZERO                                  #  WAKE SLEEPING PROGRAM.
057294,000731: 07,3652           50071                           INDEX    RUPTREG2                              
057295,000732: 07,3653           57304                           XCH      MODECADR                              
057296,000733: 07,3654           05137                           TC       JOBWAKE                               
057297,000734: 
057298,000735: 07,3655           40072                           CS       RUPTREG3                              #  ADVANCE LOC IF SUCCESSFUL.
057299,000736: 07,3656           50064                           INDEX    LOCCTR                                
057300,000737: 07,3657           26164                           ADS      LOC                                   
057301,000738: 
057302,000739: 07,3660           15261                           TCF      TASKOVER                              
057303,000740: 
057304,000741: 07,3661           30072        ENDMODE            CA       RUPTREG3                              #  -0 INDICATES OPERATION COMPLETE BUT
057305,000742: 07,3662           50071                 +1        INDEX    RUPTREG2                              #  UNSUCCESSFUL: -1 INDICATES COMPLETE AND
057306,000743: 07,3663           55304                           TS       MODECADR                              #  SUCCESSFUL.
057307,000744: 07,3664           15261                           TCF      TASKOVER                              
057308,000745: 

Page 1323

057310,000747:                                                                                                  #           GENERAL STALLING ROUTINE. USING PROGRAMS COME HERE TO WAIT FOR I/O COMPLETION.
057311,000748: 
057312,000749:                                                                                                  #  PROGRAM DESCRIPTION                                     DATE- 21 FEB 1967
057313,000750:                                                                                                  #                                             LOG SECTION IMU MODE SWITCHING
057314,000751:                                                                                                  #  MOD BY- R. MELANSON TO ADD DOCUMENTATION       ASSEMBLY SUNDISK  REV.  82
057315,000752: 
057316,000753:                                                                                                  #  FUNCTIONAL DESCRIPTION-
057317,000754:                                                                                                  #    TO DELAY FURTHER EXECUTION OF THE CALLING ROUTINE UNTIL ITS SELECTED
057318,000755:                                                                                                  #    I/O FUNCTION IS COMPLETE.THE FOLLOWING CHECKS ON THE CALLING ROUTINE:S
057319,000756:                                                                                                  #    MODECADR ARE MADE AND ACTED UPON.
057320,000757:                                                                                                  #      1) +0 INDICATES INCOMPLETE I/O OPERATION.CALLING ROUTINE IS PUT TO
057321,000758:                                                                                                  #         SLEEP.
057322,000759:                                                                                                  #      2) -1 INDICATES COMPLETED I/O OPERATION. STALL BYPASSES JOBSLEEP
057323,000760:                                                                                                  #         CALL AND RETURNS TO CALLING ROUTINE AT L+3
057324,000761:                                                                                                  #      3) -0 INDICATES COMPLETED I/O WITH FAILURE. STALL CLEARS MODECADR
057325,000762:                                                                                                  #         AND RETURNS TO CALLING ROUTINE AT L+2.
057326,000763:                                                                                                  #      4) VALUE GREATER THAN 0 INDICATES TWO ROUTINES CALLING FOR USE OF
057327,000764:                                                                                                  #         SAME DEVICE. STALL EXITS TO ABORT WHICH EXECUTES A PROGRAM
057328,000765:                                                                                                  #         RESTART WHICH IN TURN CLEARS ALL MODECADR REGISTERS.
057329,000766: 
057330,000767:                                                                                                  #   CALLING SEQUENCE-
057331,000768:                                                                                                  #    L   TC   BANKCALL
057332,000769:                                                                                                  #    L+1 CADR (ONE OF 5 STALL ADDRESSES I.E. IMUSTALL, OPTSTALL, RADSTALL,
057333,000770:                                                                                                  #               AOTSTALL, OR ATTSTALL)
057334,000771: 
057335,000772:                                                                                                  #   NORMAL-EXIT MODE-
057336,000773:                                                                                                  #    TCF   JOBSLEEP OR TCF   MODEXIT
057337,000774: 
057338,000775:                                                                                                  #  ALARM OR ABORT EXIT MODE-
057339,000776:                                                                                                  #    TC   ABORT
057340,000777: 
057341,000778:                                                                                                  #  OUTPUT-
057342,000779:                                                                                                  #    MODECADR=CADR IF JOBSLEEP
057343,000780:                                                                                                  #    MODECADR=+0   IF I/O COMPLETE
057344,000781:                                                                                                  #    BUF2=L+3      IF I/O COMPLETE AND GOOD.
057345,000782:                                                                                                  #    BUF2=L+2 IF I/O COMPLETE BUT FAILED.
057346,000783: 
057347,000784:                                                                                                  #  ERASABLE INITIALIZATION-
057348,000785:                                                                                                  #    BUF2 CONTAINS RETURN ADDRESS PLUS 1,(L+2)
057349,000786:                                                                                                  #    BUF2+1 CONTAINS FBANK VALUE OF CALLING ROUTINE.
057350,000787:                                                                                                  #    MODECADR OF CALLING ROUTINE CONTAINS +0,-1,-0 OR CADR RETURN ADDRESS.
057351,000788: 
057352,000789:                                                                                                  #  DEBRIS-
057353,000790:                                                                                                  #    RUPTREG2 AND CALLING ROUTINE MODECADR.
057354,000791: 
057355,000792: 07,3665           34753        AOTSTALL           CAF      ONE                                   #  AOT.
057356,000793: 07,3666           03672                           TC       STALL                                 
057357,000794: 
057358,000795: 07,3667           34752        RADSTALL           CAF      TWO                                   
057359,000796: 07,3670           13672                           TCF      STALL                                 
057360,000797: 

Page 1324

057362,000799: 07,3671  07,3665               OPTSTALL           EQUALS   AOTSTALL                              
057363,000800: 
057364,000801: 07,3671           34755        IMUSTALL           CAF      ZERO                                  #  IMU.
057365,000802: 
057366,000803: 07,3672           00004        STALL              INHINT                                         
057367,000804: 07,3673           54071                           TS       RUPTREG2                              #  SAVE DEVICE INDEX.
057368,000805: 07,3674           50000                           INDEX    A                                     #  SEE IF OPERATION COMPLETE.
057369,000806: 07,3675           11304                           CCS      MODECADR                              
057370,000807: 07,3676           13714                           TCF      MODABORT                              #  ALLOWABLE STATES ARE +0, -1, AND -0.
057371,000808: 07,3677           13710                           TCF      MODESLP                               #  OPERATION INCOMPLETE.
057372,000809: 07,3700           13704                           TCF      MODEGOOD                              #  COMPLETE AND GOOD IF = -1.
057373,000810: 
057374,000811: 07,3701           50071        MG2                INDEX    RUPTREG2                              #  COMPLETE AND FAILED IF -0.  RESET TO +0.
057375,000812: 07,3702           55304                           TS       MODECADR                              #  RETURN TO CALLER.
057376,000813: 07,3703           12730                           TCF      MODEEXIT                              
057377,000814: 
057378,000815: 07,3704           10000        MODEGOOD           CCS      A                                     #  MAKE SURE INITIAL STATE -1.
057379,000816: 07,3705           13714                           TCF      MODABORT                              
057380,000817: 
057381,000818: 07,3706           24133                           INCR     BUF2                                  #  IF SO, INCREMENT RETURN ADDRESS AND
057382,000819: 07,3707           13701                           TCF      MG2                                   #  RETURN IMMEDIATELY, SETTING CADR = +0.
057383,000820: 
057384,000821: 07,3710           04645        MODESLP            TC       MAKECADR                              #  CALL FROM SWITCHABLE FIXED ONLY.
057385,000822: 07,3711           50071                           INDEX    RUPTREG2                              
057386,000823: 07,3712           55304                           TS       MODECADR                              
057387,000824: 07,3713           15133                           TCF      JOBSLEEP                              
057388,000825: 
057389,000826: 07,3714           52134        MODABORT           DXCH     BUF2                                  
057390,000827: 07,3715           05710                           TC       BAILOUT1                              #  TWO PROGRAMS USING THE SAME DEVICE.
057391,000828: 07,3716           01210                           OCT      1210                                  
057392,000829: 

Page 1325

057394,000831:                                                                                                  #  CONSTANTS FOR MODE SWITCHING ROUTINES
057395,000832: 
057396,000833: 07,3717     5742               BITS3&4            =        OCT14                                 
057397,000834: 07,3717     4771               BITS4&6            =        OCT50                                 
057398,000835: 07,3717           00030        BITS4-5            OCT      00030                                 
057399,000836: 07,3720     4744               IMUSEFLG           EQUALS   BIT8                                  #  INTERPRETER SWITCH 7.
057400,000837: 07,3720           77500        -COMMAX            DEC      -191       B-14                       
057401,000838: 07,3721           77477        -COMMAX-           DEC      -192       B-14                       
057402,000839: 07,3722           00074        600MS              DEC      60         B-14                       
057403,000840: 07,3723  07,3163               IMUFIN20           =        IMUFINE                               
057404,000841: 07,3723           31307        GOMANUR            CA       ATTCADR                               #  IS KALCMANU FREE
057405,000842: 07,3724           00006                           EXTEND                                         
057406,000843: 07,3725           13730                           BZF      +3                                    
057407,000844: 
057408,000845: 07,3726           05652                           TC       POODOO                                #  NO
057409,000846: 07,3727           01210                           OCT      1210                                  #  2 TRYING TO USE SAME DEVICE
057410,000847: 
057411,000848: 07,3730           00006                 +3        EXTEND                                         
057412,000849: 07,3731           30134                           DCA      BUF2                                  
057413,000850: 07,3732           53310                           DXCH     ATTCADR                               #  SAVE FINAL RETURN FOR KALCMAN3
057414,000851: 
057415,000852: 07,3733           30006                           CA       BBANK                                 
057416,000853: 07,3734           74757                           MASK     SEVEN                                 
057417,000854: 07,3735           27310                           ADS      ATTCADR    +1                         
057418,000855: 
057419,000856: 07,3736           30167                           CA       PRIORITY                              
057420,000857: 07,3737           77724                           MASK     PRIO37                                
057421,000858: 07,3740           55311                           TS       ATTPRIO                               #  SAVE USERS PRIO
057422,000859: 
057423,000860: 07,3741           33745                           CAF      KALEBCON                              #  SET EBANK FOR KALCMAN3
057424,000861: 07,3742           54003                           TS       EBANK                                 
057425,000862: 07,3743           04635                           TC       POSTJUMP                              
057426,000863: 07,3744           44004                           CADR     KALCMAN3                              
057427,000864: 07,3745           03274        KALEBCON           ECADR    BCDU                                  
057428,000865: 

Page 1326

057430,000867:                                                                                                  #  PROGRAM DESCRIPTION
057431,000868:                                                                                                  #  IMU STATUS CHECK ROUTINE R02 (SUBROUTINE UTILITY)
057432,000869:                                                                                                  #  MOD NO - 1
057433,000870:                                                                                                  #  MOD BY - N.BRODEUR
057434,000871: 
057435,000872:                                                                                                  #  FUNCTIONAL DESCRIPTION
057436,000873:                                                                                                  #  TO CHECK WHETHER IMU IS ON AND IF ON WHETHER IT IS ALIGNED TO AN
057437,000874:                                                                                                  #  ORIENTATION KNOWN BY THE CMC. TO REQUEST SELECTION OF THE APPROPRIATE
057438,000875:                                                                                                  #  PROGRAM IF THE IMU IS OFF OR NOT ALIGNED TO AN ORIENTATION KNOWN BY THE
057439,000876:                                                                                                  #  CMC. CALLED THROUGH BANKCALL
057440,000877:                                                                                                  #  CALLING SEQUENCE-
057441,000878: 
057442,000879:                                                                                                  #  L        TC     BANKCALL
057443,000880:                                                                                                  #  L+1      CADR   R02BOTH
057444,000881:                                                                                                  #  SUBROUTINES CALLED
057445,000882: 
057446,000883:                                                                                                  #        VARALARM
057447,000884:                                                                                                  #        FLAGUP
057448,000885: 
057449,000886:                                                                                                  #  NORMAL EXIT MODES
057450,000887: 
057451,000888:                                                                                                  #  AT L+2 OF CALLING SEQUENCE
057452,000889:                                                                                                  #  ALARM OR ABORT EXIT MODES
057453,000890:                                                                                                  #        GOTOPOOH, WITH ALARM
057454,000891:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED
057455,000892: 
057456,000893:                                                                                                  #  NONE
057457,000894:                                                                                                  #  DEBRIS
057458,000895: 
057459,000896:                                                                                                  #  CENTRALS - A,Q,L
057460,000897: 
057461,000898: 34,3760                                           BANK     34                                    
057462,000899: 04,2000                                           SETLOC   R02                                   
057463,000900: 04,2000                                           BANK                                           
057464,000901: 04,3174                                           COUNT*   $$/R02                                
057465,000902: 04,3174           00063        DEC51              DEC      51         B-14                       
057466,000903: 04,3175           34737        R02BOTH            CAF      REFSMBIT                              
057467,000904: 04,3176           70077                           MASK     FLAGWRD3                              
057468,000905: 04,3177           10000                           CCS      A                                     
057469,000906: 04,3200           03211                           TC       R02ZERO                               #  ZERO IMUS
057470,000907: 
057471,000908: 04,3201           31302                           CA       IMODES30                              
057472,000909: 04,3202           74743                           MASK     BIT9                                  #  IS ISS INITIALIZED
057473,000910: 04,3203           00006                           EXTEND                                         
057474,000911: 04,3204           13206                           BZF      +2                                    
057475,000912: 04,3205           44750                           CS       BIT4                                  #  SEND IMU ALARM CODE 210
057476,000913: 04,3206           63214                           AD       OCT220                                #  SEND REFSMM ALARM
057477,000914: 04,3207           05735                           TC       VARALARM                              
057478,000915: 
057479,000916: 04,3210           06001                           TC       GOTOPOOH                              
057480,000917: 
057481,000918: 04,3211           05504        R02ZERO            TC       UPFLAG                                

Page 1327

057483,000920: 04,3212           00007                           ADRES    IMUSE                                 
057484,000921: 04,3213           14631                           TCF      SWRETURN                              
057485,000922: 04,3214           00220        OCT220             OCT      220                                   
057486,000923: 

Page 1328

057488,000925:                                                                                                  #  PROGRAM DESCRIPTION   P06   10 FEB 67
057489,000926: 
057490,000927:                                                                                                  #  TRANSFER THE ISS/CMC FROM THE OPERATE TO THE STANDBY CONDITION.
057491,000928: 
057492,000929:                                                                                                  #  THE NORMAL CONDITION OF READINESS OF THE GNCS WHEN NOT IN USE IS STANDBY. IN THIS CONDITION THE IMU
057493,000930:                                                                                                  #  HEATER POWER IS ON. THE IMU OPERATE POWER IS OFF. THE COMPUTER POWER IS ON. THE OPTICS POWER IS OFF. THE
057494,000931:                                                                                                  #  CMC  STANDBY ON THE MAIN AND LEB DISKYS IS ON.
057495,000932: 
057496,000933:                                                                                                  #  CALLING SEQUENCE:
057497,000934:                                                                                                  #            ASTRONAUT REQUEST THROUGH DSKY    V37E 06E.
057498,000935: 
057499,000936:                                                                                                  #  SUBROUTINES CALLED:
057500,000937:                                                                                                  #           GOPERF1
057501,000938:                                                                                                  #           BANKCALL
057502,000939:                                                                                                  #           FLAGDOWN
057503,000940: 

Page 1329

057505,000942:                                                                                                  #  PRESTAND PREPARES FOR STANDBY BY SNAPSHOTTING THE SCALER AND TIME1 TIME2
057506,000943:                                                                                                  #  THE LOW 5 BITS OF THE SCALER ARE INSPECTED TO INSURE COMPATABILITY
057507,000944:                                                                                                  #  BETWEEN THE SCALER READING AND THE TIME1 TIME2 READING.
057508,000945: 
057509,000946: 37,2000                                           SETLOC   P05P06                                
057510,000947: 37,2000                                           BANK                                           
057511,000948: 
057512,000949: 37,3641     0314                                  EBANK=   TIME2SAV                              
057513,000950: 37,3641                                           COUNT*   $$/P06                                
057514,000951: 
057515,000952: 37,3641           05504        P06                TC       UPFLAG                                #  SET NODOV37 BIT
057516,000953: 37,3642           00054                           ADRES    NODOFLAG                              
057517,000954: 
057518,000955: 37,3643           00004        PRESTAND           INHINT                                         
057519,000956: 37,3644           00006                           EXTEND                                         
057520,000957: 37,3645           30025                           DCA      TIME2                                 #  SNAPSHOT TIME1 TIME2
057521,000958: 37,3646           52315                           DXCH     TIME2SAV                              
057522,000959: 37,3647           03700                           TC       SCALPREP                              
057523,000960: 37,3650           03643                           TC       PRESTAND                              #  T1,T2,SCALER NOT COMPATIBLE
057524,000961: 37,3651           52155                           DXCH     MPAC                                  #  T1,T2 AND SCALER OK
057525,000962: 37,3652           52317                           DXCH     SCALSAVE                              #  STORE SCALER
057526,000963: 37,3653           00004                           INHINT                                         
057527,000964: 37,3654           04616                           TC       BANKCALL                              
057528,000965: 37,3655           17150                           CADR     RNDREFDR                              #  REFSMM, DRIFT, TRACK FLAGS DOWN
057529,000966: 
057530,000967: 37,3656           05516                           TC       DOWNFLAG                              
057531,000968: 37,3657           00007                           ADRES    IMUSE                                 #  IMUSE DOWN
057532,000969: 37,3660           05516                           TC       DOWNFLAG                              
057533,000970: 37,3661           00010                           ADRES    RNDVZFLG                              #  RNDVZFLG DOWN
057534,000971: 
057535,000972: 37,3662           34741                           CAF      BIT11                                 
057536,000973: 37,3663           00006                           EXTEND                                         
057537,000974: 37,3664           05013                           WOR      CHAN13                                #  SET STANDBY ENABLE BIT
057538,000975: 
057539,000976: 37,3665           05353                           TC       PHASCHNG                              #  SET RESTART TO POSTAND WHEN STANDBY
057540,000977: 37,3666           07024                           OCT      07024                                 #    RECOVERS
057541,000978: 37,3667           20000                           OCT      20000                                 
057542,000979: 37,3670     0316                                  EBANK=   SCALSAVE                              
057543,000980: 37,3670           03720 76060                     2CADR    POSTAND                               
057544,000981: 
057545,000982: 37,3672           34774                           CAF      OCT62                                 
057546,000983: 37,3673           04616                           TC       BANKCALL                              
057547,000984: 37,3674           20476                           CADR     GOPERF1                               
057548,000985: 37,3675           13672                           TCF      -3                                    
057549,000986: 37,3676           13672                           TCF      -4                                    
057550,000987: 37,3677           13672                           TCF      -5                                    
057551,000988: 
057552,000989: 37,3700     4774               OCT62              EQUALS   .5SEC                                 #  DEC 50 = OCT 62
057553,000990: 
057554,000991:                                                                                                  #  THE LOW 5 BITS OF THE SCALER READS 10000 FOR THE FIRST INTERVAL AFTER A

Page 1330

057556,000993:                                                                                                  #  T1 INCREMENT. IF  SCALPREP DETECTS THIS INTERVAL THE T1,T2 AND SCALER
057557,000994:                                                                                                  #  DATA ARE NOT COMPATABLE AND RETURN IS TO L+1 FOR ANOTHER READING OF THE
057558,000995:                                                                                                  #  DATA. OTHERWISE, THE RETURN IS TO L+2 TO PROCEED. ROUTINE ALSO PREPARES
057559,000996:                                                                                                  #  THE SCALER READING FOR COMPUTATION OF THE INCREMENT TO UPDATE T1T2. (THE
057560,000997:                                                                                                  #  10 MS BIT (BIT 6) OF THE SCALER IS INCREMENTED 5 MS OUT OF PHASE FROM
057561,000998:                                                                                                  #  T1.) ADDITION OF 5 MS (BIT 5) TO THE SCALER READING HAS THE EFFECT OF
057562,000999:                                                                                                  #  ADJUSTING BIT 6 IN THE SCALER TO BE IN PHASE WITH BIT 1 OF T1. THE LOW 5
057563,001000:                                                                                                  #  BITS OF THE SCALER READING ARE THEN SET TO ZERO, TO TRUNCATE THE SCALER
057564,001001:                                                                                                  #  DATA TO 10 MS. RESULTS ARE STORED IN MPAC, +1.
057565,001002: 
057566,001003: 37,3700           00006        SCALPREP           EXTEND                                         
057567,001004: 37,3701           22156                           QXCH     MPAC       +2                         
057568,001005: 37,3702           04103                           TC       FINETIME   +1                         
057569,001006: 37,3703           00003                           RELINT                                         
057570,001007: 37,3704           52155                           DXCH     MPAC                                  
057571,001008: 37,3705           34747                           CA       BIT5                                  #  ADD 5 MS TO THE SCALER READING.
057572,001009: 37,3706           54001                           TS       L                                     
057573,001010: 37,3707           34755                           CA       ZERO                                  
057574,001011: 37,3710           20155                           DAS      MPAC                                  
057575,001012: 37,3711           44346                           CS       LOW5                                  #  SET LOW 5 BITS OF (SCALER+5MS) TO ZERO
057576,001013: 37,3712           70155                           MASK     MPAC       +1                         #  AND STORE RESULTS IN MPAC,+1.
057577,001014: 37,3713           56155                           XCH      MPAC       +1                         
057578,001015: 37,3714           74346                           MASK     LOW5                                  #  TEST LOW 5 BITS OF SCALER FOR THE FIRST
057579,001016:                                                                                                  #  INTERVAL AFTER THE T1 INCREMENT
057580,001017:                                                                                                  #  (NOW = 00000, SINCE BIT 5 ADDED).
057581,001018: 37,3715           10000                           CCS      A                                     #  IS IT 1ST INTERVAL AFTER T1 INCREMENT
057582,001019: 37,3716           24156                           INCR     MPAC       +2                         #  NO
057583,001020: 37,3717           00156                           TC       MPAC       +2                         #  YES
057584,001021: 
057585,001022:                                                                                                  #  POSTAND RECOVERS TIME AFTER STANDBY.THE SCALER IS SNAPSHOTTED AND THE
057586,001023:                                                                                                  #  TIME1 TIME2 COUNTER IS SET TO ZERO. THE LOW 5 BITS OF THE SCALER ARE
057587,001024:                                                                                                  #  INSPECTED TO INSURE COMPATABILITY BETWEEN THE SCALER READING AND THE
057588,001025:                                                                                                  #  CLEARING OF THE TIME COUNTER. IT THEN COMPUTES THE DIFFERENCE IN SCALER
057589,001026:                                                                                                  #  VALUES (IN DP) AND ADDS THIS TO THE PREVIOUSLY SNAPSHOTTED VALUES OF
057590,001027:                                                                                                  #  TIME1 TIME2 AND PLACES THIS NEW TIME INTO THE TIME1 TIME2 COUNTER.
057591,001028: 
057592,001029: 37,3720                                           COUNT*   $$/P05                                
057593,001030: 
057594,001031: 37,3720           44741        POSTAND            CS       BIT11                                 #  RECOVER TIME AFTER STANDBY.
057595,001032: 37,3721           00006                           EXTEND                                         
057596,001033: 37,3722           03013                           WAND     CHAN13                                #  CLEAR STANDBY ENABLE BIT
057597,001034: 37,3723           00004                           INHINT                                         
057598,001035: 37,3724           34755                           CA       ZERO                                  
057599,001036: 37,3725           54001                           TS       L                                     
057600,001037: 37,3726           52025                           DXCH     TIME2                                 #  CLEAR TIME1TIME2
057601,001038: 37,3727           03700                           TC       SCALPREP                              #  STORE SCALER IN MPAC, MPAC+1
057602,001039: 37,3730           03723                           TC       POSTAND    +3                         #  T1,T2,SCALER NOT COMPATIBLE
057603,001040: 37,3731           00006                           EXTEND                                         #  T1,T2 AND SCALER OK
057604,001041: 37,3732           40317                           DCS      SCALSAVE                              
057605,001042: 37,3733           20155                           DAS      MPAC                                  #  FORM DP DIFFERENCE OF POSTSTANDBY SCALER

Page 1331

057607,001044: 37,3734           34742                           CAF      BIT10                                 #  MINUS PRESTANDBY SCALER AND SHIFT RIGHT
057608,001045: 37,3735           07306                           TC       SHORTMP                               #  5 TO ALIGN BITS WITH TIME1 TIME2.
057609,001046: 37,3736           34755                           CAF      ZERO                                  
057610,001047: 37,3737           54156                           TS       MPAC       +2                         #  NEEDED FOR TP AGREE
057611,001048: 37,3740           07256                           TC       TPAGREE                               #  MAKE DP DIFF AGREE
057612,001049: 37,3741           10154                           CCS      MPAC                                  
057613,001050: 37,3742           03747                           TC       POSTCOM                               #  IF DP DIFF NET +, NO SCALER OVERFLOW
057614,001051: 37,3743           03747                           TC       POSTCOM                               #  BETWEEN PRE AND POST STANDBY.
057615,001052: 37,3744           03745                           TC       +1                                    #  IF DP DIFF NET -, SCALER OVERFLOWED. ADD
057616,001053: 37,3745           34742                           CAF      BIT10                                 #  BIT 10 TO HIGH DIFF TO CORRECT.
057617,001054: 37,3746           26154                           ADS      MPAC                                  
057618,001055: 37,3747           00006        POSTCOM            EXTEND                                         #  C(MPAC,+1) IS MAGNITUDE OF DELTA SCALER.
057619,001056: 37,3750           30315                           DCA      TIME2SAV                              #  PRESTANDBY TIME1TIME2
057620,001057: 37,3751           20155                           DAS      MPAC                                  
057621,001058: 37,3752           07256                           TC       TPAGREE                               #  FORCE SIGN AGREEMENT
057622,001059: 37,3753           52155                           DXCH     MPAC                                  #  UPDATED VALUE FOR T1,T2.
057623,001060: 37,3754           20025                           DAS      TIME2                                 #  LOAD UPDATED VALUE INTO T1,T2, WITH
057624,001061: 37,3755           05516                           TC       DOWNFLAG                              #  CLEAR NODOFLAG
057625,001062: 37,3756           00054                           ADRES    NODOFLAG                              
057626,001063: 
057627,001064: 37,3757           06001                           TC       GOTOPOOH                              
057628,001065: 

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