Source Code

This is a reconstruction of the AGC program Luminary 99 Rev 0. It was the third release of the Lunar Module flight software targeted for use in Apollo 11, after Luminary 96 and 97. A bug (which had been around since at least Apollo 10, Luminary 69) was discovered in Rev 0 shortly before the Apollo 11 flight, resulting in a last minute revision into Rev 1, which is what actually flew rather than the Rev 0 presented here. A hardcopy of Rev 0 is known to exist — it belonged to AGC developer Allan Klumpp for many years — but unfortunately the Virtual AGC Project has not had access to that hardcopy. Thus the code you see here had been reconstructed (we believe accurately) rather than transcribed. The first step of the reconstruction of the Rev 0 source code was the transcription of the Rev 1 source code from a hardcopy in the MIT Museum collection. The process of reverting the active portion of the source code (i.e., other than program comments) from Rev 1 to Rev 0 was very minor, consisting only of moving the position of the STARTSB1 label in FRESH START AND RESTART. Allan had previously given us the checksums of the memory banks of Rev 0, and we have verified the program presented here has checksums identical to all banks of Allan's listing of Rev 0. The notations on Allan's Rev 0 program listing read, in part:

	GAP:  ASSEMBLE REVISION 099 OF AGC PROGRAM LUMINARY BY NASA 2021112-051

A single program comment is known to differ between Rev 0 and Rev 1, but these are harder to reconstruct and verify than changes to the active portion of the code. Thus it is possible that there are additional differences between the program comments in Rev 0 and Rev 1 that are unknown to us, and therefore are not reflected in the code presented here.

057346,000002:                                                                                                  ## Copyright:   Public domain.
057347,000003:                                                                                                  ## Filename:    IMU_MODE_SWITCHING_ROUTINES.agc
057348,000004:                                                                                                  ## Purpose:     Part of the reconstructed source code for LMY99 Rev 0,
057349,000005:                                                                                                  ##              otherwise known as Luminary Rev 99, the third release
057350,000006:                                                                                                  ##              of the Apollo Guidance Computer (AGC) software for Apollo 11.
057351,000007:                                                                                                  ##              It differs from LMY99 Rev 1 (the flown version) only in the
057352,000008:                                                                                                  ##              placement of a single label. The corrections shown here have
057353,000009:                                                                                                  ##              been verified to have the same bank checksums as AGC developer
057354,000010:                                                                                                  ##              Allan Klumpp's copy of Luminary Rev 99, and so are believed
057355,000011:                                                                                                  ##              to be accurate. This file is intended to be a faithful 
057356,000012:                                                                                                  ##              recreation, except that the code format has been changed to 
057357,000013:                                                                                                  ##              conform to the requirements of the yaYUL assembler rather than 
057358,000014:                                                                                                  ##              the original YUL assembler.
057359,000015:                                                                                                  ##
057360,000016:                                                                                                  ## Assembler:   yaYUL
057361,000017:                                                                                                  ## Contact:     Onno Hommes <ohommes@cmu.edu>.
057362,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo.
057363,000019:                                                                                                  ## Pages:       1309-1337
057364,000020:                                                                                                  ## Mod history: 2009-05-28 OH   Transcribed from page images.
057365,000021:                                                                                                  ##              2009-06-05 RSB  Fixed a typo.
057366,000022:                                                                                                  ##              2011-01-06 JL   Fixed pseudo-label indentation.
057367,000023:                                                                                                  ##              2011-05-08 JL   Removed workaround. Flagged SBANK= 
057368,000024:                                                                                                  ##                              workaround for future removal.
057369,000025:                                                                                                  ##              2016-12-13 RSB  GOTOP00H -> GOTOPOOH
057370,000026:                                                                                                  ##              2016-12-18 RSB  Proofed text comments with octopus/ProoferComments
057371,000027:                                                                                                  ##                              and corrected the errors found.
057372,000028:                                                                                                  ##              2017-01-18 RRB  Found typo while updating for Luminary 69.
057373,000029:                                                                                                  ##              2017-01-28 RSB  Comment-text fixes identified for Luminary 69.
057374,000030:                                                                                                  ##              2017-03-13 RSB  Comment-text fixes noted in proofing Luminary 116.
057375,000031:                                                                                                  ##              2017-03-15 RSB  Comment-text fixes identified in 6-way
057376,000032:                                                                                                  ##                              side-by-side diff of Sunburst 120 and Luminary 
057377,000033:                                                                                                  ##                              69/99/116/131/210.
057378,000034:                                                                                                  ##              2017-06-17 MAS  Globally removed all SBANK= workarounds.
057379,000035:                                                                                                  ##              2017-08-01 MAS  Created from LMY99 Rev 1.
057380,000036: 
057381,000037:                                                                                                  ## This source code has been transcribed or otherwise adapted from
057382,000038:                                                                                                  ## digitized images of a hardcopy from the MIT Museum.  The digitization
057383,000039:                                                                                                  ## was performed by Paul Fjeld, and arranged for by Deborah Douglas of
057384,000040:                                                                                                  ## the Museum.  Many thanks to both.  The images (with suitable reduction
057385,000041:                                                                                                  ## in storage size and consequent reduction in image quality as well) are
057386,000042:                                                                                                  ## available online at www.ibiblio.org/apollo.  If for some reason you
057387,000043:                                                                                                  ## find that the images are illegible, contact me at info@sandroid.org
057388,000044:                                                                                                  ## about getting access to the (much) higher-quality images which Paul
057389,000045:                                                                                                  ## actually created.
057390,000046:                                                                                                  ##
057391,000047:                                                                                                  ## The code has been modified to match LMY99 Revision 0, otherwise
057392,000048:                                                                                                  ## known as Luminary Revision 99, the Apollo 11 software release preceeding
057393,000049:                                                                                                  ## the listing from which it was transcribed. It has been verified to
057394,000050:                                                                                                  ## contain the same bank checksums as AGC developer Allan Klumpp's listing
057395,000051:                                                                                                  ## of Luminary Revision 99 (for which we do not have scans).
057396,000052:                                                                                                  ##
057397,000053:                                                                                                  ## Notations on Allan Klumpp's listing read, in part:
057398,000054:                                                                                                  ##
057399,000055:                                                                                                  ##      ASSEMBLE REVISION 099 OF AGC PROGRAM LUMINARY BY NASA 2021112-51
057400,000056: 

Page 1309

057402,000058:    5457                                           BLOCK    02                                    
057403,000059:    4000                                           SETLOC   FFTAG3                                
057404,000060:    4000                                           BANK                                           
057405,000061: 
057406,000062:    5457  E3,1471                                  EBANK=   COMMAND                               
057407,000063: 
057408,000064:                                                                                                  #  FIXED-FIXED ROUTINES.
057409,000065: 
057410,000066:    5457                                           COUNT*   $$/IMODE                              
057411,000067:    5457           34755        ZEROICDU           CAF      ZERO                                  #  ZERO ICDU COUNTERS.
057412,000068:    5460           54032                           TS       CDUX                                  
057413,000069:    5461           54033                           TS       CDUY                                  
057414,000070:    5462           54034                           TS       CDUZ                                  
057415,000071:    5463           00002                           TC       Q                                     
057416,000072: 
057417,000073:    5464     4743               SPSCODE            =        BIT9                                  
057418,000074: 

Page 1310

057420,000076:                                                                                                  #  IMU ZEROING ROUTINE.
057421,000077: 
057422,000078: 11,3776                                           BANK     11                                    
057423,000079: 07,2000                                           SETLOC   MODESW                                
057424,000080: 07,2000                                           BANK                                           
057425,000081: 
057426,000082: 07,2714                                           COUNT*   $$/IMODE                              
057427,000083: 07,2714           00004        IMUZERO            INHINT                                         #  ROUTINE TO ZERO ICDUS.
057428,000084: 07,2715           41036                           CS       DSPTAB     +11D                       #  DONT ZERO CDUS IF IMU IN GIMBAL LOCK AND
057429,000085: 07,2716           74771                           MASK     BITS4&6                               #  COARSE ALIGN (GIMBAL RUNAWAY PROTECTION)
057430,000086: 07,2717           10000                           CCS      A                                     
057431,000087: 07,2720           12724                           TCF      IMUZEROA                              
057432,000088: 
057433,000089: 07,2721           05567                           TC       ALARM                                 #  IF SO.
057434,000090: 07,2722           00206                           OCT      00206                                 
057435,000091: 
057436,000092: 07,2723           13657                           TCF      CAGETSTJ   +4                         #  IMMEDIATE FAILURE.
057437,000093: 
057438,000094: 07,2724           03653        IMUZEROA           TC       CAGETSTJ                              
057439,000095:                                                                                                  #  DELETE
057440,000096: 07,2725           41303                           CS       IMODES33                              #  DISABLE DAP AUTO AND HOLD MODES
057441,000097: 07,2726           74773                           MASK     SUPER011                              #        BIT5 FOR GROUND
057442,000098: 07,2727           27303                           ADS      IMODES33                              
057443,000099: 
057444,000100: 07,2730           41302                           CS       IMODES30                              #  INHIBIT ICDUFAIL AND IMUFAIL (IN CASE WE
057445,000101: 07,2731           75751                           MASK     BITS3&4                               #  JUST CAME OUT OF COARSE ALIGN).
057446,000102: 07,2732           27302                           ADS      IMODES30                              
057447,000103: 
057448,000104: 07,2733           44771                           CS       BITS4&6                               #  SEND ZERO ENCODE WITH COARSE AND ERROR
057449,000105: 07,2734           00006                           EXTEND                                         #  COUNTER DISABLED.
057450,000106: 07,2735           03012                           WAND     CHAN12                                
057451,000107: 
057452,000108: 07,2736           03266                           TC       NOATTOFF                              #  TURN OFF NO ATT LAMP.
057453,000109: 
057454,000110: 07,2737           34747                           CAF      BIT5                                  
057455,000111: 07,2740           00006                           EXTEND                                         
057456,000112: 07,2741           05012                           WOR      CHAN12                                
057457,000113: 
057458,000114: 07,2742           05457                           TC       ZEROICDU                              
057459,000115: 07,2743           34746                           CAF      BIT6                                  #  WAIT 320 MS TO GIVE AGS ADEQUATE TIME TO
057460,000116: 07,2744           05203                           TC       WAITLIST                              #  RECEIVE ITS PULSE TRAIN.
057461,000117: 07,2745  E3,1474                                  EBANK=   CDUIND                                
057462,000118: 07,2745           02757 16103                     2CADR    IMUZERO2                              
057463,000119: 
057464,000120: 07,2747           41302                           CS       IMODES30                              #  SEE IF IMU OPERATING AND ALARM IF NOT.
057465,000121: 07,2750           74743                           MASK     BIT9                                  
057466,000122: 07,2751           10000                           CCS      A                                     
057467,000123: 07,2752           12755                           TCF      MODEEXIT                              

Page 1311

057469,000125: 07,2753           05567                           TC       ALARM                                 
057470,000126: 07,2754           00210                           OCT      210                                   
057471,000127: 
057472,000128: 07,2755           00003        MODEEXIT           RELINT                                         #  GENERAL MODE-SWITCHING EXIT.
057473,000129: 07,2756           14631                           TCF      SWRETURN                              
057474,000130: 
057475,000131: 07,2757           03641        IMUZERO2           TC       CAGETEST                              
057476,000132: 07,2760           05457                           TC       ZEROICDU                              #  ZERO CDUX, CDUY, CDUZ
057477,000133: 
057478,000134: 07,2761           44747                           CS       BIT5                                  #  REMOVE ZERO DISCRETE.
057479,000135: 07,2762           00006                           EXTEND                                         
057480,000136: 07,2763           03012                           WAND     CHAN12                                
057481,000137: 
057482,000138: 07,2764           34741                           CAF      BIT11                                 #  WAIT 10 SECS FOR CTRS TO FIND GIMBALS
057483,000139: 07,2765           05224                           TC       VARDELAY                              
057484,000140: 
057485,000141: 07,2766           03641        IMUZERO3           TC       CAGETEST                              
057486,000142: 07,2767           45751                           CS       BITS3&4                               #  REMOVE IMUFAIL AND ICDUFAIL INHIBIT.
057487,000143: 07,2770           71302                           MASK     IMODES30                              
057488,000144: 07,2771           55302                           TS       IMODES30                              
057489,000145: 
057490,000146: 07,2772           44773                           CS       SUPER011                              #  ENABLE DAP AUTO AND HOLD MODES
057491,000147: 07,2773           71303                           MASK     IMODES33                              #        BIT5 FOR GROUND
057492,000148: 07,2774           55303                           TS       IMODES33                              
057493,000149: 
057494,000150: 07,2775           04674                           TC       IBNKCALL                              #  SET ISS WARNING IF EITHER OF ABOVE ARE
057495,000151: 07,2776           14703                           CADR     SETISSW                               #  PRESENT.
057496,000152: 
057497,000153: 07,2777           13631                           TCF      ENDIMU                                
057498,000154: 

Page 1312

057500,000156:                                                                                                  #  IMU COARSE ALIGN MODE.
057501,000157: 
057502,000158: 07,3000           00004        IMUCOARS           INHINT                                         
057503,000159: 07,3001           03653                           TC       CAGETSTJ                              
057504,000160: 07,3002           03144                           TC       SETCOARS                              
057505,000161: 
057506,000162: 07,3003           36242                           CAF      SIX                                   
057507,000163: 07,3004           05203                           TC       WAITLIST                              
057508,000164: 07,3005  E3,1474                                  EBANK=   CDUIND                                
057509,000165: 07,3005           03010 16103                     2CADR    COARS                                 
057510,000166: 
057511,000167: 07,3007           12755                           TCF      MODEEXIT                              
057512,000168: 
057513,000169: 07,3010           03641        COARS              TC       CAGETEST                              
057514,000170: 07,3011           34746                           CAF      BIT6                                  #  ENABLE ALL THREE ISS CDU ERROR COUNTERS
057515,000171: 07,3012           00006                           EXTEND                                         
057516,000172: 07,3013           05012                           WOR      CHAN12                                
057517,000173: 
057518,000174: 07,3014           34752                           CAF      TWO                                   #  SET CDU INDICATOR
057519,000175: 07,3015           55474        COARS1             TS       CDUIND                                
057520,000176: 
057521,000177: 07,3016           51474                           INDEX    CDUIND                                #  COMPUTE THETAD - THETAA IN 1:S
057522,000178: 07,3017           30321                           CA       THETAD                                #        COMPLEMENT FORM
057523,000179: 07,3020           00006                           EXTEND                                         
057524,000180: 07,3021           51474                           INDEX    CDUIND                                
057525,000181: 07,3022           20032                           MSU      CDUX                                  
057526,000182: 07,3023           00006                           EXTEND                                         
057527,000183: 07,3024           74737                           MP       BIT13                                 #  SHIFT RIGHT 2
057528,000184: 07,3025           56001                           XCH      L                                     #  ROUND
057529,000185: 07,3026           60000                           DOUBLE                                         
057530,000186: 07,3027           54061                           TS       ITEMP1                                
057531,000187: 07,3030           13032                           TCF      +2                                    
057532,000188: 07,3031           26001                           ADS      L                                     
057533,000189: 
057534,000190: 07,3032           51474                           INDEX    CDUIND                                #  DIFFERENCE TO BE COMPUTED
057535,000191: 07,3033           23471                           LXCH     COMMAND                               
057536,000192: 07,3034           11474                           CCS      CDUIND                                
057537,000193: 07,3035           03015                           TC       COARS1                                
057538,000194: 
057539,000195: 07,3036           34752                           CAF      TWO                                   #  MINIMUM OF 4 MS WAIT
057540,000196: 07,3037           05224                           TC       VARDELAY                              
057541,000197: 

Page 1313

057543,000199: 07,3040           03641        COARS2             TC       CAGETEST                              #  DONT CONTINUE IF CAGED.
057544,000200: 07,3041           54061                           TS       ITEMP1                                #  SETS TO +0.
057545,000201: 07,3042           34752                           CAF      TWO                                   #  SET CDU INDICATOR
057546,000202: 07,3043           55474                 +3        TS       CDUIND                                
057547,000203: 
057548,000204: 07,3044           51474                           INDEX    CDUIND                                
057549,000205: 07,3045           11471                           CCS      COMMAND                               #  NUMBER OF PULSES REQUIRED
057550,000206: 07,3046           03052                           TC       COMPOS                                #  GREATER THAN MAX ALLOWED
057551,000207: 07,3047           03061                           TC       NEXTCDU    +1                         
057552,000208: 07,3050           03117                           TC       COMNEG                                
057553,000209: 07,3051           03061                           TC       NEXTCDU    +1                         
057554,000210: 
057555,000211: 07,3052           63745        COMPOS             AD       -COMMAX                               #  COMMAX = MAX NUMBER OF PULSES ALLOWED
057556,000212: 07,3053           00006                           EXTEND                                         #        MINUS ONE
057557,000213: 07,3054           63127                           BZMF     COMZERO                               
057558,000214: 07,3055           51474                           INDEX    CDUIND                                
057559,000215: 07,3056           55471                           TS       COMMAND                               #  REDUCE COMMAND BY MAX NUMBER OF PULSES
057560,000216: 07,3057           43746                           CS       -COMMAX-                              #        ALLOWED
057561,000217: 
057562,000218: 07,3060           24061        NEXTCDU            INCR     ITEMP1                                
057563,000219: 07,3061           64754                           AD       NEG0                                  
057564,000220: 07,3062           51474                           INDEX    CDUIND                                
057565,000221: 07,3063           54050                           TS       CDUXCMD                               #  SET UP COMMAND REGISTER.
057566,000222: 
057567,000223: 07,3064           11474                           CCS      CDUIND                                
057568,000224: 07,3065           03043                           TC       COARS2     +3                         
057569,000225: 
057570,000226: 07,3066           10061                           CCS      ITEMP1                                #  SEE IF ANY PULSES TO GO OUT.
057571,000227: 07,3067           13133                           TCF      SENDPULS                              
057572,000228: 
057573,000229: 07,3070           05221                           TC       FIXDELAY                              #  WAIT FOR GIMBALS TO SETTLE.
057574,000230: 07,3071           00226                           DEC      150        B-14                       
057575,000231: 
057576,000232: 07,3072           34752                           CAF      TWO                                   #  AT END OF COMMAND, CHECK TO SEE THAT
057577,000233: 07,3073           54061        CHKCORS            TS       ITEMP1                                #  GIMBALS ARE WITHIN 2 DEGREES OF THETAD.
057578,000234: 07,3074           50000                           INDEX    A                                     
057579,000235: 07,3075           30032                           CA       CDUX                                  
057580,000236: 07,3076           00006                           EXTEND                                         
057581,000237: 07,3077           50061                           INDEX    ITEMP1                                
057582,000238: 07,3100           20321                           MSU      THETAD                                
057583,000239: 07,3101           10000                           CCS      A                                     
057584,000240: 07,3102           13110                           TCF      COARSERR                              
057585,000241: 07,3103           13105                           TCF      CORSCHK2                              
057586,000242: 07,3104           13110                           TCF      COARSERR                              
057587,000243: 

Page 1314

057589,000245: 07,3105           10061        CORSCHK2           CCS      ITEMP1                                
057590,000246: 07,3106           13073                           TCF      CHKCORS                               
057591,000247: 07,3107           13631                           TCF      ENDIMU                                #  END OF COARSE ALIGNMENT.
057592,000248: 
057593,000249: 07,3110           63116        COARSERR           AD       COARSTOL                              #  2 DEGREES.
057594,000250: 07,3111           00006                           EXTEND                                         
057595,000251: 07,3112           63105                           BZMF     CORSCHK2                              
057596,000252: 
057597,000253: 07,3113           05567                           TC       ALARM                                 #  COARSE ALIGN ERROR.
057598,000254: 07,3114           00211                           OCT      211                                   
057599,000255: 
057600,000256: 07,3115           13637                           TCF      IMUBAD                                
057601,000257: 
057602,000258: 07,3116           77511        COARSTOL           DEC      -.01111                               #  2 DEGREES SCALED AT HALF-REVOLUTIONS
057603,000259: 
057604,000260: 07,3117           63745        COMNEG             AD       -COMMAX                               
057605,000261: 07,3120           00006                           EXTEND                                         
057606,000262: 07,3121           63127                           BZMF     COMZERO                               
057607,000263: 07,3122           40000                           COM                                            
057608,000264: 07,3123           51474                           INDEX    CDUIND                                
057609,000265: 07,3124           55471                           TS       COMMAND                               
057610,000266: 07,3125           33746                           CA       -COMMAX-                              
057611,000267: 07,3126           03060                           TC       NEXTCDU                               
057612,000268: 
057613,000269: 07,3127           34755        COMZERO            CAF      ZERO                                  
057614,000270: 07,3130           51474                           INDEX    CDUIND                                
057615,000271: 07,3131           57471                           XCH      COMMAND                               
057616,000272: 07,3132           03060                           TC       NEXTCDU                               
057617,000273: 
057618,000274: 07,3133           37740        SENDPULS           CAF      13,14,15                              
057619,000275: 07,3134           00006                           EXTEND                                         
057620,000276: 07,3135           05014                           WOR      CHAN14                                
057621,000277: 07,3136           33747                           CAF      600MS                                 
057622,000278: 07,3137           13037                           TCF      COARS2     -1                         #  THEN TO VARDELAY
057623,000279: 
057624,000280: 07,3140           34746        CA+ECE             CAF      BIT6                                  #  ENABLE ALL THREE ISS CDU ERROR COUNTERS
057625,000281: 07,3141           00006                           EXTEND                                         
057626,000282: 07,3142           05012                           WOR      CHAN12                                
057627,000283: 07,3143           05261                           TC       TASKOVER                              
057628,000284: 

Page 1315

057630,000286: 07,3144           34750        SETCOARS           CAF      BIT4                                  #  BYPASS IF ALREADY IN COARSE ALIGN
057631,000287: 07,3145           00006                           EXTEND                                         
057632,000288: 07,3146           02012                           RAND     CHAN12                                
057633,000289: 07,3147           10000                           CCS      A                                     
057634,000290: 07,3150           00002                           TC       Q                                     
057635,000291: 
057636,000292: 07,3151           44746                           CS       BIT6                                  #  CLEAR ISS ERROR COUNTERS
057637,000293: 07,3152           00006                           EXTEND                                         
057638,000294: 07,3153           03012                           WAND     CHAN12                                
057639,000295: 
057640,000296: 07,3154           44742                           CS       BIT10                                 #  KNOCK DOWN GYRO ACTIVITY
057641,000297: 07,3155           00006                           EXTEND                                         
057642,000298: 07,3156           03014                           WAND     CHAN14                                
057643,000299: 07,3157           44755                           CS       ZERO                                  
057644,000300: 07,3160           54047                           TS       GYROCMD                               
057645,000301: 
057646,000302: 07,3161           34750                           CAF      BIT4                                  #  PUT ISS IN COARSE ALIGN
057647,000303: 07,3162           00006                           EXTEND                                         
057648,000304: 07,3163           05012                           WOR      CHAN12                                
057649,000305: 
057650,000306: 07,3164           41036                           CS       DSPTAB     +11D                       #  TURN ON NO ATT LAMP
057651,000307: 07,3165           73207                           MASK     OCT40010                              
057652,000308: 07,3166           27036                           ADS      DSPTAB     +11D                       
057653,000309: 
057654,000310: 07,3167           41303                           CS       IMODES33                              #  DISABLE DAP AUTO AND HOLD MODES
057655,000311: 07,3170           74746                           MASK     BIT6                                  
057656,000312: 07,3171           27303                           ADS      IMODES33                              
057657,000313: 
057658,000314: 07,3172           41302                           CS       IMODES30                              #  DISABLE IMUFAIL
057659,000315: 07,3173           74750                           MASK     BIT4                                  
057660,000316: 07,3174           27302                           ADS      IMODES30                              
057661,000317: 
057662,000318: 07,3175           44747        RNDREFDR           CS       TRACKBIT                              #  CLEAR TRACK FLAG
057663,000319: 07,3176           70075                           MASK     FLAGWRD1                              
057664,000320: 07,3177           54075                           TS       FLAGWRD1                              
057665,000321: 
057666,000322: 07,3200           44735                           CS       DRFTBIT                               #  CLEAR DRIFT FLAG
057667,000323: 07,3201           70076                           MASK     FLAGWRD2                              
057668,000324: 07,3202           54076                           TS       FLAGWRD2                              
057669,000325: 
057670,000326: 07,3203           44737                           CS       REFSMBIT                              #  CLEAR REFSMMAT FLAG
057671,000327: 07,3204           70077                           MASK     FLAGWRD3                              
057672,000328: 07,3205           54077                           TS       FLAGWRD3                              
057673,000329: 
057674,000330: 07,3206           00002                           TC       Q                                     
057675,000331: 
057676,000332: 07,3207           40010        OCT40010           OCT      40010                                 
057677,000333: 

Page 1316

057679,000335:                                                                                                  #  IMU FINE ALIGN MODE SWITCH.
057680,000336: 
057681,000337: 07,3210           00004        IMUFINE            INHINT                                         
057682,000338: 07,3211           03653                           TC       CAGETSTJ                              #  SEE IF IMU BEING CAGED.
057683,000339: 
057684,000340: 07,3212           43744                           CS       BITS4-5                               #  RESET ZERO AND COARSE
057685,000341: 07,3213           00006                           EXTEND                                         
057686,000342: 07,3214           03012                           WAND     CHAN12                                
057687,000343: 
057688,000344: 07,3215           44746                           CS       BIT6                                  #  INSURE DAP AUTO AND HOLD MODES ENABLED
057689,000345: 07,3216           71303                           MASK     IMODES33                              
057690,000346: 07,3217           55303                           TS       IMODES33                              
057691,000347: 
057692,000348: 07,3220           03266                           TC       NOATTOFF                              
057693,000349: 
057694,000350: 07,3221           34742                           CAF      BIT10                                 #  IMU FAIL WAS INHIBITED DURING THE
057695,000351: 07,3222           05203                           TC       WAITLIST                              #  PRESUMABLY PRECEDING COARSE ALIGN.  LEAVE
057696,000352: 07,3223  E3,1474                                  EBANK=   CDUIND                                
057697,000353: 07,3223           03234 16103                     2CADR    IFAILOK                               #  IT ON FOR THE FIRST 5 SECS OF FINE ALIGN
057698,000354: 
057699,000355: 07,3225           35000                           CAF      2SECS                                 
057700,000356: 07,3226           05203                           TC       WAITLIST                              
057701,000357: 07,3227  E3,1474                                  EBANK=   CDUIND                                
057702,000358: 07,3227           03232 16103                     2CADR    IMUFINED                              
057703,000359: 
057704,000360: 07,3231           12755                           TCF      MODEEXIT                              
057705,000361: 
057706,000362: 07,3232           03641        IMUFINED           TC       CAGETEST                              #  SEE THAT NO ONE HAS CAGED THE IMU.
057707,000363: 07,3233           13631                           TCF      ENDIMU                                
057708,000364: 

Page 1317

057710,000366: 07,3234           03646        IFAILOK            TC       CAGETSTQ                              #  ENABLE IMU FIAL UNLESS IMU BEING CAGED.
057711,000367: 07,3235           15261                           TCF      TASKOVER                              #  IT IS.
057712,000368: 
057713,000369: 07,3236           34750                           CAF      BIT4                                  #  DONT RESET IMU FAIL INHIBIT IF SOMEONE
057714,000370: 07,3237           00006                           EXTEND                                         #  HAS GONE INTO COARSE ALIGN.
057715,000371: 07,3240           02012                           RAND     CHAN12                                
057716,000372: 07,3241           10000                           CCS      A                                     
057717,000373: 07,3242           15261                           TCF      TASKOVER                              
057718,000374: 
057719,000375: 07,3243           41302                           CS       IMODES30                              #  RESET IMUFAIL.
057720,000376: 07,3244           74737                           MASK     BIT13                                 
057721,000377: 07,3245           27302                           ADS      IMODES30                              
057722,000378: 07,3246           44750                           CS       BIT4                                  
057723,000379: 07,3247           71302        PFAILOK2           MASK     IMODES30                              
057724,000380: 07,3250           55302                           TS       IMODES30                              
057725,000381: 07,3251           04674                           TC       IBNKCALL                              #  THE ISS WARNING LIGHT MAY COME ON NOW
057726,000382: 07,3252           14703                           CADR     SETISSW                               #  THAT THE INHIBIT HAS BEEN REMOVED.
057727,000383: 07,3253           15261                           TCF      TASKOVER                              
057728,000384: 
057729,000385: 07,3254           03646        PFAILOK            TC       CAGETSTQ                              #  ENABLE PIP FAIL PROG ALARM.
057730,000386: 07,3255           15261                           TCF      TASKOVER                              
057731,000387: 
057732,000388: 07,3256           41302                           CS       IMODES30                              #  RESET IMU AND PIPA FAIL BITS.
057733,000389: 07,3257           74742                           MASK     BIT10                                 
057734,000390: 07,3260           27302                           ADS      IMODES30                              
057735,000391: 
057736,000392: 07,3261           41303                           CS       IMODES33                              
057737,000393: 07,3262           74737                           MASK     BIT13                                 
057738,000394: 07,3263           27303                           ADS      IMODES33                              
057739,000395: 
057740,000396: 07,3264           44747                           CS       BIT5                                  
057741,000397: 07,3265           13247                           TCF      PFAILOK2                              
057742,000398: 
057743,000399: 07,3266           43207        NOATTOFF           CS       OCT40010                              #  SUBROUTINE TO TURN OFF NO ATT LAMP.
057744,000400: 07,3267           71036                           MASK     DSPTAB     +11D                       
057745,000401: 07,3270           64735                           AD       BIT15                                 
057746,000402: 07,3271           55036                           TS       DSPTAB     +11D                       
057747,000403: 07,3272           00002                           TC       Q                                     
057748,000404: 

Page 1318

057750,000406:                                                                                                  #  ROUITNES TO INITIATE AND TERMINATE PROGRAM USE OF THE PIPAS.  NO IMUSTALL REQUIRED IN EITHER CASE.
057751,000407: 
057752,000408: 07,3273           44755        PIPUSE             CS       ZERO                                  
057753,000409: 07,3274           54037                           TS       PIPAX                                 
057754,000410: 07,3275           54040                           TS       PIPAY                                 
057755,000411: 07,3276           54041                           TS       PIPAZ                                 
057756,000412: 
057757,000413: 07,3277           03646        PIPUSE1            TC       CAGETSTQ                              #  DO NOT ENABLE PIPA FAIL IF IMU IS CAGED
057758,000414: 07,3300           14631                           TCF      SWRETURN                              
057759,000415: 
057760,000416: 07,3301           00004                           INHINT                                         
057761,000417: 07,3302           44753                           CS       BIT1                                  #  IF PIPA FAILS FROM NOW ON (UNTIL
057762,000418: 07,3303           71302                           MASK     IMODES30                              #  PIPFREE), LIGHT ISS WARNING.
057763,000419: 07,3304           55302                           TS       IMODES30                              
057764,000420: 
057765,000421: 07,3305           04674        PIPFREE2           TC       IBNKCALL                              #  ISS WARNING MIGHT COME ON NOW.
057766,000422: 07,3306           14703                           CADR     SETISSW                               #  (OR GO OFF ON PIPFREE).
057767,000423: 
057768,000424: 07,3307           12755                           TCF      MODEEXIT                              
057769,000425: 
057770,000426: 07,3310           00004        PIPFREE            INHINT                                         #  PROGRAM DONE WITH PIPAS.  DONT LIGHT
057771,000427: 07,3311           41302                           CS       IMODES30                              #  ISS WARNING.
057772,000428: 07,3312           74753                           MASK     BIT1                                  
057773,000429: 07,3313           27302                           ADS      IMODES30                              
057774,000430: 
057775,000431: 07,3314           74742                           MASK     BIT10                                 #  IF PIP FAIL ON, DO PROG ALSRM AND RESET
057776,000432: 07,3315           10000                           CCS      A                                     #  ISS WARNING.
057777,000433: 07,3316           12755                           TCF      MODEEXIT                              
057778,000434: 
057779,000435: 07,3317           05567                           TC       ALARM                                 
057780,000436: 07,3320           00212                           OCT      212                                   
057781,000437: 
057782,000438: 07,3321           00004                           INHINT                                         
057783,000439: 
057784,000440: 07,3322           13305                           TCF      PIPFREE2                              
057785,000441: 

Page 1319

057787,000443:                                                                                                  #  THE FOLLOWING ROUTINE TORQUES THE IRIGS ACCORDING TO DOUBLE PRECISION INPUTS IN THE SIX REGISTERS
057788,000444:                                                                                                  #  BEGINNING AT THE ECADR ARRIVING IN A.  THE MINIMUM SIZE OF ANY PULSE TRAIN IS 16 PULSES (.25 CDU COUNTS).  THE
057789,000445:                                                                                                  #  UNSENT PORTION OF THE COMMAND IS LEFT INTACT IN THE INPUT COMMAND REGISTERS.
057790,000446: 
057791,000447: 07,3323  E3,1400                                  EBANK=   1400                                  #  VARIABLE, ACTUALLY.
057792,000448: 
057793,000449: 07,3323           54161        IMUPULSE           TS       MPAC       +5                         #  SAVE ARRIVING ECADR.
057794,000450: 07,3324           03653                           TC       CAGETSTJ                              #  DONT PROCEED IF IMU BEING CAGED.
057795,000451: 
057796,000452: 07,3325           11314                           CCS      LGYRO                                 #  SEE IF GYROS BUSY.
057797,000453: 07,3326           03367                           TC       GYROBUSY                              #  SLEEP.
057798,000454: 
057799,000455: 07,3327           54156                           TS       MPAC       +2                         
057800,000456: 07,3330           34746                           CAF      BIT6                                  #  ENABLE THE POWER SUPPLY.
057801,000457: 07,3331           00006                           EXTEND                                         
057802,000458: 07,3332           05014                           WOR      CHAN14                                
057803,000459: 
057804,000460: 07,3333           34751                           CAF      FOUR                                  
057805,000461: 07,3334           05203        GWAKE2             TC       WAITLIST                              #  (IF A JOB WAS PUT TO SLEEP, THE POWER
057806,000462: 07,3335  E3,1474                                  EBANK=   CDUIND                                #  SUPPLY IS LEFT ON BY THE WAKING JOB).
057807,000463: 07,3335           03405 16103                     2CADR    STRTGYRO                              
057808,000464: 
057809,000465: 07,3337           30161                           CA       MPAC       +5                         #  SET UP EBANK, SAVING CALLER'S EBANK FOR
057810,000466: 07,3340           56003                           XCH      EBANK                                 #  RESTORATION ON RETURN.
057811,000467: 07,3341           56161                           XCH      MPAC       +5                         
057812,000468: 07,3342           55314                           TS       LGYRO                                 #  RESERVES GYROS.
057813,000469: 07,3343           74357                           MASK     LOW8                                  
057814,000470: 07,3344           54061                           TS       ITEMP1                                
057815,000471: 
057816,000472: 07,3345           34752                           CAF      TWO                                   #  FORCE SIGN AGREEMENT ON INPUTS.
057817,000473: 07,3346           54157        GYROAGRE           TS       MPAC       +3                         
057818,000474: 07,3347           60000                           DOUBLE                                         
057819,000475: 07,3350           60061                           AD       ITEMP1                                
057820,000476: 07,3351           54160                           TS       MPAC       +4                         
057821,000477: 07,3352           00006                           EXTEND                                         
057822,000478: 07,3353           50000                           INDEX    A                                     
057823,000479: 07,3354           31401                           DCA      1400                                  
057824,000480: 07,3355           52155                           DXCH     MPAC                                  
057825,000481: 07,3356           07257                           TC       TPAGREE                               
057826,000482: 07,3357           52155                           DXCH     MPAC                                  
057827,000483: 07,3360           50160                           INDEX    MPAC       +4                         
057828,000484: 07,3361           53401                           DXCH     1400                                  
057829,000485: 
057830,000486: 07,3362           10157                           CCS      MPAC       +3                         
057831,000487: 07,3363           13346                           TCF      GYROAGRE                              
057832,000488: 
057833,000489: 07,3364           30161                           CA       MPAC       +5                         #  RESTORE CALLER'S EBANK.
057834,000490: 07,3365           54003                           TS       EBANK                                 
057835,000491: 07,3366           12755                           TCF      MODEEXIT                              
057836,000492: 

Page 1320

057838,000494:                                                                                                  #  ROUTINES TO ALLOW TORQUING BY ONLY ONE JOB AT A TIME.
057839,000495: 
057840,000496: 07,3367           00006        GYROBUSY           EXTEND                                         #  SAVE RETURN 2FCADR.
057841,000497: 07,3370           30134                           DCA      BUF2                                  
057842,000498: 07,3371           52155                           DXCH     MPAC                                  
057843,000499: 07,3372           33404        REGSLEEP           CAF      LGWAKE                                
057844,000500: 07,3373           15133                           TCF      JOBSLEEP                              
057845,000501: 
057846,000502: 07,3374           11314        GWAKE              CCS      LGYRO                                 #  WHEN AWAKENED, SEE IF GYROS STILL BUSY.
057847,000503: 07,3375           13372                           TCF      REGSLEEP                              #  IF SO, SLEEP SOME MORE.
057848,000504: 
057849,000505: 07,3376           54156                           TS       MPAC       +2                         
057850,000506: 07,3377           00006                           EXTEND                                         
057851,000507: 07,3400           30155                           DCA      MPAC                                  
057852,000508: 07,3401           52134                           DXCH     BUF2                                  #  RESTORE SWRETURN INFO.
057853,000509: 07,3402           34753                           CAF      ONE                                   
057854,000510: 07,3403           13334                           TCF      GWAKE2                                
057855,000511: 
057856,000512: 07,3404           17374        LGWAKE             CADR     GWAKE                                 
057857,000513: 

Page 1321

057859,000515:                                                                                                  #  GYRO-TORQUING WAITLIST TASKS.
057860,000516: 
057861,000517: 07,3405           43626        STRTGYRO           CS       GDESELCT                              #  DE-SELECT LAST GYRO.
057862,000518: 07,3406           00006                           EXTEND                                         
057863,000519: 07,3407           03014                           WAND     CHAN14                                
057864,000520: 
057865,000521: 07,3410           03641                           TC       CAGETEST                              
057866,000522: 
057867,000523: 07,3411           31314        STRTGYR2           CA       LGYRO                                 #  JUMP ON PHASE COUNTER IN BITS 13-14.
057868,000524: 07,3412           00006                           EXTEND                                         
057869,000525: 07,3413           74750                           MP       BIT4                                  
057870,000526: 07,3414           50000                           INDEX    A                                     
057871,000527: 07,3415           13416                           TCF      +1                                    
057872,000528: 07,3416           03433                           TC       GSELECT                               #  =0.  DO Y GYRO.
057873,000529: 07,3417           00202                           OCT      00202                                 
057874,000530: 
057875,000531: 07,3420           03433                           TC       GSELECT                               #  =1.  DO Z GYRO.
057876,000532: 07,3421           00302                           OCT      00302                                 
057877,000533: 
057878,000534: 07,3422           03431                           TC       GSELECT    -2                         #  =2.  DO X GYRO.
057879,000535: 07,3423           00100                           OCT      00100                                 
057880,000536: 
057881,000537: 07,3424           34755                           CAF      ZERO                                  #  =3.  DONE
057882,000538: 07,3425           55314                           TS       LGYRO                                 
057883,000539: 07,3426           33404                           CAF      LGWAKE                                #  WAKE A POSSIBLE SLEEPING JOB.
057884,000540: 07,3427           05137                           TC       JOBWAKE                               
057885,000541: 
057886,000542: 07,3430           13232        NORESET            TCF      IMUFINED                              #  DO NOT RESET POWER SUPPLY

Page 1322

057888,000544: 07,3431           44751                 -2        CS       FOUR                                  #  SPECIAL ENTRY TO REGRESS LGYRO FOR X.
057889,000545: 07,3432           27314                           ADS      LGYRO                                 
057890,000546: 
057891,000547: 07,3433           50002        GSELECT            INDEX    Q                                     #  SELECT GYRO.
057892,000548: 07,3434           30000                           CAF      0                                     #  PACKED WORD CONTAINS GYRO SELECT BITS
057893,000549: 07,3435           54064                           TS       ITEMP4                                #  AND INCREMENT TO LGYRO.
057894,000550: 07,3436           74757                           MASK     SEVEN                                 
057895,000551: 07,3437           64737                           AD       BIT13                                 
057896,000552: 07,3440           27314                           ADS      LGYRO                                 
057897,000553: 07,3441           54003                           TS       EBANK                                 
057898,000554: 07,3442           74357                           MASK     LOW8                                  
057899,000555: 07,3443           54061                           TS       ITEMP1                                
057900,000556: 
057901,000557: 07,3444           44757                           CS       SEVEN                                 
057902,000558: 07,3445           70064                           MASK     ITEMP4                                
057903,000559: 07,3446           54064                           TS       ITEMP4                                
057904,000560: 
057905,000561: 07,3447           00006                           EXTEND                                         #  MOVE DP COMMAND TO RUPTREGS FOR TESTING.
057906,000562: 07,3450           50061                           INDEX    ITEMP1                                
057907,000563: 07,3451           31401                           DCA      1400                                  
057908,000564: 07,3452           52071                           DXCH     RUPTREG1                              
057909,000565: 
057910,000566: 07,3453           10070                           CCS      RUPTREG1                              
057911,000567: 07,3454           13467                           TCF      MAJ+                                  
057912,000568: 07,3455           13457                           TCF      +2                                    
057913,000569: 07,3456           13607                           TCF      MAJ-                                  
057914,000570: 
057915,000571: 07,3457           10071                           CCS      RUPTREG2                              
057916,000572: 07,3460           13464                           TCF      MIN+                                  
057917,000573: 07,3461           13411                           TCF      STRTGYR2                              
057918,000574: 07,3462           13604                           TCF      MIN-                                  
057919,000575: 07,3463           13411                           TCF      STRTGYR2                              
057920,000576: 

Page 1323

057922,000578: 07,3464           63520        MIN+               AD       -GYROMIN                              #  SMALL POSITIVE COMMAND.  SEE IF AT LEAST
057923,000579: 07,3465           00006                           EXTEND                                         #  16 GYRO PULSES.
057924,000580: 07,3466           63411                           BZMF     STRTGYR2                              
057925,000581: 
057926,000582: 07,3467           00006        MAJ+               EXTEND                                         #  DEFINITE POSITIVE OUTPUT.
057927,000583: 07,3470           33630                           DCA      GYROFRAC                              
057928,000584: 07,3471           20071                           DAS      RUPTREG1                              
057929,000585: 
057930,000586: 07,3472           30064                           CA       ITEMP4                                #  SELECT POSITIVE TORQUING FOR THIS GYRO.
057931,000587: 07,3473           00006                           EXTEND                                         
057932,000588: 07,3474           05014                           WOR      CHAN14                                
057933,000589: 
057934,000590: 07,3475           36074                           CAF      LOW7                                  #  LEAVE NUMBER OF POSSIBLE 8192 AUGMENTS
057935,000591: 07,3476           70071                           MASK     RUPTREG2                              #  TO INITIAL COMMAND IN MAJOR PART OF LONG
057936,000592: 07,3477           56071                           XCH      RUPTREG2                              #  TERM STORAGE AND TRUNCATED FRACTION
057937,000593: 07,3500           00006        GMERGE             EXTEND                                         #  IN MINOR PART.  THE MAJOR PART WILL BE
057938,000594: 07,3501           74744                           MP       BIT8                                  #  COUNTED DOWN TO ZERO IN THE COURSE OF
057939,000595: 07,3502           54062                           TS       ITEMP2                                #  PUTTING OUT THE ENTIRE COMMAND.
057940,000596: 07,3503           30070                           CA       RUPTREG1                              
057941,000597: 07,3504           00006                           EXTEND                                         
057942,000598: 07,3505           74743                           MP       BIT9                                  
057943,000599: 07,3506           54070                           TS       RUPTREG1                              
057944,000600: 07,3507           30001                           CA       L                                     
057945,000601: 07,3510           00006                           EXTEND                                         
057946,000602: 07,3511           74736                           MP       BIT14                                 
057947,000603: 07,3512           26062                           ADS      ITEMP2                                #  INITIAL COMMAND.
057948,000604: 
057949,000605: 07,3513           00006                           EXTEND                                         #  SEE IF MORE THAN ONE PULSE TRAIN NEEDED
057950,000606: 07,3514           30071                           DCA      RUPTREG1                              #  (MORE THAN 16383 PULSES).
057951,000607: 07,3515           67747                           AD       MINUS1                                
057952,000608: 07,3516           10000                           CCS      A                                     
057953,000609: 07,3517           13543                           TCF      LONGGYRO                              
057954,000610: 07,3520           77601        -GYROMIN           OCT      -176                                  #  MAY BE ADJUSTED TO SPECIFY MINIMUM CMD
057955,000611: 07,3521           13525                           TCF      +4                                    
057956,000612: 
057957,000613: 07,3522           34736                           CAF      BIT14                                 
057958,000614: 07,3523           26062                           ADS      ITEMP2                                
057959,000615: 07,3524           34755                           CAF      ZERO                                  
057960,000616: 
057961,000617: 07,3525           50061                 +4        INDEX    ITEMP1                                
057962,000618: 07,3526           53401                           DXCH     1400                                  

Page 1324

057964,000620: 07,3527           30062                           CA       ITEMP2                                #  ENTIRE COMMAND.
057965,000621: 07,3530           54047        LASTSEG            TS       GYROCMD                               
057966,000622: 07,3531           00006                           EXTEND                                         
057967,000623: 07,3532           74742                           MP       BIT10                                 #  WAITLIST DT
057968,000624: 07,3533           66245                           AD       THREE                                 #  TRUNCATION AND PHASE UNCERTAINTIES.
057969,000625: 07,3534           05203                           TC       WAITLIST                              
057970,000626: 07,3535  E3,1474                                  EBANK=   CDUIND                                
057971,000627: 07,3535           03405 16103                     2CADR    STRTGYRO                              
057972,000628: 
057973,000629: 07,3537           34742        GYROEXIT           CAF      BIT10                                 
057974,000630: 07,3540           00006                           EXTEND                                         
057975,000631: 07,3541           05014                           WOR      CHAN14                                
057976,000632: 07,3542           15261                           TCF      TASKOVER                              
057977,000633: 
057978,000634: 07,3543           50061        LONGGYRO           INDEX    ITEMP1                                
057979,000635: 07,3544           53401                           DXCH     1400                                  #  INITIAL COMMAND OUT PLUS N AUGMENTS OF
057980,000636: 07,3545           34736                           CAF      BIT14                                 #  8192.  INITIAL COMMAND IS AT LEAST 8192.
057981,000637: 07,3546           60062                           AD       ITEMP2                                
057982,000638: 07,3547           54047                           TS       GYROCMD                               
057983,000639: 
057984,000640: 07,3550           00006        AUG3               EXTEND                                         #  GET WAITLIST DT TO TIME WHEN TRAIN IS
057985,000641: 07,3551           74742                           MP       BIT10                                 #  ALMOST OUT.
057986,000642: 07,3552           67745                           AD       NEG3                                  
057987,000643: 07,3553           05203                           TC       WAITLIST                              
057988,000644: 07,3554  E3,1474                                  EBANK=   CDUIND                                
057989,000645: 07,3554           03557 16103                     2CADR    8192AUG                               
057990,000646: 
057991,000647: 07,3556           13537                           TCF      GYROEXIT                              
057992,000648: 
057993,000649: 07,3557           03641        8192AUG            TC       CAGETEST                              
057994,000650: 
057995,000651: 07,3560           34750                           CAF      BIT4                                  
057996,000652: 07,3561           00006                           EXTEND                                         
057997,000653: 07,3562           02012                           RAND     CHAN12                                
057998,000654: 07,3563           10000                           CCS      A                                     
057999,000655: 07,3564           13637                           TCF      IMUBAD                                
058000,000656: 07,3565           31314                           CA       LGYRO                                 #  ADD 8192 PULSES TO GYROCMD
058001,000657: 07,3566           54003                           TS       EBANK                                 
058002,000658: 07,3567           74357                           MASK     LOW8                                  
058003,000659: 07,3570           54061                           TS       ITEMP1                                
058004,000660: 
058005,000661: 07,3571           50061                           INDEX    ITEMP1                                #  SEE IF THIS IS THE LAST AUG.
058006,000662: 07,3572           11400                           CCS      1400                                  
058007,000663: 07,3573           13577                           TCF      AUG2                                  #  MORE TO COME.
058008,000664: 
058009,000665: 07,3574           34736                           CAF      BIT14                                 
058010,000666: 07,3575           26047                           ADS      GYROCMD                               
058011,000667: 07,3576           13531                           TCF      LASTSEG    +1                         
058012,000668: 

Page 1325

058014,000670: 07,3577           50061        AUG2               INDEX    ITEMP1                                
058015,000671: 07,3600           55400                           TS       1400                                  
058016,000672: 07,3601           34736                           CAF      BIT14                                 
058017,000673: 07,3602           26047                           ADS      GYROCMD                               
058018,000674: 07,3603           13550                           TCF      AUG3                                  #  COMPUTE DT.
058019,000675: 

Page 1326

058021,000677: 07,3604           63520        MIN-               AD       -GYROMIN                              #  POSSIBLE NEGATIVE OUTPUT.
058022,000678: 07,3605           00006                           EXTEND                                         
058023,000679: 07,3606           63411                           BZMF     STRTGYR2                              
058024,000680: 
058025,000681: 07,3607           00006        MAJ-               EXTEND                                         #  DEFINITE NEGATIVE OUTPUT.
058026,000682: 07,3610           43630                           DCS      GYROFRAC                              
058027,000683: 07,3611           20071                           DAS      RUPTREG1                              
058028,000684: 
058029,000685: 07,3612           30064                           CA       ITEMP4                                #  SELECT NEGATIVE TORQUING FOR THIS GYRO.
058030,000686: 07,3613           64743                           AD       BIT9                                  
058031,000687: 07,3614           00006                           EXTEND                                         
058032,000688: 07,3615           05014                           WOR      CHAN14                                
058033,000689: 
058034,000690: 07,3616           40070                           CS       RUPTREG1                              #  SET UP RUPTREGS TO FALL INTO GMERGE.
058035,000691: 07,3617           54070                           TS       RUPTREG1                              #  ALL NUMBERS PUT INTO GYROCMD ARE
058036,000692: 07,3620           40071                           CS       RUPTREG2                              #  POSITIVE - BIT9 OF CHAN 14 DETERMINES
058037,000693: 07,3621           76074                           MASK     LOW7                                  #  THE SIGN OF THE COMMAND.
058038,000694: 07,3622           40000                           COM                                            
058039,000695: 07,3623           56071                           XCH      RUPTREG2                              
058040,000696: 07,3624           40000                           COM                                            
058041,000697: 07,3625           13500                           TCF      GMERGE                                
058042,000698: 
058043,000699: 07,3626           01700        GDESELCT           OCT      1700                                  #  TURN OFF SELECT AND ACTIVITY BITS.
058044,000700: 
058045,000701: 07,3627           00000 00034  GYROFRAC           2DEC     .215       B-21                       
058046,000702: 

Page 1327

058048,000704:                                                                                                  #  IMU MODE SWITCHING ROUTINES COME HERE WHEN ACTION COMPLETE.
058049,000705: 
058050,000706: 07,3631           00006        ENDIMU             EXTEND                                         #  MODE IS BAD IF CAGE HAS OCCURED OR IF
058051,000707: 07,3632           00011                           READ     DSALMOUT                              #  ISS WARNING IS ON.
058052,000708: 07,3633           74753                           MASK     BIT1                                  
058053,000709: 07,3634           10000                           CCS      A                                     
058054,000710: 07,3635           13637                           TCF      IMUBAD                                
058055,000711: 
058056,000712: 07,3636           13665        IMUGOOD            TCF      GOODEND                               #  WITH C(A) = 0.
058057,000713: 
058058,000714: 07,3637           34755        IMUBAD             CAF      ZERO                                  
058059,000715: 07,3640           13662                           TCF      BADEND                                
058060,000716: 
058061,000717: 07,3641           34746        CAGETEST           CAF      BIT6                                  #  SUBROUTINE TO TERMINATE IMU MODE
058062,000718: 07,3642           71302                           MASK     IMODES30                              #  SWITCH IF IMU HAS BEEN CAGED.
058063,000719: 07,3643           10000                           CCS      A                                     
058064,000720: 07,3644           13637                           TCF      IMUBAD                                #  DIRECTLY.
058065,000721: 07,3645           00002                           TC       Q                                     #  WITH C(A) = +0.
058066,000722: 
058067,000723: 07,3646           41302        CAGETSTQ           CS       IMODES30                              #  SKIP IF IMU NOT BEING CAGED.
058068,000724: 07,3647           74746                           MASK     BIT6                                  
058069,000725: 07,3650           10000                           CCS      A                                     
058070,000726: 07,3651           24002                           INCR     Q                                     
058071,000727: 07,3652           00002                           TC       Q                                     
058072,000728: 
058073,000729: 07,3653           41302        CAGETSTJ           CS       IMODES30                              #  IF DURING MODE SWITCH INITIALIZATION
058074,000730: 07,3654           74746                           MASK     BIT6                                  #  IT IS FOUND THAT THE IMU IS BEING CAGED,
058075,000731: 07,3655           10000                           CCS      A                                     #  SET IMUCADR TO -0 TO INDICATE OPERATION
058076,000732: 07,3656           00002                           TC       Q                                     #  COMPLETE BUT FAILED.  RETURN IMMEDIATELY
058077,000733: 
058078,000734: 07,3657           44755                           CS       ZERO                                  #  TO SWRETURN.
058079,000735: 07,3660           55304                           TS       IMUCADR                               
058080,000736: 07,3661           12755                           TCF      MODEEXIT                              
058081,000737: 

Page 1328

058083,000739:                                                                                                  #  GENERALIZED MODE SWITCHING TERMINATION.  ENTER AT GOODEND FOR SUCCESSFUL COMPLETION OF AN I/O OPERATION
058084,000740:                                                                                                  #  OR AT BADEND FOR AN UNSUCCESSFUL ONE.  C(A) OR ARRIVAL =0 FOR IMU, 1 FOR OPTICS.
058085,000741: 
058086,000742: 07,3662           54071        BADEND             TS       RUPTREG2                              #  DEVICE INDEX.
058087,000743: 07,3663           44755                           CS       ZERO                                  #  FOR FAILURE.
058088,000744: 07,3664           13667                           TCF      GOODEND    +2                         
058089,000745: 
058090,000746: 07,3665           54071        GOODEND            TS       RUPTREG2                              
058091,000747: 07,3666           44753                           CS       ONE                                   #  FOR SUCCESS.
058092,000748: 
058093,000749: 07,3667           54072                           TS       RUPTREG3                              
058094,000750: 07,3670           50071                           INDEX    RUPTREG2                              #  SEE IF USING PROGRAM ASLEEP.
058095,000751: 07,3671           11304                           CCS      MODECADR                              
058096,000752: 07,3672           13676                           TCF      +4                                    #  YES - WAKE IT UP.
058097,000753: 07,3673           13706                           TCF      ENDMODE                               #  IF 0, PROGRAM NOT IN YET.
058098,000754: 
058099,000755: 07,3674           00006                           EXTEND                                         
058100,000756: 07,3675           13707                           BZF      ENDMODE    +1                         #  BZF = TCF IF MODECADR = -0.
058101,000757: 
058102,000758: 07,3676           34755                           CAF      ZERO                                  #  WAKE SLEEPING PROGRAM.
058103,000759: 07,3677           50071                           INDEX    RUPTREG2                              
058104,000760: 07,3700           57304                           XCH      MODECADR                              
058105,000761: 07,3701           05137                           TC       JOBWAKE                               
058106,000762: 
058107,000763: 07,3702           40072                           CS       RUPTREG3                              #  ADVANCE LOC IF SUCCESSFUL.
058108,000764: 07,3703           50064                           INDEX    LOCCTR                                
058109,000765: 07,3704           26164                           ADS      LOC                                   
058110,000766: 
058111,000767: 07,3705           15261                           TCF      TASKOVER                              
058112,000768: 
058113,000769: 07,3706           30072        ENDMODE            CA       RUPTREG3                              #  -0 INDICATES OPERATION COMPLETE BUT
058114,000770: 07,3707           50071                 +1        INDEX    RUPTREG2                              #  UNSUCCESSFUL:  -1 INDICATES COMPLETE AND
058115,000771: 07,3710           55304                           TS       MODECADR                              #  SUCCESSFUL.
058116,000772: 07,3711           15261                           TCF      TASKOVER                              
058117,000773: 

Page 1329

058119,000775:                                                                                                  #  GENERAL STALLING ROUTINE.  USING PROGRAMS COME HERE TO WAIT FOR I/O COMPLETION.
058120,000776: 
058121,000777:                                                                                                  #  PROGRAM DESCRIPTION                           DATE - 21 FEB 1967
058122,000778:                                                                                                  #                                                LOG SECTION IMU MODE SWITCHING
058123,000779:                                                                                                  #  MOD BY - R. MELANSON TO ADD DOCUMENTATION     ASSEMBLY SUNDISK REV. 82
058124,000780: 
058125,000781:                                                                                                  #  FUNCTIONAL DESCRIPTION -
058126,000782:                                                                                                  #        TO DELAY FURTHER EXECUTION OF THE CALLING ROUTINE UNTIL ITS SELECTED
058127,000783:                                                                                                  #        I/O FUNCTION IS COMPLETE.  THE FOLLOWING CHECKS ON THE CALLING ROUTINE:S
058128,000784:                                                                                                  #        MODECADR ARE MADE AND ACTED UPON.
058129,000785:                                                                                                  #        1) +0 INDICATES INCOMPLETE I/O OPERATION.  CALLING ROUTINE IS PUT TO
058130,000786:                                                                                                  #           SLEEP.
058131,000787:                                                                                                  #        2) -1 INDICATES COMPLETED I/O OPERATION.  STALL BYPASSES JOBSLEEP
058132,000788:                                                                                                  #           CALL AND RETURNS TO CALLING ROUTINE AT L+3
058133,000789:                                                                                                  #        3) -0 INDICATES COMPLETED I/O WITH FAILURE.  STALL CLEARS MODECADR
058134,000790:                                                                                                  #           AND RETURNS TO CALLING ROUTINE AT L+2.
058135,000791:                                                                                                  #        4) VALUE GREATER THAN 0 INDICATES TWO ROUTINES CALLING FOR USE OF
058136,000792:                                                                                                  #           SAME DEVICE.  STALL EXITS TO ABORT WHICH EXECUTES A PROGRAM
058137,000793:                                                                                                  #           RESTART WHICH IN TURN CLEARS ALL MODECADR REGISTERS.
058138,000794: 
058139,000795:                                                                                                  #  CALLING SEQUENCE -
058140,000796:                                                                                                  #        L       TC      BANKCALL
058141,000797:                                                                                                  #        L+1     CADR    (ONE OF 5 STALL ADDRESSES I.E. IMUSTALL, OPTSTALL, RADSTALL,
058142,000798:                                                                                                  #                        AOTSTALL, OR ATTSTALL)
058143,000799: 
058144,000800:                                                                                                  #  NORMAL-EXIT MODE -
058145,000801:                                                                                                  #        TCF JOBSLEEP    OR      TCF MODEXIT
058146,000802: 
058147,000803:                                                                                                  #  ALARM OR ABORT EXIT MODE -
058148,000804:                                                                                                  #        TC      ABORT
058149,000805: 
058150,000806:                                                                                                  #  OUTPUT -
058151,000807:                                                                                                  #        MODECADR=CADR   IF JOBSLEEP
058152,000808:                                                                                                  #        MODECADR=+0     IF I/O COMPLETE
058153,000809:                                                                                                  #        BUF2=L+3        IF I/O COMPLETE AND GOOD.
058154,000810:                                                                                                  #        BUF2=L+2        IF I/O COMPLETE BUT FAILED.
058155,000811: 
058156,000812:                                                                                                  #  ERASABLE INITIALIZATION -
058157,000813:                                                                                                  #        BUF2 CONTAINS RETURN ADDRESS PLUS 1,(L+2)
058158,000814:                                                                                                  #        BUF2+1 CONTAINS FBANK VALUE OF CALLING ROUTINE.
058159,000815:                                                                                                  #        MODECADR OF CALLING ROUTINE CONTAINS +0,-1,-0 OR CADR RETURN ADDRESS.
058160,000816: 
058161,000817:                                                                                                  #  DEBRIS -
058162,000818:                                                                                                  #        RUPTREG2 AND CALLING ROUTINE MODECADR.
058163,000819: 
058164,000820: 07,3712           34753        AOTSTALL           CAF      ONE                                   #  AOT.
058165,000821: 07,3713           03717                           TC       STALL                                 
058166,000822: 
058167,000823: 07,3714           34752        RADSTALL           CAF      TWO                                   
058168,000824: 07,3715           13717                           TCF      STALL                                 
058169,000825: 

Page 1330

058171,000827: 07,3716  07,3712               OPTSTALL           EQUALS   AOTSTALL                              
058172,000828: 
058173,000829: 07,3716           34755        IMUSTALL           CAF      ZERO                                  #  IMU.
058174,000830: 
058175,000831: 07,3717           00004        STALL              INHINT                                         
058176,000832: 07,3720           54071                           TS       RUPTREG2                              #  SAVE DEVICE INDEX.
058177,000833: 07,3721           50000                           INDEX    A                                     #  SEE IF OPERATION COMPLETE.
058178,000834: 07,3722           11304                           CCS      MODECADR                              
058179,000835: 07,3723           13741                           TCF      MODABORT                              #  ALLOWABLE STATES ARE +0, -1, AND -0.
058180,000836: 07,3724           13735                           TCF      MODESLP                               #  OPERATION INCOMPLETE.
058181,000837: 07,3725           13731                           TCF      MODEGOOD                              #  COMPLETE AND GOOD IF = -1.
058182,000838: 
058183,000839: 07,3726           50071        MG2                INDEX    RUPTREG2                              #  COMPLETE AND FAILED IF -0.  RESET TO +0.
058184,000840: 07,3727           55304                           TS       MODECADR                              #  RETURN TO CALLER.
058185,000841: 07,3730           12755                           TCF      MODEEXIT                              
058186,000842: 
058187,000843: 07,3731           10000        MODEGOOD           CCS      A                                     #  MAKE SURE INITIAL STATE -1.
058188,000844: 07,3732           13741                           TCF      MODABORT                              
058189,000845: 
058190,000846: 07,3733           24133                           INCR     BUF2                                  #  IF SO, INCREMENT RETURN ADDRESS AND
058191,000847: 07,3734           13726                           TCF      MG2                                   #  RETURN IMMEDIATELY, SETTING CADR = +0.
058192,000848: 
058193,000849: 07,3735           04645        MODESLP            TC       MAKECADR                              #  CALL FROM SWITCHABLE FIXED ONLY.
058194,000850: 07,3736           50071                           INDEX    RUPTREG2                              
058195,000851: 07,3737           55304                           TS       MODECADR                              
058196,000852: 07,3740           15133                           TCF      JOBSLEEP                              
058197,000853: 
058198,000854: 07,3741           52134        MODABORT           DXCH     BUF2                                  
058199,000855: 07,3742           05716                           TC       BAILOUT1                              #  TWO PROGRAMS USING THE SAME DEVICE.
058200,000856: 07,3743           01210                           OCT      1210                                  
058201,000857: 

Page 1331

058203,000859:                                                                                                  #  CONSTANTS FOR MODE SWITCHING ROUTINES
058204,000860: 
058205,000861: 07,3744     5751               BITS3&4            =        OCT14                                 
058206,000862: 07,3744     4771               BITS4&6            =        OCT50                                 
058207,000863: 07,3744           00030        BITS4-5            OCT      00030                                 
058208,000864: 07,3745     4744               IMUSEFLG           EQUALS   BIT8                                  #  INTERPRETER SWITCH 7.
058209,000865: 07,3745           77500        -COMMAX            DEC      -191       B-14                       
058210,000866: 07,3746           77477        -COMMAX-           DEC      -192       B-14                       
058211,000867: 07,3747           00074        600MS              DEC      60         B-14                       
058212,000868: 07,3750  07,3210               IMUFIN20           =        IMUFINE                               
058213,000869: 07,3750           31307        GOMANUR            CA       ATTCADR                               #  IS KALCMANU FREE
058214,000870: 07,3751           00006                           EXTEND                                         
058215,000871: 07,3752           13755                           BZF      +3                                    
058216,000872: 
058217,000873: 07,3753           05652                           TC       POODOO                                #  NO
058218,000874: 07,3754           01210                           OCT      1210                                  #  2 TRYING TO USE SAME DEVICE
058219,000875: 
058220,000876: 07,3755           00006                 +3        EXTEND                                         
058221,000877: 07,3756           30134                           DCA      BUF2                                  
058222,000878: 07,3757           53310                           DXCH     ATTCADR                               #  SAVE FINAL RETURN FOR KALCMAN3
058223,000879: 
058224,000880: 07,3760           30006                           CA       BBANK                                 
058225,000881: 07,3761           74757                           MASK     SEVEN                                 
058226,000882: 07,3762           27310                           ADS      ATTCADR    +1                         
058227,000883: 
058228,000884: 07,3763           30167                           CA       PRIORITY                              
058229,000885: 07,3764           77725                           MASK     PRIO37                                
058230,000886: 07,3765           55311                           TS       ATTPRIO                               #  SAVE USERS PRIO
058231,000887: 
058232,000888: 07,3766           33772                           CAF      KALEBCON                              #  SET EBANK FOR KALCMAN3
058233,000889: 07,3767           54003                           TS       EBANK                                 
058234,000890: 07,3770           04635                           TC       POSTJUMP                              
058235,000891: 07,3771           44004                           CADR     KALCMAN3                              
058236,000892: 07,3772           03276        KALEBCON           ECADR    BCDU                                  
058237,000893: 

Page 1332

058239,000895:                                                                                                  #  PROGRAM DESCRIPTION
058240,000896:                                                                                                  #  IMU STATUS CHECK ROUTINE R02 (SUBROUTINE UTILITY)
058241,000897:                                                                                                  #  MOD NO - 1
058242,000898:                                                                                                  #  MOD BY - N.BRODEUR
058243,000899: 
058244,000900:                                                                                                  #  FUNCTIONAL DESCRIPTION
058245,000901:                                                                                                  #        TO CHECK WHETHER IMU IS ON AND IF ON WHETHER IT IS ALIGNED TO AN
058246,000902:                                                                                                  #        ORIENTATION KNOWN BY THE CMC.  TO REQUEST SELECTION OF THE APPROPRIATE
058247,000903:                                                                                                  #        PROGRAM IF THE IMU IS OFF OR NOT ALIGNED TO AN ORIENTATION KNOWN BY THE
058248,000904:                                                                                                  #        CMC.  CALLED THROUGH BANKCALL
058249,000905: 
058250,000906:                                                                                                  #  CALLING SEQUENCE -
058251,000907:                                                                                                  #        L       TC      BANKCALL
058252,000908:                                                                                                  #        L+1     CADR    R02BOTH
058253,000909: 
058254,000910:                                                                                                  #  SUBROUTINES CALLED
058255,000911:                                                                                                  #        VARALARM
058256,000912:                                                                                                  #        FLAGUP
058257,000913: 
058258,000914:                                                                                                  #  NORMAL EXIT MODES
058259,000915:                                                                                                  #        AT L+2 OF CALLING SEQUENCE
058260,000916: 
058261,000917:                                                                                                  #  ALARM OR ABORT EXIT MODES
058262,000918:                                                                                                  #        GOTOPOOH, WITH ALARM
058263,000919: 
058264,000920:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED
058265,000921:                                                                                                  #        NONE
058266,000922: 
058267,000923:                                                                                                  #  DEBRIS
058268,000924:                                                                                                  #        CENTRALS - A,Q,L
058269,000925: 
058270,000926: 34,3775                                           BANK     34                                    
058271,000927: 04,2000                                           SETLOC   R02                                   
058272,000928: 04,2000                                           BANK                                           
058273,000929: 04,3253                                           COUNT*   $$/R02                                
058274,000930: 04,3253           00063        DEC51              DEC      51         B-14                       
058275,000931: 04,3254           34737        R02BOTH            CAF      REFSMBIT                              
058276,000932: 04,3255           70077                           MASK     FLAGWRD3                              
058277,000933: 04,3256           10000                           CCS      A                                     
058278,000934: 04,3257           03270                           TC       R02ZERO                               #  ZERO IMUS
058279,000935: 
058280,000936: 04,3260           31302                           CA       IMODES30                              
058281,000937: 04,3261           74743                           MASK     BIT9                                  #  IS ISS INITIALIZED
058282,000938: 04,3262           00006                           EXTEND                                         
058283,000939: 04,3263           13265                           BZF      +2                                    
058284,000940: 04,3264           44750                           CS       BIT4                                  #  SEND IMU ALARM CODE 210
058285,000941: 04,3265           63273                           AD       OCT220                                #  SEND REFSMM ALARM
058286,000942: 04,3266           05744                           TC       VARALARM                              
058287,000943: 
058288,000944: 04,3267           06001                           TC       GOTOPOOH                              
058289,000945: 
058290,000946: 04,3270           05504        R02ZERO            TC       UPFLAG                                

Page 1333

058292,000948: 04,3271           00007                           ADRES    IMUSE                                 
058293,000949: 04,3272           14631                           TCF      SWRETURN                              
058294,000950: 04,3273           00220        OCT220             OCT      220                                   
058295,000951: 

Page 1334

058297,000953:                                                                                                  #  PROGRAM DESCRIPTION           P06             10 FEB 67
058298,000954: 
058299,000955:                                                                                                  #  TRANSFER THE ISS/CMC FROM THE OPERATE TO THE STANDBY CONDITION.
058300,000956: 
058301,000957:                                                                                                  #  THE NORMAL CONDITION OF READINESS OF THE GNCS WHEN NOT IN USE IS STANDBY.  IN THIS CONDITION THE IMU
058302,000958:                                                                                                  #  HEATER POWER IS ON.  THE IMU OPERATE POWER IS OFF.  THE COMPUTER POWER IS ON.  THE OPTICS POWER IS OFF.  THE
058303,000959:                                                                                                  #  CMC STANDBY ON THE MAIN AND LEB DISKYS IS ON.
058304,000960: 
058305,000961:                                                                                                  #  CALLING SEQUENCE:
058306,000962:                                                                                                  #        ASTRONAUT REQUEST THROUGH DSKY  V37E 06E.
058307,000963: 
058308,000964:                                                                                                  #  SUBROUTINES CALLED:
058309,000965:                                                                                                  #        GOPERF1
058310,000966:                                                                                                  #        BANKCALL
058311,000967:                                                                                                  #        FLAGDOWN
058312,000968: 

Page 1335

058314,000970:                                                                                                  #  PRESTAND PREPARES FOR STANDBY BY SNAPSHOTTING THE SCALER AND TIME1 TIME2
058315,000971:                                                                                                  #  THE LOW 5 BITS OF THE SCALER ARE INSPECTED TO INSURE COMPATABILITY
058316,000972:                                                                                                  #  BETWEEN THE SCALER READING AND THE TIME1 TIME2 READING.
058317,000973: 
058318,000974: 37,2000                                           SETLOC   P05P06                                
058319,000975: 37,2000                                           BANK                                           
058320,000976: 
058321,000977: 37,3655     0314                                  EBANK=   TIME2SAV                              
058322,000978: 37,3655                                           COUNT*   $$/P06                                
058323,000979: 
058324,000980: 37,3655           05504        P06                TC       UPFLAG                                #  SET NODOV37 BIT
058325,000981: 37,3656           00054                           ADRES    NODOFLAG                              
058326,000982: 
058327,000983: 37,3657           00004        PRESTAND           INHINT                                         
058328,000984: 37,3660           00006                           EXTEND                                         
058329,000985: 37,3661           30025                           DCA      TIME2                                 #  SNAPSHOT TIME1 TIME2
058330,000986: 37,3662           52315                           DXCH     TIME2SAV                              
058331,000987: 37,3663           03714                           TC       SCALPREP                              
058332,000988: 37,3664           03657                           TC       PRESTAND                              #  T1,T2,SCALER NOT COMPATIBLE
058333,000989: 37,3665           52155                           DXCH     MPAC                                  #  T1,T2 AND SCALER OK
058334,000990: 37,3666           52317                           DXCH     SCALSAVE                              #  STORE SCALER
058335,000991: 37,3667           00004                           INHINT                                         
058336,000992: 37,3670           04616                           TC       BANKCALL                              
058337,000993: 37,3671           17175                           CADR     RNDREFDR                              #  REFSMM, DRIFT, TRACK FLAGS DOWN
058338,000994: 
058339,000995: 37,3672           05516                           TC       DOWNFLAG                              
058340,000996: 37,3673           00007                           ADRES    IMUSE                                 #  IMUSE DOWN
058341,000997: 37,3674           05516                           TC       DOWNFLAG                              
058342,000998: 37,3675           00010                           ADRES    RNDVZFLG                              #  RNDVZFLG DOWN
058343,000999: 
058344,001000: 37,3676           34741                           CAF      BIT11                                 
058345,001001: 37,3677           00006                           EXTEND                                         
058346,001002: 37,3700           05013                           WOR      CHAN13                                #  SET STANDBY ENABLE BIT
058347,001003: 
058348,001004: 37,3701           05353                           TC       PHASCHNG                              #  SET RESTART TO POSTAND WHEN STANDBY
058349,001005: 37,3702           07024                           OCT      07024                                 #        RECOVERS
058350,001006: 37,3703           20000                           OCT      20000                                 
058351,001007: 37,3704     0316                                  EBANK=   SCALSAVE                              
058352,001008: 37,3704           03734 76060                     2CADR    POSTAND                               
058353,001009: 
058354,001010: 37,3706           34774                           CAF      OCT62                                 
058355,001011: 37,3707           04616                           TC       BANKCALL                              
058356,001012: 37,3710           20623                           CADR     GOPERF1                               
058357,001013: 37,3711           13706                           TCF      -3                                    
058358,001014: 37,3712           13706                           TCF      -4                                    
058359,001015: 37,3713           13706                           TCF      -5                                    
058360,001016: 
058361,001017: 37,3714     4774               OCT62              EQUALS   .5SEC                                 #  DEC 50 = OCT 62
058362,001018: 
058363,001019:                                                                                                  #  THE LOW 5 BITS OF THE SCALER READS 10000 FOR THE FIRST INTERVAL AFTER A

Page 1336

058365,001021:                                                                                                  #  T1 INCREMENT.  IF SCALPREP DETECTS THIS INTERVAL THE T1,T2 AND SCALER
058366,001022:                                                                                                  #  DATA ARE NOT COMPATABLE AND RETURN IS TO L+1 FOR ANOTHER READING OF THE
058367,001023:                                                                                                  #  DATA.  OTHERWISE, THE RETURN IS TO L+2 TO PROCEED.  ROUTINE ALSO PREPARES
058368,001024:                                                                                                  #  THE SCALER READING FOR COMPUTATION OF THE INCREMENT TO UPDATE T1T2.  (THE
058369,001025:                                                                                                  #  10 MS BIT (BIT 6) OF THE SCALER IS INCREMENTED 5 MS OUT OF PHASE FROM
058370,001026:                                                                                                  #  T1.) ADDITION OF 5 MS (BIT 5) TO THE SCALER READING HAS THE EFFECT OF
058371,001027:                                                                                                  #  ADJUSTING BIT 6 IN THE SCALER TO BE IN PHASE WITH BIT 1 OF T1.  THE LOW 5
058372,001028:                                                                                                  #  BITS OF THE SCALER READING ARE THEN SET TO ZERO, TO TRUNCATE THE SCALER
058373,001029:                                                                                                  #  DATA TO 10 MS.  RESULTS ARE STORED IN MPAC, +1.
058374,001030: 
058375,001031: 37,3714           00006        SCALPREP           EXTEND                                         
058376,001032: 37,3715           22156                           QXCH     MPAC       +2                         
058377,001033: 37,3716           04103                           TC       FINETIME   +1                         
058378,001034: 37,3717           00003                           RELINT                                         
058379,001035: 37,3720           52155                           DXCH     MPAC                                  
058380,001036: 37,3721           34747                           CA       BIT5                                  #  ADD 5 MS TO THE SCALER READING.
058381,001037: 37,3722           54001                           TS       L                                     
058382,001038: 37,3723           34755                           CA       ZERO                                  
058383,001039: 37,3724           20155                           DAS      MPAC                                  
058384,001040: 37,3725           44346                           CS       LOW5                                  #  SET LOW 5 BITS OF (SCALER+5MS) TO ZERO
058385,001041: 37,3726           70155                           MASK     MPAC       +1                         #  AND STORE RESULTS IN MPAC,+1.
058386,001042: 37,3727           56155                           XCH      MPAC       +1                         
058387,001043: 37,3730           74346                           MASK     LOW5                                  #  TEST LOW 5 BITS OF SCALER FOR THE FIRST
058388,001044:                                                                                                  #  INTERVAL AFTER THE T1 INCREMENT
058389,001045:                                                                                                  #  (NOW = 00000, SINCE BIT 5 ADDED).
058390,001046: 37,3731           10000                           CCS      A                                     #  IS IT 1ST INTERVAL AFTER T1 INCREMENT
058391,001047: 37,3732           24156                           INCR     MPAC       +2                         #  NO
058392,001048: 37,3733           00156                           TC       MPAC       +2                         #  YES
058393,001049: 
058394,001050:                                                                                                  #  POSTAND RECOVERS TIME AFTER STANDBY.  THE SCALER IS SNAPSHOTTED AND THE
058395,001051:                                                                                                  #  TIME1 TIME2 COUNTER IS SET TO ZERO.  THE LOW 5 BITS OF THE SCALER ARE
058396,001052:                                                                                                  #  INSPECTED TO INSURE COMPATABILITY BETWEEN THE SCALER READING AND THE
058397,001053:                                                                                                  #  CLEARING OF THE TIME COUNTER.  IT THEN COMPUTES THE DIFFERENCE IN SCALER
058398,001054:                                                                                                  #  VALUES (IN DP) AND ADDS THIS TO THE PREVIOUSLY SNAPSHOTTED VALUES OF
058399,001055:                                                                                                  #  TIME1 TIME2 AND PLACES THIS NEW TIME INTO THE TIME1 TIME2 COUNTER.
058400,001056: 
058401,001057: 37,3734                                           COUNT*   $$/P05                                
058402,001058: 
058403,001059: 37,3734           44741        POSTAND            CS       BIT11                                 #  RECOVER TIME AFTER STANDBY.
058404,001060: 37,3735           00006                           EXTEND                                         
058405,001061: 37,3736           03013                           WAND     CHAN13                                #  CLEAR STANDBY ENABLE BIT
058406,001062: 37,3737           00004                           INHINT                                         
058407,001063: 37,3740           34755                           CA       ZERO                                  
058408,001064: 37,3741           54001                           TS       L                                     
058409,001065: 37,3742           52025                           DXCH     TIME2                                 #  CLEAR TIME1TIME2
058410,001066: 37,3743           03714                           TC       SCALPREP                              #  STORE SCALER IN MPAC, MPAC+1
058411,001067: 37,3744           03737                           TC       POSTAND    +3                         #  T1,T2,SCALER NOT COMPATIBLE
058412,001068: 37,3745           00006                           EXTEND                                         #  T1,T2 AND SCALER OK
058413,001069: 37,3746           40317                           DCS      SCALSAVE                              
058414,001070: 37,3747           20155                           DAS      MPAC                                  #  FORM DP DIFFERENCE OF POSTSTANDBY SCALER

Page 1337

058416,001072: 37,3750           34742                           CAF      BIT10                                 #  MINUS PRESTANDBY SCALER AND SHIFT RIGHT
058417,001073: 37,3751           07307                           TC       SHORTMP                               #  5 TO ALIGN BITS WITH TIME1 TIME2.
058418,001074: 37,3752           34755                           CAF      ZERO                                  
058419,001075: 37,3753           54156                           TS       MPAC       +2                         #  NEEDED FOR TP AGREE
058420,001076: 37,3754           07257                           TC       TPAGREE                               #  MAKE DP DIFF AGREE
058421,001077: 37,3755           10154                           CCS      MPAC                                  
058422,001078: 37,3756           03763                           TC       POSTCOM                               #  IF DP DIFF NET +, NO SCALER OVERFLOW
058423,001079: 37,3757           03763                           TC       POSTCOM                               #  BETWEEN PRE AND POST STANDBY.
058424,001080: 37,3760           03761                           TC       +1                                    #  IF DP DIFF NET -, SCALER OVERFLOWED.  ADD
058425,001081: 37,3761           34742                           CAF      BIT10                                 #  BIT 10 TO HIGH DIFF TO CORRECT.
058426,001082: 37,3762           26154                           ADS      MPAC                                  
058427,001083: 37,3763           00006        POSTCOM            EXTEND                                         #  C(MPAC,+1) IS MAGNITUDE OF DELTA SCALER.
058428,001084: 37,3764           30315                           DCA      TIME2SAV                              #  PRESTANDBY TIME1TIME2
058429,001085: 37,3765           20155                           DAS      MPAC                                  
058430,001086: 37,3766           07257                           TC       TPAGREE                               #  FORCE SIGN AGREEMENT
058431,001087: 37,3767           52155                           DXCH     MPAC                                  #  UPDATED VALUE FOR T1,T2.
058432,001088: 37,3770           20025                           DAS      TIME2                                 #  LOAD UPDATED VALUE INTO T1,T2, WITH
058433,001089: 37,3771           05516                           TC       DOWNFLAG                              #  CLEAR NODOFLAG
058434,001090: 37,3772           00054                           ADRES    NODOFLAG                              
058435,001091: 
058436,001092: 37,3773           06001                           TC       GOTOPOOH                              
058437,001093: 

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