Source Code

These source-code files are part of a reconstructed copy of Corona 261, the final, flown release of the Block I Command Module (CM) Apollo Guidance Computer (AGC) software for the AS-202 mission.

They have been created via disassembly of binary dumps of the original core rope memory modules actually flown on the mission, part numbers 1003733-171, 1003733-241, 1003733-191, 1003733-211, 1003733-221, and 1003733-241. The source code for the Apollo 4 and 6 software, Solarium 55, was used as a starting point, since it was directly derived from Corona and (at least in theory) only minimally modified.

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

006075,000002:                                                                                                  ## Copyright:   Public domain.
006076,000003:                                                                                                  ## Filename:    T4RUPT_OUTPUT_CONTROL_PROGRAMS.agc
006077,000004:                                                                                                  ## Purpose:     A section of Corona revision 261.
006078,000005:                                                                                                  ##              It is part of the source code for the Apollo Guidance Computer
006079,000006:                                                                                                  ##              (AGC) for AS-202. No original listings of this software are
006080,000007:                                                                                                  ##              available; instead, this file was created via disassembly of
006081,000008:                                                                                                  ##              the core rope modules actually flown on the mission.
006082,000009:                                                                                                  ## Assembler:   yaYUL
006083,000010:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
006084,000011:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
006085,000012:                                                                                                  ## Mod history: 2023-05-27 MAS  Created from Solarium 55.
006086,000013:                                                                                                  ##              2023-06-17 MAS  Updated for Corona.
006087,000014: 
006088,000015:    2626                                           BANK     1                                     
006089,000016:    2626           35501        T4RUPT             CAF      ZERO                                  #  ALONSO THINKS THIS SHOULD BE TURNED OFF
006090,000017:    2627           50010                           TS       OUT0                                  #  EVERY 60 MS AS A MATTER OF COURSE.
006091,000018:    2630           10033                           CCS      DSRUPTSW                              #  SEE IF THIS IS A SPECIAL RUPT TO
006092,000019:    2631           02641                           TC       REGRUPT    +1                         #  ZERO OUT0 20MS AFTER IT WAS DRIVEN BY
006093,000020:    2632           02640                           TC       REGRUPT                               #  DSPOUT. IF SO, DSRUPTSW IS NNZ.
006094,000021: 
006095,000022:    2633           64516                           AD       ONE                                   #  RESTORE DSRUPTSW TO ITS POSITIVE VALUE.
006096,000023:    2634           50033                           TS       DSRUPTSW                              
006097,000024: 
006098,000025:    2635           32647                           CAF      40MSRUPT                              #  SET TIME4 TO INTERRUPT 40 MS FROM NOW.
006099,000026:    2636           50040                           TS       TIME4                                 #  RE-ESTABLISHING THE REGULAR 60 MS
006100,000027:    2637           02266                           TC       NBRESUME                              #  PATTERN. THEN DO NO-BANK-SWITCH RESUME.
006101,000028: 
006102,000029:    2640           35362        REGRUPT            CAF      SEVEN                                 #  REGULAR 60 MS RUPT - COUNT DOWN ON
006103,000030:    2641           50033                 +1        TS       DSRUPTSW                              #  DSRUPTSW.
006104,000031: 
006105,000032:    2642           32646                           CAF      LT4RUPTA                              #  CALL IN APPROPRIATE BANK.
006106,000033:    2643           30015                           XCH      BANKREG                               #  SAVE BANKREG FOR RESUME.
006107,000034:    2644           50030                           TS       BANKRUPT                              
006108,000035:    2645           06115                           TC       T4RUPTA                               
006109,000036: 
006110,000037:    2646           20115        LT4RUPTA           CADR     T4RUPTA                               
006111,000038: 
006112,000039:    2647           37774        40MSRUPT           OCT      37774                                 #  INTERRUPT IN 40 MS.
006113,000040: 
006114,000041: 
006115,000042:                                                                                                  #  RELTAB IS A PACKED TABLE. RELAYWORD CODE IN UPPER 4 BITS, RELAY CODE
006116,000043:                                                                                                  #  IN LOWER 5 BITS.
006117,000044: 
006118,000045:    2650           04025        RELTAB             OCT      04025                                 
006119,000046:    2651           10003                           OCT      10003                                 
006120,000047:    2652           14031                           OCT      14031                                 
006121,000048:    2653           20033                           OCT      20033                                 
006122,000049:    2654           24017                           OCT      24017                                 
006123,000050:    2655           30036                           OCT      30036                                 
006124,000051:    2656           34034                           OCT      34034                                 
006125,000052:    2657           40023                           OCT      40023                                 
006126,000053:    2660           44035                           OCT      44035                                 
006127,000054:    2661           50037                           OCT      50037                                 
006128,000055:    2662           54000                           OCT      54000                                 
006129,000056:    2663           60000        RELTAB11           OCT      60000                                 
006130,000057:    2664           64000                           OCT      64000                                 
006131,000058:    2665           70000        70K                OCT      70000                                 #  ALSO USEFUL AS A BANK-SWITCHING MASK.
006132,000059: 
006133,000060: 
006134,000061:                                                                                                  #        ROUTINE TO ZERO (OR PSEUDO-ZERO) THE OPTICS COUNTERS.
006135,000062: 
006136,000063:    2666           35501        ZEROOCTR           CAF      ZERO                                  
006137,000064:    2667           50052                           TS       OPTX                                  
006138,000065:    2670           34502                           CAF      BIT13                                 
006139,000066:    2671           70730                           MASK     WASOPSET                              
006140,000067:    2672           10000                           CCS      A                                     
006141,000068:    2673           42676                           CS       20DEGS                                #  SET OPTY APPROX -20 DEGS (SXT ON)
006142,000069:    2674           50053                           TS       OPTY                                  
006143,000070:    2675           00001                           TC       Q                                     
006144,000071: 
006145,000072:    2676           16037        20DEGS             DEC      7199       B-14                       
006146,000073: 
006147,000074: 
006148,000075:                                                                                                  #        SWITCHED-BANK PORTION OF T4RUPT.
006149,000076: 
006150,000077: 10,6115                                           BANK     10                                    
006151,000078: 10,6115           30034        T4RUPTA            XCH      OVCTR                                 #  SAVE OVCTR.
006152,000079: 10,6116           50031                           TS       OVRUPT                                
006153,000080: 
006154,000081: 10,6117           37044                           CAF      60MSRUPT                              #  T4 NORMALLY INTERRUPTS EVERY 60 MS.
006155,000082: 10,6120           50040                           TS       TIME4                                 
006156,000083: 
006157,000084: 
006158,000085: 10,6121           10677        DSKYON             CCS      CDUIND                                #  DO AN IMU-CDU IF DESIRED.
006159,000086: 10,6122           06127                           TC       DOIMUCDU   +1                         #  WITH NEW CDUIND IN A.
006160,000087: 10,6123           06126                           TC       DOIMUCDU                              #  SET COUNT TO 2.
006161,000088: 
006162,000089: 10,6124           06210                           TC       DSRUPTBR                              #  NO CDU. NNZ MEANS CDUS ARE RESERVED.
006163,000090: 10,6125           06210                           TC       DSRUPTBR                              #  -0 MEANS THEY ARE AVAILABLE.
006164,000091: 
006165,000092: 
006166,000093: 
006167,000094: 
006168,000095:                                                                                                  #        T4RUPT IMU CDU DRIVE - SERVICED EVERY 60 MS.
006169,000096: 
006170,000097: 10,6126           35503        DOIMUCDU           CAF      TWO                                   #  SET CDUIND BACK TO 2.
006171,000098: 10,6127           50677                 +1        TS       CDUIND                                
006172,000099: 
006173,000100: 10,6130           30003                           XCH      LP                                    #  SAVE LP FOR IMU CDU DRIVE ONLY.
006174,000101: 10,6131           50032                           TS       LPRUPT                                
006175,000102: 
006176,000103: 10,6132           20677                           INDEX    CDUIND                                #  0 FOR X, 1 FOR Y, AND 2 FOR Z.
006177,000104: 10,6133           40700                           CS       THETAD                                #  PICK UP DESIRED ANGLE.
006178,000105: 10,6134           50600                           TS       ITEMP2                                
006179,000106: 
006180,000107: 10,6135           20677                           INDEX    CDUIND                                
006181,000108: 10,6136           40047                           CS       CDUX                                  #  READ AND SAVE CDU COUNTER.
006182,000109: 10,6137           07413                           TC       2SCOMDIF                              #  DIFFERENCE WITH -0 UNEQUAL TO +0.
006183,000110: 
006184,000111: 10,6140           25777                           EXTEND                                         #  RETURNS WITH DIFFERENCE IN A.
006185,000112: 10,6141           46202                           MP       KG                                    
006186,000113: 10,6142           50577                           TS       ITEMP1                                #  COMMAND TO TEMP STORAGE
006187,000114: 10,6143           10000                           CCS      A                                     #  CHECK SIGNUM OF COMMAND
006188,000115: 10,6144           06153                           TC       POSCOM2                               
006189,000116: 10,6145           06205                           TC       CDURSM                                
006190,000117: 10,6146           06150                           TC       NEGCOM2                               
006191,000118: 10,6147           06205                           TC       CDURSM                                
006192,000119: 
006193,000120: 10,6150           50577        NEGCOM2            TS       ITEMP1                                #  SAVE CCS OF COMMAND.
006194,000121: 10,6151           40677                           CS       CDUIND                                #  USE NEGATIVE TO SELECT OUT2 PATTERN.
006195,000122: 10,6152           06156                           TC       CDUOUT                                
006196,000123: 
006197,000124: 10,6153           50577        POSCOM2            TS       ITEMP1                                #  SAME AS ABOVE EXCEPT 1+CDUIND SELECTS.
006198,000125: 10,6154           34516                           CAF      ONE                                   
006199,000126: 10,6155           60677                           AD       CDUIND                                
006200,000127: 
006201,000128: 10,6156           50034        CDUOUT             TS       OVCTR                                 
006202,000129: 10,6157           36165                           CAF      DUMCODE                               #  CODE WHICH INTERRUPTS OUT2 PULSES DURING
006203,000130: 10,6160           30012                           XCH      OUT2                                  #   OUT2 MODIFICATION, BUT ALLOWS DETEC-
006204,000131: 10,6161           77470                           MASK     LOW8                                  #   TION OF THE VERY RARE EVENT THAT THE
006205,000132: 10,6162           30012                           XCH      OUT2                                  #   PULSE THATRESETS ANOTHER FIELD OF OUT2
006206,000133: 10,6163           66166                           AD       -DUMCODE                              #   WAS REQUESTED DURING THE ORIGINAL
006207,000134: 10,6164           10000                           CCS      A                                     #   XCH OUT2.
006208,000135: 10,6165           02040        DUMCODE            OCT      02040                                 #  INCOMPLETE OUT2 SETTINGS (X AND OPTX).
006209,000136: 10,6166           75737        -DUMCODE           OCT      -2040                                 
006210,000137: 10,6167           07402                           TC       JACKPOT                               #  THE PROBABILITY OF THIS IS ABOUT ZERO.
006211,000138: 
006212,000139: 10,6170           40577                           CS       ITEMP1                                #  FORM 1.0 - ABS(COMMAND).
006213,000140: 10,6171           64476                           AD       POSMAX                                
006214,000141: 10,6172           50042                           TS       OUTCR1                                
006215,000142: 
006216,000143: 10,6173           36165                           CAF      DUMCODE                               
006217,000144: 10,6174           30012                           XCH      OUT2                                  #  NOW ENABLE OUTCR1 BY SETTING OUT2.
006218,000145: 10,6175           20034                           INDEX    OVCTR                                 
006219,000146: 10,6176           67455                           AD       CDUCODES   +2                         
006220,000147: 10,6177           30012                           XCH      OUT2                                  
006221,000148: 10,6200           66166                           AD       -DUMCODE                              
006222,000149: 10,6201           10000                           CCS      A                                     
006223,000150: 
006224,000151: 10,6202           05605        KG                 DEC      .18                                   #  CDU DRIVING GAIN
006225,000152: 10,6203           03070                           TC       CCSHOLE                               
006226,000153: 10,6204           07402                           TC       JACKPOT                               
006227,000154: 
006228,000155: 10,6205           34516        CDURSM             CAF      ONE                                   #  RESTORE LP.
006229,000156: 10,6206           25777                           EXTEND                                         
006230,000157: 10,6207           40032                           MP       LPRUPT                                
006231,000158: 
006232,000159: 
006233,000160:                                                                                                  #        BRANCH ACCORDING TO DSRUPTSW  AND PERFORM THE APPROPRIATE DSRUPT FUNCTIONS.
006234,000161: 
006235,000162: 10,6210           20033        DSRUPTBR           INDEX    DSRUPTSW                              #  JUMP ON DSRUPTSW.
006236,000163: 10,6211           06212                           TC       +1                                    
006237,000164: 10,6212           06663                           TC       TMCHECK                               #  =0
006238,000165: 10,6213           06431                           TC       LOSCAN                                #  LOOK FOR LIFT OFF EVERY 480 MS.
006239,000166: 10,6214           06663                           TC       TMCHECK                               
006240,000167: 10,6215           06342                           TC       NWALM                                 #  INITIATE NIGHT WATCHMAN JOB.
006241,000168: 10,6216           06663                           TC       TMCHECK                               #  =4
006242,000169: 10,6217           06463                           TC       OPTTEST                               #  =5    SERVICE OPTICS CDUS.
006243,000170: 10,6220           06663                           TC       TMCHECK                               #  =6
006244,000171: 
006245,000172: 
006246,000173:                                                                                                  #        SYSTEM FAILURE INPUT BITS MONITOR - ENTERED EVERY 480 MS BY T4RUPT.
006247,000174: 
006248,000175: 10,6221           10726        ERRORMON           CCS      OLDERR                                #  IGNORE BITS IF C(OLDERR) = 40000
006249,000176: 10,6222           06225                           TC       ERRMON                                #  ORDINARILY POSITIVE.
006250,000177: 10,6223           06225                           TC       ERRMON                                
006251,000178: 10,6224           06445                           TC       ENDT4ERR                              
006252,000179: 
006253,000180: 10,6225           30006        ERRMON             XCH      IN2                                   #  REFRESH LAST-SAMPLED-ERRORS REGISTER.
006254,000181: 10,6226           30006                           XCH      IN2                                   
006255,000182: 10,6227           76237                           MASK     ERRMASK                               
006256,000183: 10,6230           50600                           TS       ITEMP2                                
006257,000184: 10,6231           36237                           CAF      ERRMASK                               
006258,000185: 10,6232           70726                           MASK     OLDERR                                
006259,000186: 10,6233           40000                           COM                                            
006260,000187: 10,6234           60600                           AD       ITEMP2                                
006261,000188: 10,6235           10000                           CCS      A                                     
006262,000189: 10,6236           06242                           TC       ERRCHANG                              #  CHANGED.
006263,000190: 10,6237           07000        ERRMASK            OCT      07000                                 #  IMU, CDU, AND PIPA FAIL.
006264,000191: 10,6240           06242                           TC       ERRCHANG                              
006265,000192: 10,6241           06445                           TC       ENDT4ERR                              #  EXIT - NO CHANGE HAS TAKEN PLACE.
006266,000193: 
006267,000194: 10,6242           46237        ERRCHANG           CS       ERRMASK                               #  UPDATE IMU FAIL BITS IN OLDERR.
006268,000195: 10,6243           70726                           MASK     OLDERR                                
006269,000196: 10,6244           60600                           AD       ITEMP2                                
006270,000197: 10,6245           50726                           TS       OLDERR                                
006271,000198: 
006272,000199: 10,6246           36264                           CAF      LITESOUT                              
006273,000200: 10,6247           70723                           MASK     DSPTAB     +11D                       
006274,000201: 10,6250           64500                           AD       BIT15                                 #  TO INDICATE CHANGE.
006275,000202: 10,6251           50723                           TS       DSPTAB     +11D                       
006276,000203: 
006277,000204: 10,6252           35503                           CAF      TWO                                   #  TURN ON LIGHTS ACCORDING TO C(OLDERR).
006278,000205: 10,6253           50600        ERRSCAN            TS       ITEMP2                                
006279,000206: 10,6254           20000                           INDEX    A                                     
006280,000207: 10,6255           34503                           CAF      BIT12                                 #  SELECT BIT IN OLDERR.
006281,000208: 10,6256           70726                           MASK     OLDERR                                
006282,000209: 10,6257           10000                           CCS      A                                     
006283,000210: 10,6260           06265                           TC       BITON                                 #  BIT IS PRESENT.
006284,000211: 
006285,000212: 10,6261           10600        ERRSCAN3           CCS      ITEMP2                                #  LOOP THREE TIMES THROUGH.
006286,000213: 10,6262           06253                           TC       ERRSCAN                               
006287,000214: 
006288,000215: 10,6263           06445                           TC       ENDT4ERR                              #  FINISHED.
006289,000216: 
006290,000217: 10,6264           37437        LITESOUT           OCT      37437                                 
006291,000218: 
006292,000219: 
006293,000220:                                                                                                  #        PROCESS ERROR SIGNALS PRESENT. NOTE THAT C(WASKSET) INDICATES THE STATE OF THE SYSTEM SINCE NO RELAYS
006294,000221:                                                                                                  #  HAVE BEEN SWITCHED IN THE LAST 120 MS, AND KSAMP WAS EXECUTED 60 MS AGO.
006295,000222: 
006296,000223: 10,6265           20600        BITON              INDEX    ITEMP2                                #  2, 1, OR 0.
006297,000224: 10,6266           06267                           TC       +1                                    
006298,000225: 10,6267           06272                           TC       IMUFAIL                               
006299,000226: 10,6270           06333                           TC       PIPAFAIL                              
006300,000227: 10,6271           06314                           TC       CDUFAIL                               
006301,000228: 
006302,000229: 10,6272           10727        IMUFAIL            CCS      WASKSET                               #  FAILURE NOT LEGITMATE IF IN COARSE ALIGN
006303,000230: 10,6273           06303                           TC       IMUFAIL2                              #  PURSUE THIS ONE.
006304,000231: 10,6274           06335                           TC       NOFAIL                                #  NO MODE-DEPENDENT FAILURE MONITORING
006305,000232: 10,6275           06335                           TC       NOFAIL                                #  IF MODING FAILURE OR PROCEDURAL FAILURE.
006306,000233: 10,6276           06335                           TC       NOFAIL                                
006307,000234: 
006308,000235: 10,6277           34507        IMUFAIL3           CAF      BIT8                                  #  TURN ON IMU FAIL LIGHT.
006309,000236: 10,6300           60723        FAILITON           AD       DSPTAB     +11D                       #  (WHICH HAD BEEN ZEROED IN ALL LIGHT
006310,000237: 10,6301           50723                           TS       DSPTAB     +11D                       #  POSITIONS).
006311,000238: 10,6302           06261                           TC       ERRSCAN3                              #  PROCESS NEXT INPUT BIT.
006312,000239: 
006313,000240: 10,6303           64516        IMUFAIL2           AD       ONE                                   #  SEE IF COASE ALIGN ACHIEVED.
006314,000241: 10,6304           74515                           MASK     BIT2                                  
006315,000242: 10,6305           10000                           CCS      A                                     
006316,000243: 10,6306           06335                           TC       NOFAIL                                
006317,000244: 10,6307           34513                           CAF      BIT4                                  #  SEE IF WITHIN 5 SECONDS OF COARSE ALIGN.
006318,000245: 10,6310           70726                           MASK     OLDERR                                
006319,000246: 10,6311           10000                           CCS      A                                     
006320,000247: 10,6312           06335                           TC       NOFAIL                                #  IF SO.
006321,000248: 10,6313           06277                           TC       IMUFAIL3                              #  FAILED.
006322,000249: 
006323,000250: 10,6314           10727        CDUFAIL            CCS      WASKSET                               
006324,000251: 10,6315           06323                           TC       CDUFAIL2                              #  FAILURE ONLY IF IN FINE ALIGN.
006325,000252: 10,6316           06335                           TC       NOFAIL                                #  (SEE NOTE FOR IMUFAIL).
006326,000253: 10,6317           06335                           TC       NOFAIL                                
006327,000254: 10,6320           06335                           TC       NOFAIL                                
006328,000255: 
006329,000256: 10,6321           34511        CDUFAIL3           CAF      BIT6                                  #  CDU FAIL LIGHT ON.
006330,000257: 10,6322           06300                           TC       FAILITON                              
006331,000258: 
006332,000259: 10,6323           44511        CDUFAIL2           CS       BIT6                                  #  TURN ON FAIL LIGHT ONLY IF IN FINE ALIGN
006333,000260: 10,6324           70727                           MASK     WASKSET                               
006334,000261: 10,6325           66330                           AD       -BIT4                                 
006335,000262: 10,6326           10000                           CCS      A                                     
006336,000263: 10,6327           06335                           TC       NOFAIL                                
006337,000264: 10,6330           77767        -BIT4              OCT      -10                                   
006338,000265: 10,6331           06335                           TC       NOFAIL                                
006339,000266: 10,6332           06321                           TC       CDUFAIL3                              #  TURN ON THE LIGHT.
006340,000267: 
006341,000268: 10,6333           34510        PIPAFAIL           CAF      BIT7                                  #  TURN ON FAIL LIGHT UNCONDITIONALLY.
006342,000269: 10,6334           06300                           TC       FAILITON                              
006343,000270: 
006344,000271: 10,6335           20600        NOFAIL             INDEX    ITEMP2                                #  COMES HERE IF PRESENT MODE INHIBITS FAIL
006345,000272: 10,6336           44503                           CS       BIT12                                 #  BITS. THIS MAINTAINS PRESENT ACTUAL
006346,000273: 10,6337           70726                           MASK     OLDERR                                #  ERRORS IN OLDERR FOR THE NIGHT WATCH-
006347,000274: 10,6340           50726                           TS       OLDERR                                #  MANS BENEFIT, IN PARTICULAR.
006348,000275: 10,6341           06261                           TC       ERRSCAN3                              
006349,000276: 
006350,000277: 
006351,000278:                                                                                                  #        NIGHT-WATCHMAN ALARM, SERVICED EVERY 480 MS BY T4RUPT.
006352,000279: 
006353,000280: 10,6342           32171        NWALM              CAF      PRIO36                                
006354,000281: 10,6343           02052                           TC       NOVAC                                 
006355,000282: 10,6344           20346                           CADR     NWJOB                                 
006356,000283: 
006357,000284: 10,6345           06445                           TC       S4BSCAN                               
006358,000285: 
006359,000286: 
006360,000287: 
006361,000288:                                                                                                  #        NIGHT-WATCHMAN JOB - DIDDLES TMALM FOR 24 MICRO-SEC AFTER VERIFYING THAT NEWJOB IS BEING TESTED.
006362,000289: 
006363,000290: 10,6346           37506        NWJOB              CAF      NWMASK                                #  DONT ISSUE SIGNAL IF IMU, PIPA, OR
006364,000291: 10,6347           20017                           INHINT                                         
006365,000292: 10,6350           70726                           MASK     OLDERR                                #  RESTART FAIL IS ON.
006366,000293: 10,6351           10000                           CCS      A                                     
006367,000294: 10,6352           06367                           TC       NONNWJOB                              
006368,000295: 10,6353           44513        DONW               CS       BIT4                                  
006369,000296: 10,6354           70011                           MASK     OUT1                                  
006370,000297: 10,6355           50001                           TS       Q                                     
006371,000298: 10,6356           40011                           CS       OUT1                                  
006372,000299: 10,6357           74513                           MASK     BIT4                                  
006373,000300: 10,6360           60001                           AD       Q                                     
006374,000301: 10,6361           30011                           XCH      OUT1                                  
006375,000302: 10,6362           50011                           TS       OUT1                                  
006376,000303: 10,6363           44514                           CS       BIT3                                  #  RESET INHIBIT INDICATOR.
006377,000304: 10,6364           70726                           MASK     OLDERR                                
006378,000305: 10,6365           50726                           TS       OLDERR                                
006379,000306: 10,6366           02124                           TC       ENDOFJOB                              
006380,000307: 
006381,000308: 10,6367           62261        NONNWJOB           AD       BANKMASK                              #  SEE IF PIPA FAIL ONLY PROBLEM.
006382,000309: 10,6370           10000                           CCS      A                                     
006383,000310: 10,6371           06411                           TC       NOINH                                 
006384,000311: 10,6372           06411                           TC       NOINH                                 
006385,000312: 10,6373           06411                           TC       NOINH                                 
006386,000313: 
006387,000314: 10,6374           45362                           CS       SEVEN                                 #  CHECK FOR MODES 22 - 27.
006388,000315: 10,6375           70612                           MASK     MODREG                                
006389,000316: 10,6376           66401                           AD       -MODE20                               
006390,000317: 10,6377           10000                           CCS      A                                     
006391,000318: 10,6400           06411                           TC       NOINH                                 
006392,000319: 10,6401           77757        -MODE20            OCT      -20                                   
006393,000320: 10,6402           06411                           TC       NOINH                                 
006394,000321: 
006395,000322: 10,6403           46407                           CS       MODE21                                #  NO MODE 20.
006396,000323: 10,6404           60612                           AD       MODREG                                
006397,000324: 10,6405           10000                           CCS      A                                     
006398,000325: 10,6406           06353                           TC       DONW                                  
006399,000326: 10,6407           00021        MODE21             OCT      21                                    
006400,000327: 10,6410           06353                           TC       DONW                                  
006401,000328: 
006402,000329: 10,6411           44514        NOINH              CS       BIT3                                  #  SEE IF WE HAVE HAD TWO CONSECUTIVE
006403,000330: 10,6412           70726                           MASK     OLDERR                                #  CONSECUTIVE INHIBITS.
006404,000331: 10,6413           64514                           AD       BIT3                                  
006405,000332: 10,6414           30726                           XCH      OLDERR                                
006406,000333: 10,6415           74514                           MASK     BIT3                                  
006407,000334: 10,6416           10000                           CCS      A                                     
006408,000335: 10,6417           06421                           TC       +2                                    
006409,000336: 10,6420           02124                           TC       ENDOFJOB                              
006410,000337: 10,6421           20016                           RELINT                                         
006411,000338: 10,6422           02346                           TC       CHECKMM                               #  SET MM 77 IF REQUIRED.
006412,000339: 10,6423           00077                           OCT      77                                    
006413,000340: 10,6424           06426                           TC       +2                                    
006414,000341: 10,6425           02124                           TC       ENDOFJOB                              
006415,000342: 10,6426           02362                           TC       NEWMODE                               
006416,000343: 10,6427           00077                           OCT      77                                    #  G AND N FLUSHED.
006417,000344: 10,6430           02124                           TC       ENDOFJOB                              
006418,000345: 
006419,000346: 
006420,000347:                                                                                                  #        SCAN FOR LIFT-OFF EVERY 480 MS.
006421,000348: 
006422,000349: 10,6431           40006        LOSCAN             CS       IN2                                   
006423,000350: 10,6432           40006                           CS       IN2                                   
006424,000351: 10,6433           74512                           MASK     BIT5                                  
006425,000352: 10,6434           10000                           CCS      A                                     
006426,000353: 10,6435           06445                           TC       S4BSCAN                               
006427,000354: 10,6436           34515                           CAF      BIT2                                  #  SEE IF SIGNAL ALREADY RECEIVED.
006428,000355: 10,6437           70646                           MASK     FLAGWRD1                              
006429,000356: 10,6440           10000                           CCS      A                                     
006430,000357: 10,6441           06445                           TC       S4BSCAN                               
006431,000358: 
006432,000359: 10,6442           32157                           CAF      PRIO24                                
006433,000360: 10,6443           02046                           TC       FINDVAC                               
006434,000361: 10,6444           64000                           CADR     LIFTOFF                               
006435,000362: 
006436,000363:                                                                                                  #        S4B SEPARATE SCANNER - ENTERED EVERY 120 MS.
006437,000364: 
006438,000365: 10,6445           30006        S4BSCAN            XCH      IN2                                   
006439,000366: 10,6446           30006                           XCH      IN2                                   
006440,000367: 10,6447           74507                           MASK     BIT8                                  
006441,000368: 10,6450           10000                           CCS      A                                     
006442,000369: 10,6451           06453                           TC       +2                                    #  IF BIT ON.
006443,000370: 10,6452           06516                           TC       CDRVE                                 #  NORMAL CASE.
006444,000371: 
006445,000372: 10,6453           34507                           CAF      BIT8                                  #  SEE IF FIRST TIME BIT ON.
006446,000373: 10,6454           70646                           MASK     STATE      +1                         
006447,000374: 10,6455           10000                           CCS      A                                     
006448,000375: 10,6456           06516                           TC       CDRVE                                 #  NO ACTION UNLESS FIRST TIME ON.
006449,000376: 
006450,000377: 10,6457           32160                           CAF      PRIO25                                
006451,000378: 10,6460           02046                           TC       FINDVAC                               
006452,000379: 10,6461           64407                           CADR     S4BSMSEP                              
006453,000380: 10,6462           06516                           TC       CDRVE                                 
006454,000381: 
006455,000382: 10,6463  10,6445               NOOPTCDU           EQUALS   S4BSCAN                               
006456,000383: 10,6463  10,6445               ENDT4ERR           EQUALS   S4BSCAN                               
006457,000384: 
006458,000385: 
006459,000386:                                                                                                  #        OPTICS CDU DRIVING PROGRAM, SERVICED EVERY 480 MS BY DSRUPT.
006460,000387: 
006461,000388: 10,6463           10703        OPTTEST            CCS      OPTIND                                #  PNZ FOR ACTIVE, NEGATIVE FOR INACTIVE.
006462,000389: 10,6464           06471                           TC       +5                                    #  DRIVE CDU.
006463,000390: 10,6465           06470                           TC       +3                                    #  DRIVE CDU.
006464,000391: 10,6466           06445                           TC       NOOPTCDU                              #  NNZ MEANS RESERVED.
006465,000392: 10,6467           06445                           TC       NOOPTCDU                              #  -0 MEANS AVAILABLE. 
006466,000393: 
006467,000394: 10,6470           34516                 +3        CAF      ONE                                   #  GOES 1(-1)0.
006468,000395: 10,6471           50703                 +5        TS       OPTIND                                
006469,000396: 
006470,000397: 10,6472           50637                           TS       RUPTREG1                              #  SET UP OUT2SUB TO START OUT-COUNTER.
006471,000398: 10,6473           34516                           CAF      ONE                                   #  (TO ADDRESS OUTCR2).
006472,000399: 10,6474           50640                           TS       RUPTREG2                              
006473,000400: 
006474,000401: 10,6475           10703                           CCS      OPTIND                                #  DRIVE OPTICS Y DIFFERENT THAN OTHERS.
006475,000402: 10,6476           06507                           TC       BLIVOT3                               #  OVF UNCORRECTION WONT WORK FOR OPTY.
006476,000403: 
006477,000404: 10,6477           20703        REGDIFF            INDEX    OPTIND                                
006478,000405: 10,6500           40704                           CS       DESOPTX                               #  DESIRED ANGLES.
006479,000406: 10,6501           50600                           TS       ITEMP2                                
006480,000407: 
006481,000408: 10,6502           20703                           INDEX    OPTIND                                
006482,000409: 10,6503           40052                           CS       OPTX                                  #  READ COUNTER.
006483,000410: 10,6504           07413                           TC       2SCOMDIF                              #  TAKES DIFFERENCE WITH -0 UNEQUAL TO +0.
006484,000411: 
006485,000412: 10,6505           06613        OPTOUT             TC       OUT2SUB                               
006486,000413: 
006487,000414: 10,6506           06445                           TC       S4BSCAN                               
006488,000415: 
006489,000416: 10,6507           40053        BLIVOT3            CS       OPTY                                  #  IF THE DIFFERENCE OVERFLOWS, THE ERROR
006490,000417: 10,6510           60705                           AD       DESOPTX    +1                         #   ERROR SIGNAL IS GREATER THAN 16383, SO
006491,000418: 10,6511           50001                           TS       Q                                     #   JUST THROW IN POSMAX WITH THE RIGHT 
006492,000419: 10,6512           06477                           TC       REGDIFF                               #   SIGN AND CALL IT A DAY. OTHERWISE FOLL-
006493,000420: 
006494,000421: 10,6513           20000                           INDEX    A                                     #   THE USUAL PROCEDURES.
006495,000422: 10,6514           44477                           CS       LIMITS                                
006496,000423: 10,6515           06505                           TC       OPTOUT                                
006497,000424: 
006498,000425: 
006499,000426:                                                                                                  #        CDRVE  CHANGES A BANK OF C RELAYS IF ANY CHANGE IS INDICATED IN THE C-RELAY PORTION OF DSPTAB.
006500,000427: 
006501,000428: 10,6516           10725        CDRVE              CCS      DSPTAB     +13D                       #  SPACECRAFT RELAYS HAVE HIGHEST PRIORITY.
006502,000429: 10,6517           06526                           TC       CDRVE1                                
006503,000430: 10,6520           06526                           TC       CDRVE1                                
006504,000431: 
006505,000432: 10,6521           30725                           XCH      DSPTAB     +13D                       
006506,000433: 10,6522           74302                           MASK     LOW11                                 
006507,000434: 10,6523           50725                           TS       DSPTAB     +13D                       
006508,000435: 10,6524           62665                           AD       RELTAB11   +2                         
006509,000436: 10,6525           06605                           TC       DSPLAYC                               
006510,000437: 
006511,000438: 10,6526           10723        CDRVE1             CCS      DSPTAB     +11D                       #  IMU AND CAUTION LIGHTS.
006512,000439: 10,6527           06536                           TC       CDRVE2                                
006513,000440: 10,6530           06536                           TC       CDRVE2                                
006514,000441: 
006515,000442: 10,6531           30723                           XCH      DSPTAB     +11D                       
006516,000443: 10,6532           74302                           MASK     LOW11                                 
006517,000444: 10,6533           50723                           TS       DSPTAB     +11D                       
006518,000445: 10,6534           62663                           AD       RELTAB11                              
006519,000446: 10,6535           06605                           TC       DSPLAYC                               
006520,000447: 
006521,000448: 10,6536           10724        CDRVE2             CCS      DSPTAB     +12D                       #  OPTICS.
006522,000449: 10,6537           06546                           TC       DSPOUT                                
006523,000450: 10,6540           06546                           TC       DSPOUT                                
006524,000451: 
006525,000452: 10,6541           30724                           XCH      DSPTAB     +12D                       
006526,000453: 10,6542           74302                           MASK     LOW11                                 
006527,000454: 10,6543           50724                           TS       DSPTAB     +12D                       
006528,000455: 10,6544           62664                           AD       RELTAB11   +1                         
006529,000456: 10,6545           06605                           TC       DSPLAYC                               
006530,000457: 
006531,000458: 10,6546           10707        DSPOUT             CCS      NOUT                                  #  ENTERED IN INTERRUPTED STATE AT END OF
006532,000459: 10,6547           06551                           TC       +2                                    #                          DSRUPT
006533,000460: 10,6550           02262                           TC       LVDSRUPT                              
006534,000461: 10,6551           50707                           TS       NOUT                                  
006535,000462: 10,6552           45501                           CS       ZERO                                  
006536,000463: 10,6553           50600                           TS       DSRUPTEM                              #  SET TO -0 FOR 1ST PASS THRU DSPTAB
006537,000464: 10,6554           30706                           XCH      DSPCNT                                
006538,000465: 10,6555           65504                           AD       NEG0                                  #  TO PREVENT +0
006539,000466: 10,6556           50706                           TS       DSPCNT                                
006540,000467: 10,6557           20706        DSPSCAN            INDEX    DSPCNT                                
006541,000468: 10,6560           10710                           CCS      DSPTAB                                
006542,000469: 10,6561           10706                           CCS      DSPCNT                                #  IF DSPTAB ENTRY +, SKIP
006543,000470: 10,6562           06555                           TC       DSPSCAN    -2                         #  IF DSPCNT +, AGAIN
006544,000471: 10,6563           06574                           TC       DSPLAY                                #  IF DSPTAB ENTRY -, DISPLAY
006545,000472: 10,6564           00012        TABLNTH            OCT      12                                    #  DEC 10   LENGTH OF DSPTAB
006546,000473: 10,6565           10600                           CCS      DSRUPTEM                              #  IF DSRUPTEM=+0,2ND PASS THRU DSPTAB
006547,000474: 10,6566           03070                           TC       CCSHOLE                               #  (DSPCNT=0). +0 INTO NOUT, RESUME.
006548,000475: 10,6567           50707                           TS       NOUT                                  
006549,000476: 10,6570           02262                           TC       LVDSRUPT                              
006550,000477: 10,6571           50600                           TS       DSRUPTEM                              #  IF DSRUPTEM=-0,1ST PASS THRU DSPTAB
006551,000478: 10,6572           36564                           CAF      TABLNTH                               #  (DSPCNT=0). +0 INTO DSRUPTEM. PASS AGAIN
006552,000479: 10,6573           06556                           TC       DSPSCAN    -1                         
006553,000480: 
006554,000481: 10,6574           64516        DSPLAY             AD       ONE                                   
006555,000482: 10,6575           20706                           INDEX    DSPCNT                                
006556,000483: 10,6576           50710                           TS       DSPTAB                                #  REPLACE POSITIVELY
006557,000484: 10,6577           74302                           MASK     LOW11                                 #  REMOVE BITS 12 TO 15
006558,000485: 10,6600           50600                           TS       DSRUPTEM                              
006559,000486: 10,6601           32261                           CAF      HI5                                   
006560,000487: 10,6602           20706                           INDEX    DSPCNT                                
006561,000488: 10,6603           72650                           MASK     RELTAB                                #  PICK UP BITS 12 TO 15 OF RELTAB ENTRY
006562,000489: 10,6604           60600                           AD       DSRUPTEM                              
006563,000490: 10,6605           50010        DSPLAYC            TS       OUT0                                  
006564,000491: 10,6606           37131                           CAF      20MSRUPT                              #  SET T4 TO INTERRUPT IN 20 MS SO OUT0 MAY
006565,000492: 10,6607           50040                           TS       TIME4                                 #  BE TURNED OFF AS SOON AS POSSIBLE. WHEN
006566,000493: 10,6610           40033                           CS       DSRUPTSW                              #  THIS RUPT OCCURS, T4 IS RESET TO FIRE
006567,000494: 10,6611           50033                           TS       DSRUPTSW                              #  IN 40MS, RE-ESTABLISHING THE REGULAR 60.
006568,000495: 
006569,000496: 10,6612           02262                           TC       LVDSRUPT                              
006570,000497: 
006571,000498: 10,6613     2262               LVDSRUPT           EQUALS   OVRESUME                              
006572,000499: 
006573,000500: 
006574,000501:                                                                                                  #        OUT2SUB IS USED BY THE GYRO DRIVE AND THE OPTICS CDU DRIVE TO SET THE PROPER SECTION OF OUT2 AND THE
006575,000502:                                                                                                  #  PROPER OUT-COUNTER TO DELIVER THE COMMAND ARRIVING IN A.
006576,000503: 
006577,000504: 10,6613           50577        OUT2SUB            TS       ITEMP1                                #  SIGNED COMMAND.
006578,000505: 10,6614           30001                           XCH      Q                                     
006579,000506: 10,6615           50600                           TS       ITEMP2                                
006580,000507: 10,6616           10577                           CCS      ITEMP1                                
006581,000508: 10,6617           06626                           TC       POSCOM                                
006582,000509: 10,6620           00600                           TC       ITEMP2                                #  RETURN TO CALLER ON EITHER ZERO.
006583,000510: 10,6621           06623                           TC       NEGCOM                                
006584,000511: 10,6622           00600                           TC       ITEMP2                                
006585,000512: 
006586,000513: 10,6623           50577        NEGCOM             TS       ITEMP1                                #  CCS OF COMMAND LEFT IN ITEMP1
006587,000514: 10,6624           40637                           CS       RUPTREG1                              #  0 AND 1 FOR OPTICS - 2, 3, AND 4 FOR GYR
006588,000515: 10,6625           06631                           TC       SETOUT2                               
006589,000516: 
006590,000517: 10,6626           50577        POSCOM             TS       ITEMP1                                #  CCS OF COMMAND.
006591,000518: 10,6627           34516                           CAF      ONE                                   
006592,000519: 10,6630           60637                           AD       RUPTREG1                              
006593,000520: 
006594,000521: 
006595,000522: 10,6631           50642        SETOUT2            TS       RUPTREG4                              
006596,000523: 10,6632           36165                           CAF      DUMCODE                               #  FOR A DESCRIPTION OF THIS OUT2 PROCEDURE
006597,000524: 10,6633           30012                           XCH      OUT2                                  #  SEE THE IMUCDU DRIVE PROGRAM EARLIER IN 
006598,000525: 10,6634           20640                           INDEX    RUPTREG2                              #  T4RUPT.
006599,000526: 10,6635           77470                           MASK     OUT2MASK                              
006600,000527: 10,6636           30012                           XCH      OUT2                                  
006601,000528: 10,6637           66166                           AD       -DUMCODE                              
006602,000529: 10,6640           10000                           CCS      A                                     
006603,000530: 10,6641           03070                           TC       CCSHOLE                               
006604,000531: 10,6642           03070                           TC       CCSHOLE                               
006605,000532: 10,6643           07402                           TC       JACKPOT                               
006606,000533: 
006607,000534: 10,6644           40577                           CS       ITEMP1                                #  ABS(COMMAND) - 1.
006608,000535: 10,6645           64476                           AD       POSMAX                                #  FORMS 1.0 - ABS(COMMAND).
006609,000536: 10,6646           20640                           INDEX    RUPTREG2                              
006610,000537: 10,6647           50042                           TS       OUTCR1                                
006611,000538: 
006612,000539: 10,6650           36165                           CAF      DUMCODE                               #  ENABLE THE APPROPRIATE OUTCR BY SETTING
006613,000540: 10,6651           30012                           XCH      OUT2                                  #  THE PROPER CODE IN OUT2
006614,000541: 10,6652           20642                           INDEX    RUPTREG4                              
006615,000542: 10,6653           67476                           AD       OPTCODES   +1                         
006616,000543: 10,6654           30012                           XCH      OUT2                                  
006617,000544: 10,6655           66166                           AD       -DUMCODE                              
006618,000545: 10,6656           10000                           CCS      A                                     
006619,000546: 10,6657           03070                           TC       CCSHOLE                               
006620,000547: 10,6660           03070                           TC       CCSHOLE                               
006621,000548: 10,6661           07402                           TC       JACKPOT                               
006622,000549: 
006623,000550: 10,6662           00600                           TC       ITEMP2                                
006624,000551: 
006625,000552: 10,6663                        NOGYROC            EQUALS                                         
006626,000553: 
006627,000554: 10,6663                        ENDGYROC           EQUALS                                         
006628,000555: 
006629,000556: 
006630,000557:                                                                                                  #  ALTERNATE 120 MS LEG OF T4RUPT.
006631,000558: 
006632,000559: 10,6663           35362        TMCHECK            CAF      SEVEN                                 #  ALLOW UP TO SEVEN TM WORDS UNTIL NEXT
006633,000560: 10,6664           30670                           XCH      TELCOUNT                              #  DSRUPT0 EXECUTION. CHECK LAST TM PERIOD
006634,000561: 10,6665           66667                           AD       NEG7                                  #  TO SEE IF AT LEAST ONE WORD WENT OUT.
006635,000562: 10,6666           10000                           CCS      A                                     #  THIS SATISFIES BOTH HIGH- AND LOW-POWER.
006636,000563: 
006637,000564: 10,6667           77770        NEG7               DEC      -7         B-14                       
006638,000565: 10,6670           03070                           TC       CCSHOLE                               
006639,000566: 10,6671           06673                           TC       +2                                    #  OK - PROCEED.
006640,000567: 10,6672           02567                           TC       TMFAIL                                #  TURN ON TM FAIL LIGHT BEFORE KSAMP.
006641,000568: 
006642,000569: 10,6673           30007        MODESAMP           XCH      IN3                                   #  SAMPLE MODE BITS AND TUCK THEM AWAY
006643,000570: 10,6674           30007                           XCH      IN3                                   #  FOR KSAMP AND OPTSAMP.
006644,000571: 10,6675           50637                           TS       KSAMPTEM                              
006645,000572: 10,6676           74720                           MASK     LOW7                                  
006646,000573: 10,6677           30637                           XCH      KSAMPTEM                              
006647,000574: 10,6700           76752                           MASK     OPTBITS                               
006648,000575: 10,6701           50640                           TS       OSAMPTEM                              
006649,000576: 10,6702           30004                           XCH      IN0                                   #  THIS CLEARS THE KEY CODE WITHIN 120MS
006650,000577:                                                                                                  #   OF THE TIME THE KEY WAS RELEASED.
006651,000578: 
006652,000579: 10,6703           50034                           TS       OVCTR                                 #  SEE IF INHIBIT UP-SYNC BIT IS ON.
006653,000580: 10,6704           74510                           MASK     BIT7                                  
006654,000581: 10,6705           10000                           CCS      A                                     
006655,000582: 10,6706           02567                           TC       TMFAIL                                #  IF SO, TURN ON TELEMETRY FAIL LIGHT.
006656,000583: 
006657,000584: 10,6707           10034                           CCS      OVCTR                                 #  SEE IF MARK BUTTON DOWN.
006658,000585: 10,6710           06716                           TC       OPTSAMP                               
006659,000586: 10,6711           06716                           TC       OPTSAMP                               
006660,000587: 10,6712           06713                           TC       +1                                    
006661,000588: 10,6713           36765                           CAF      NOMKACPT                              #  DONT INCLUDE MARK ACCEPT INFORMATION.
006662,000589: 10,6714           70640                           MASK     OSAMPTEM                              
006663,000590: 10,6715           50640                           TS       OSAMPTEM                              
006664,000591: 
006665,000592: 
006666,000593:                                                                                                  #        OPTICS MODE SAMPLING.
006667,000594: 
006668,000595: 10,6716           10732        OPTSAMP            CCS      DESOPSET                              #  IS COMPUTER COMMANDING
006669,000596: 10,6717           06733                           TC       OPTCOMM                               #  YES
006670,000597: 10,6720           07040                           TC       NOOPCOM                               #  NO
006671,000598: 
006672,000599: 10,6721           34503                           CAF      BIT12                                 #  MAKE SURE WE ARE STILL ZEROING
006673,000600: 10,6722           70640                           MASK     OSAMPTEM                              #  (THIS PORTION ENTERED FOR 30 SEC. DURING
006674,000601: 10,6723           60730                           AD       WASOPSET                              #     MANUAL OPTICS ZERO).
006675,000602: 10,6724           74503                           MASK     BIT12                                 #  SEE IF CDU-ZERO BIT HAS CHANGED.
006676,000603: 10,6725           10000                           CCS      A                                     #  ALARM IF SO.
006677,000604: 10,6726           06730                           TC       +2                                    
006678,000605: 10,6727           07077                           TC       LVOPTSMP                              
006679,000606: 
006680,000607: 10,6730           03015                           TC       ALARM                                 #  IF NOT, ALARM ON
006681,000608: 10,6731           00101                           OCT      00101                                 #  OPTICS ALARM NO. 1.
006682,000609: 10,6732           07077                           TC       LVOPTSMP                              
006683,000610: 
006684,000611: 10,6733           34501        OPTCOMM            CAF      BIT14                                 #  SEE IF COMPUTER-ON SWITCH JUST CHANGED.
006685,000612: 10,6734           70730                           MASK     WASOPSET                              #  FORM WAS BIT14 - IS BIT14.
006686,000613: 10,6735           50001                           TS       Q                                     
006687,000614: 10,6736           34501                           CAF      BIT14                                 
006688,000615: 10,6737           70640                           MASK     OSAMPTEM                              #  PRESENT INPUT BITS.
006689,000616: 10,6740           40000                           COM                                            
006690,000617: 10,6741           60001                           AD       Q                                     
006691,000618: 10,6742           10000                           CCS      A                                     
006692,000619: 10,6743           06772                           TC       COMP.OFF                              #  SWITCH JUST TURNED OFF.
006693,000620: 10,6744           34760        OFFMASK            OCT      34760                                 #  USED FOR SETTING IMU C-RELAYS.
006694,000621: 10,6745           07001                           TC       COMP.ON                               #  SWITCH JUST TURNED ON.
006695,000622: 
006696,000623: 10,6746           40732        OPTCOMM2           CS       DESOPSET                              #  SEE IF DESIRED MODE ACHIEVED.
006697,000624: 10,6747           60640                           AD       OSAMPTEM                              
006698,000625: 10,6750           10000                           CCS      A                                     
006699,000626: 10,6751           06755                           TC       OPTCTEST                              #  COMMAND NOT EQUAL TO ACTUAL
006700,000627: 10,6752           35000        OPTBITS            OCT      35000                                 
006701,000628: 10,6753           06762                           TC       OPTCOMM3                              #  NO MATCH - SEE IF COMP ON ONLY MISMATCH.
006702,000629: 10,6754           07077                           TC       LVOPTSMP                              #  DONE IF MODES AGREE. 
006703,000630: 
006704,000631: 10,6755           10724        OPTCTEST           CCS      DSPTAB     +12D                       #  IS CHANGE COMING.
006705,000632: 10,6756           07011                           TC       OPTCFAIL                              #  NO - C-RELAY FAILURE OR UNWANTED MANUAL
006706,000633: 10,6757           07011                           TC       OPTCFAIL                              #  INTERVENTION.
006707,000634: 
006708,000635: 10,6760           35501                           CAF      ZERO                                  #  LEAVE WAITING FLAG IN WASOPSET.
006709,000636: 10,6761           07100                           TC       LVOPTSMP   +1                         
006710,000637: 
006711,000638: 10,6762           67201        OPTCOMM3           AD       -BIT14+1                              #  NO ERROR IF COMPUTER-ON ONLY ONE DIFF.
006712,000639: 10,6763           10000                           CCS      A                                     
006713,000640: 10,6764           06755                           TC       OPTCTEST                              
006714,000641: 10,6765           31000        NOMKACPT           OCT      31000                                 
006715,000642: 10,6766           06755                           TC       OPTCTEST                              
006716,000643: 10,6767           34501                           CAF      BIT14                                 #  IN THIS CASE, SET COMP.ON BIT TO 1 IN
006717,000644: 10,6770           60640                           AD       OSAMPTEM                              #  WASOPSET TO PREVENT +0 FOR CORRECT MODES
006718,000645: 10,6771           07100                           TC       LVOPTSMP   +1                         
006719,000646: 
006720,000647: 10,6772           10703        COMP.OFF           CCS      OPTIND                                #  TAKE AGC OUT OF CDU LOOP IF APPROPRIATE.
006721,000648: 10,6773           06775                           TC       +2                                    
006722,000649: 10,6774           06775                           TC       +1                                    #  POSITIVE MEANS COMPUTER WAS IN LOOP.
006723,000650: 10,6775           34516                           CAF      ONE                                   #  LEAVE CDUS RESERVED (RARE).
006724,000651: 10,6776           40000                           COM                                            #  -0 REVERTS TO -0.
006725,000652: 10,6777           50703                           TS       OPTIND                                
006726,000653: 
006727,000654: 10,7000           06746                           TC       OPTCOMM2                              #  DO MODE CHECK.
006728,000655: 
006729,000656: 10,7001           10703        COMP.ON            CCS      OPTIND                                #  PUT AGC BACK INTO CDU LOOP IF DESIRED.
006730,000657: 10,7002           07005                           TC       ONALARM                               #  (THIS SHOULD NEVER HAPPEN).
006731,000658: 10,7003           07005                           TC       ONALARM                               
006732,000659: 10,7004           07026                           TC       ONOK                                  #  CDUS HAD BEEN RESERVED.
006733,000660: 
006734,000661: 10,7005           07016        ONALARM            TC       OFAILTST                              #  SEE IF FAIL FLAG ALREADY SET.
006735,000662: 10,7006           03015                           TC       ALARM                                 #  ALARM AND SET FAILURE FLAG.
006736,000663: 10,7007           00104                           OCT      00104                                 
006737,000664: 10,7010           07014                           TC       OFAILSET                              
006738,000665: 
006739,000666: 10,7011           07016        OPTCFAIL           TC       OFAILTST                              #  SEE IF ALARM ALREADY SOUNDED.
006740,000667: 10,7012           03015                           TC       ALARM                                 #  ALARM AND SET FAIL FLAG IF NOT.
006741,000668: 10,7013           00102                           OCT      00102                                 
006742,000669: 
006743,000670: 10,7014           45501        OFAILSET           CS       ZERO                                  
006744,000671: 10,7015           07100                           TC       LVOPTSMP   +1                         #  SET FAIL FLAG AND EXIT.
006745,000672: 
006746,000673: 10,7016           10730        OFAILTST           CCS      WASOPSET                              #  RETURNS TO CALLER IF NO FAILURE ALARM
006747,000674: 10,7017           00001                           TC       Q                                     #  GIVEN. EXITS WITHOUT CHANGING WASOPSET
006748,000675: 10,7020           00001                           TC       Q                                     #  IF SO.
006749,000676: 10,7021           07101                           TC       NOOPRSET                              
006750,000677: 10,7022           07101                           TC       NOOPRSET                              
006751,000678: 
006752,000679: 10,7023           03015        NOZALARM           TC       ALARM                                 
006753,000680: 10,7024           00103                           OCT      00103                                 
006754,000681: 10,7025           07062                           TC       RECONTRK                              
006755,000682: 
006756,000683: 10,7026           50703        ONOK               TS       OPTIND                                #  SET OPTIND TO +0 TO ACTIVE CDU DRIVE.
006757,000684: 10,7027           06746                           TC       OPTCOMM2                              #  DO MODE AGREEMENT CHECK.
006758,000685: 
006759,000686: 10,7030           40640        NOOPCOM2           CS       OSAMPTEM                              
006760,000687: 10,7031           74503                           MASK     BIT12                                 
006761,000688: 10,7032           10000                           CCS      A                                     
006762,000689: 10,7033           07023                           TC       NOZALARM                              
006763,000690: 10,7034           34502                           CAF      BIT13                                 
006764,000691: 10,7035           70640                           MASK     OSAMPTEM                              
006765,000692: 10,7036           02672                           TC       ZEROOCTR   +4                         
006766,000693: 10,7037           07062                           TC       RECONTRK                              
006767,000694: 
006768,000695: 10,7040           40730        NOOPCOM            CS       WASOPSET                              #  ENTERS HERE IF COMPUTER NOT COMMANDING.
006769,000696: 10,7041           60640                           AD       OSAMPTEM                              #  SEE IF ANY CHANGES SINCE LAST LOCK.
006770,000697: 10,7042           10000                           CCS      A                                     
006771,000698: 10,7043           07047                           TC       NOOPCOM1                              #  CHANGED.
006772,000699: 10,7044           37772        60MSRUPT           OCT      37772                                 #  UNUSED CCS BRANCH.
006773,000700: 10,7045           07047                           TC       NOOPCOM1                              #  CHANGED.
006774,000701: 10,7046           07077                           TC       LVOPTSMP                              #  NO CHANGE - NORMAL EXIT IN MANUAL.
006775,000702: 
006776,000703: 10,7047           40730        NOOPCOM1           CS       WASOPSET                              #  SEE IF MANUAL CDU-ZERO JUST REQUESTED.
006777,000704: 10,7050           74503                           MASK     BIT12                                 
006778,000705: 10,7051           70640                           MASK     OSAMPTEM                              
006779,000706: 10,7052           10000                           CCS      A                                     
006780,000707: 10,7053           07363                           TC       MANOPTZ                               #  CALL MANUAL OPTICS ZERO SUBROUTINE.
006781,000708:                                                                                                  #  (THIS RECONCILES OPTICS-ZERO C-RELAY).
006782,000709: 
006783,000710: 10,7054           34502                           CAF      BIT13                                 
006784,000711: 10,7055           70640                           MASK     OSAMPTEM                              
006785,000712: 10,7056           60730                           AD       WASOPSET                              
006786,000713: 10,7057           74502                           MASK     BIT13                                 
006787,000714: 10,7060           10000                           CCS      A                                     
006788,000715: 10,7061           07030                           TC       NOOPCOM2                              
006789,000716: 
006790,000717: 10,7062           34505        RECONTRK           CAF      BIT10                                 #  RECONCILE TRKR-ON C-RELAY.
006791,000718: 10,7063           70640                           MASK     OSAMPTEM                              
006792,000719: 10,7064           10000                           CCS      A                                     
006793,000720: 10,7065           34515                           CAF      BIT2                                  #  TURN ON TRKR-ON C-RELAY.
006794,000721: 10,7066           64500                           AD       BIT15                                 
006795,000722: 10,7067           30724                           XCH      DSPTAB     +12D                       
006796,000723: 10,7070           77257                           MASK     OCT37775                              #  CHANGE BITS 2 AND 15.
006797,000724: 10,7071           60724                           AD       DSPTAB     +12D                       
006798,000725: 10,7072           50724                           TS       DSPTAB     +12D                       
006799,000726: 
006800,000727: 10,7073           30640                           XCH      OSAMPTEM                              #  SET WASOPSET AND CALL SETZLIT TO 
006801,000728: 10,7074           50730                           TS       WASOPSET                              #  SET ZERO-ENCODER LIGHT. 
006802,000729: 10,7075           02744                           TC       SETZLIT                               
006803,000730: 10,7076           07101                           TC       NOOPRSET                              
006804,000731: 
006805,000732: 10,7077           30640        LVOPTSMP           XCH      OSAMPTEM                              
006806,000733: 10,7100           50730                           TS       WASOPSET                              
006807,000734: 
006808,000735: 10,7101                        NOOPRSET           EQUALS                                         #  DONT RESET WASOPSET.
006809,000736: 
006810,000737: 
006811,000738:                                                                                                  #  KSAMP         ENTERED EVERY 120 MS DURING T4RUPT. SAMPLES STATUS OF
006812,000739:                                                                                                  #  -----         IMU MODE SWITCHES.
006813,000740:                                                                                                  #                SETS C(WASKSET)=C(DESKSET) FOR SUCCESSFUL COMP. COMM.
006814,000741:                                                                                                  #                               =+0 FOR WAITING(START-UP,CONTACT BOUNCE)
006815,000742:                                                                                                  #                               =-X FOR ASTRONAUT COMM. IGNORE
006816,000743:                                                                                                  #                               =-0 FOR SYSTEM FAILURE
006817,000744: 
006818,000745: 
006819,000746: 
006820,000747: 10,7101           10727        KSAMP              CCS      WASKSET                               #  TEST FOR IGNORE
006821,000748: 10,7102           07105                           TC       +3                                    
006822,000749: 10,7103           07105                           TC       +2                                    
006823,000750: 10,7104           02262                           TC       ENDKSAMP                              
006824,000751: 
006825,000752: 10,7105           10731                           CCS      DESKSET                               #  C(DESKSET)=DESIRED K RELAY SETTING
006826,000753: 10,7106           07253                           TC       KSAMP1                                #            =+0 FOR COMPUTER NOT COMM.
006827,000754: 10,7107           07122                           TC       KSAMP4                                #            -DESIRED K SETTING FOR MAN 0.
006828,000755: 
006829,000756: 10,7110           34516                           CAF      BIT1                                  #  ENTERS HERE TO BE SURE MANUAL CDU ZERO
006830,000757: 10,7111           70637                           MASK     KSAMPTEM                              #  LASTS AT LEAST 30 SEC.
006831,000758: 10,7112           60727                           AD       WASKSET                               #  ALARM IF CDU-ZERO SWITCH CHANGED STATE.
006832,000759: 10,7113           74516                           MASK     BIT1                                  
006833,000760: 10,7114           10000                           CCS      A                                     
006834,000761: 10,7115           07117                           TC       +2                                    
006835,000762: 10,7116           07263                           TC       LVKSAMP                               
006836,000763: 
006837,000764: 10,7117           03015                           TC       ALARM                                 
006838,000765: 10,7120           00201                           OCT      00201                                 #  CDU NOT ZEROED PROPERLY.
006839,000766: 10,7121           07263                           TC       LVKSAMP                               
006840,000767: 
006841,000768: 10,7122           30637        KSAMP4             XCH      KSAMPTEM                              #  NO COMPUTER COMMAND.
006842,000769: 10,7123           30727                           XCH      WASKSET                               #  CURRENT STATUS TO WASKSET
006843,000770: 10,7124           50637                           TS       KSAMPTEM                              #  (FOR EVENTUAL USE BY MANUAL ZERO TEST).
006844,000771: 10,7125           40000                           CS       A                                     
006845,000772: 10,7126           60727                           AD       WASKSET                               
006846,000773: 10,7127           10000                           CCS      A                                     
006847,000774: 10,7130           07214                           TC       KSAMP2B                               #  SEE IF TRNSW JUST ON AND IS ONLY CHANGE.
006848,000775: 10,7131           37776        20MSRUPT           OCT      37776                                 #  UNUSED CCS BRANCH - USED TO CAUSE 0 OUT0
006849,000776: 10,7132           07134                           TC       KSAMP2                                
006850,000777: 10,7133           02262                           TC       ENDKSAMP                              #  EXIT ON NO CHANGE IN MODE.
006851,000778: 
006852,000779: 10,7134           34511        KSAMP2             CAF      BIT6                                  #  CHANGE IN MODE
006853,000780: 10,7135           70727                           MASK     WASKSET                               
006854,000781: 10,7136           10000                           CCS      A                                     #  IS TRNSW ON MANUAL
006855,000782: 10,7137           07222                           TC       TRNSWON                               #  SEE IF START-UP OR PILOTS BUTTON ON.
006856,000783: 
006857,000784: 10,7140           40727                           CS       WASKSET                               #  TEST FOR START UP SEQUENCE
006858,000785: 10,7141           77341                           MASK     FINE+CRS                              #  START-UP=FINE AND COARSE IN MANUAL.
006859,000786: 10,7142           10000                           CCS      A                                     
006860,000787: 10,7143           07150                           TC       MANZTEST                              
006861,000788: 
006862,000789: 10,7144           36744        SETCOARS           CAF      OFFMASK                               
006863,000790: 10,7145           70723                           MASK     DSPTAB     +11D                       
006864,000791: 10,7146           64656                           AD       OCT40002                              
006865,000792: 10,7147           07211                           TC       SETC       +3                         
006866,000793: 
006867,000794: 10,7150           40637        MANZTEST           CS       KSAMPTEM                              #  SEE IF MANUAL ZERO SWITCH JUST ON.
006868,000795: 10,7151           74516                           MASK     BIT1                                  
006869,000796: 10,7152           70727                           MASK     WASKSET                               
006870,000797: 10,7153           10000                           CCS      A                                     
006871,000798: 10,7154           07342                           TC       MANCDU                                #  MANUAL IMU CDU ZERO JUST REQUESTED.
006872,000799: 
006873,000800: 10,7155           40637                           CS       KSAMPTEM                              #  IF PREVIOUS MODE WAS COARSE ALIGN,
006874,000801: 10,7156           74515                           MASK     BIT2                                  #  DISABLE IMU FAIL FOR THE NEXT 5 SECS.
006875,000802: 10,7157           10000                           CCS      A                                     
006876,000803: 10,7160           07170                           TC       PRERECON                              
006877,000804: 
006878,000805: 10,7161           44513                           CS       BIT4                                  
006879,000806: 10,7162           70726                           MASK     OLDERR                                
006880,000807: 10,7163           64513                           AD       BIT4                                  
006881,000808: 10,7164           50726                           TS       OLDERR                                
006882,000809: 
006883,000810: 10,7165           34505                           CAF      BIT10                                 
006884,000811: 10,7166           02173                           TC       WAITLIST                              
006885,000812: 10,7167           30201                           CADR     IFAILOK                               
006886,000813: 
006887,000814: 10,7170           36744        PRERECON           CAF      OFFMASK                               #  MANUAL MODE CHANGE
006888,000815: 10,7171           70723                           MASK     DSPTAB     +11D                       #  SO THE C-RELAYS MUST BE UPDATED.
006889,000816: 10,7172           64500                           AD       BIT15                                 #  ALL ARE TURNED OFF AND THE RIGHT ONES
006890,000817: 10,7173           50723                           TS       DSPTAB     +11D                       #  ARE TURNED ON BY SCANNING IN3.
006891,000818: 
006892,000819: 10,7174           40727                           CS       WASKSET                               #  UPDATE C-RELAYS SO THEY AGREE WITH THE
006893,000820: 10,7175           50034                           TS       OVCTR                                 #  CURRENT MODE. THE SCAN IS FROM LEFT TO
006894,000821: 10,7176           34475                           CAF      SIX                                   #  RIGHT SO THE PILOTS BUTTON WORKS OK.
006895,000822: 
006896,000823: 10,7177           50637        RECONCIL           TS       KSAMPTEM                              
006897,000824: 10,7200           30034                           XCH      OVCTR                                 #  NEXT BIT INTO POSITION.
006898,000825: 10,7201           60000        -BIT14+1           DOUBLE                                         
006899,000826: 10,7202           50034                           TS       OVCTR                                 
006900,000827: 10,7203           74507                           MASK     BIT8                                  
006901,000828: 10,7204           10000                           CCS      A                                     
006902,000829: 10,7205           07246                           TC       RECONLUP                              #  LOOP TO EXAMINE NEXT BIT.
006903,000830: 
006904,000831: 10,7206           20637        SETC               INDEX    KSAMPTEM                              
006905,000832: 10,7207           37461                           CAF      MODECHNG                              #  NEW IMU C-RELAY SETTINGS.
006906,000833: 10,7210           60723                           AD       DSPTAB     +11D                       
006907,000834: 10,7211           50723                 +3        TS       DSPTAB     +11D                       
006908,000835: 10,7212           02744                           TC       SETZLIT                               #  UPDATE THE ZERO ENCODER LAMP.
006909,000836: 10,7213           02262                           TC       ENDKSAMP                              
006910,000837: 
006911,000838: 10,7214           67217        KSAMP2B            AD       LOW5BAR                               #  NO ERROR IF TRNSW JUST ON IS ONLY CHANGE
006912,000839: 10,7215           10000                           CCS      A                                     
006913,000840: 10,7216           07134                           TC       KSAMP2                                
006914,000841: 10,7217           77740        LOW5BAR            OCT      -37                                   
006915,000842: 10,7220           07134                           TC       KSAMP2                                
006916,000843: 10,7221           02262                           TC       ENDKSAMP                              #  ORIGINAL DIFFERENCE WAS JUST BIT 6.
006917,000844: 
006918,000845: 10,7222           37340        TRNSWON            CAF      OCT14                                 #  THE PILOTS BUTTON HAS CHANGED IF THERE
006919,000846: 10,7223           70727                           MASK     WASKSET                               #  HAS BEEN A CHANGE IN THE FINE ALIGN OR
006920,000847: 10,7224           60637                           AD       KSAMPTEM                              #  LOCK CDU BITS WITH THE SYSTEM IN ATTI-
006921,000848: 10,7225           77340                           MASK     OCT14                                 #  TUDE CONTROL AS WELL.
006922,000849: 10,7226           10000                           CCS      A                                     
006923,000850: 10,7227           07231                           TC       +2                                    
006924,000851: 10,7230           07236                           TC       STARTCHK                              #  NO - SEE IF SYSTEM CYCLING UP.
006925,000852: 
006926,000853: 10,7231           34512                           CAF      BIT5                                  #  OK SO FAR ON PILOTS BUTTON. SEE IF
006927,000854: 10,7232           70727                           MASK     WASKSET                               #  SYSTEM WAS AND IS IN ATTITUDE CONTROL.
006928,000855: 10,7233           70637                           MASK     KSAMPTEM                              
006929,000856: 10,7234           10000                           CCS      A                                     
006930,000857: 10,7235           02262                           TC       ENDKSAMP                              #  YES - LEAVE THE C-RELAYS IN ATTITUDE C.
006931,000858: 
006932,000859: 10,7236           40637        STARTCHK           CS       KSAMPTEM                              #  SEE IF COARSE-ALIGN JUST ON. IF SO,
006933,000860: 10,7237           74515                           MASK     BIT2                                  #  IF SO, THE SYSTEM IS CYCLING UP SO SET
006934,000861: 10,7240           70727                           MASK     WASKSET                               #  THE C-RELAYS FOR COARSE ALIGN.
006935,000862: 10,7241           10000                           CCS      A                                     
006936,000863: 10,7242           07144                           TC       SETCOARS                              #  USUAL RECONCILING WOULDNT WORK HERE.
006937,000864: 
006938,000865: 10,7243           03015        MODALARM           TC       ALARM                                 #  UN-CALLED-FOR MODE CHANGE WITH COMPUTER
006939,000866: 10,7244           00204                           OCT      00204                                 #  DOING MODE SWITCHING.
006940,000867: 10,7245           02262                           TC       ENDKSAMP                              
006941,000868: 
006942,000869: 10,7246           10637        RECONLUP           CCS      KSAMPTEM                              
006943,000870: 10,7247           07177                           TC       RECONCIL                              
006944,000871: 
006945,000872: 10,7250           03015                           TC       ALARM                                 #  NO IMU MODE INDICATION BITS GIVEN.
006946,000873: 10,7251           00203                           OCT      00203                                 
006947,000874: 10,7252           02262                           TC       ENDKSAMP                              
006948,000875: 
006949,000876: 
006950,000877: 
006951,000878: 10,7253           40731        KSAMP1             CS       DESKSET                               #  IS PRESENT MODE = COMMANDED
006952,000879: 10,7254           60637                           AD       KSAMPTEM                              
006953,000880: 10,7255           10000                           CCS      A                                     
006954,000881: 10,7256           07266                           TC       KSAMP1A                               
006955,000882: 10,7257           37775        OCT37775           OCT      37775                                 #  UNUSED CCS BRANCH - USED TO SET TRKR-ON.
006956,000883: 10,7260           07266                           TC       KSAMP1A                               
006957,000884: 
006958,000885: 10,7261           10726                           CCS      OLDERR                                #  TURN OFF THE PILOTS BUTTON BIT IF ON.
006959,000886: 10,7262           07334                           TC       PIBUTOFF                              
006960,000887: 
006961,000888: 10,7263           30637        LVKSAMP            XCH      KSAMPTEM                              #  YES
006962,000889: 10,7264           50727                           TS       WASKSET                               
006963,000890: 10,7265           02262                           TC       ENDKSAMP                              
006964,000891: 
006965,000892: 10,7266           34516        KSAMP1A            CAF      BIT1                                  #  IS COMPUTER TRYING TO ZERO CDU AND
006966,000893: 10,7267           70731                           MASK     DESKSET                               #  GETTING COARSE ALIGN.
006967,000894: 10,7270           60000                           DOUBLE                                         
006968,000895: 10,7271           70637                           MASK     KSAMPTEM                              
006969,000896: 10,7272           10000                           CCS      A                                     
006970,000897: 10,7273           07325                           TC       IMUSTART                              #  YES.
006971,000898: 
006972,000899: 10,7274           37320                           CAF      OCT60                                 #  SEE IF PILOTS BUTTON IS ON.
006973,000900: 10,7275           70731                           MASK     DESKSET                               #  CHECK THAT TRNSW ON AND ATTITUDE CONTROL
006974,000901: 10,7276           70637                           MASK     KSAMPTEM                              #  ARE DESIRED AND ACTUAL AND THAT EITHER 
006975,000902: 10,7277           40000                           COM                                            #  FINE ALIGN (FOLLOW) OR LOCK CDU (HOLD)
006976,000903: 10,7300           77320                           MASK     OCT60                                 #  ARE PRESENT IN ADDITION. IF SO, SET BIT
006977,000904: 10,7301           10000                           CCS      A                                     #  1 OF OLDERR TO INDICATE THIS CONDITION.
006978,000905: 10,7302           07315                           TC       KSAMP2A                               #  MISSION PROGRAMS WILL DETECT THIS CON-
006979,000906: 10,7303           37340                           CAF      OCT14                                 #  DITION WHEN THEY TEST OLDERR AS THEY DO
006980,000907: 10,7304           70637                           MASK     KSAMPTEM                              #  PERIODICALLY.
006981,000908: 10,7305           10000                           CCS      A                                     
006982,000909: 10,7306           07310                           TC       +2                                    
006983,000910: 10,7307           07315                           TC       KSAMP2A                               
006984,000911: 
006985,000912: 10,7310           44516                           CS       ONE                                   
006986,000913: 10,7311           70726                           MASK     OLDERR                                
006987,000914: 10,7312           64516                           AD       ONE                                   
006988,000915: 10,7313           50726                           TS       OLDERR                                
006989,000916: 10,7314           07263                           TC       LVKSAMP                               
006990,000917: 
006991,000918: 10,7315           10727        KSAMP2A            CCS      WASKSET                               #  CHECK ON PREVIOUS ACTIVITIES
006992,000919: 10,7316           07322                           TC       KSAMP3A                               #   NORMAL OPERATION
006993,000920: 10,7317           07322                           TC       KSAMP3A                               #  WAITING
006994,000921: 10,7320           00060        OCT60              OCT      60                                    
006995,000922: 10,7321           02262                           TC       ENDKSAMP                              #  SYSTEM FAILURE
006996,000923: 
006997,000924: 10,7322           10723        KSAMP3A            CCS      DSPTAB     +11D                       #  SEE IF BANK IS TO BE CHANGED.
006998,000925: 10,7323           07327                           TC       SYSFAIL                               #  NO - SYSTEM FAILURE.
006999,000926: 10,7324           07327                           TC       SYSFAIL                               
007000,000927: 
007001,000928: 10,7325           35501        IMUSTART           CAF      WAITFLAG                              #  SET WAITING FLAG AND EXIT.
007002,000929: 10,7326           07264                           TC       LVKSAMP    +1                         
007003,000930: 
007004,000931: 10,7327           45501        SYSFAIL            CS       ZERO                                  #  IMU SYSTEM FAILURE.
007005,000932: 10,7330           50727                           TS       WASKSET                               
007006,000933: 10,7331           03015                           TC       ALARM                                 #  CALL ALARM SUBROUTINE FOR DISPLAY.
007007,000934: 10,7332           00202                           OCT      00202                                 
007008,000935: 10,7333           02262                           TC       ENDKSAMP                              
007009,000936: 
007010,000937: 10,7334           44516        PIBUTOFF           CS       ONE                                   
007011,000938: 10,7335           70726                           MASK     OLDERR                                #  BIT 1 OF OLDERR IS 1 IF THE PILOTS
007012,000939: 10,7336           50726                           TS       OLDERR                                #  BUTTON IS ON WHILE THE COMPUTERS
007013,000940: 10,7337           07263                           TC       LVKSAMP                               #  COMMANDING.
007014,000941: 
007015,000942: 10,7340           00014        OCT14              OCT      14                                    
007016,000943: 10,7341           00012        FINE+CRS           OCT      12                                    
007017,000944: 10,7342     5501               WAITFLAG           EQUALS   ZERO                                  
007018,000945: 
007019,000946: 10,7342     2262               ENDKSAMP           EQUALS   LVDSRUPT                              
007020,000947: 
007021,000948: 
007022,000949:                                                                                                  #        MANUAL CDU-ZERO PROGRAMS FOR IMU AND OPTICS CDUS.
007023,000950: 
007024,000951: 10,7342           45503        MANCDU             CS       TWO                                   #  INITIATE MANUAL CDU ZERO MONITOR.
007025,000952: 10,7343           50731                           TS       DESKSET                               #  (C-RELAYS WILL BE SET BY RECONCIL).
007026,000953: 10,7344           37504                           CAF      35SCNDS                               
007027,000954: 10,7345           02173                           TC       WAITLIST                              
007028,000955: 10,7346           21353                           CADR     MANIZD                                
007029,000956: 
007030,000957: 10,7347           36744                           CAF      OFFMASK                               #  USUAL RECONCILING WOULDNT WORK HERE
007031,000958: 10,7350           70723                           MASK     DSPTAB     +11D                       #  SINCE THE SCAN IS FROM LEFT TO RIGHT.
007032,000959: 10,7351           67461                           AD       MODECHNG                              
007033,000960: 10,7352           07211                           TC       SETC       +3                         
007034,000961: 
007035,000962:                                                                                                  #        WAITLIST TASK TO COMPLETE MANUAL ZERO. TURNS OFF LIGHT TO INDICCATE COMPLETION.
007036,000963: 
007037,000964: 10,7353           02732        MANIZD             TC       ZEROICTR                              #  ZERO COUNTERS.
007038,000965: 10,7354           10731                           CCS      DESKSET                               #  SET DESKSET TO +0 TO RESUME MANUAL
007039,000966: 10,7355           07361                           TC       +4                                    #  MODE MONITORING UNLESS THE SYSTEM WAS
007040,000967: 10,7356           07361                           TC       +3                                    #  PLACED UNDER COMPUTER CONTROL BY ANOTHER
007041,000968: 10,7357           35501                           CAF      ZERO                                  #  PROGRAM DURING THE 35 SEC. WAIT.
007042,000969: 10,7360           50731                           TS       DESKSET                               
007043,000970: 10,7361           02744                           TC       SETZLIT                               #  TURN OFF LIGHT IF APPROPRIATE.
007044,000971: 10,7362           02256                           TC       TASKOVER                              
007045,000972: 
007046,000973: 
007047,000974:                                                                                                  #        MANUAL OPTICS ZEROING PROCEDURES.
007048,000975: 10,7363           37505        MANOPTZ            CAF      60SCNDS                               #  MANUAL OPTICS ZEROING ROUTINE.
007049,000976: 10,7364           02173                           TC       WAITLIST                              #  CALL WAITLIST FOR 30 SEC. WAIT
007050,000977: 10,7365           21375                           CADR     MANOZD                                
007051,000978: 10,7366           45503                           CS       TWO                                   #  SET ZEROING FLAG IN DESOPSET.
007052,000979: 10,7367           50732                           TS       DESOPSET                              
007053,000980: 10,7370           44664                           CS       CSQ                                   #  RECONCILE ZERO OPTICS C RELAY
007054,000981: 10,7371           70724                           MASK     DSPTAB     +12D                       
007055,000982: 10,7372           64664                           AD       CSQ                                   
007056,000983: 10,7373           50724                           TS       DSPTAB     +12D                       
007057,000984: 10,7374           07062                           TC       RECONTRK                              
007058,000985: 
007059,000986:                                                                                                  #        WAITLIST TASK TO COMPLETE MANUAL OPTICS ZERO.
007060,000987: 
007061,000988: 10,7375           35501        MANOZD             CAF      ZERO                                  
007062,000989: 10,7376           50732                           TS       DESOPSET                              #  LEAVE MANUAL ZERO MONITOR
007063,000990: 10,7377           02667                           TC       ZEROOCTR   +1                         #  SET OPTICS COUNTERS.
007064,000991: 10,7400           02744                           TC       SETZLIT                               #  TURN OFF LIGHT (POSSIBLY) AS SIGNAL.
007065,000992: 10,7401           02256                           TC       TASKOVER                              
007066,000993: 
007067,000994: 
007068,000995:                                                                                                  #        PROCEDURE TO TURN OFF AN OUTCR WHOSE RESET PULSE WAS INITIATED DURING THE FIRST OF TWO  XCH OUT2  IN-
007069,000996: 
007070,000997:                                                                                                  #  STRUCTIONS USED IN UPDATING THE CONTENTS OF OUT2. THE OCCURENCE OF THIS IS EXTREMELY RARE.
007071,000998: 
007072,000999: 10,7402           74511        JACKPOT            MASK     BIT6                                  #  SEE WHICH FIELD TURNED OFF UNEXPECTEDLY.
007073,001000: 10,7403           10000                           CCS      A                                     
007074,001001: 10,7404           37411                           CAF      OCT00767                              #  IMU - MAKE UP MASK  OCT 00377  .
007075,001002: 10,7405           67412                           AD       OCT77407                              #  OPTICS - MAKE UP MASK  OCT 77407  .
007076,001003: 10,7406           70012                           MASK     OUT2                                  #  THE PROBLEM WILL NOT RECUR HERE SINCE
007077,001004: 10,7407           50012                           TS       OUT2                                  #  THIS IS WITHIN 26 MCT OF THE LAST PULSE.
007078,001005: 10,7410           00001                           TC       Q                                     
007079,001006: 
007080,001007: 10,7411           00767        OCT00767           OCT      00767                                 
007081,001008: 10,7412           77407        OCT77407           OCT      77407                                 
007082,001009: 
007083,001010: 
007084,001011:                                                                                                  #        THE FOLLOWING PROGRAM TAKES A 2S COMPLEMENT DIFFERENCE BETWEEN THE ACTUAL CDU COUNTER AND THE DESIRED
007085,001012:                                                                                                  #  SETTING. THE AGC AD INSTRUCTION BY ITSELF CANNOT BE USED SINCE +0 = -0 THERE. TO COMPENSATE, IF THE SIGNS OF
007086,001013:                                                                                                  #  THE OPERANDS ARE DIFFERENT AND THE ROTATION NECESSARY TO NULL OUT THE ERROR PASSES THROUGH ZERO (NO OVERFLOW
007087,001014:                                                                                                  #  OCCURS IN DIFFERENCING THE DESIRED AND ACTUAL), A ONE WITH THE SIGN OF THE DESIRED ANGLE IS ADDEDTO THE DIFFER-
007088,001015:                                                                                                  #  ENCE.
007089,001016: 
007090,001017: 10,7413           50577        2SCOMDIF           TS       ITEMP1                                #  NEGATIVE OF CDU COUNTER ARRIVES IN A.
007091,001018: 10,7414           30001                           XCH      Q                                     
007092,001019: 10,7415           50574                           TS       ITEMP3                                
007093,001020: 10,7416           40600                           CS       ITEMP2                                #  C(ITEMP2) = -THE APPROPRIATE DES. ANGLE.
007094,001021: 10,7417           60577                           AD       ITEMP1                                
007095,001022: 10,7420           50034                           TS       OVCTR                                 
007096,001023: 10,7421           07426                           TC       2SCOM2                                #  IF NO OVERFLOW, SEE IF +-1 MUST BE ADDED
007097,001024: 
007098,001025: 10,7422           20000        UNCOROVF           INDEX    A                                     #  IF OVERFLOW, SIMPLY DO OVERFLOW UNCOR-
007099,001026: 10,7423           34477                           CAF      LIMITS                                #  RECTION AND EXIT.
007100,001027: 10,7424           60034                           AD       OVCTR                                 
007101,001028: 10,7425           00574                           TC       ITEMP3                                
007102,001029: 
007103,001030: 10,7426           10577        2SCOM2             CCS      ITEMP1                                #  NO OVERFLOW - SEE IF SIGNS OF INPUTS ARE 
007104,001031: 10,7427           07440                           TC       EXAM2                                 #  DIFFERENT.
007105,001032: 10,7430           07440                           TC       EXAM2                                 
007106,001033: 10,7431           07432                           TC       +1                                    
007107,001034: 10,7432           10600                           CCS      ITEMP2                                
007108,001035: 10,7433           07446                           TC       INCEX-                                #  ADD -1 AND EXIT HERE.
007109,001036: 10,7434           07446                           TC       INCEX-                                
007110,001037: 10,7435           07436                           TC       +1                                    
007111,001038: 
007112,001039: 10,7436           30034        DIFEX              XCH      OVCTR                                 #  ORIGINAL DIFFERENCE IS OK IF SIGNS SAME.
007113,001040: 10,7437           00574                           TC       ITEMP3                                
007114,001041: 
007115,001042: 10,7440           10600        EXAM2              CCS      ITEMP2                                
007116,001043: 10,7441           07436                           TC       DIFEX                                 #  SIGNS SAME HERE.
007117,001044: 10,7442           07436                           TC       DIFEX                                 
007118,001045: 10,7443           07444                           TC       +1                                    #  ADD +1 TO DIFFERENCE HERE.
007119,001046: 
007120,001047: 10,7444           34516                           CAF      ONE                                   
007121,001048: 10,7445           07447                           TC       +2                                    
007122,001049: 10,7446           44516        INCEX-             CS       ONE                                   
007123,001050: 10,7447           60034                           AD       OVCTR                                 
007124,001051: 10,7450           50034                           TS       OVCTR                                 
007125,001052: 10,7451           00574                           TC       ITEMP3                                #  NORMAL TRAIN OF EVENTS.
007126,001053: 10,7452           07422                           TC       UNCOROVF                              #  THIS ONLY HAPPENS AT 180 DEGREES.
007127,001054: 
007128,001055: 
007129,001056:                                                                                                  #        OUTCTR SETTINGS FOR OUT2, AND C-RELAY SETTING CONSTANTS FOR IMU MODES.
007130,001057: 
007131,001058: 10,7453           50400        CDUCODES           OCT      50400                                 #  -Z CDU
007132,001059: 10,7454           51000                           OCT      51000                                 #  -Y CDU
007133,001060: 10,7455           52000                           OCT      52000                                 #  -X CDU
007134,001061: 10,7456           32000                           OCT      32000                                 #  +X CDU
007135,001062: 10,7457           31000                           OCT      31000                                 #  +Y CDU
007136,001063: 10,7460           30400                           OCT      30400                                 #  +Z CDU
007137,001064: 
007138,001065: 10,7461           40011        MODECHNG           OCT      40011                                 #  (THIS CONSTANT IS NEVER USED BY RECONCIL
007139,001066: 10,7462           00002                           OCT      00002                                 #   BUT ONLY BY THE MANUAL ZEROING PROG.)
007140,001067: 10,7463           00004                           OCT      00004                                 
007141,001068: 10,7464           00010                           OCT      00010                                 
007142,001069: 10,7465           01000                           OCT      01000                                 
007143,001070: 10,7466           00000                           OCT      00000                                 #  (TRANSFER SWITCH - NOT USED).
007144,001071: 10,7467           02000                           OCT      02000                                 
007145,001072: 
007146,001073:                                                                                                  #        ZERO-ENCODER LIGHT NOT COVERED HERE.
007147,001074: 
007148,001075: 10,7470           00377        LOW8               OCT      377                                   
007149,001076: 10,7471  10,7470               OUT2MASK           EQUALS   LOW8                                  
007150,001077: 10,7471           77407        OPTMASK            OCT      77407                                 #  COMPLEMENT OF OUTCR2 ACTIVITY BITS.
007151,001078: 
007152,001079: 10,7472           44400                           OCT      44400                                 #  -Z GYRO
007153,001080: 10,7473           45000                           OCT      45000                                 #  -Y GYRO
007154,001081: 10,7474           46000                           OCT      46000                                 #  -X GYRO.
007155,001082: 
007156,001083: 10,7475           00220        OPTCODES           OCT      00220                                 #  -Y OPTICS CDU.
007157,001084: 10,7476           00240                           OCT      00240                                 #  -X OPTICS CDU.
007158,001085: 10,7477           00140                           OCT      00140                                 #  +X OPTICS CDU.
007159,001086: 10,7500           00120                           OCT      00120                                 #  +Y OPTICS CDU.
007160,001087: 
007161,001088: 10,7501           26000                           OCT      26000                                 #  +X GYRO
007162,001089: 10,7502           25000                           OCT      25000                                 #  +Y GYRO
007163,001090: 10,7503           24400                           OCT      24400                                 #  +Z GYRO.
007164,001091: 
007165,001092: 10,7504           06654        35SCNDS            DEC      35.        E2                         #  FOR MANUAL IMUCDU ZEROING.
007166,001093: 10,7505           13560        60SCNDS            DEC      60.        E2                         #  FOR MANUAL OPTICS ZEROING.
007167,001094: 10,7506           06022        NWMASK             OCT      06022                                 #  IMU, PIPA, RESTART FAIL AND CURTAINS.
007168,001095: 10,7507     2261               HI5                EQUALS   BANKMASK                              

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