Source Code

This is the source-code for the Apollo 9 Command Module's Guidance Computer. These files were derived originally from the scan from MIT's Dibner Institute's now-discontinued website titled "History of Recent Science and Technology", which in turn was originally created by Gary Neff, though his high-quality scans were unfortunately reduced in legibility when presented online. The markings on the front of the printout imply that it was the original AGC developer Norm Brodeur's copy. A scan by Ron Burkey has superceded it, made from a more-legible copy from the collection of original AGC developer Fred Martin. The source code was transcribed from those images by Ron Burkey. 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:

	ASSEMBLE REVISION 249 OF AGC PROGRAM COLOSSUS BY NASA 2021111-041
	20'35 OCT. 28,1968
Note that the date is the date of the printout, not the date of the program revision.

012653,000002:                                                                                                  ## Copyright:   Public domain.
012654,000003:                                                                                                  ## Filename:    IMU_COMPENSATION_PACKAGE.agc
012655,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus, build 249.
012656,000005:                                                                                                  ##              It is part of the source code for the Command Module's (CM)
012657,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 9.
012658,000007:                                                                                                  ## Assembler:   yaYUL
012659,000008:                                                                                                  ## Reference:   pp. 292-301.
012660,000009:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
012661,000010:                                                                                                  ## Website:     www.ibiblio.org/apollo.
012662,000011:                                                                                                  ## Mod history: 08/09/04 RSB.   Began adapting from corresponding Luminary131
012663,000012:                                                                                                  ##                              source file.
012664,000013:                                                                                                  ##              2010-10-24 JL   Fixed page numbers.
012665,000014:                                                                                                  ##              2016-12-30 RSB  Backported BYRO->GYRO from Colossus 237.
012666,000015:                                                                                                  ##                              (There's lots more that needs to be backported,
012667,000016:                                                                                                  ##                              but I found this one particularly annoying.)
012668,000017:                                                                                                  ##              2017-01-05 RSB  Page numbers now agree with those on the
012669,000018:                                                                                                  ##                              original harcopy, as opposed to the PDF page
012670,000019:                                                                                                  ##                              numbers in 1701.pdf.
012671,000020:                                                                                                  ##              2017-01-14 RSB  Cross-diff'd comment text (not whitespace)
012672,000021:                                                                                                  ##                              vs the already-proofed corresponding Colossus
012673,000022:                                                                                                  ##                              237 and Comanche 55 source-code files
012674,000023:                                                                                                  ##                              and corrected errors found.
012675,000024:                                                                                                  ##              2017-03-16 RSB  Comment-text fixes identified in 4-way side-by-side
012676,000025:                                                                                                  ##                              diff of Colossus237/249/Comanche55/Artemis72.
012677,000026: 
012678,000027:                                                                                                  ## The contents of the "Colossus249" files, in general, are transcribed 
012679,000028:                                                                                                  ## from a scanned copy of the program listing.  Notations on this
012680,000029:                                                                                                  ## document read, in part:
012681,000030:                                                                                                  ##
012682,000031:                                                                                                  ##      Assemble revision 249 of AGC program Colossus by NASA
012683,000032:                                                                                                  ##      2021111-041.  October 28, 1968.  
012684,000033:                                                                                                  ##
012685,000034:                                                                                                  ##      This AGC program shall also be referred to as
012686,000035:                                                                                                  ##                              Colossus 1A
012687,000036:                                                                                                  ##
012688,000037:                                                                                                  ##      Prepared by
012689,000038:                                                                                                  ##                      Massachusetts Institute of Technology
012690,000039:                                                                                                  ##                      75 Cambridge Parkway
012691,000040:                                                                                                  ##                      Cambridge, Massachusetts
012692,000041:                                                                                                  ##      under NASA contract NAS 9-4065.
012693,000042:                                                                                                  ##
012694,000043:                                                                                                  ## Refer directly to the online document mentioned above for further information.
012695,000044:                                                                                                  ## Please report any errors (relative to the scanned pages) to info@sandroid.org.
012696,000045:                                                                                                  ##
012697,000046:                                                                                                  ## In some cases, where the source code for Luminary 131 overlaps that of 
012698,000047:                                                                                                  ## Colossus 249, this code is instead copied from the corresponding Luminary 131
012699,000048:                                                                                                  ## source file, and then is proofed to incorporate any changes.
012700,000049: 

Page 292

012702,000051: 07,2440                                           BANK     7                                     
012703,000052: 06,2000                                           SETLOC   IMUCOMP                               
012704,000053: 06,2000                                           BANK                                           
012705,000054: 06,3262  E3,1460                                  EBANK=   NBDX                                  
012706,000055: 
012707,000056: 06,3262                                           COUNT    06/ICOMP                              
012708,000057: 
012709,000058: 06,3262           33516        1/PIPA             CAF      LGCOMP                                #  SAVE EBANK OF CALLING PROGRAM
012710,000059: 06,3263           56003                           XCH      EBANK                                 
012711,000060: 06,3264           54163                           TS       MODE                                  
012712,000061: 
012713,000062: 06,3265           11477                           CCS      GCOMPSW                               #  BYPASS IF GCOMPSW NEGATIVE
012714,000063: 06,3266           13271                           TCF      +3                                    
012715,000064: 06,3267           13271                           TCF      +2                                    
012716,000065: 06,3270           13407                           TCF      IRIG1                                 #  RETURN
012717,000066: 
012718,000067: 06,3271           00004                           INHINT                                         #  ASSURE COMPLETE COMPENSATION OF DELV'S
012719,000068:                                                                                                  #  FOR DOWNLINK.
012720,000069: 
012721,000070: 06,3272           34710        1/PIPA1            CAF      FOUR                                  #  PIPAZ, PIPAY, PIPAX
012722,000071: 06,3273           54132                           TS       BUF        +2                         
012723,000072: 
012724,000073: 06,3274           50132                           INDEX    BUF        +2                         
012725,000074: 06,3275           31453                           CA       PIPASCF                               #  (P.P.M.) X 2(-9)
012726,000075: 06,3276           00006                           EXTEND                                         
012727,000076: 06,3277           50132                           INDEX    BUF        +2                         
012728,000077: 06,3300           71162                           MP       DELVX                                 #  (PP) X 2(+14) NOW (PIPA PULSES) X 2(+5)
012729,000078: 06,3301           54002                           TS       Q                                     #  SAVE MAJOR PART
012730,000079: 
012731,000080: 06,3302           30001                           CA       L                                     #  MINOR PART
012732,000081: 06,3303           00006                           EXTEND                                         
012733,000082: 06,3304           74705                           MP       BIT6                                  #  SCALE 2(+9)   SHIFT RIGHT 9   
012734,000083: 06,3305           50132                           INDEX    BUF        +2                         
012735,000084: 06,3306           55163                           TS       DELVX      +1                         #  FRACTIONAL PIPA PULSES SCALED 2(+14)
012736,000085: 
012737,000086: 06,3307           30002                           CA       Q                                     #  MAJOR PART
012738,000087: 06,3310           00006                           EXTEND                                         
012739,000088: 06,3311           74705                           MP       BIT6                                  #  SCALE 2(+9)   SHIFT RIGHT 9
012740,000089: 06,3312           50132                           INDEX    BUF        +2                         
012741,000090: 06,3313           21163                           DAS      DELVX                                 #  (PIPAI) + (PIPAI)(SFE)
012742,000091: 
012743,000092: 06,3314           50132                           INDEX    BUF        +2                         
012744,000093: 06,3315           41452                           CS       PIPABIAS                              #  (PIPA PULSES)/(CS) X 2(-8)                    *
012745,000094: 06,3316           00006                           EXTEND                                         
012746,000095: 06,3317           71074                           MP       1/PIPADT                              #  (CS) X 2(+8) NOW (PIPA PULSES) X 2(+0)        *
012747,000096: 06,3320           00006                           EXTEND                                         
012748,000097: 06,3321           74712                           MP       BIT1                                  #  SCALE 2(+14) SHIFT RIGHT 14                   *
012749,000098: 06,3322           50132                           INDEX    BUF        +2                         
012750,000099: 06,3323           21163                           DAS      DELVX                                 #  (PIPAI) + (PIPAI)(SFE) - (BIAS)(DELTAT)
012751,000100: 
012752,000101: 06,3324           10132                           CCS      BUF        +2                         #  PIPAZ, PIPAY, PIPAX

Page 293

012754,000103: 06,3325           67716                           AD       NEG1                                  
012755,000104: 06,3326           13273                           TCF      1/PIPA1    +1                         
012756,000105: 06,3327           13330                           NOOP                                           #  LESS THAN ZERO IMPOSSIBLE.
012757,000106: 06,3330           00003                           RELINT                                         

Page 294

012759,000108: 
012760,000109: 06,3331           55477        IRIGCOMP           TS       GCOMPSW                               #  INDICATE COMMANDS 2 PULSES OR LESS
012761,000110: 06,3332           54130                           TS       BUF                                   #  INDEX COUNTER - IRIGX, IRIGY, IRIGZ
012762,000111: 
012763,000112: 06,3333           00006        IRIGX              EXTEND                                         
012764,000113: 06,3334           41163                           DCS      DELVX                                 #  (PIPA PULSES) X 2(+14)
012765,000114: 06,3335           52155                           DXCH     MPAC                                  
012766,000115: 06,3336           31463                           CA       ADIAX                                 #  (GYRO PULSES)/(PIPA PULSE) X 2(-3)            *
012767,000116: 06,3337           03412                           TC       GCOMPSUB                              #  -(ADIAX)(PIPAX)       (GYRO PULSES) X 2(+14)
012768,000117: 
012769,000118: 06,3340           00006                           EXTEND                                         #  
012770,000119: 06,3341           41165                           DCS      DELVY                                 #        (PIPA PULSES) X 2(+14)
012771,000120: 06,3342           52155                           DXCH     MPAC                                  #  
012772,000121: 06,3343           41466                           CS       ADSRAX                                #        (GYRO PULSES)/(PIPA PULSE) X 2(-3)      *
012773,000122: 06,3344           03412                           TC       GCOMPSUB                              #        +(ADSRAX)(PIPAY)        (GYRO PULSES) X 2(+14)
012774,000123: 
012775,000124:                                                                                                  #                EXTEND                  ***
012776,000125:                                                                                                  #                DCS     DELVZ           ***     (PIPA PULSES) X 2(+14)
012777,000126:                                                                                                  #                DXCH    MPAC            ***
012778,000127:                                                                                                  #                CA      ADOAX           ***     (GYRO PULSES)/(PIPA PULSE) X 2(-3)      *
012779,000128:                                                                                                  #                TC      GCOMPSUB        ***     -(ADOAX)(PIPAZ)         (GYRO PULSES) X 2(+14)
012780,000129: 
012781,000130: 06,3345           41460                           CS       NBDX                                  #        (GYRO PULSES)/(CS) X 2(-5)
012782,000131: 06,3346           03441                           TC       DRIFTSUB                              #        -(NBDX)(DELTAT) (GYRO PULSES) X 2(+14)
012783,000132: 
012784,000133: 06,3347           00006        IRIGY              EXTEND                                         
012785,000134: 06,3350           41165                           DCS      DELVY                                 #  (PIPA PULSES) X 2(+14)
012786,000135: 06,3351           52155                           DXCH     MPAC                                  
012787,000136: 06,3352           31464                           CA       ADIAY                                 #  (GYRO PULSES)/(PIPA PULSE) X 2(-3)            *
012788,000137: 06,3353           03412                           TC       GCOMPSUB                              #  -(ADIAY)(PIPAY)       (GYRO PULSES) X 2(+14)
012789,000138: 
012790,000139: 06,3354           00006                           EXTEND                                         
012791,000140: 06,3355           41167                           DCS      DELVZ                                 #  (PIPA PULSES) X 2(+14)
012792,000141: 06,3356           52155                           DXCH     MPAC                                  
012793,000142: 06,3357           41467                           CS       ADSRAY                                #  (GYRO PULSES)/(PIPA PULSE) X 2(-3)            *
012794,000143: 06,3360           03412                           TC       GCOMPSUB                              #  +(ADSRAY)(PIPAZ)      (GYRO PULSES) X 2(+14)
012795,000144: 
012796,000145:                                                                                                  #                EXTEND                  ***
012797,000146:                                                                                                  #                DCS     DELVX           ***     (PIPA PULSES) X 2(+14)
012798,000147:                                                                                                  #                DXCH    MPAC            ***
012799,000148:                                                                                                  #                CA      ADOAY           ***     (GYRO PULSES)/(PIPA PULSE) X 2(-3)      *
012800,000149:                                                                                                  #                TC      GCOMPSUB        ***     -(ADOAY)(PIPAX) (GYRO PULSES) X 2(+14)
012801,000150: 
012802,000151: 06,3361           41461                           CS       NBDY                                  #        (GYRO PULSES)/(CS) X 2(-5)
012803,000152: 06,3362           03441                           TC       DRIFTSUB                              #        -(NBDY)(DELTAT) (GYRO PULSES) X 2(+14)
012804,000153: 
012805,000154: 06,3363           00006        IRIGZ              EXTEND                                         
012806,000155: 06,3364           41165                           DCS      DELVY                                 #  (PIPA PULSES) X 2(+14)
012807,000156: 06,3365           52155                           DXCH     MPAC                                  
012808,000157: 06,3366           31470                           CA       ADSRAZ                                #  (GYRO PULSES)/(PIPA PULSE) X 2(-3)            *

Page 295

012810,000159: 06,3367           03412                           TC       GCOMPSUB                              #  -(ADSRAZ)(PIPAY)      (GYRO PULSES) X 2(+14)
012811,000160: 
012812,000161: 06,3370           00006                           EXTEND                                         
012813,000162: 06,3371           41167                           DCS      DELVZ                                 #  (PIPA PULSES) X 2(+14)
012814,000163: 06,3372           52155                           DXCH     MPAC                                  
012815,000164: 06,3373           31465                           CA       ADIAZ                                 #  (GYRO PULSES)/(PIPA PULSE) X 2(-3)            *
012816,000165: 06,3374           03412                           TC       GCOMPSUB                              #  -(ADIAZ)(PIPAZ)       (GYRO PULSES) X 2(+14)
012817,000166: 
012818,000167:                                                                                                  #                EXTEND                  ***
012819,000168:                                                                                                  #                DCS     DELVX           ***     (PIPA PULSE) X 2(+14)
012820,000169:                                                                                                  #                DXCH    MPAC            ***
012821,000170:                                                                                                  #                CS      ADOAZ           ***     (GYRO PULSES)/(PIPA PULSE) X 2(-3)      *
012822,000171:                                                                                                  #                TC      GCOMPSUB        ***     +(ADOAZ)(PIPAX) (GYRO PULSES) X 2(+14)
012823,000172: 
012824,000173: 06,3375           31462                           CA       NBDZ                                  #        (GYRO PULSES)/(CS) X 2(-5)
012825,000174: 06,3376           03441                           TC       DRIFTSUB                              #        +(NBDZ)(DELTAT) (GYRO PULSES) X 2(+14)
012826,000175: 

Page 296

012828,000177: 06,3377           11477                           CCS      GCOMPSW                               #  ARE GYRO COMMANDS GREATER THAN 2 PULSES
012829,000178: 06,3400           13402                           TCF      +2                                    #  YES   
012830,000179: 06,3401           13407                           TCF      IRIG1                                 #  NO    
012831,000180: 
012832,000181: 06,3402           34764                           CA       PRIO17                                #  LEM PRIORITY HIGHER-THIS FOR PRELAUNCH
012833,000182: 06,3403           05027                           TC       NOVAC                                 
012834,000183: 06,3404  E3,1460                                  EBANK=   NBDX                                  
012835,000184: 06,3404           03474 14063                     2CADR    1/GYRO                                
012836,000185: 
012837,000186: 06,3406           00003                           RELINT                                         
012838,000187: 06,3407           30163        IRIG1              CA       MODE                                  #  SET EBANK FOR RETURN
012839,000188: 06,3410           54003                           TS       EBANK                                 
012840,000189: 06,3411           14570                           TCF      SWRETURN                              
012841,000190: 
012842,000191: 06,3412           56154        GCOMPSUB           XCH      MPAC                                  #  ADIA OR ADSRA COEFFICIENT ARRIVES IN A
012843,000192: 06,3413           00006                           EXTEND                                         #  C(MPAC) = (PIPA PULSES) X 2(+14)
012844,000193: 06,3414           70154                           MP       MPAC                                  #  (GYRO PULSES)/(PIPA PULSE) X 2(-3)            *
012845,000194: 06,3415           52123                           DXCH     VBUF                                  #  NOW = (GYRO PULSES) X 2(+11)                  *
012846,000195: 
012847,000196: 06,3416           30155                           CA       MPAC       +1                         #  MINOR PART PIPA PULSES
012848,000197: 06,3417           00006                           EXTEND                                         
012849,000198: 06,3420           70154                           MP       MPAC                                  #  ADIA OR ADSRA
012850,000199: 06,3421           54001                           TS       L                                     
012851,000200: 06,3422           34714                           CAF      ZERO                                  
012852,000201: 06,3423           20123                           DAS      VBUF                                  #  NOW = (GYRO PULSES) X 2(+11)                  *
012853,000202: 
012854,000203: 06,3424           30122                           CA       VBUF                                  #  PARTIAL RESULT - MAJOR
012855,000204: 06,3425           00006                           EXTEND                                         
012856,000205: 06,3426           74677                           MP       BIT12                                 #  SCALE 2(+3)   SHIFT RIGHT 3                   *
012857,000206: 06,3427           50130                           INDEX    BUF                                   #  RESULT = (GYRO PULSES) X 2(+14)
012858,000207: 06,3430           21472                           DAS      GCOMP                                 #  HI(ADIA)(PIPAI) OR HI(ADSRA)(PIPAI)
012859,000208: 
012860,000209: 06,3431           30123                           CA       VBUF       +1                         #  PARTIAL RESULT - MINOR
012861,000210: 06,3432           00006                           EXTEND                                         
012862,000211: 06,3433           74677                           MP       BIT12                                 #  SCALE 2(+3)   SHIFT RIGHT 3                   *
012863,000212: 06,3434           54001                           TS       L                                     
012864,000213: 06,3435           34714                           CAF      ZERO                                  
012865,000214: 06,3436           50130                           INDEX    BUF                                   #  RESULT = (GYRO PULSES) X 2(+14)
012866,000215: 06,3437           21472                           DAS      GCOMP                                 #  (ADIA)(PIPAI) OR (ADSRA)(PIPAI)
012867,000216: 
012868,000217: 06,3440           00002                           TC       Q                                     
012869,000218: 

Page 297

012871,000220: 06,3441           00006        DRIFTSUB           EXTEND                                         
012872,000221: 06,3442           22131                           QXCH     BUF        +1                         
012873,000222: 
012874,000223: 06,3443           00006                           EXTEND                                         #  C(A) = NBD    (GYRO PULSES)/(CS) X 2(-5)
012875,000224: 06,3444           71074                           MP       1/PIPADT                              #  (CS) X 2(+8)  NOW (GYRO PULSES) X 2(+3)
012876,000225: 06,3445           22155                           LXCH     MPAC       +1                         #  SAVE FOR FRACTIONAL COMPENSATION
012877,000226: 06,3446           00006                           EXTEND                                         
012878,000227: 06,3447           74707                           MP       BIT4                                  #  SCALE 2(+11)  SHIFT RIGHT 11
012879,000228: 06,3450           50130                           INDEX    BUF                                   
012880,000229: 06,3451           21472                           DAS      GCOMP                                 #  HI(NBD)(DELTAT)       (GYRO PULSES) X 2(+14)
012881,000230: 
012882,000231: 06,3452           30155                           CA       MPAC       +1                         #  NOW MINOR PART
012883,000232: 06,3453           00006                           EXTEND                                         
012884,000233: 06,3454           74707                           MP       BIT4                                  #  SCALE 2(+11)          SHIFT RIGHT 11
012885,000234: 06,3455           54001                           TS       L                                     
012886,000235: 06,3456           34714                           CAF      ZERO                                  
012887,000236: 06,3457           50130                           INDEX    BUF                                   #  ADD IN FRACTIONAL COMPENSATION
012888,000237: 06,3460           21472                           DAS      GCOMP                                 #  (NBD)(DELTAT)         (GYRO PULSES) X 2(+14)
012889,000238: 
012890,000239: 06,3461           34711        DRFTSUB2           CAF      TWO                                   #  PIPAX, PIPAY, PIPAZ
012891,000240: 06,3462           60130                           AD       BUF                                   
012892,000241: 06,3463           56130                           XCH      BUF                                   
012893,000242: 06,3464           50000                           INDEX    A                                     
012894,000243: 06,3465           11471                           CCS      GCOMP                                 #  ARE GYRO COMMANDS 1 PULSE OR GREATER
012895,000244: 06,3466           13470                           TCF      +2                                    #  YES
012896,000245: 06,3467           00131                           TC       BUF        +1                         #  NO
012897,000246: 
012898,000247: 06,3470           77716                           MASK     NEGONE                                
012899,000248: 06,3471           10000                           CCS      A                                     #  ARE GYRO COMMANDS GREATER THAN 2 PULSES
012900,000249: 06,3472           55477                           TS       GCOMPSW                               #  YES - SET GCOMPSW POSITIVE
012901,000250: 06,3473           00131                           TC       BUF        +1                         #  NO
012902,000251: 

Page 298

012904,000253: 06,3474           34710        1/GYRO             CAF      FOUR                                  #  PIPAZ, PIPAY, PIPAX
012905,000254: 06,3475           54130                           TS       BUF                                   
012906,000255: 
012907,000256: 06,3476           50130                           INDEX    BUF                                   #  SCALE GYRO COMMANDS FOR IMUPULSE
012908,000257: 06,3477           31472                           CA       GCOMP      +1                         #  FRACTIONAL PULSES
012909,000258: 06,3500           00006                           EXTEND                                         
012910,000259: 06,3501           74703                           MP       BIT8                                  #  SHIFT RIGHT 7
012911,000260: 06,3502           50130                           INDEX    BUF                                   
012912,000261: 06,3503           55472                           TS       GCOMP      +1                         #  FRACTIONAL PULSES SCALED
012913,000262: 
012914,000263: 06,3504           34714                           CAF      ZERO                                  #  SET GCOMP = 0 FOR DAS INSTRUCTION
012915,000264: 06,3505           50130                           INDEX    BUF                                   
012916,000265: 06,3506           57471                           XCH      GCOMP                                 #  GYRO PULSES
012917,000266: 06,3507           00006                           EXTEND                                         
012918,000267: 06,3510           74703                           MP       BIT8                                  #  SHIFT RIGHT 7
012919,000268: 06,3511           50130                           INDEX    BUF                                   
012920,000269: 06,3512           21472                           DAS      GCOMP                                 #  ADD THESE TO FRACTIONAL PULSES ABOVE
012921,000270: 
012922,000271: 06,3513           10130                           CCS      BUF                                   #  PIPAZ, PIPAY, PIPAX
012923,000272: 06,3514           67716                           AD       NEG1                                  
012924,000273: 06,3515           13475                           TCF      1/GYRO     +1                         
012925,000274: 06,3516           01471        LGCOMP             ECADR    GCOMP                                 #  LESS THAN ZERO IMPOSSIBLE
012926,000275: 
012927,000276: 06,3517           33516                           CAF      LGCOMP                                
012928,000277: 06,3520           04555                           TC       BANKCALL                              
012929,000278: 06,3521           17125                           CADR     IMUPULSE                              #  CALL GYRO TORQUING ROUTINE
012930,000279: 06,3522           04555                           TC       BANKCALL                              
012931,000280: 06,3523           17516                           CADR     IMUSTALL                              #  WAIT FOR PULSES TO GET OUT
012932,000281: 06,3524           15112                           TCF      ENDOFJOB                              #  TEMPORARY
012933,000282: 
012934,000283: 06,3525           34710        GCOMP1             CAF      FOUR                                  #  PIPAZ, PIPAY, PIPAX
012935,000284: 06,3526           54130                           TS       BUF                                   
012936,000285: 
012937,000286: 06,3527           50130                           INDEX    BUF                                   #  RESCALE
012938,000287: 06,3530           31472                           CA       GCOMP      +1                         
012939,000288: 06,3531           00006                           EXTEND                                         
012940,000289: 06,3532           74703                           MP       BIT8                                  #  SHIFT MINOR PART LEFT 7 - MAJOR PART = 0
012941,000290: 06,3533           50130                           INDEX    BUF                                   
012942,000291: 06,3534           23472                           LXCH     GCOMP      +1                         #  BITS 8-14 OF MINOR PART WERE = 0
012943,000292: 
012944,000293: 06,3535           10130                           CCS      BUF                                   #  PIPAZ, PIPAY, PIPAX
012945,000294: 06,3536           67716                           AD       NEG1                                  
012946,000295: 06,3537           13526                           TCF      GCOMP1     +1                         
012947,000296: 
012948,000297: 06,3540           01436        V06N30S            VN       0630                                  
012949,000298: 06,3541           15112                           TCF      ENDOFJOB                              
012950,000299: 

Page 299

012952,000301: 06,3542           11477        NBDONLY            CCS      GCOMPSW                               #  BYPASS IF GCOMPSW NEGATIVE
012953,000302: 06,3543           13546                           TCF      +3                                    
012954,000303: 06,3544           13546                           TCF      +2                                    
012955,000304: 06,3545           15112                           TCF      ENDOFJOB                              
012956,000305: 
012957,000306: 06,3546           00004                           INHINT                                         
012958,000307: 06,3547           10076                           CCS      FLAGWRD2                              #  PREREAD T3RUPT MAY COINCIDE
012959,000308: 06,3550           15112                           TCF      ENDOFJOB                              
012960,000309: 06,3551           15112                           TCF      ENDOFJOB                              
012961,000310: 06,3552           13553                           TCF      +1                                    
012962,000311: 
012963,000312: 06,3553           30025                           CA       TIME1                                 #  (CS) X 2(+14)
012964,000313: 06,3554           57074                           XCH      1/PIPADT                              #  PREVIOUS TIME
012965,000314: 06,3555           00003                           RELINT                                         
012966,000315: 06,3556           40000                           COM                                            
012967,000316: 06,3557           61074                           AD       1/PIPADT                              
012968,000317: 06,3560           10000        NBD2               CCS      A                                     #  CALCULATE ELAPSED TIME
012969,000318: 06,3561           64712                           AD       ONE                                   #  NO TIME1 OVERFLOW
012970,000319: 06,3562           13567                           TCF      NBD3                                  #  RESTORE TIME DIFFERENCE AND JUMP
012971,000320: 06,3563           13565                           TCF      +2                                    #  TIME1 OVERFLOW
012972,000321: 06,3564           15112                           TCF      ENDOFJOB                              #  IF ELAPSED TIME = 0 (DIFFERENCE = -0)
012973,000322: 
012974,000323: 06,3565           40000                           COM                                            #  CALCULATE ABSOLUTE DIFFERENCE
012975,000324: 06,3566           64672                           AD       POSMAX                                
012976,000325: 
012977,000326: 06,3567           00006        NBD3               EXTEND                                         #  C(A) = DELTAT         (CS) X 2(+14)
012978,000327: 06,3570           74701                           MP       BIT10                                 #  SHIFT RIGHT 5
012979,000328: 06,3571           52123                           DXCH     VBUF                                  
012980,000329: 06,3572           00006                           EXTEND                                         
012981,000330: 06,3573           30123                           DCA      VBUF                                  
012982,000331: 06,3574           52155                           DXCH     MPAC                                  #  DELTAT NOW SCALED (CS) X 2(+19)
012983,000332: 
012984,000333: 06,3575           34714                           CAF      ZERO                                  
012985,000334: 06,3576           55477                           TS       GCOMPSW                               #  INDICATE COMMANDS 2 PULSES OR LESS
012986,000335: 06,3577           54130                           TS       BUF                                   #  PIPAX, PIPAY, PIPAZ
012987,000336: 
012988,000337: 06,3600           41460                           CS       NBDX                                  #  (GYRO PULSES)/(CS) X 2(-5)
012989,000338: 06,3601           03617                           TC       FBIASSUB                              #  -(NBDX)(DELTAT)       (GYRO PULSES) X 2(+14)
012990,000339: 
012991,000340: 06,3602           00006                           EXTEND                                         
012992,000341: 06,3603           40123                           DCS      VBUF                                  
012993,000342: 06,3604           52155                           DXCH     MPAC                                  #  DELTAT SCALED (CS) X 2(+19)
012994,000343: 06,3605           31461                           CA       NBDY                                  #  (GYRO PULSES)/(CS) X 2(-5)
012995,000344: 06,3606           03617                           TC       FBIASSUB                              #  -(NBDY)(DELTAT)       (GYRO PULSES) X 2(+14)
012996,000345: 
012997,000346: 06,3607           00006                           EXTEND                                         
012998,000347: 06,3610           40123                           DCS      VBUF                                  
012999,000348: 06,3611           52155                           DXCH     MPAC                                  #  DELTAT SCALED (CS) X 2(+19)
013000,000349: 06,3612           41462                           CS       NBDZ                                  #  (GYRO PULSES)/(CS) X 2(-5)
013001,000350: 06,3613           03617                           TC       FBIASSUB                              #  +(NBDZ)(DELTAT)       (GYRO PULSES) X 2(+14)

Page 300

013003,000352: 06,3614           11477                           CCS      GCOMPSW                               #  ARE GYRO COMMANDS GREATER THAN 2 PULSES
013004,000353: 06,3615           13474                           TCF      1/GYRO                                #  YES
013005,000354: 06,3616           15112                           TCF      ENDOFJOB                              #  NO
013006,000355: 

Page 301

013008,000357: 06,3617           56002        FBIASSUB           XCH      Q                                     
013009,000358: 06,3620           54131                           TS       BUF        +1                         
013010,000359: 
013011,000360: 06,3621           30002                           CA       Q                                     #  NBD SCALED (GYRO PULSES)/(CS) X 2(-5)
013012,000361: 06,3622           00006                           EXTEND                                         
013013,000362: 06,3623           70154                           MP       MPAC                                  #  DELTAT SCALED (CS) X 2(+19)
013014,000363: 06,3624           50130                           INDEX    BUF                                   
013015,000364: 06,3625           21472                           DAS      GCOMP                                 #  HI(NBD)(DELTAT)       (GYRO PULSES) X 2(+14)
013016,000365: 
013017,000366: 06,3626           30002                           CA       Q                                     #  NOW FRACTIONAL PART
013018,000367: 06,3627           00006                           EXTEND                                         
013019,000368: 06,3630           70155                           MP       MPAC       +1                         
013020,000369: 06,3631           54001                           TS       L                                     
013021,000370: 06,3632           34714                           CAF      ZERO                                  
013022,000371: 06,3633           50130                           INDEX    BUF                                   
013023,000372: 06,3634           21472                           DAS      GCOMP                                 #  (NBD)(DELTAT)         (GYRO PULSES) X 2(+14)
013024,000373: 
013025,000374: 06,3635           13461                           TCF      DRFTSUB2                              #  CHECK MAGNITUDE OF COMPENSATION
013026,000375: 
013027,000376: 06,3636           04555        LASTBIAS           TC       BANKCALL                              
013028,000377: 06,3637           17075                           CADR     PIPUSE                                
013029,000378: 
013030,000379: 06,3640           11477                           CCS      GCOMPSW                               #  BYPASS IF GCOMPSW NEGATIVE
013031,000380: 06,3641           13644                           TCF      +3                                    
013032,000381: 06,3642           13644                           TCF      +2                                    
013033,000382: 06,3643           15112                           TCF      ENDOFJOB                              
013034,000383: 
013035,000384: 06,3644           37665                           CAF      PRIO31                                #  2 SECONDS SCALED (CS) X 2(+8)
013036,000385: 06,3645           57074                           XCH      1/PIPADT                              
013037,000386: 06,3646           40000                           COM                                            
013038,000387: 06,3647           61246                           AD       PIPTIME1   +1                         #  TIME AT PIPA1 =0
013039,000388: 06,3650           13560                           TCF      NBD2                                  
013040,000389: 

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