Source Code

These source-code files were from the printout at the MIT Museum, with many thanks to Deborah Douglas, the Museum's Curator of Science and Technology, for releasing it to us. The printout was digitally photographed by Paul Fjeld. A team of volunteers transcribed the source code manually from these images or, where appropriate, modified already-transcribed but similar source Colossus 249 (Apollo 9) source code to agree with the images from the printout. Note that the page images presented online are of reduced quality, and that higher-quality images are available. Report any conversion errors or legibility problems in page images to info@sandroid.org. Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 055 OF AGC PROGRAM COMANCHE BY NASA 2021113-051
	10:28 APR.  1,1969
Note that the date is the date of the printout, not the date of the program revision.

012853,000002:                                                                                                  ## Copyright:   Public domain.
012854,000003:                                                                                                  ## Filename:    IMU_COMPENSATION_PACKAGE.agc
012855,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus 2A, AKA Comanche 055.
012856,000005:                                                                                                  ##              It is part of the source code for the Command Module's (CM)
012857,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 11.
012858,000007:                                                                                                  ## Assembler:   yaYUL
012859,000008:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
012860,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo.
012861,000010:                                                                                                  ## Pages:       297-306
012862,000011:                                                                                                  ## Mod history: 2009-05-08 RSB  Adapted from the Colossus249/ file of the
012863,000012:                                                                                                  ##                              same name, using Comanche055 page images/
012864,000013:                                                                                                  ##              2009-05-21 RSB  In IRIGZ, PRIO17 corrected to PRIO21.
012865,000014:                                                                                                  ##              2010-08-24 JL   Fixed page 306 number.
012866,000015:                                                                                                  ##              2016-12-10 RSB  Proofed comments with octopus/ProoferComments
012867,000016:                                                                                                  ##                              and fixed the errors found.
012868,000017:                                                                                                  ##              2017-01-14 RSB  Fixed comment-text errors located while 
012869,000018:                                                                                                  ##                              diff'ing against Colossus 249.
012870,000019:                                                                                                  ##
012871,000020:                                                                                                  ## This source code has been transcribed or otherwise adapted from digitized
012872,000021:                                                                                                  ## images of a hardcopy from the MIT Museum.  The digitization was performed
012873,000022:                                                                                                  ## by Paul Fjeld, and arranged for by Deborah Douglas of the Museum.  Many
012874,000023:                                                                                                  ## thanks to both.  The images (with suitable reduction in storage size and
012875,000024:                                                                                                  ## consequent reduction in image quality as well) are available online at
012876,000025:                                                                                                  ## www.ibiblio.org/apollo.  If for some reason you find that the images are
012877,000026:                                                                                                  ## illegible, contact me at info@sandroid.org about getting access to the 
012878,000027:                                                                                                  ## (much) higher-quality images which Paul actually created.
012879,000028:                                                                                                  ##
012880,000029:                                                                                                  ## Notations on the hardcopy document read, in part:
012881,000030:                                                                                                  ##
012882,000031:                                                                                                  ##      Assemble revision 055 of AGC program Comanche by NASA
012883,000032:                                                                                                  ##      2021113-051.  10:28 APR. 1, 1969  
012884,000033:                                                                                                  ##
012885,000034:                                                                                                  ##      This AGC program shall also be referred to as
012886,000035:                                                                                                  ##                      Colossus 2A
012887,000036: 

Page 297

012889,000038: 07,2441                                           BANK     7                                     
012890,000039: 06,2000                                           SETLOC   IMUCOMP                               
012891,000040: 06,2000                                           BANK                                           
012892,000041: 06,3262  E3,1460                                  EBANK=   NBDX                                  
012893,000042: 
012894,000043: 06,3262                                           COUNT    06/ICOMP                              
012895,000044: 
012896,000045: 06,3262           33516        1/PIPA             CAF      LGCOMP                                #  SAVE EBANK OF CALLING PROGRAM
012897,000046: 06,3263           56003                           XCH      EBANK                                 
012898,000047: 06,3264           54163                           TS       MODE                                  
012899,000048: 
012900,000049: 06,3265           11477                           CCS      GCOMPSW                               #  BYPASS IF GCOMPSW NEGATIVE
012901,000050: 06,3266           13271                           TCF      +3                                    
012902,000051: 06,3267           13271                           TCF      +2                                    
012903,000052: 06,3270           13407                           TCF      IRIG1                                 #  RETURN
012904,000053: 
012905,000054: 06,3271           00004                           INHINT                                         #  ASSURE COMPLETE COMPENSATION OF DELV'S
012906,000055:                                                                                                  #  FOR DOWNLINK.
012907,000056: 
012908,000057: 06,3272           35015        1/PIPA1            CAF      FOUR                                  #  PIPAZ, PIPAY, PIPAX
012909,000058: 06,3273           54132                           TS       BUF        +2                         
012910,000059: 
012911,000060: 06,3274           50132                           INDEX    BUF        +2                         
012912,000061: 06,3275           31453                           CA       PIPASCF                               #  (P.P.M.) X 2(-9)
012913,000062: 06,3276           00006                           EXTEND                                         
012914,000063: 06,3277           50132                           INDEX    BUF        +2                         
012915,000064: 06,3300           71162                           MP       DELVX                                 #  (PP) X 2(+14) NOW (PIPA PULSES) X 2(+5)
012916,000065: 06,3301           54002                           TS       Q                                     #  SAVE MAJOR PART
012917,000066: 
012918,000067: 06,3302           30001                           CA       L                                     #  MINOR PART
012919,000068: 06,3303           00006                           EXTEND                                         
012920,000069: 06,3304           75012                           MP       BIT6                                  #  SCALE 2(+9)   SHIFT RIGHT 9   
012921,000070: 06,3305           50132                           INDEX    BUF        +2                         
012922,000071: 06,3306           55163                           TS       DELVX      +1                         #  FRACTIONAL PIPA PULSES SCALED 2(+14)
012923,000072: 
012924,000073: 06,3307           30002                           CA       Q                                     #  MAJOR PART
012925,000074: 06,3310           00006                           EXTEND                                         
012926,000075: 06,3311           75012                           MP       BIT6                                  #  SCALE 2(+9)   SHIFT RIGHT 9
012927,000076: 06,3312           50132                           INDEX    BUF        +2                         
012928,000077: 06,3313           21163                           DAS      DELVX                                 #  (PIPAI) + (PIPAI)(SFE)
012929,000078: 
012930,000079: 06,3314           50132                           INDEX    BUF        +2                         
012931,000080: 06,3315           41452                           CS       PIPABIAS                              #  (PIPA PULSES)/(CS) X 2(-8)                    *
012932,000081: 06,3316           00006                           EXTEND                                         
012933,000082: 06,3317           71074                           MP       1/PIPADT                              #  (CS) X 2(+8) NOW (PIPA PULSES) X 2(+0)        *
012934,000083: 06,3320           00006                           EXTEND                                         
012935,000084: 06,3321           75017                           MP       BIT1                                  #  SCALE 2(+14) SHIFT RIGHT 14                   *
012936,000085: 06,3322           50132                           INDEX    BUF        +2                         
012937,000086: 06,3323           21163                           DAS      DELVX                                 #  (PIPAI) + (PIPAI)(SFE) - (BIAS)(DELTAT)
012938,000087: 
012939,000088: 06,3324           10132                           CCS      BUF        +2                         #  PIPAZ, PIPAY, PIPAX

Page 298

012941,000090: 06,3325           67716                           AD       NEG1                                  
012942,000091: 06,3326           13273                           TCF      1/PIPA1    +1                         
012943,000092: 06,3327           13330                           NOOP                                           #  LESS THAN ZERO IMPOSSIBLE.
012944,000093: 06,3330           00003                           RELINT                                         

Page 299

012946,000095: 
012947,000096: 06,3331           55477        IRIGCOMP           TS       GCOMPSW                               #  INDICATE COMMANDS 2 PULSES OR LESS
012948,000097: 06,3332           54130                           TS       BUF                                   #  INDEX COUNTER - IRIGX, IRIGY, IRIGZ
012949,000098: 
012950,000099: 06,3333           00006        IRIGX              EXTEND                                         
012951,000100: 06,3334           41163                           DCS      DELVX                                 #  (PIPA PULSES) X 2(+14)
012952,000101: 06,3335           52155                           DXCH     MPAC                                  
012953,000102: 06,3336           31463                           CA       ADIAX                                 #  (GYRO PULSES)/(PIPA PULSE) X 2(-3)            *
012954,000103: 06,3337           03412                           TC       GCOMPSUB                              #  -(ADIAX)(PIPAX)       (GYRO PULSES) X 2(+14)
012955,000104: 
012956,000105: 06,3340           00006                           EXTEND                                         #  
012957,000106: 06,3341           41165                           DCS      DELVY                                 #        (PIPA PULSES) X 2(+14)
012958,000107: 06,3342           52155                           DXCH     MPAC                                  #  
012959,000108: 06,3343           41466                           CS       ADSRAX                                #        (GYRO PULSES)/(PIPA PULSE) X 2(-3)      *
012960,000109: 06,3344           03412                           TC       GCOMPSUB                              #        +(ADSRAX)(PIPAY)        (GYRO PULSES) X 2(+14)
012961,000110: 
012962,000111:                                                                                                  #                EXTEND                  ***
012963,000112:                                                                                                  #                DCS     DELVZ           ***     (PIPA PULSES) X 2(+14)
012964,000113:                                                                                                  #                DXCH    MPAC            ***
012965,000114:                                                                                                  #                CA      ADOAX           ***     (GYRO PULSES)/(PIPA PULSE) X 2(-3)      *
012966,000115:                                                                                                  #                TC      GCOMPSUB        ***     -(ADOAX)(PIPAZ)         (GYRO PULSES) X 2(+14)
012967,000116: 
012968,000117: 06,3345           41460                           CS       NBDX                                  #        (GYRO PULSES)/(CS) X 2(-5)
012969,000118: 06,3346           03441                           TC       DRIFTSUB                              #        -(NBDX)(DELTAT) (GYRO PULSES) X 2(+14)
012970,000119: 
012971,000120: 06,3347           00006        IRIGY              EXTEND                                         
012972,000121: 06,3350           41165                           DCS      DELVY                                 #  (PIPA PULSES) X 2(+14)
012973,000122: 06,3351           52155                           DXCH     MPAC                                  
012974,000123: 06,3352           31464                           CA       ADIAY                                 #  (GYRO PULSES)/(PIPA PULSE) X 2(-3)            *
012975,000124: 06,3353           03412                           TC       GCOMPSUB                              #  -(ADIAY)(PIPAY)       (GYRO PULSES) X 2(+14)
012976,000125: 
012977,000126: 06,3354           00006                           EXTEND                                         
012978,000127: 06,3355           41167                           DCS      DELVZ                                 #  (PIPA PULSES) X 2(+14)
012979,000128: 06,3356           52155                           DXCH     MPAC                                  
012980,000129: 06,3357           41467                           CS       ADSRAY                                #  (GYRO PULSES)/(PIPA PULSE) X 2(-3)            *
012981,000130: 06,3360           03412                           TC       GCOMPSUB                              #  +(ADSRAY)(PIPAZ)      (GYRO PULSES) X 2(+14)
012982,000131: 
012983,000132:                                                                                                  #                EXTEND                  ***
012984,000133:                                                                                                  #                DCS     DELVX           ***     (PIPA PULSES) X 2(+14)
012985,000134:                                                                                                  #                DXCH    MPAC            ***
012986,000135:                                                                                                  #                CA      ADOAY           ***     (GYRO PULSES)/(PIPA PULSE) X 2(-3)      *
012987,000136:                                                                                                  #                TC      GCOMPSUB        ***     -(ADOAY)(PIPAX)    (GYRO PULSES) X 2(+14)
012988,000137: 
012989,000138: 06,3361           41461                           CS       NBDY                                  #        (GYRO PULSES)/(CS) X 2(-5)
012990,000139: 06,3362           03441                           TC       DRIFTSUB                              #        -(NBDY)(DELTAT) (GYRO PULSES) X 2(+14)
012991,000140: 
012992,000141: 06,3363           00006        IRIGZ              EXTEND                                         
012993,000142: 06,3364           41165                           DCS      DELVY                                 #  (PIPA PULSES) X 2(+14)
012994,000143: 06,3365           52155                           DXCH     MPAC                                  
012995,000144: 06,3366           31470                           CA       ADSRAZ                                #  (GYRO PULSES)/(PIPA PULSE) X 2(-3)            *

Page 300

012997,000146: 06,3367           03412                           TC       GCOMPSUB                              #  -(ADSRAZ)(PIPAY)      (GYRO PULSES) X 2(+14)
012998,000147: 
012999,000148: 06,3370           00006                           EXTEND                                         
013000,000149: 06,3371           41167                           DCS      DELVZ                                 #  (PIPA PULSES) X 2(+14)
013001,000150: 06,3372           52155                           DXCH     MPAC                                  
013002,000151: 06,3373           31465                           CA       ADIAZ                                 #  (GYRO PULSES)/(PIPA PULSE) X 2(-3)            *
013003,000152: 06,3374           03412                           TC       GCOMPSUB                              #  -(ADIAZ)(PIPAZ)       (GYRO PULSES) X 2(+14)
013004,000153: 
013005,000154:                                                                                                  #                EXTEND                  ***
013006,000155:                                                                                                  #                DCS     DELVX           ***     (PIPA PULSE) X 2(+14)
013007,000156:                                                                                                  #                DXCH    MPAC            ***
013008,000157:                                                                                                  #                CS      ADOAZ           ***     (GYRO PULSES)/(PIPA PULSE) X 2(-3)      *
013009,000158:                                                                                                  #                TC      GCOMPSUB        ***     +(ADOAZ)(PIPAX) (GYRO PULSES) X 2(+14)
013010,000159: 
013011,000160: 06,3375           31462                           CA       NBDZ                                  #        (GYRO PULSES)/(CS) X 2(-5)
013012,000161: 06,3376           03441                           TC       DRIFTSUB                              #        +(NBDZ)(DELTAT) (GYRO PULSES) X 2(+14)
013013,000162: 

Page 301

013015,000164: 06,3377           11477                           CCS      GCOMPSW                               #  ARE GYRO COMMANDS GREATER THAN 2 PULSES
013016,000165: 06,3400           13402                           TCF      +2                                    #  YES   
013017,000166: 06,3401           13407                           TCF      IRIG1                                 #  NO    
013018,000167: 
013019,000168: 06,3402           35073                           CA       PRIO21                                #  HIGHER THAN SERVICER - LESS THAN PRELAUNCH
013020,000169: 06,3403           05134                           TC       NOVAC                                 
013021,000170: 06,3404  E3,1460                                  EBANK=   NBDX                                  
013022,000171: 06,3404           03474 14063                     2CADR    1/GYRO                                
013023,000172: 
013024,000173: 06,3406           00003                           RELINT                                         
013025,000174: 06,3407           30163        IRIG1              CA       MODE                                  #  SET EBANK FOR RETURN
013026,000175: 06,3410           54003                           TS       EBANK                                 
013027,000176: 06,3411           14675                           TCF      SWRETURN                              
013028,000177: 
013029,000178: 06,3412           56154        GCOMPSUB           XCH      MPAC                                  #  ADIA OR ADSRA COEFFICIENT ARRIVES IN A
013030,000179: 06,3413           00006                           EXTEND                                         #  C(MPAC) = (PIPA PULSES) X 2(+14)
013031,000180: 06,3414           70154                           MP       MPAC                                  #  (GYRO PULSES)/(PIPA PULSE) X 2(-3)            *
013032,000181: 06,3415           52123                           DXCH     VBUF                                  #  NOW = (GYRO PULSES) X 2(+11)                  *
013033,000182: 
013034,000183: 06,3416           30155                           CA       MPAC       +1                         #  MINOR PART PIPA PULSES
013035,000184: 06,3417           00006                           EXTEND                                         
013036,000185: 06,3420           70154                           MP       MPAC                                  #  ADIA OR ADSRA
013037,000186: 06,3421           54001                           TS       L                                     
013038,000187: 06,3422           35021                           CAF      ZERO                                  
013039,000188: 06,3423           20123                           DAS      VBUF                                  #  NOW = (GYRO PULSES) X 2(+11)                  *
013040,000189: 
013041,000190: 06,3424           30122                           CA       VBUF                                  #  PARTIAL RESULT - MAJOR
013042,000191: 06,3425           00006                           EXTEND                                         
013043,000192: 06,3426           75004                           MP       BIT12                                 #  SCALE 2(+3)   SHIFT RIGHT 3                   *
013044,000193: 06,3427           50130                           INDEX    BUF                                   #  RESULT = (GYRO PULSES) X 2(+14)
013045,000194: 06,3430           21472                           DAS      GCOMP                                 #  HI(ADIA)(PIPAI) OR HI(ADSRA)(PIPAI)
013046,000195: 
013047,000196: 06,3431           30123                           CA       VBUF       +1                         #  PARTIAL RESULT - MINOR
013048,000197: 06,3432           00006                           EXTEND                                         
013049,000198: 06,3433           75004                           MP       BIT12                                 #  SCALE 2(+3)   SHIFT RIGHT 3                   *
013050,000199: 06,3434           54001                           TS       L                                     
013051,000200: 06,3435           35021                           CAF      ZERO                                  
013052,000201: 06,3436           50130                           INDEX    BUF                                   #  RESULT = (GYRO PULSES) X 2(+14)
013053,000202: 06,3437           21472                           DAS      GCOMP                                 #  (ADIA)(PIPAI) OR (ADSRA)(PIPAI)
013054,000203: 
013055,000204: 06,3440           00002                           TC       Q                                     
013056,000205: 

Page 302

013058,000207: 06,3441           00006        DRIFTSUB           EXTEND                                         
013059,000208: 06,3442           22131                           QXCH     BUF        +1                         
013060,000209: 
013061,000210: 06,3443           00006                           EXTEND                                         #  C(A) = NBD    (GYRO PULSES)/(CS) X 2(-5)
013062,000211: 06,3444           71074                           MP       1/PIPADT                              #  (CS) X 2(+8)   NOW (GYRO PULSES) X 2(+3)
013063,000212: 06,3445           22155                           LXCH     MPAC       +1                         #  SAVE FOR FRACTIONAL COMPENSATION
013064,000213: 06,3446           00006                           EXTEND                                         
013065,000214: 06,3447           75014                           MP       BIT4                                  #  SCALE 2(+11)  SHIFT RIGHT 11
013066,000215: 06,3450           50130                           INDEX    BUF                                   
013067,000216: 06,3451           21472                           DAS      GCOMP                                 #  HI(NBD)(DELTAT)       (GYRO PULSES) X 2(+14)
013068,000217: 
013069,000218: 06,3452           30155                           CA       MPAC       +1                         #  NOW MINOR PART
013070,000219: 06,3453           00006                           EXTEND                                         
013071,000220: 06,3454           75014                           MP       BIT4                                  #  SCALE 2(+11)          SHIFT RIGHT 11
013072,000221: 06,3455           54001                           TS       L                                     
013073,000222: 06,3456           35021                           CAF      ZERO                                  
013074,000223: 06,3457           50130                           INDEX    BUF                                   #  ADD IN FRACTIONAL COMPENSATION
013075,000224: 06,3460           21472                           DAS      GCOMP                                 #  (NBD)(DELTAT)         (GYRO PULSES) X 2(+14)
013076,000225: 
013077,000226: 06,3461           35016        DRFTSUB2           CAF      TWO                                   #  PIPAX, PIPAY, PIPAZ
013078,000227: 06,3462           60130                           AD       BUF                                   
013079,000228: 06,3463           56130                           XCH      BUF                                   
013080,000229: 06,3464           50000                           INDEX    A                                     
013081,000230: 06,3465           11471                           CCS      GCOMP                                 #  ARE GYRO COMMANDS 1 PULSE OR GREATER
013082,000231: 06,3466           13470                           TCF      +2                                    #  YES
013083,000232: 06,3467           00131                           TC       BUF        +1                         #  NO
013084,000233: 
013085,000234: 06,3470           77716                           MASK     NEGONE                                
013086,000235: 06,3471           10000                           CCS      A                                     #  ARE GYRO COMMANDS GREATER THAN 2 PULSES
013087,000236: 06,3472           55477                           TS       GCOMPSW                               #  YES - SET GCOMPSW POSITIVE
013088,000237: 06,3473           00131                           TC       BUF        +1                         #  NO
013089,000238: 

Page 303

013091,000240: 06,3474           35015        1/GYRO             CAF      FOUR                                  #  PIPAZ, PIPAY, PIPAX
013092,000241: 06,3475           54130                           TS       BUF                                   
013093,000242: 
013094,000243: 06,3476           50130                           INDEX    BUF                                   #  SCALE GYRO COMMANDS FOR IMUPULSE
013095,000244: 06,3477           31472                           CA       GCOMP      +1                         #  FRACTIONAL PULSES
013096,000245: 06,3500           00006                           EXTEND                                         
013097,000246: 06,3501           75010                           MP       BIT8                                  #  SHIFT RIGHT 7
013098,000247: 06,3502           50130                           INDEX    BUF                                   
013099,000248: 06,3503           55472                           TS       GCOMP      +1                         #  FRACTIONAL PULSES SCALED
013100,000249: 
013101,000250: 06,3504           35021                           CAF      ZERO                                  #  SET GCOMP = 0 FOR DAS INSTRUCTION
013102,000251: 06,3505           50130                           INDEX    BUF                                   
013103,000252: 06,3506           57471                           XCH      GCOMP                                 #  GYRO PULSES
013104,000253: 06,3507           00006                           EXTEND                                         
013105,000254: 06,3510           75010                           MP       BIT8                                  #  SHIFT RIGHT 7
013106,000255: 06,3511           50130                           INDEX    BUF                                   
013107,000256: 06,3512           21472                           DAS      GCOMP                                 #  ADD THESE TO FRACTIONAL PULSES ABOVE
013108,000257: 
013109,000258: 06,3513           10130                           CCS      BUF                                   #  PIPAZ, PIPAY, PIPAX
013110,000259: 06,3514           67716                           AD       NEG1                                  
013111,000260: 06,3515           13475                           TCF      1/GYRO     +1                         
013112,000261: 06,3516           01471        LGCOMP             ECADR    GCOMP                                 #  LESS THAN ZERO IMPOSSIBLE
013113,000262: 
013114,000263: 06,3517           33516                           CAF      LGCOMP                                
013115,000264: 06,3520           04662                           TC       BANKCALL                              
013116,000265: 06,3521           17206                           CADR     IMUPULSE                              #  CALL GYRO TORQUING ROUTINE
013117,000266: 06,3522           04662                           TC       BANKCALL                              
013118,000267: 06,3523           17577                           CADR     IMUSTALL                              #  WAIT FOR PULSES TO GET OUT
013119,000268: 06,3524           15217                           TCF      ENDOFJOB                              #  TEMPORARY
013120,000269: 
013121,000270: 06,3525           35015        GCOMP1             CAF      FOUR                                  #  PIPAZ, PIPAY, PIPAX
013122,000271: 06,3526           54130                           TS       BUF                                   
013123,000272: 
013124,000273: 06,3527           50130                           INDEX    BUF                                   #  RESCALE
013125,000274: 06,3530           31472                           CA       GCOMP      +1                         
013126,000275: 06,3531           00006                           EXTEND                                         
013127,000276: 06,3532           75010                           MP       BIT8                                  #  SHIFT MINOR PART LEFT 7 - MAJOR PART = 0
013128,000277: 06,3533           50130                           INDEX    BUF                                   
013129,000278: 06,3534           23472                           LXCH     GCOMP      +1                         #  BITS 8-14 OF MINOR PART WERE = 0
013130,000279: 
013131,000280: 06,3535           10130                           CCS      BUF                                   #  PIPAZ, PIPAY, PIPAX
013132,000281: 06,3536           67716                           AD       NEG1                                  
013133,000282: 06,3537           13526                           TCF      GCOMP1     +1                         
013134,000283: 
013135,000284: 06,3540           01436        V06N30S            VN       0630                                  
013136,000285: 06,3541           15217                           TCF      ENDOFJOB                              
013137,000286: 

Page 304

013139,000288: 06,3542           11477        NBDONLY            CCS      GCOMPSW                               #  BYPASS IF GCOMPSW NEGATIVE
013140,000289: 06,3543           13546                           TCF      +3                                    
013141,000290: 06,3544           13546                           TCF      +2                                    
013142,000291: 06,3545           15217                           TCF      ENDOFJOB                              
013143,000292: 
013144,000293: 06,3546           00004                           INHINT                                         
013145,000294: 06,3547           10076                           CCS      FLAGWRD2                              #  PREREAD T3RUPT MAY COINCIDE
013146,000295: 06,3550           15217                           TCF      ENDOFJOB                              
013147,000296: 06,3551           15217                           TCF      ENDOFJOB                              
013148,000297: 06,3552           13553                           TCF      +1                                    
013149,000298: 
013150,000299: 06,3553           30025                           CA       TIME1                                 #  (CS) X 2(+14)
013151,000300: 06,3554           57074                           XCH      1/PIPADT                              #  PREVIOUS TIME
013152,000301: 06,3555           00003                           RELINT                                         
013153,000302: 06,3556           40000                           COM                                            
013154,000303: 06,3557           61074                           AD       1/PIPADT                              
013155,000304: 06,3560           10000        NBD2               CCS      A                                     #  CALCULATE ELAPSED TIME
013156,000305: 06,3561           65017                           AD       ONE                                   #  NO TIME1 OVERFLOW
013157,000306: 06,3562           13567                           TCF      NBD3                                  #  RESTORE TIME DIFFERENCE AND JUMP
013158,000307: 06,3563           13565                           TCF      +2                                    #  TIME1 OVERFLOW
013159,000308: 06,3564           15217                           TCF      ENDOFJOB                              #  IF ELAPSED TIME = 0 (DIFFERENCE = -0)
013160,000309: 
013161,000310: 06,3565           40000                           COM                                            #  CALCULATE ABSOLUTE DIFFERENCE
013162,000311: 06,3566           64777                           AD       POSMAX                                
013163,000312: 
013164,000313: 06,3567           00006        NBD3               EXTEND                                         #  C(A) = DELTAT         (CS) X 2(+14)
013165,000314: 06,3570           75006                           MP       BIT10                                 #  SHIFT RIGHT 5
013166,000315: 06,3571           52123                           DXCH     VBUF                                  
013167,000316: 06,3572           00006                           EXTEND                                         
013168,000317: 06,3573           30123                           DCA      VBUF                                  
013169,000318: 06,3574           52155                           DXCH     MPAC                                  #  DELTAT NOW SCALED (CS) X 2(+19)
013170,000319: 
013171,000320: 06,3575           35021                           CAF      ZERO                                  
013172,000321: 06,3576           55477                           TS       GCOMPSW                               #  INDICATE COMMANDS 2 PULSES OR LESS
013173,000322: 06,3577           54130                           TS       BUF                                   #  PIPAX, PIPAY, PIPAZ
013174,000323: 
013175,000324: 06,3600           41460                           CS       NBDX                                  #  (GYRO PULSES)/(CS) X 2(-5)
013176,000325: 06,3601           03617                           TC       FBIASSUB                              #  -(NBDX)(DELTAT)       (GYRO PULSES) X 2(+14)
013177,000326: 
013178,000327: 06,3602           00006                           EXTEND                                         
013179,000328: 06,3603           40123                           DCS      VBUF                                  
013180,000329: 06,3604           52155                           DXCH     MPAC                                  #  DELTAT SCALED (CS) X 2(+19)
013181,000330: 06,3605           31461                           CA       NBDY                                  #  (GYRO PULSES)/(CS) X 2(-5)
013182,000331: 06,3606           03617                           TC       FBIASSUB                              #  -(NBDY)(DELTAT)       (GYRO PULSES) X 2(+14)
013183,000332: 
013184,000333: 06,3607           00006                           EXTEND                                         
013185,000334: 06,3610           40123                           DCS      VBUF                                  
013186,000335: 06,3611           52155                           DXCH     MPAC                                  #  DELTAT SCALED (CS) X 2(+19)
013187,000336: 06,3612           41462                           CS       NBDZ                                  #  (GYRO PULSES)/(CS) X 2(-5)
013188,000337: 06,3613           03617                           TC       FBIASSUB                              #  +(NBDZ)(DELTAT)       (GYRO PULSES) X 2(+14)

Page 305

013190,000339: 06,3614           11477                           CCS      GCOMPSW                               #  ARE GYRO COMMANDS GREATER THAN 2 PULSES
013191,000340: 06,3615           13474                           TCF      1/GYRO                                #  YES
013192,000341: 06,3616           15217                           TCF      ENDOFJOB                              #  NO
013193,000342: 

Page 306

013195,000344: 06,3617           56002        FBIASSUB           XCH      Q                                     
013196,000345: 06,3620           54131                           TS       BUF        +1                         
013197,000346: 
013198,000347: 06,3621           30002                           CA       Q                                     #  NBD SCALED (GYRO PULSES)/(CS) X 2(-5)
013199,000348: 06,3622           00006                           EXTEND                                         
013200,000349: 06,3623           70154                           MP       MPAC                                  #  DELTAT SCALED (CS) X 2(+19)
013201,000350: 06,3624           50130                           INDEX    BUF                                   
013202,000351: 06,3625           21472                           DAS      GCOMP                                 #  HI(NBD)(DELTAT)       (GYRO PULSES) X 2(+14)
013203,000352: 
013204,000353: 06,3626           30002                           CA       Q                                     #  NOW FRACTIONAL PART
013205,000354: 06,3627           00006                           EXTEND                                         
013206,000355: 06,3630           70155                           MP       MPAC       +1                         
013207,000356: 06,3631           54001                           TS       L                                     
013208,000357: 06,3632           35021                           CAF      ZERO                                  
013209,000358: 06,3633           50130                           INDEX    BUF                                   
013210,000359: 06,3634           21472                           DAS      GCOMP                                 #  (NBD)(DELTAT)         (GYRO PULSES) X 2(+14)
013211,000360: 
013212,000361: 06,3635           13461                           TCF      DRFTSUB2                              #  CHECK MAGNITUDE OF COMPENSATION
013213,000362: 
013214,000363: 06,3636           04662        LASTBIAS           TC       BANKCALL                              
013215,000364: 06,3637           17156                           CADR     PIPUSE                                
013216,000365: 
013217,000366: 06,3640           11477                           CCS      GCOMPSW                               #  BYPASS IF GCOMPSW NEGATIVE
013218,000367: 06,3641           13644                           TCF      +3                                    
013219,000368: 06,3642           13644                           TCF      +2                                    
013220,000369: 06,3643           15217                           TCF      ENDOFJOB                              
013221,000370: 
013222,000371: 06,3644           37665                           CAF      PRIO31                                #  2 SECONDS SCALED (CS) X 2(+8)
013223,000372: 06,3645           57074                           XCH      1/PIPADT                              
013224,000373: 06,3646           40000                           COM                                            
013225,000374: 06,3647           61246                           AD       PIPTIME1   +1                         #  TIME AT PIPA1 =0
013226,000375: 06,3650           13560                           TCF      NBD2                                  
013227,000376: 

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