Source Code

These source-code files are part of a reconstructed copy of Comanche 51, the initial release (though not the final mission release) of the Apollo 11 Command Module (CM) Apollo Guidance Computer (AGC) software. The flown, final release was Comanche 55. The reconstruction is believed to be exactly accurate, but in the absence of an actual Apollo-era listing of Comanche 51, some explanation of the reconstruction process is needed to insure confidence in that accuracy.

The starting point was the source code of Comanche 55, whose original source code is available. Comanche 55 source code was then modified by undoing changes known to have been made between revisions 51 and 55. The most-significant steps involved reverting changes related to the R-2 lunar potential model, the details of which were known from the previous, separate, independent reconstruction of the Apollo 10 Lunar Module software Luminary 69/2. The now-reconstructed Comanche 51 source code was verified by assembling it and checking that the assembled code had the expected known-correct memory-bank checksums. Note that page numbers in the reconstructed code match those on the Comanche 55 or Luminary 69 printouts, although the source code would likely have different page numbers in a contemporary Comanche 51 listing.

Annotations that were not present in the contemporary source code have been added to the reconstructed code to justify each change relative to Comanche 55. Here's a guide to some of the Apollo documentation relevant to those annotations:
Among documentation not actually referenced in the annotations, there is a short writeup about the reconstruction process in our software repository that may be helpful in understanding it from a different perspective. There's also a handy table that lists what the number of memory-words should be for each routine in Comanche 51, which could make a nice double-check; however, we've not performed that double-check ourselves.

Comments expected to have been present in the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC Project's GitHub repository.

060472,000002:                                                                                                  ## Copyright:   Public domain.
060473,000003:                                                                                                  ## Filename:    IMU_MODE_SWITCHING_ROUTINES.agc
060474,000004:                                                                                                  ## Purpose:     A section of Comanche revision 051.
060475,000005:                                                                                                  ##              It is part of the reconstructed source code for the
060476,000006:                                                                                                  ##              original release of the flight software for the Command
060477,000007:                                                                                                  ##              Module's (CM) Apollo Guidance Computer (AGC) for Apollo 11.
060478,000008:                                                                                                  ##              The code has been recreated from a copy of Comanche 055. It
060479,000009:                                                                                                  ##              has been adapted such that the resulting bugger words
060480,000010:                                                                                                  ##              exactly match those specified for Comanche 51 in NASA drawing
060481,000011:                                                                                                  ##              2021153D, which gives relatively high confidence that the
060482,000012:                                                                                                  ##              reconstruction is correct.
060483,000013:                                                                                                  ## Reference:   pp. 1420-1448
060484,000014:                                                                                                  ## Assembler:   yaYUL
060485,000015:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
060486,000016:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
060487,000017:                                                                                                  ## Mod history: 2019-07-30 MAS  Created from Comanche 55.
060488,000018: 

Page 1420

060490,000020:    5521                                           BLOCK    02                                    
060491,000021:    4000                                           SETLOC   FFTAG3                                
060492,000022:    4000                                           BANK                                           
060493,000023: 
060494,000024:    5521  E3,1471                                  EBANK=   COMMAND                               
060495,000025: 
060496,000026:                                                                                                  #  FIXED-FIXED ROUTINES.
060497,000027: 
060498,000028:    5521                                           COUNT    02/IMODE                              
060499,000029: 
060500,000030:    5521           35021        ZEROICDU           CAF      ZERO                                  #  ZERO ICDU COUNTERS.
060501,000031:    5522           54032                           TS       CDUX                                  
060502,000032:    5523           54033                           TS       CDUY                                  
060503,000033:    5524           54034                           TS       CDUZ                                  
060504,000034:    5525           00002                           TC       Q                                     
060505,000035: 
060506,000036:    5526     5007               SPSCODE            =        BIT9                                  
060507,000037: 

Page 1421

060509,000039:                                                                                                  #  IMU ZEROING ROUTINE.
060510,000040: 
060511,000041: 11,3776                                           BANK     11                                    
060512,000042: 07,2000                                           SETLOC   MODESW                                
060513,000043: 07,2000                                           BANK                                           
060514,000044: 
060515,000045: 07,2577                                           COUNT    07/IMODE                              
060516,000046: 
060517,000047: 07,2577           00004        IMUZERO            INHINT                                         #  ROUTINE TO ZERO ICDUS.
060518,000048: 07,2600           41036                           CS       DSPTAB     +11D                       #  DONT ZERO CDUS IF IMU IN GIMBAL LOCK AND
060519,000049: 07,2601           75033                           MASK     BITS4&6                               #  COARSE ALIGN (GIMBAL RUNAWAY PROTECTION)
060520,000050: 07,2602           10000                           CCS      A                                     
060521,000051: 07,2603           12607                           TCF      IMUZEROA                              
060522,000052: 
060523,000053: 07,2604           05650                           TC       ALARM                                 #  IF SO.
060524,000054: 07,2605           00206                           OCT      00206                                 
060525,000055: 
060526,000056: 07,2606           13542                           TCF      CAGETSTJ   +4                         #  IMMEDIATE FAILURE.
060527,000057: 
060528,000058: 07,2607           03536        IMUZEROA           TC       CAGETSTJ                              
060529,000059: 
060530,000060:                                                                                                  #  DO ALL THE WORK.
060531,000061: 
060532,000062: 07,2610           41321                           CS       IMODES33                              #  DISABLE DAP AUTO AND HOLD MODES
060533,000063: 07,2611           75035                           MASK     SUPER011                              #        BIT5 FOR GROUND
060534,000064: 07,2612           27321                           ADS      IMODES33                              
060535,000065: 
060536,000066: 07,2613           41320                           CS       IMODES30                              #  INHIBIT ICDUFAIL AND IMUFAIL (IN CASE WE
060537,000067: 07,2614           75771                           MASK     BITS3&4                               #  JUST CAME OUT OF COARSE ALIGN).
060538,000068: 07,2615           27320                           ADS      IMODES30                              
060539,000069: 
060540,000070: 07,2616           45033                           CS       BITS4&6                               #  SEND ZERO ENCODE WITH COARSE AND ERROR
060541,000071: 07,2617           00006                           EXTEND                                         #  COUNTER DISABLED.
060542,000072: 07,2620           03012                           WAND     CHAN12                                
060543,000073: 
060544,000074: 07,2621           03151                           TC       NOATTOFF                              #  TURN OFF NO ATT LAMP.
060545,000075: 
060546,000076: 07,2622           35013                           CAF      BIT5                                  
060547,000077: 07,2623           00006                           EXTEND                                         
060548,000078: 07,2624           05012                           WOR      CHAN12                                
060549,000079: 
060550,000080: 07,2625           05521                           TC       ZEROICDU                              
060551,000081: 07,2626           35012                           CAF      BIT6                                  #  WAIT 320 MS TO GIVE AGS ADEQUATE TIME TO
060552,000082: 07,2627           05245                           TC       WAITLIST                              #  RECEIVE ITS PULSE TRAIN.
060553,000083: 07,2630  E3,1474                                  EBANK=   CDUIND                                
060554,000084: 07,2630           02642 16063                     2CADR    IMUZERO2                              
060555,000085: 
060556,000086: 07,2632           41320                           CS       IMODES30                              #  SEE IF IMU OPERATING AND ALARM IF NOT.
060557,000087: 07,2633           75007                           MASK     BIT9                                  
060558,000088: 07,2634           10000                           CCS      A                                     
060559,000089: 07,2635           12640                           TCF      MODEEXIT                              

Page 1422

060561,000091: 07,2636           05650                           TC       ALARM                                 
060562,000092: 07,2637           00210                           OCT      210                                   
060563,000093: 
060564,000094: 07,2640           00003        MODEEXIT           RELINT                                         #  GENERAL MODE-SWITCHING EXIT.
060565,000095: 07,2641           14675                           TCF      SWRETURN                              
060566,000096: 
060567,000097: 07,2642           03524        IMUZERO2           TC       CAGETEST                              
060568,000098: 07,2643           05521                           TC       ZEROICDU                              #  ZERO CDUX, CDUY, CDUZ
060569,000099: 
060570,000100: 07,2644           45013                           CS       BIT5                                  #  REMOVE ZERO DISCRETE.
060571,000101: 07,2645           00006                           EXTEND                                         
060572,000102: 07,2646           03012                           WAND     CHAN12                                
060573,000103: 
060574,000104: 07,2647           35005                           CAF      BIT11                                 #  WAIT 10 SECS FOR CTRS TO FIND GIMBALS
060575,000105: 07,2650           05272                           TC       VARDELAY                              
060576,000106: 
060577,000107: 07,2651           03524        IMUZERO3           TC       CAGETEST                              
060578,000108: 07,2652           45771                           CS       BITS3&4                               #  REMOVE IMUFAIL AND ICDUFAIL INHIBIT.
060579,000109: 07,2653           71320                           MASK     IMODES30                              
060580,000110: 07,2654           55320                           TS       IMODES30                              
060581,000111: 
060582,000112: 07,2655           45035                           CS       SUPER011                              #  ENABLE DAP AUTO AND HOLD MODES
060583,000113: 07,2656           71321                           MASK     IMODES33                              #        BIT5 FOR GROUND
060584,000114: 07,2657           55321                           TS       IMODES33                              
060585,000115: 
060586,000116: 07,2660           04740                           TC       IBNKCALL                              #  SET ISS WARNING IF EITHER OF ABOVE ARE
060587,000117: 07,2661           14665                           CADR     SETISSW                               #  PRESENT.
060588,000118: 
060589,000119: 07,2662           13514                           TCF      ENDIMU                                
060590,000120: 

Page 1423

060592,000122:                                                                                                  #  IMU COARSE ALIGN MODE.
060593,000123: 
060594,000124: 07,2663           00004        IMUCOARS           INHINT                                         
060595,000125: 07,2664           03536                           TC       CAGETSTJ                              
060596,000126: 07,2665           03027                           TC       SETCOARS                              
060597,000127: 
060598,000128: 07,2666           36211                           CAF      SIX                                   
060599,000129: 07,2667           05245                           TC       WAITLIST                              
060600,000130: 07,2670  E3,1474                                  EBANK=   CDUIND                                
060601,000131: 07,2670           02673 16063                     2CADR    COARS                                 
060602,000132: 
060603,000133: 07,2672           12640                           TCF      MODEEXIT                              
060604,000134: 
060605,000135: 07,2673           03524        COARS              TC       CAGETEST                              
060606,000136: 07,2674           35012                           CAF      BIT6                                  #  ENABLE ALL THREE ISS CDU ERROR COUNTERS
060607,000137: 07,2675           00006                           EXTEND                                         
060608,000138: 07,2676           05012                           WOR      CHAN12                                
060609,000139: 
060610,000140: 07,2677           35016                           CAF      TWO                                   #  SET CDU INDICATOR
060611,000141: 07,2700           55474        COARS1             TS       CDUIND                                
060612,000142: 
060613,000143: 07,2701           51474                           INDEX    CDUIND                                #  COMPUTE THETAD - THETAA IN 1:S
060614,000144: 07,2702           31155                           CA       THETAD                                #        COMPLEMENT FORM
060615,000145: 07,2703           00006                           EXTEND                                         
060616,000146: 07,2704           51474                           INDEX    CDUIND                                
060617,000147: 07,2705           20032                           MSU      CDUX                                  
060618,000148: 07,2706           00006                           EXTEND                                         
060619,000149: 07,2707           75003                           MP       BIT13                                 #  SHIFT RIGHT 2
060620,000150: 07,2710           56001                           XCH      L                                     #  ROUND
060621,000151: 07,2711           60000                           DOUBLE                                         
060622,000152: 07,2712           54061                           TS       ITEMP1                                
060623,000153: 07,2713           12715                           TCF      +2                                    
060624,000154: 07,2714           26001                           ADS      L                                     
060625,000155: 
060626,000156: 07,2715           51474                           INDEX    CDUIND                                #  DIFFERENCE TO BE COMPUTED
060627,000157: 07,2716           23471                           LXCH     COMMAND                               
060628,000158: 07,2717           11474                           CCS      CDUIND                                
060629,000159: 07,2720           02700                           TC       COARS1                                
060630,000160: 
060631,000161: 07,2721           35016                           CAF      TWO                                   #  MINIMUM OF 4 MS WAIT
060632,000162: 07,2722           05272                           TC       VARDELAY                              
060633,000163: 

Page 1424

060635,000165: 07,2723           03524        COARS2             TC       CAGETEST                              #  DONT CONTINUE IF CAGED.
060636,000166: 07,2724           54061                           TS       ITEMP1                                #  SETS TO +0.
060637,000167: 07,2725           35016                           CAF      TWO                                   #  SET CDU INDICATOR
060638,000168: 07,2726           55474                 +3        TS       CDUIND                                
060639,000169: 
060640,000170: 07,2727           51474                           INDEX    CDUIND                                
060641,000171: 07,2730           11471                           CCS      COMMAND                               #  NUMBER OF PULSES REQUIRED
060642,000172: 07,2731           02735                           TC       COMPOS                                #  GREATER THAN MAX ALLOWED
060643,000173: 07,2732           02744                           TC       NEXTCDU    +1                         
060644,000174: 07,2733           03002                           TC       COMNEG                                
060645,000175: 07,2734           02744                           TC       NEXTCDU    +1                         
060646,000176: 
060647,000177: 07,2735           63624        COMPOS             AD       -COMMAX                               #  COMMAX = MAX NUMBER OF PULSES ALLOWED
060648,000178: 07,2736           00006                           EXTEND                                         #        MINUS ONE
060649,000179: 07,2737           63012                           BZMF     COMZERO                               
060650,000180: 07,2740           51474                           INDEX    CDUIND                                
060651,000181: 07,2741           55471                           TS       COMMAND                               #  REDUCE COMMAND BY MAX NUMBER OF PULSES
060652,000182: 07,2742           43625                           CS       -COMMAX-                              #        ALLOWED
060653,000183: 
060654,000184: 07,2743           24061        NEXTCDU            INCR     ITEMP1                                
060655,000185: 07,2744           65020                           AD       NEG0                                  
060656,000186: 07,2745           51474                           INDEX    CDUIND                                
060657,000187: 07,2746           54050                           TS       CDUXCMD                               #  SET UP COMMAND REGISTER.
060658,000188: 
060659,000189: 07,2747           11474                           CCS      CDUIND                                
060660,000190: 07,2750           02726                           TC       COARS2     +3                         
060661,000191: 
060662,000192: 07,2751           10061                           CCS      ITEMP1                                #  SEE IF ANY PULSES TO GO OUT.
060663,000193: 07,2752           13016                           TCF      SENDPULS                              
060664,000194: 
060665,000195: 07,2753           05267                           TC       FIXDELAY                              #  WAIT FOR GIMBALS TO SETTLE.
060666,000196: 07,2754           00226                           DEC      150        B-14                       
060667,000197: 
060668,000198: 07,2755           35016                           CAF      TWO                                   #  AT END OF COMMAND, CHECK TO SEE THAT
060669,000199: 07,2756           54061        CHKCORS            TS       ITEMP1                                #  GIMBALS ARE WITHIN 2 DEGREES OF THETAD.
060670,000200: 07,2757           50000                           INDEX    A                                     
060671,000201: 07,2760           30032                           CA       CDUX                                  
060672,000202: 07,2761           00006                           EXTEND                                         
060673,000203: 07,2762           50061                           INDEX    ITEMP1                                
060674,000204: 07,2763           21155                           MSU      THETAD                                
060675,000205: 07,2764           10000                           CCS      A                                     
060676,000206: 07,2765           12773                           TCF      COARSERR                              
060677,000207: 07,2766           12770                           TCF      CORSCHK2                              
060678,000208: 07,2767           12773                           TCF      COARSERR                              
060679,000209: 

Page 1425

060681,000211: 07,2770           10061        CORSCHK2           CCS      ITEMP1                                
060682,000212: 07,2771           12756                           TCF      CHKCORS                               
060683,000213: 07,2772           13514                           TCF      ENDIMU                                #  END OF COARSE ALIGNMENT.
060684,000214: 
060685,000215: 07,2773           63001        COARSERR           AD       COARSTOL                              #  2 DEGREES.
060686,000216: 07,2774           00006                           EXTEND                                         
060687,000217: 07,2775           62770                           BZMF     CORSCHK2                              
060688,000218: 
060689,000219: 07,2776           05650                           TC       ALARM                                 #  COARSE ALIGN ERROR.
060690,000220: 07,2777           00211                           OCT      211                                   
060691,000221: 
060692,000222: 07,3000           13522                           TCF      IMUBAD                                
060693,000223: 
060694,000224: 07,3001           77511        COARSTOL           DEC      -.01111                               #  2 DEGREES SCALED AT HALF-REVOLUTIONS
060695,000225: 
060696,000226: 07,3002           63624        COMNEG             AD       -COMMAX                               
060697,000227: 07,3003           00006                           EXTEND                                         
060698,000228: 07,3004           63012                           BZMF     COMZERO                               
060699,000229: 07,3005           40000                           COM                                            
060700,000230: 07,3006           51474                           INDEX    CDUIND                                
060701,000231: 07,3007           55471                           TS       COMMAND                               
060702,000232: 07,3010           33625                           CA       -COMMAX-                              
060703,000233: 07,3011           02743                           TC       NEXTCDU                               
060704,000234: 
060705,000235: 07,3012           35021        COMZERO            CAF      ZERO                                  
060706,000236: 07,3013           51474                           INDEX    CDUIND                                
060707,000237: 07,3014           57471                           XCH      COMMAND                               
060708,000238: 07,3015           02743                           TC       NEXTCDU                               
060709,000239: 
060710,000240: 07,3016           37707        SENDPULS           CAF      13,14,15                              
060711,000241: 07,3017           00006                           EXTEND                                         
060712,000242: 07,3020           05014                           WOR      CHAN14                                
060713,000243: 07,3021           33626                           CAF      600MS                                 
060714,000244: 07,3022           12722                           TCF      COARS2     -1                         #  THEN TO VARDELAY
060715,000245: 
060716,000246: 07,3023           35012        CA+ECE             CAF      BIT6                                  #  ENABLE ALL THREE ISS CDU ERROR COUNTERS
060717,000247: 07,3024           00006                           EXTEND                                         
060718,000248: 07,3025           05012                           WOR      CHAN12                                
060719,000249: 07,3026           05324                           TC       TASKOVER                              
060720,000250: 

Page 1426

060722,000252: 07,3027           35014        SETCOARS           CAF      BIT4                                  #  BYPASS IF ALREADY IN COARSE ALIGN
060723,000253: 07,3030           00006                           EXTEND                                         
060724,000254: 07,3031           02012                           RAND     CHAN12                                
060725,000255: 07,3032           10000                           CCS      A                                     
060726,000256: 07,3033           00002                           TC       Q                                     
060727,000257: 
060728,000258: 07,3034           45012                           CS       BIT6                                  #  CLEAR ISS ERROR COUNTERS
060729,000259: 07,3035           00006                           EXTEND                                         
060730,000260: 07,3036           03012                           WAND     CHAN12                                
060731,000261: 
060732,000262: 07,3037           45006                           CS       BIT10                                 #  KNOCK DOWN GYRO ACTIVITY
060733,000263: 07,3040           00006                           EXTEND                                         
060734,000264: 07,3041           03014                           WAND     CHAN14                                
060735,000265: 07,3042           45021                           CS       ZERO                                  
060736,000266: 07,3043           54047                           TS       GYROCMD                               
060737,000267: 
060738,000268: 07,3044           35014                           CAF      BIT4                                  #  PUT ISS IN COARSE ALIGN
060739,000269: 07,3045           00006                           EXTEND                                         
060740,000270: 07,3046           05012                           WOR      CHAN12                                
060741,000271: 
060742,000272: 07,3047           41036                           CS       DSPTAB     +11D                       #  TURN ON NO ATT LAMP
060743,000273: 07,3050           73072                           MASK     OCT40010                              
060744,000274: 07,3051           27036                           ADS      DSPTAB     +11D                       
060745,000275: 
060746,000276: 07,3052           41321                           CS       IMODES33                              #  DISABLE DAP AUTO AND HOLD MODES
060747,000277: 07,3053           75012                           MASK     BIT6                                  
060748,000278: 07,3054           27321                           ADS      IMODES33                              
060749,000279: 
060750,000280: 07,3055           41320                           CS       IMODES30                              #  DISABLE IMUFAIL
060751,000281: 07,3056           75014                           MASK     BIT4                                  
060752,000282: 07,3057           27320                           ADS      IMODES30                              
060753,000283: 
060754,000284: 07,3060           45013        RNDREFDR           CS       BIT5                                  #  KNOCK DOWN TRACK FLAG
060755,000285: 07,3061           70075                           MASK     FLAGWRD1                              
060756,000286: 07,3062           54075                           TS       FLAGWRD1                              
060757,000287: 
060758,000288: 07,3063           45001                           CS       BIT15                                 #  KNOCK DOWN DRIFT FLAG
060759,000289: 07,3064           70076                           MASK     FLAGWRD2                              
060760,000290: 07,3065           54076                           TS       FLAGWRD2                              
060761,000291: 
060762,000292: 07,3066           45003                           CS       BIT13                                 #  KNOCK DOWN REFSMMAT FLAG
060763,000293: 07,3067           70077                           MASK     FLAGWRD3                              
060764,000294: 07,3070           54077                           TS       FLAGWRD3                              
060765,000295: 
060766,000296: 07,3071           00002                           TC       Q                                     
060767,000297: 
060768,000298: 07,3072           40010        OCT40010           OCT      40010                                 
060769,000299: 

Page 1427

060771,000301:                                                                                                  #  IMU FINE ALIGN MODE SWITCH.
060772,000302: 
060773,000303: 07,3073           00004        IMUFINE            INHINT                                         
060774,000304: 07,3074           03536                           TC       CAGETSTJ                              #  SEE IF IMU BEING CAGED.
060775,000305: 
060776,000306: 07,3075           45027                           CS       BITS4-5                               #  RESET ZERO AND COARSE
060777,000307: 07,3076           00006                           EXTEND                                         
060778,000308: 07,3077           03012                           WAND     CHAN12                                
060779,000309: 
060780,000310: 07,3100           45012                           CS       BIT6                                  #  INSURE DAP AUTO AND HOLD MODES ENABLED
060781,000311: 07,3101           71321                           MASK     IMODES33                              
060782,000312: 07,3102           55321                           TS       IMODES33                              
060783,000313: 
060784,000314: 07,3103           03151                           TC       NOATTOFF                              
060785,000315: 
060786,000316: 07,3104           35006                           CAF      BIT10                                 #  IMU FAIL WAS INHIBITED DURING THE
060787,000317: 07,3105           05245                           TC       WAITLIST                              #  PRESUMABLY PRECEDING COARSE ALIGN.  LEAVE
060788,000318: 07,3106  E3,1474                                  EBANK=   CDUIND                                
060789,000319: 07,3106           03117 16063                     2CADR    IFAILOK                               #  IT ON FOR THE FIRST 5 SECS OF FINE ALIGN
060790,000320: 
060791,000321: 07,3110           35042                           CAF      2SECS                                 
060792,000322: 07,3111           05245                           TC       WAITLIST                              
060793,000323: 07,3112  E3,1474                                  EBANK=   CDUIND                                
060794,000324: 07,3112           03115 16063                     2CADR    IMUFINED                              
060795,000325: 
060796,000326: 07,3114           12640                           TCF      MODEEXIT                              
060797,000327: 
060798,000328: 07,3115           03524        IMUFINED           TC       CAGETEST                              #  SEE THAT NO ONE HAS CAGED THE IMU.
060799,000329: 07,3116           13514                           TCF      ENDIMU                                
060800,000330: 

Page 1428

060802,000332: 07,3117           03531        IFAILOK            TC       CAGETSTQ                              #  ENABLE IMU FIAL UNLESS IMU BEING CAGED.
060803,000333: 07,3120           15324                           TCF      TASKOVER                              #  IT IS.
060804,000334: 
060805,000335: 07,3121           35014                           CAF      BIT4                                  #  DONT RESET IMU FAIL INHIBIT IF SOMEONE
060806,000336: 07,3122           00006                           EXTEND                                         #  HAS GONE INTO COARSE ALIGN.
060807,000337: 07,3123           02012                           RAND     CHAN12                                
060808,000338: 07,3124           10000                           CCS      A                                     
060809,000339: 07,3125           15324                           TCF      TASKOVER                              
060810,000340: 
060811,000341: 07,3126           41320                           CS       IMODES30                              #  RESET IMUFAIL.
060812,000342: 07,3127           75003                           MASK     BIT13                                 
060813,000343: 07,3130           27320                           ADS      IMODES30                              
060814,000344: 07,3131           45014                           CS       BIT4                                  
060815,000345: 07,3132           71320        PFAILOK2           MASK     IMODES30                              
060816,000346: 07,3133           55320                           TS       IMODES30                              
060817,000347: 07,3134           04740                           TC       IBNKCALL                              #  THE ISS WARNING LIGHT MAY COME ON NOW
060818,000348: 07,3135           14665                           CADR     SETISSW                               #  THAT THE INHIBIT HAS BEEN REMOVED.
060819,000349: 07,3136           15324                           TCF      TASKOVER                              
060820,000350: 
060821,000351: 07,3137           03531        PFAILOK            TC       CAGETSTQ                              #  ENABLE PIP FAIL PROG ALARM.
060822,000352: 07,3140           15324                           TCF      TASKOVER                              
060823,000353: 
060824,000354: 07,3141           41320                           CS       IMODES30                              #  RESET IMU AND PIPA FAIL BITS.
060825,000355: 07,3142           75006                           MASK     BIT10                                 
060826,000356: 07,3143           27320                           ADS      IMODES30                              
060827,000357: 
060828,000358: 07,3144           41321                           CS       IMODES33                              
060829,000359: 07,3145           75003                           MASK     BIT13                                 
060830,000360: 07,3146           27321                           ADS      IMODES33                              
060831,000361: 
060832,000362: 07,3147           45013                           CS       BIT5                                  
060833,000363: 07,3150           13132                           TCF      PFAILOK2                              
060834,000364: 
060835,000365: 07,3151           43072        NOATTOFF           CS       OCT40010                              #  SUBROUTINE TO TURN OFF NO ATT LAMP.
060836,000366: 07,3152           71036                           MASK     DSPTAB     +11D                       
060837,000367: 07,3153           65001                           AD       BIT15                                 
060838,000368: 07,3154           55036                           TS       DSPTAB     +11D                       
060839,000369: 07,3155           00002                           TC       Q                                     
060840,000370: 

Page 1429

060842,000372:                                                                                                  #  ROUITNES TO INITIATE AND TERMINATE PROGRAM USE OF THE PIPAS.  NO IMUSTALL REQUIRED IN EITHER CASE.
060843,000373: 
060844,000374: 07,3156           45021        PIPUSE             CS       ZERO                                  
060845,000375: 07,3157           54037                           TS       PIPAX                                 
060846,000376: 07,3160           54040                           TS       PIPAY                                 
060847,000377: 07,3161           54041                           TS       PIPAZ                                 
060848,000378: 
060849,000379: 07,3162           03531        PIPUSE1            TC       CAGETSTQ                              #  DO NOT ENABLE PIPA FAIL IF IMU IS CAGED
060850,000380: 07,3163           14675                           TCF      SWRETURN                              
060851,000381: 
060852,000382: 07,3164           00004                           INHINT                                         
060853,000383: 07,3165           45017                           CS       BIT1                                  #  IF PIPA FAILS FROM NOW ON (UNTIL
060854,000384: 07,3166           71320                           MASK     IMODES30                              #  PIPFREE), LIGHT ISS WARNING.
060855,000385: 07,3167           55320                           TS       IMODES30                              
060856,000386: 
060857,000387: 07,3170           04740        PIPFREE2           TC       IBNKCALL                              #  ISS WARNING MIGHT COME ON NOW.
060858,000388: 07,3171           14665                           CADR     SETISSW                               #  (OR GO OFF ON PIPFREE).
060859,000389: 
060860,000390: 07,3172           12640                           TCF      MODEEXIT                              
060861,000391: 
060862,000392: 07,3173           00004        PIPFREE            INHINT                                         #  PROGRAM DONE WITH PIPAS.  DONT LIGHT
060863,000393: 07,3174           41320                           CS       IMODES30                              #  ISS WARNING.
060864,000394: 07,3175           75017                           MASK     BIT1                                  
060865,000395: 07,3176           27320                           ADS      IMODES30                              
060866,000396: 
060867,000397: 07,3177           75006                           MASK     BIT10                                 #  IF PIP FAIL ON, DO PROG ALSRM AND RESET
060868,000398: 07,3200           10000                           CCS      A                                     #  ISS WARNING.
060869,000399: 07,3201           12640                           TCF      MODEEXIT                              
060870,000400: 
060871,000401: 07,3202           05650                           TC       ALARM                                 
060872,000402: 07,3203           00212                           OCT      212                                   
060873,000403: 
060874,000404: 07,3204           00004                           INHINT                                         
060875,000405: 
060876,000406: 07,3205           13170                           TCF      PIPFREE2                              
060877,000407: 

Page 1430

060879,000409:                                                                                                  #  THE FOLLOWING ROUTINE TORQUES THE IRIGS ACCORDING TO DOUBLE PRECISION INPUTS IN THE SIX REGISTERS
060880,000410:                                                                                                  #  BEGINNING AT THE ECADR ARRIVING IN A.  THE MINIMUM SIZE OF ANY PULSE TRAIN IS 16 PULSES (.25 CDU COUNTS).  THE
060881,000411:                                                                                                  #  UNSENT PORTION OF THE COMMAND IS LEFT INTACT IN THE INPUT COMMAND REGISTERS.
060882,000412: 
060883,000413: 07,3206  E3,1400                                  EBANK=   1400                                  #  VARIABLE, ACTUALLY.
060884,000414: 
060885,000415: 07,3206           54161        IMUPULSE           TS       MPAC       +5                         #  SAVE ARRIVING ECADR.
060886,000416: 07,3207           03536                           TC       CAGETSTJ                              #  DONT PROCEED IF IMU BEING CAGED.
060887,000417: 
060888,000418: 07,3210           11304                           CCS      LGYRO                                 #  SEE IF GYROS BUSY.
060889,000419: 07,3211           03252                           TC       GYROBUSY                              #  SLEEP.
060890,000420: 
060891,000421: 07,3212           54156                           TS       MPAC       +2                         
060892,000422: 07,3213           35012                           CAF      BIT6                                  #  ENABLE THE POWER SUPPLY.
060893,000423: 07,3214           00006                           EXTEND                                         
060894,000424: 07,3215           05014                           WOR      CHAN14                                
060895,000425: 
060896,000426: 07,3216           35015                           CAF      FOUR                                  
060897,000427: 07,3217           05245        GWAKE2             TC       WAITLIST                              #  (IF A JOB WAS PUT TO SLEEP, THE POWER
060898,000428: 07,3220  E3,1474                                  EBANK=   CDUIND                                #  SUPPLY IS LEFT ON BY THE WAKING JOB).
060899,000429: 07,3220           03270 16063                     2CADR    STRTGYRO                              
060900,000430: 
060901,000431: 07,3222           30161                           CA       MPAC       +5                         #  SET UP EBANK, SAVING CALLER'S EBANK FOR
060902,000432: 07,3223           56003                           XCH      EBANK                                 #  RESTORATION ON RETURN.
060903,000433: 07,3224           56161                           XCH      MPAC       +5                         
060904,000434: 07,3225           55304                           TS       LGYRO                                 #  RESERVES GYROS.
060905,000435: 07,3226           74373                           MASK     LOW8                                  
060906,000436: 07,3227           54061                           TS       ITEMP1                                
060907,000437: 
060908,000438: 07,3230           35016                           CAF      TWO                                   #  FORCE SIGN AGREEMENT ON INPUTS.
060909,000439: 07,3231           54157        GYROAGRE           TS       MPAC       +3                         
060910,000440: 07,3232           60000                           DOUBLE                                         
060911,000441: 07,3233           60061                           AD       ITEMP1                                
060912,000442: 07,3234           54160                           TS       MPAC       +4                         
060913,000443: 07,3235           00006                           EXTEND                                         
060914,000444: 07,3236           50000                           INDEX    A                                     
060915,000445: 07,3237           31401                           DCA      1400                                  
060916,000446: 07,3240           52155                           DXCH     MPAC                                  
060917,000447: 07,3241           07226                           TC       TPAGREE                               
060918,000448: 07,3242           52155                           DXCH     MPAC                                  
060919,000449: 07,3243           50160                           INDEX    MPAC       +4                         
060920,000450: 07,3244           53401                           DXCH     1400                                  
060921,000451: 
060922,000452: 07,3245           10157                           CCS      MPAC       +3                         
060923,000453: 07,3246           13231                           TCF      GYROAGRE                              
060924,000454: 
060925,000455: 07,3247           30161                           CA       MPAC       +5                         #  RESTORE CALLER'S EBANK.
060926,000456: 07,3250           54003                           TS       EBANK                                 
060927,000457: 07,3251           12640                           TCF      MODEEXIT                              
060928,000458: 

Page 1431

060930,000460:                                                                                                  #  ROUTINES TO ALLOW TORQUING BY ONLY ONE JOB AT A TIME.
060931,000461: 
060932,000462: 07,3252           00006        GYROBUSY           EXTEND                                         #  SAVE RETURN 2FCADR.
060933,000463: 07,3253           30134                           DCA      BUF2                                  
060934,000464: 07,3254           52155                           DXCH     MPAC                                  
060935,000465: 07,3255           33267        REGSLEEP           CAF      LGWAKE                                
060936,000466: 07,3256           15175                           TCF      JOBSLEEP                              
060937,000467: 
060938,000468: 07,3257           11304        GWAKE              CCS      LGYRO                                 #  WHEN AWAKENED, SEE IF GYROS STILL BUSY.
060939,000469: 07,3260           13255                           TCF      REGSLEEP                              #  IF SO, SLEEP SOME MORE.
060940,000470: 
060941,000471: 07,3261           54156                           TS       MPAC       +2                         
060942,000472: 07,3262           00006                           EXTEND                                         
060943,000473: 07,3263           30155                           DCA      MPAC                                  
060944,000474: 07,3264           52134                           DXCH     BUF2                                  #  RESTORE SWRETURN INFO.
060945,000475: 07,3265           35017                           CAF      ONE                                   
060946,000476: 07,3266           13217                           TCF      GWAKE2                                
060947,000477: 
060948,000478: 07,3267           17257        LGWAKE             CADR     GWAKE                                 
060949,000479: 

Page 1432

060951,000481:                                                                                                  #  GYRO-TORQUING WAITLIST TASKS.
060952,000482: 
060953,000483: 07,3270           43511        STRTGYRO           CS       GDESELCT                              #  DE-SELECT LAST GYRO.
060954,000484: 07,3271           00006                           EXTEND                                         
060955,000485: 07,3272           03014                           WAND     CHAN14                                
060956,000486: 
060957,000487: 07,3273           03524                           TC       CAGETEST                              
060958,000488: 
060959,000489: 07,3274           31304        STRTGYR2           CA       LGYRO                                 #  JUMP ON PHASE COUNTER IN BITS 13-14.
060960,000490: 07,3275           00006                           EXTEND                                         
060961,000491: 07,3276           75014                           MP       BIT4                                  
060962,000492: 07,3277           50000                           INDEX    A                                     
060963,000493: 07,3300           13301                           TCF      +1                                    
060964,000494: 07,3301           03316                           TC       GSELECT                               #  =0.  DO Y GYRO.
060965,000495: 07,3302           00202                           OCT      00202                                 
060966,000496: 
060967,000497: 07,3303           03316                           TC       GSELECT                               #  =1.  DO Z GYRO.
060968,000498: 07,3304           00302                           OCT      00302                                 
060969,000499: 
060970,000500: 07,3305           03314                           TC       GSELECT    -2                         #  =2.  DO X GYRO.
060971,000501: 07,3306           00100                           OCT      00100                                 
060972,000502: 
060973,000503: 07,3307           35021                           CAF      ZERO                                  #  =3.  DONE
060974,000504: 07,3310           55304                           TS       LGYRO                                 
060975,000505: 07,3311           33267                           CAF      LGWAKE                                #  WAKE A POSSIBLE SLEEPING JOB.
060976,000506: 07,3312           05201                           TC       JOBWAKE                               
060977,000507: 
060978,000508: 07,3313           13115        NORESET            TCF      IMUFINED                              #  DO NOT RESET POWER SUPPLY

Page 1433

060980,000510: 07,3314           45015                 -2        CS       FOUR                                  #  SPECIAL ENTRY TO REGRESS LGYRO FOR X.
060981,000511: 07,3315           27304                           ADS      LGYRO                                 
060982,000512: 
060983,000513: 07,3316           50002        GSELECT            INDEX    Q                                     #  SELECT GYRO.
060984,000514: 07,3317           30000                           CAF      0                                     #  PACKED WORD CONTAINS GYRO SELECT BITS
060985,000515: 07,3320           54064                           TS       ITEMP4                                #  AND INCREMENT TO LGYRO.
060986,000516: 07,3321           75023                           MASK     SEVEN                                 
060987,000517: 07,3322           65003                           AD       BIT13                                 
060988,000518: 07,3323           27304                           ADS      LGYRO                                 
060989,000519: 07,3324           54003                           TS       EBANK                                 
060990,000520: 07,3325           74373                           MASK     LOW8                                  
060991,000521: 07,3326           54061                           TS       ITEMP1                                
060992,000522: 
060993,000523: 07,3327           45023                           CS       SEVEN                                 
060994,000524: 07,3330           70064                           MASK     ITEMP4                                
060995,000525: 07,3331           54064                           TS       ITEMP4                                
060996,000526: 
060997,000527: 07,3332           00006                           EXTEND                                         #  MOVE DP COMMAND TO RUPTREGS FOR TESTING.
060998,000528: 07,3333           50061                           INDEX    ITEMP1                                
060999,000529: 07,3334           31401                           DCA      1400                                  
061000,000530: 07,3335           52071                           DXCH     RUPTREG1                              
061001,000531: 
061002,000532: 07,3336           10070                           CCS      RUPTREG1                              
061003,000533: 07,3337           13352                           TCF      MAJ+                                  
061004,000534: 07,3340           13342                           TCF      +2                                    
061005,000535: 07,3341           13472                           TCF      MAJ-                                  
061006,000536: 
061007,000537: 07,3342           10071                           CCS      RUPTREG2                              
061008,000538: 07,3343           13347                           TCF      MIN+                                  
061009,000539: 07,3344           13274                           TCF      STRTGYR2                              
061010,000540: 07,3345           13467                           TCF      MIN-                                  
061011,000541: 07,3346           13274                           TCF      STRTGYR2                              
061012,000542: 

Page 1434

061014,000544: 07,3347           63403        MIN+               AD       -GYROMIN                              #  SMALL POSITIVE COMMAND.  SEE IF AT LEAST
061015,000545: 07,3350           00006                           EXTEND                                         #  16 GYRO PULSES.
061016,000546: 07,3351           63274                           BZMF     STRTGYR2                              
061017,000547: 
061018,000548: 07,3352           00006        MAJ+               EXTEND                                         #  DEFINITE POSITIVE OUTPUT.
061019,000549: 07,3353           33513                           DCA      GYROFRAC                              
061020,000550: 07,3354           20071                           DAS      RUPTREG1                              
061021,000551: 
061022,000552: 07,3355           30064                           CA       ITEMP4                                #  SELECT POSITIVE TORQUING FOR THIS GYRO.
061023,000553: 07,3356           00006                           EXTEND                                         
061024,000554: 07,3357           05014                           WOR      CHAN14                                
061025,000555: 
061026,000556: 07,3360           36043                           CAF      LOW7                                  #  LEAVE NUMBER OF POSSIBLE 8192 AUGMENTS
061027,000557: 07,3361           70071                           MASK     RUPTREG2                              #  TO INITIAL COMMAND IN MAJOR PART OF LONG
061028,000558: 07,3362           56071                           XCH      RUPTREG2                              #  TERM STORAGE AND TRUNCATED FRACTION
061029,000559: 07,3363           00006        GMERGE             EXTEND                                         #  IN MINOR PART.  THE MAJOR PART WILL BE
061030,000560: 07,3364           75010                           MP       BIT8                                  #  COUNTED DOWN TO ZERO IN THE COURSE OF
061031,000561: 07,3365           54062                           TS       ITEMP2                                #  PUTTING OUT THE ENTIRE COMMAND.
061032,000562: 07,3366           30070                           CA       RUPTREG1                              
061033,000563: 07,3367           00006                           EXTEND                                         
061034,000564: 07,3370           75007                           MP       BIT9                                  
061035,000565: 07,3371           54070                           TS       RUPTREG1                              
061036,000566: 07,3372           30001                           CA       L                                     
061037,000567: 07,3373           00006                           EXTEND                                         
061038,000568: 07,3374           75002                           MP       BIT14                                 
061039,000569: 07,3375           26062                           ADS      ITEMP2                                #  INITIAL COMMAND.
061040,000570: 
061041,000571: 07,3376           00006                           EXTEND                                         #  SEE IF MORE THAN ONE PULSE TRAIN NEEDED
061042,000572: 07,3377           30071                           DCA      RUPTREG1                              #  (MORE THAN 16383 PULSES).
061043,000573: 07,3400           67716                           AD       MINUS1                                
061044,000574: 07,3401           10000                           CCS      A                                     
061045,000575: 07,3402           13426                           TCF      LONGGYRO                              
061046,000576: 07,3403           77601        -GYROMIN           OCT      -176                                  #  MAY BE ADJUSTED TO SPECIFY MINIMUM CMD
061047,000577: 07,3404           13410                           TCF      +4                                    
061048,000578: 
061049,000579: 07,3405           35002                           CAF      BIT14                                 
061050,000580: 07,3406           26062                           ADS      ITEMP2                                
061051,000581: 07,3407           35021                           CAF      ZERO                                  
061052,000582: 
061053,000583: 07,3410           50061                 +4        INDEX    ITEMP1                                
061054,000584: 07,3411           53401                           DXCH     1400                                  

Page 1435

061056,000586: 07,3412           30062                           CA       ITEMP2                                #  ENTIRE COMMAND.
061057,000587: 07,3413           54047        LASTSEG            TS       GYROCMD                               
061058,000588: 07,3414           00006                           EXTEND                                         
061059,000589: 07,3415           75006                           MP       BIT10                                 #  WAITLIST DT
061060,000590: 07,3416           66214                           AD       THREE                                 #  TRUNCATION AND PHASE UNCERTAINTIES.
061061,000591: 07,3417           05245                           TC       WAITLIST                              
061062,000592: 07,3420  E3,1474                                  EBANK=   CDUIND                                
061063,000593: 07,3420           03270 16063                     2CADR    STRTGYRO                              
061064,000594: 
061065,000595: 07,3422           35006        GYROEXIT           CAF      BIT10                                 
061066,000596: 07,3423           00006                           EXTEND                                         
061067,000597: 07,3424           05014                           WOR      CHAN14                                
061068,000598: 07,3425           15324                           TCF      TASKOVER                              
061069,000599: 
061070,000600: 07,3426           50061        LONGGYRO           INDEX    ITEMP1                                
061071,000601: 07,3427           53401                           DXCH     1400                                  #  INITIAL COMMAND OUT PLUS N AUGMENTS OF
061072,000602: 07,3430           35002                           CAF      BIT14                                 #  8192.  INITIAL COMMAND IS AT LEAST 8192.
061073,000603: 07,3431           60062                           AD       ITEMP2                                
061074,000604: 07,3432           54047                           TS       GYROCMD                               
061075,000605: 
061076,000606: 07,3433           00006        AUG3               EXTEND                                         #  GET WAITLIST DT TO TIME WHEN TRAIN IS
061077,000607: 07,3434           75006                           MP       BIT10                                 #  ALMOST OUT.
061078,000608: 07,3435           67714                           AD       NEG3                                  
061079,000609: 07,3436           05245                           TC       WAITLIST                              
061080,000610: 07,3437  E3,1474                                  EBANK=   CDUIND                                
061081,000611: 07,3437           03442 16063                     2CADR    8192AUG                               
061082,000612: 
061083,000613: 07,3441           13422                           TCF      GYROEXIT                              
061084,000614: 
061085,000615: 07,3442           03524        8192AUG            TC       CAGETEST                              
061086,000616: 
061087,000617: 07,3443           35014                           CAF      BIT4                                  
061088,000618: 07,3444           00006                           EXTEND                                         
061089,000619: 07,3445           02012                           RAND     CHAN12                                
061090,000620: 07,3446           10000                           CCS      A                                     
061091,000621: 07,3447           13522                           TCF      IMUBAD                                
061092,000622: 07,3450           31304                           CA       LGYRO                                 #  ADD 8192 PULSES TO GYROCMD
061093,000623: 07,3451           54003                           TS       EBANK                                 
061094,000624: 07,3452           74373                           MASK     LOW8                                  
061095,000625: 07,3453           54061                           TS       ITEMP1                                
061096,000626: 
061097,000627: 07,3454           50061                           INDEX    ITEMP1                                #  SEE IF THIS IS THE LAST AUG.
061098,000628: 07,3455           11400                           CCS      1400                                  
061099,000629: 07,3456           13462                           TCF      AUG2                                  #  MORE TO COME.
061100,000630: 
061101,000631: 07,3457           35002                           CAF      BIT14                                 
061102,000632: 07,3460           26047                           ADS      GYROCMD                               
061103,000633: 07,3461           13414                           TCF      LASTSEG    +1                         
061104,000634: 

Page 1436

061106,000636: 07,3462           50061        AUG2               INDEX    ITEMP1                                
061107,000637: 07,3463           55400                           TS       1400                                  
061108,000638: 07,3464           35002                           CAF      BIT14                                 
061109,000639: 07,3465           26047                           ADS      GYROCMD                               
061110,000640: 07,3466           13433                           TCF      AUG3                                  #  COMPUTE DT.
061111,000641: 

Page 1437

061113,000643: 07,3467           63403        MIN-               AD       -GYROMIN                              #  POSSIBLE NEGATIVE OUTPUT.
061114,000644: 07,3470           00006                           EXTEND                                         
061115,000645: 07,3471           63274                           BZMF     STRTGYR2                              
061116,000646: 
061117,000647: 07,3472           00006        MAJ-               EXTEND                                         #  DEFINITE NEGATIVE OUTPUT.
061118,000648: 07,3473           43513                           DCS      GYROFRAC                              
061119,000649: 07,3474           20071                           DAS      RUPTREG1                              
061120,000650: 
061121,000651: 07,3475           30064                           CA       ITEMP4                                #  SELECT NEGATIVE TORQUING FOR THIS GYRO.
061122,000652: 07,3476           65007                           AD       BIT9                                  
061123,000653: 07,3477           00006                           EXTEND                                         
061124,000654: 07,3500           05014                           WOR      CHAN14                                
061125,000655: 
061126,000656: 07,3501           40070                           CS       RUPTREG1                              #  SET UP RUPTREGS TO FALL INTO GMERGE.
061127,000657: 07,3502           54070                           TS       RUPTREG1                              #  ALL NUMBERS PUT INTO GYROCMD ARE
061128,000658: 07,3503           40071                           CS       RUPTREG2                              #  POSITIVE - BIT9 OF CHAN 14 DETERMINES
061129,000659: 07,3504           76043                           MASK     LOW7                                  #  THE SIGN OF THE COMMAND.
061130,000660: 07,3505           40000                           COM                                            
061131,000661: 07,3506           56071                           XCH      RUPTREG2                              
061132,000662: 07,3507           40000                           COM                                            
061133,000663: 07,3510           13363                           TCF      GMERGE                                
061134,000664: 
061135,000665: 07,3511           01700        GDESELCT           OCT      1700                                  #  TURN OFF SELECT AND ACTIVITY BITS.
061136,000666: 
061137,000667: 07,3512           00000 00034  GYROFRAC           2DEC     .215       B-21                       
061138,000668: 

Page 1438

061140,000670:                                                                                                  #  IMU MODE SWITCHING ROUTINES COME HERE WHEN ACTION COMPLETE.
061141,000671: 
061142,000672: 07,3514           00006        ENDIMU             EXTEND                                         #  MODE IS BAD IF CAGE HAS OCCURED OR IF
061143,000673: 07,3515           00011                           READ     DSALMOUT                              #  ISS WARNING IS ON.
061144,000674: 07,3516           75017                           MASK     BIT1                                  
061145,000675: 07,3517           10000                           CCS      A                                     
061146,000676: 07,3520           13522                           TCF      IMUBAD                                
061147,000677: 
061148,000678: 07,3521           13550        IMUGOOD            TCF      GOODEND                               #  WITH C(A) = 0.
061149,000679: 
061150,000680: 07,3522           35021        IMUBAD             CAF      ZERO                                  
061151,000681: 07,3523           13545                           TCF      BADEND                                
061152,000682: 
061153,000683: 07,3524           35012        CAGETEST           CAF      BIT6                                  #  SUBROUTINE TO TERMINATE IMU MODE
061154,000684: 07,3525           71320                           MASK     IMODES30                              #  SWITCH IF IMU HAS BEEN CAGED.
061155,000685: 07,3526           10000                           CCS      A                                     
061156,000686: 07,3527           13522                           TCF      IMUBAD                                #  DIRECTLY.
061157,000687: 07,3530           00002                           TC       Q                                     #  WITH C(A) = +0.
061158,000688: 
061159,000689: 07,3531           41320        CAGETSTQ           CS       IMODES30                              #  SKIP IF IMU NOT BEING CAGED.
061160,000690: 07,3532           75012                           MASK     BIT6                                  
061161,000691: 07,3533           10000                           CCS      A                                     
061162,000692: 07,3534           24002                           INCR     Q                                     
061163,000693: 07,3535           00002                           TC       Q                                     
061164,000694: 
061165,000695: 07,3536           41320        CAGETSTJ           CS       IMODES30                              #  IF DURING MODE SWITCH INITIALIZATION
061166,000696: 07,3537           75012                           MASK     BIT6                                  #  IT IS FOUND THAT THE IMU IS BEING CAGED,
061167,000697: 07,3540           10000                           CCS      A                                     #  SET IMUCADR TO -0 TO INDICATE OPERATION
061168,000698: 07,3541           00002                           TC       Q                                     #  COMPLETE BUT FAILED.  RETURN IMMEDIATELY
061169,000699: 07,3542           45021                           CS       ZERO                                  #  TO SWRETURN.
061170,000700: 07,3543           55322                           TS       IMUCADR                               
061171,000701: 07,3544           12640                           TCF      MODEEXIT                              
061172,000702: 

Page 1439

061174,000704:                                                                                                  #  GENERALIZED MODE SWITCHING TERMINATION.  ENTER AT GOODEND FOR SUCCESSFUL COMPLETION OF AN I/O OPERATION
061175,000705:                                                                                                  #  OR AT BADEND FOR AN UNSUCCESSFUL ONE.  C(A) OR ARRIVAL =0 FOR IMU, 1 FOR OPTICS.
061176,000706: 
061177,000707: 07,3545           54071        BADEND             TS       RUPTREG2                              #  DEVICE INDEX.
061178,000708: 07,3546           45021                           CS       ZERO                                  #  FOR FAILURE.
061179,000709: 07,3547           13552                           TCF      GOODEND    +2                         
061180,000710: 
061181,000711: 07,3550           54071        GOODEND            TS       RUPTREG2                              
061182,000712: 07,3551           45017                           CS       ONE                                   #  FOR SUCCESS.
061183,000713: 
061184,000714: 07,3552           54072                           TS       RUPTREG3                              
061185,000715: 07,3553           50071                           INDEX    RUPTREG2                              #  SEE IF USING PROGRAM ASLEEP.
061186,000716: 07,3554           11322                           CCS      MODECADR                              
061187,000717: 07,3555           13557                           TCF      +2                                    #  YES - WAKE IT UP.
061188,000718: 07,3556           13567                           TCF      ENDMODE                               #  IF 0, PROGRAM NOT IN YET.
061189,000719: 
061190,000720: 07,3557           35021                           CAF      ZERO                                  #  WAKE SLEEPING PROGRAM.
061191,000721: 07,3560           50071                           INDEX    RUPTREG2                              
061192,000722: 07,3561           57322                           XCH      MODECADR                              
061193,000723: 07,3562           05201                           TC       JOBWAKE                               
061194,000724: 
061195,000725: 07,3563           40072                           CS       RUPTREG3                              #  ADVANCE LOC IF SUCCESSFUL.
061196,000726: 07,3564           50064                           INDEX    LOCCTR                                
061197,000727: 07,3565           26164                           ADS      LOC                                   
061198,000728: 
061199,000729: 07,3566           15324                           TCF      TASKOVER                              
061200,000730: 
061201,000731: 07,3567           30072        ENDMODE            CA       RUPTREG3                              #  -0 INDICATES OPERATION COMPLETE BUT
061202,000732: 07,3570           50071                           INDEX    RUPTREG2                              #  UNSUCCESSFUL - -1 INDICATES COMPLETE AND
061203,000733: 07,3571           55322                           TS       MODECADR                              #  SUCCESSFUL.
061204,000734: 07,3572           15324                           TCF      TASKOVER                              
061205,000735: 

Page 1440

061207,000737:                                                                                                  #  GENERAL STALLING ROUTINE.  USING PROGRAMS COME HERE TO WAIT FOR I/O COMPLETION.
061208,000738: 
061209,000739:                                                                                                  #  PROGRAM DESCRIPTION                           DATE - 21 FEB 1967
061210,000740:                                                                                                  #                                                LOG SECTION IMU MODE SWITCHING
061211,000741:                                                                                                  #  MOD BY - R. MELANSON TO ADD DOCUMENTATION     ASSEMBLY SUNDISK REV. 82
061212,000742: 
061213,000743:                                                                                                  #  FUNCTIONAL DESCRIPTION -
061214,000744:                                                                                                  #        TO DELAY FURTHER EXECUTION OF THE CALLING ROUTINE UNTIL ITS SELECTED
061215,000745:                                                                                                  #        I/O FUNCTION IS COMPLETE.  THE FOLLOWING CHECKS ON THE CALLING ROUTINE:S
061216,000746:                                                                                                  #        MODECADR ARE MADE AND ACTED UPON.
061217,000747:                                                                                                  #        1) +0 INDICATES INCOMPLETE I/O OPERATION.  CALLING ROUTINE IS PUT TO
061218,000748:                                                                                                  #           SLEEP.
061219,000749:                                                                                                  #        2) -1 INDICATES COMPLETED I/O OPERATION.  STALL BYPASSES JOBSLEEP
061220,000750:                                                                                                  #           CALL AND RETURNS TO CALLING ROUTINE AT L+3
061221,000751:                                                                                                  #        3) -0 INDICATES COMPLETED I/O WITH FAILURE.  STALL CLEARS MODECADR
061222,000752:                                                                                                  #           AND RETURNS TO CALLING ROUTINE AT L+2.
061223,000753:                                                                                                  #        4) VALUE GREATER THAN 0 INDICATES TWO ROUTINES CALLING FOR USE OF
061224,000754:                                                                                                  #           SAME DEVICE.  STALL EXITS TO ABORT WHICH EXECUTES A PROGRAM
061225,000755:                                                                                                  #           RESTART WHICH IN TURN CLEARS ALL MODECADR REGISTERS.
061226,000756: 
061227,000757:                                                                                                  #  CALLING SEQUENCE -
061228,000758:                                                                                                  #        L       TC      BANKCALL
061229,000759:                                                                                                  #        L+1     CADR    (ONE OF 5 STALL ADDRESSES  I.E. IMUSTALL, OPTSTALL, RADSTALL,
061230,000760:                                                                                                  #                        AOTSTALL, OR ATTSTALL)
061231,000761: 
061232,000762:                                                                                                  #  NORMAL-EXIT MODE -
061233,000763:                                                                                                  #        TCF JOBSLEEP    OR      TCF MODEXIT
061234,000764: 
061235,000765:                                                                                                  #  ALARM OR ABORT EXIT MODE -
061236,000766:                                                                                                  #        TC      ABORT
061237,000767: 
061238,000768:                                                                                                  #  OUTPUT -
061239,000769:                                                                                                  #        MODECADR=CADR   IF JOBSLEEP
061240,000770:                                                                                                  #        MODECADR=+0     IF I/O COMPLETE
061241,000771:                                                                                                  #        BUF2=L+3        IF I/O COMPLETE AND GOOD.
061242,000772:                                                                                                  #        BUF2=L+2        IF I/O COMPLETE BUT FAILED.
061243,000773: 
061244,000774:                                                                                                  #  ERASABLE INITIALIZATION -
061245,000775:                                                                                                  #        BUF2 CONTAINS RETURN ADDRESS PLUS 1,(L+2)
061246,000776:                                                                                                  #        BUF2+1 CONTAINS FBANK VALUE OF CALLING ROUTINE.
061247,000777:                                                                                                  #        MODECADR OF CALLING ROUTINE CONTAINS +0,-1,-0 OR CADR RETURN ADDRESS.
061248,000778: 
061249,000779:                                                                                                  #  DEBRIS -
061250,000780:                                                                                                  #        RUPTREG2 AND CALLING ROUTINE MODECADR.
061251,000781: 
061252,000782: 07,3573           35017        AOTSTALL           CAF      ONE                                   #  AOT.
061253,000783: 07,3574           03600                           TC       STALL                                 
061254,000784: 
061255,000785: 07,3575           35016        RADSTALL           CAF      TWO                                   
061256,000786: 07,3576           13600                           TCF      STALL                                 
061257,000787: 

Page 1441

061259,000789: 07,3577  07,3573               OPTSTALL           EQUALS   AOTSTALL                              
061260,000790: 
061261,000791: 07,3577           35021        IMUSTALL           CAF      ZERO                                  #  IMU.
061262,000792: 
061263,000793: 07,3600           00004        STALL              INHINT                                         
061264,000794: 07,3601           54071                           TS       RUPTREG2                              #  SAVE DEVICE INDEX.
061265,000795: 07,3602           50000                           INDEX    A                                     #  SEE IF OPERATION COMPLETE.
061266,000796: 07,3603           11322                           CCS      MODECADR                              
061267,000797: 07,3604           13622                           TCF      MODABORT                              #  ALLOWABLE STATES ARE +0, -1, AND -0.
061268,000798: 07,3605           13616                           TCF      MODESLP                               #  OPERATION INCOMPLETE.
061269,000799: 07,3606           13612                           TCF      MODEGOOD                              #  COMPLETE AND GOOD IF = -1.
061270,000800: 
061271,000801: 07,3607           50071        MG2                INDEX    RUPTREG2                              #  COMPLETE AND FAILED IF -0.  RESET TO +0.
061272,000802: 07,3610           55322                           TS       MODECADR                              #  RETURN TO CALLER.
061273,000803: 07,3611           12640                           TCF      MODEEXIT                              
061274,000804: 
061275,000805: 07,3612           10000        MODEGOOD           CCS      A                                     #  MAKE SURE INITIAL STATE -1.
061276,000806: 07,3613           13622                           TCF      MODABORT                              
061277,000807: 
061278,000808: 07,3614           24133                           INCR     BUF2                                  #  IF SO, INCREMENT RETURN ADDRESS AND
061279,000809: 07,3615           13607                           TCF      MG2                                   #  RETURN IMMEDIATELY, SETTING CADR = +0.
061280,000810: 
061281,000811: 07,3616           04711        MODESLP            TC       MAKECADR                              #  CALL FROM SWITCHABLE FIXED ONLY.
061282,000812: 07,3617           50071                           INDEX    RUPTREG2                              
061283,000813: 07,3620           55322                           TS       MODECADR                              
061284,000814: 07,3621           15175                           TCF      JOBSLEEP                              
061285,000815: 
061286,000816: 07,3622           05721        MODABORT           TC       POODOO                                #  TWO PROGRAMS USING SAME DEVICE.
061287,000817: 07,3623           01210                           OCT      1210                                  
061288,000818: 

Page 1442

061290,000820:                                                                                                  #  CONSTANTS FOR MODE SWITCHING ROUTINES
061291,000821: 
061292,000822: 07,3624     5771               BITS3&4            =        OCT14                                 
061293,000823: 07,3624     5033               BITS4&6            =        OCT50                                 
061294,000824: 07,3624     5027               BITS4-5            EQUALS   BITS4&5                               
061295,000825: 07,3624     5010               IMUSEFLG           EQUALS   BIT8                                  #  INTERPRETER SWITCH 7.
061296,000826: 07,3624           77500        -COMMAX            DEC      -191       B-14                       
061297,000827: 07,3625           77477        -COMMAX-           DEC      -192       B-14                       
061298,000828: 07,3626           00074        600MS              DEC      60         B-14                       
061299,000829: 07,3627  07,3073               IMUFIN20           =        IMUFINE                               
061300,000830: 07,3627           31325        GOMANUR            CA       ATTCADR                               #  IS KALCMANU FREE
061301,000831: 07,3630           00006                           EXTEND                                         
061302,000832: 07,3631           13634                           BZF      +3                                    
061303,000833: 07,3632           05721                           TC       POODOO                                #  NO
061304,000834: 07,3633           01210                           OCT      1210                                  #  2 TRYING TO USE SAME DEVICE
061305,000835: 
061306,000836: 07,3634           00006                 +3        EXTEND                                         
061307,000837: 07,3635           30134                           DCA      BUF2                                  
061308,000838: 07,3636           53326                           DXCH     ATTCADR                               #  SAVE FINAL RETURN FOR KALCMAN3
061309,000839: 
061310,000840: 07,3637           30006                           CA       BBANK                                 
061311,000841: 07,3640           75023                           MASK     SEVEN                                 
061312,000842: 07,3641           27326                           ADS      ATTCADR    +1                         
061313,000843: 
061314,000844: 07,3642           30167                           CA       PRIORITY                              
061315,000845: 07,3643           77674                           MASK     PRIO37                                
061316,000846: 07,3644           55327                           TS       ATTPRIO                               #  SAVE USERS PRIO
061317,000847: 
061318,000848: 07,3645           33651                           CAF      KALEBCON                              #  SET EBANK FOR KALCMAN3
061319,000849: 07,3646           54003                           TS       EBANK                                 
061320,000850: 07,3647           04701                           TC       POSTJUMP                              
061321,000851: 07,3650           44000                           CADR     KALCMAN3                              
061322,000852: 07,3651           03261        KALEBCON           ECADR    BCDU                                  
061323,000853: 

Page 1443

061325,000855:                                                                                                  #  PROGRAM DESCRIPTION
061326,000856:                                                                                                  #  IMU STATUS CHECK ROUTINE R02 (SUBROUTINE UTILITY)
061327,000857:                                                                                                  #  MOD NO - 1
061328,000858:                                                                                                  #  MOD BY - N.BRODEUR
061329,000859: 
061330,000860:                                                                                                  #  FUNCTIONAL DESCRIPTION
061331,000861:                                                                                                  #        TO CHECK WHETHER IMU IS ON AND IF ON WHETHER IT IS ALIGNED TO AN
061332,000862:                                                                                                  #        ORIENTATION KNOWN BY THE CMC.  TO REQUEST SELECTION OF THE APPROPRIATE
061333,000863:                                                                                                  #        PROGRAM IF THE IMU IS OFF OR NOT ALIGNED TO AN ORIENTATION KNOWN BY THE
061334,000864:                                                                                                  #        CMC.  CALLED THROUGH BANKCALL
061335,000865: 
061336,000866:                                                                                                  #  CALLING SEQUENCE -
061337,000867:                                                                                                  #        L       TC      BANKCALL
061338,000868:                                                                                                  #        L+1     CADR    R02BOTH
061339,000869: 
061340,000870:                                                                                                  #  SUBROUTINES CALLED
061341,000871:                                                                                                  #        VARALARM
061342,000872:                                                                                                  #        FLAGUP
061343,000873: 
061344,000874:                                                                                                  #  NORMAL EXIT MODES
061345,000875:                                                                                                  #        AT L+2 OF CALLING SEQUENCE
061346,000876: 
061347,000877:                                                                                                  #  ALARM OR ABORT EXIT MODES
061348,000878:                                                                                                  #        GOTOPOOH, WITH ALARM
061349,000879: 
061350,000880:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED
061351,000881:                                                                                                  #        NONE
061352,000882: 
061353,000883:                                                                                                  #  DEBRIS
061354,000884:                                                                                                  #        CENTRALS - A,Q,L
061355,000885: 
061356,000886: 34,3763                                           BANK     34                                    
061357,000887: 07,2000                                           SETLOC   R02                                   
061358,000888: 07,2000                                           BANK                                           
061359,000889: 07,3652                                           COUNT    04/R02                                #  COUNT*
061360,000890: 
061361,000891: 07,3652           00063        DEC51              DEC      51         B-14                       
061362,000892: 07,3653           35003        R02BOTH            CAF      BIT13                                 
061363,000893: 07,3654           70077                           MASK     STATE      +3                         #  REFSMFLG
061364,000894: 07,3655           10000                           CCS      A                                     
061365,000895: 07,3656           03667                           TC       R02ZERO                               #  ZERO IMUS
061366,000896: 
061367,000897: 07,3657           31320                           CA       IMODES30                              
061368,000898: 07,3660           75007                           MASK     BIT9                                  #  IS ISS INITIALIZED
061369,000899: 07,3661           00006                           EXTEND                                         
061370,000900: 07,3662           13664                           BZF      +2                                    
061371,000901: 07,3663           45014                           CS       BIT4                                  #  SEND IMU ALARM CODE 210
061372,000902: 07,3664           63672                           AD       OCT220                                #  SEND REFSMM ALARM
061373,000903: 07,3665           05764                           TC       VARALARM                              
061374,000904: 
061375,000905: 07,3666           04106                           TC       GOTOPOOH                              
061376,000906: 

Page 1444

061378,000908: 07,3667           05546        R02ZERO            TC       UPFLAG                                
061379,000909: 07,3670           00007                           ADRES    IMUSE                                 
061380,000910: 07,3671           14675                           TCF      SWRETURN                              
061381,000911: 07,3672           00220        OCT220             OCT      220                                   
061382,000912: 

Page 1445

061384,000914:                                                                                                  #  PROGRAM DESCRIPTION   P06             10FEB67
061385,000915: 
061386,000916:                                                                                                  #  TRANSFER THE ISS/CMC FROM THE OPERATE TO THE STANDBY CONDITION.
061387,000917: 
061388,000918:                                                                                                  #  THE NORMAL CONDITION OF READINESS OF THE GNCS WHEN NOT IN USE IS STANDBY.  IN THIS CONDITION THE IMU
061389,000919:                                                                                                  #  HEATER POWER IS ON.  THE IMU OPERATE POWER IS OFF.  THE COMPUTER POWER IS ON.  THE OPTICS POWER IS OFF.  THE
061390,000920:                                                                                                  #  CMC STANDBY ON THE MAIN AND LEB DISKYS IS ON.
061391,000921: 
061392,000922:                                                                                                  #  CALLING SEQUENCE:
061393,000923:                                                                                                  #        ASTRONAUT REQUEST THROUGH DSKY  V37E 06E.
061394,000924: 
061395,000925:                                                                                                  #  SUBROUTINES CALLED:
061396,000926:                                                                                                  #        GOPERF1
061397,000927:                                                                                                  #        BANKCALL
061398,000928:                                                                                                  #        FLAGDOWN
061399,000929: 

Page 1446

061401,000931:                                                                                                  #  PRESTAND PREPARES FOR STANDBY BY SNAPSHOTTING THE SCALER AND TIME1 TIME2
061402,000932:                                                                                                  #  THE LOW 5 BITS OF THE SCALER ARE INSPECTED TO INSURE COMPATABILITY
061403,000933:                                                                                                  #  BETWEEN THE SCALER READING AND THE TIME1 TIME2 READING.
061404,000934: 
061405,000935: 26,2000                                           SETLOC   P05P06                                
061406,000936: 26,2000                                           BANK                                           
061407,000937: 
061408,000938: 26,3660     1150                                  EBANK=   TIME2SAV                              
061409,000939: 26,3660                                           COUNT*   $$/P06                                
061410,000940: 
061411,000941: 26,3660           05546        P06                TC       UPFLAG                                #  SET NODOV37 BIT
061412,000942: 26,3661           00054                           ADRES    NODOFLAG                              
061413,000943: 
061414,000944: 26,3662           00004        PRESTAND           INHINT                                         
061415,000945: 26,3663           00006                           EXTEND                                         
061416,000946: 26,3664           30025                           DCA      TIME2                                 #  SNAPSHOT TIME1 TIME2
061417,000947: 26,3665           53151                           DXCH     TIME2SAV                              
061418,000948: 26,3666           03717                           TC       SCALPREP                              
061419,000949: 26,3667           03662                           TC       PRESTAND                              #  T1,T2,SCALER NOT COMPATIBLE
061420,000950: 26,3670           52155                           DXCH     MPAC                                  #  T1,T2 AND SCALER OK
061421,000951: 26,3671           53153                           DXCH     SCALSAVE                              #  STORE SCALER
061422,000952: 26,3672           00004                           INHINT                                         
061423,000953: 26,3673           04662                           TC       BANKCALL                              
061424,000954: 26,3674           17060                           CADR     RNDREFDR                              #  REFSMM, DRIFT, TRACK FLAGS DOWN
061425,000955: 
061426,000956: 26,3675           05560                           TC       DOWNFLAG                              
061427,000957: 26,3676           00007                           ADRES    IMUSE                                 #  IMUSE DOWN
061428,000958: 26,3677           05560                           TC       DOWNFLAG                              
061429,000959: 26,3700           00010                           ADRES    RNDVZFLG                              #  RNDVZFLG DOWN
061430,000960: 
061431,000961: 26,3701           35005                           CAF      BIT11                                 
061432,000962: 26,3702           00006                           EXTEND                                         
061433,000963: 26,3703           05013                           WOR      CHAN13                                #  SET STANDBY ENABLE BIT
061434,000964: 
061435,000965: 26,3704           05412                           TC       PHASCHNG                              #  SET RESTART TO POSTAND WHEN STANDBY
061436,000966: 26,3705           07024                           OCT      07024                                 #        RECOVERS
061437,000967: 26,3706           20000                           OCT      20000                                 
061438,000968: 26,3707     1152                                  EBANK=   SCALSAVE                              
061439,000969: 26,3707           03737 54062                     2CADR    POSTAND                               
061440,000970: 
061441,000971: 26,3711           35036                           CAF      OCT62                                 
061442,000972: 26,3712           04662                           TC       BANKCALL                              
061443,000973: 26,3713           21045                           CADR     GOPERF1                               
061444,000974: 26,3714           13711                           TCF      -3                                    
061445,000975: 26,3715           13711                           TCF      -4                                    
061446,000976: 26,3716           13711                           TCF      -5                                    
061447,000977: 
061448,000978: 26,3717     5036               OCT62              EQUALS   .5SEC                                 #  DEC 50 = OCT 62
061449,000979: 
061450,000980:                                                                                                  #  THE LOW 5 BITS OF THE SCALER READS 10000 FOR THE FIRST INTERVAL AFTER A

Page 1447

061452,000982:                                                                                                  #  T1 INCREMENT.  IF SCALPREP DETECTS THIS INTERVAL THE T1,T2 AND SCALER
061453,000983:                                                                                                  #  DATA ARE NOT COMPATABLE AND RETURN IS TO L+1 FOR ANOTHER READING OF THE
061454,000984:                                                                                                  #  DATA.  OTHERWISE, THE RETURN IS TO L+2 TO PROCEED.  ROUTINE ALSO PREPARES
061455,000985:                                                                                                  #  THE SCALER READING FOR COMPUTATION OF THE INCREMENT TO UPDATE T1T2.  (THE
061456,000986:                                                                                                  #  10 MS BIT (BIT 6) OF THE SCALER IS INCREMENTED 5 MS OUT OF PHASE FROM
061457,000987:                                                                                                  #  T1.) ADDITION OF 5 MS (BIT 5) TO THE SCALER READING HAS THE EFFECT OF
061458,000988:                                                                                                  #  ADJUSTING BIT 6 IN THE SCALER TO BE IN PHASE WITH BIT 1 OF T1.  THE LOW 5
061459,000989:                                                                                                  #  BITS OF THE SCALER READING ARE THEN SET TO ZERO, TO TRUNCATE THE SCALER
061460,000990:                                                                                                  #  DATA TO 10 MS.  RESULTS ARE STORED IN MPAC, +1.
061461,000991: 
061462,000992: 26,3717           00006        SCALPREP           EXTEND                                         
061463,000993: 26,3720           22156                           QXCH     MPAC       +2                         
061464,000994: 26,3721           04554                           TC       FINETIME   +1                         
061465,000995: 26,3722           00003                           RELINT                                         
061466,000996: 26,3723           52155                           DXCH     MPAC                                  
061467,000997: 26,3724           35013                           CA       BIT5                                  #  ADD 5 MS TO THE SCALER READING.
061468,000998: 26,3725           54001                           TS       L                                     
061469,000999: 26,3726           35021                           CA       ZERO                                  
061470,001000: 26,3727           20155                           DAS      MPAC                                  
061471,001001: 26,3730           44362                           CS       LOW5                                  #  SET LOW 5 BITS OF (SCALER+5MS) TO ZERO
061472,001002: 26,3731           70155                           MASK     MPAC       +1                         #  AND STORE RESULTS IN MPAC,+1.
061473,001003: 26,3732           56155                           XCH      MPAC       +1                         
061474,001004: 26,3733           74362                           MASK     LOW5                                  #  TEST LOW 5 BITS OF SCALER FOR THE FIRST
061475,001005:                                                                                                  #  INTERVAL AFTER THE T1 INCREMENT
061476,001006:                                                                                                  #  (NOW = 00000, SINCE BIT 5 ADDED).
061477,001007: 26,3734           10000                           CCS      A                                     #  IS IT 1ST INTERVAL AFTER T1 INCREMENT
061478,001008: 26,3735           24156                           INCR     MPAC       +2                         #  NO
061479,001009: 26,3736           00156                           TC       MPAC       +2                         #  YES
061480,001010: 
061481,001011:                                                                                                  #  POSTAND RECOVERS TIME AFTER STANDBY.  THE SCALER IS SNAPSHOTTED AND THE
061482,001012:                                                                                                  #  TIME1 TIME2 COUNTER IS SET TO ZERO.  THE LOW 5 BITS OF THE SCALER ARE
061483,001013:                                                                                                  #  INSPECTED TO INSURE COMPATABILITY BETWEEN THE SCALER READING AND THE
061484,001014:                                                                                                  #  CLEARING OF THE TIME COUNTER.  IT THEN COMPUTES THE DIFFERENCE IN SCALER
061485,001015:                                                                                                  #  VALUES (IN DP) AND ADDS THIS TO THE PREVIOUSLY SNAPSHOTTED VALUES OF
061486,001016:                                                                                                  #  TIME1 TIME2 AND PLACES THIS NEW TIME INTO THE TIME1 TIME2 COUNTER.
061487,001017: 
061488,001018: 26,3737                                           COUNT*   $$/P05                                
061489,001019: 
061490,001020: 26,3737           45005        POSTAND            CS       BIT11                                 #  RECOVER TIME AFTER STANDBY.
061491,001021: 26,3740           00006                           EXTEND                                         
061492,001022: 26,3741           03013                           WAND     CHAN13                                #  CLEAR STANDBY ENABLE BIT
061493,001023: 26,3742           00004                           INHINT                                         
061494,001024: 26,3743           35021                           CA       ZERO                                  
061495,001025: 26,3744           54001                           TS       L                                     
061496,001026: 26,3745           52025                           DXCH     TIME2                                 #  CLEAR TIME1 TIME2
061497,001027: 26,3746           03717                           TC       SCALPREP                              #  STORE SCALER IN MPAC, MPAC+1
061498,001028: 26,3747           03742                           TC       POSTAND    +3                         #  T1,T2,SCALER NOT COMPATIBLE
061499,001029: 26,3750           00006                           EXTEND                                         #  T1,T2 AND SCALER OK
061500,001030: 26,3751           41153                           DCS      SCALSAVE                              
061501,001031: 26,3752           20155                           DAS      MPAC                                  #  FORM DP DIFFERENCE OF POSTSTANDBY SCALER

Page 1448

061503,001033: 26,3753           35006                           CAF      BIT10                                 #  MINUS PRESTANDBY SCALER AND SHIFT RIGHT
061504,001034: 26,3754           07256                           TC       SHORTMP                               #  5 TO ALIGN BITS WITH TIME1 TIME2.
061505,001035: 26,3755           35021                           CAF      ZERO                                  
061506,001036: 26,3756           54156                           TS       MPAC       +2                         #  NEEDED FOR TP AGREE
061507,001037: 26,3757           07226                           TC       TPAGREE                               #  MAKE DP DIFF AGREE
061508,001038: 26,3760           10154                           CCS      MPAC                                  
061509,001039: 26,3761           03766                           TC       POSTCOM                               #  IF DP DIFF NET +, NO SCALER OVERFLOW
061510,001040: 26,3762           03766                           TC       POSTCOM                               #  BETWEEN PRE AND POST STANDBY.
061511,001041: 26,3763           03764                           TC       +1                                    #  IF DP DIFF NET -, SCALER OVERFLOWED.  ADD
061512,001042: 26,3764           35006                           CAF      BIT10                                 #  BIT 10 TO HIGH DIFF TO CORRECT.
061513,001043: 26,3765           26154                           ADS      MPAC                                  
061514,001044: 26,3766           00006        POSTCOM            EXTEND                                         #  C(MPAC,+1) IS MAGNITUDE OF DELTA SCALER.
061515,001045: 26,3767           31151                           DCA      TIME2SAV                              #  PRESTANDBY TIME1 TIME2
061516,001046: 26,3770           20155                           DAS      MPAC                                  
061517,001047: 26,3771           07226                           TC       TPAGREE                               #  FORCE SIGN AGREEMENT
061518,001048: 26,3772           52155                           DXCH     MPAC                                  #  UPDATED VALUE FOR T1,T2.
061519,001049: 26,3773           20025                           DAS      TIME2                                 #  LOAD UPDATED VALUE INTO T1,T2, WITH
061520,001050: 26,3774           05560                           TC       DOWNFLAG                              #  CLEAR NODOFLAG
061521,001051: 26,3775           00054                           ADRES    NODOFLAG                              
061522,001052: 
061523,001053: 26,3776           04106                           TC       GOTOPOOH                              
061524,001054: 
061525,001055: 
061526,001056: 

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