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.

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

Page 292

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

Page 293

012760,000103: 06,3325           67716                           AD       NEG1                                  
012761,000104: 06,3326           13273                           TCF      1/PIPA1    +1                         
012762,000105: 06,3327           13330                           NOOP                                           #  LESS THAN ZERO IMPOSSIBLE.
012763,000106: 06,3330           00003                           RELINT                                         

Page 294

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

Page 295

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

Page 296

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

Page 297

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

Page 298

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

Page 299

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

Page 300

013009,000352: 06,3614           11477                           CCS      GCOMPSW                               #  ARE GYRO COMMANDS GREATER THAN 2 PULSES
013010,000353: 06,3615           13474                           TCF      1/GYRO                                #  YES
013011,000354: 06,3616           15112                           TCF      ENDOFJOB                              #  NO
013012,000355: 

Page 301

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

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