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.

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

Page 297

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

Page 298

012948,000090: 06,3325           67716                           AD       NEG1                                  
012949,000091: 06,3326           13273                           TCF      1/PIPA1    +1                         
012950,000092: 06,3327           13330                           NOOP                                           #  LESS THAN ZERO IMPOSSIBLE.
012951,000093: 06,3330           00003                           RELINT                                         

Page 299

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

Page 300

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

Page 301

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

Page 302

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

Page 303

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

Page 304

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

Page 305

013197,000339: 06,3614           11477                           CCS      GCOMPSW                               #  ARE GYRO COMMANDS GREATER THAN 2 PULSES
013198,000340: 06,3615           13474                           TCF      1/GYRO                                #  YES
013199,000341: 06,3616           15217                           TCF      ENDOFJOB                              #  NO
013200,000342: 

Page 306

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

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