Source Code

These source-code files are part of a reconstructed copy of Skylark 048, the Block II Command Module (CM) Apollo Guidance Computer (AGC) software for the Skylab-2, Skylab-3, Skylab-4, and Apollo-Soyuz Test Project missions.

They have been created via disassembly of binary dumps of the original core rope memory modules actually flown on Skylab-2, part numbers 2010802-541, 2010802-551, 2010802-561, 2010802-571, 2010802-581, and 2010802-591. Access to these modules was provided by the New Mexico Museum of Space History, who we are much indebted to.

The source code for the Apollo 15, 16, and 17 software, Artemis 072, was used as a starting point. Heavy use was made of TRW 4900.5-244, Programmed Guidance Equations for Skylark Command Module Earth Orbital Program, dated 14 February 1972. This document contains pseudocode of essentially all of Skylark, using original program labels which have been copied for this source reconstruction.

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

012850,000002:                                                                                                  ## Copyright:   Public domain.
012851,000003:                                                                                                  ## Filename:    IMU_COMPENSATION_PACKAGE.agc
012852,000004:                                                                                                  ## Purpose:     A section of Skylark revision 048.
012853,000005:                                                                                                  ##              It is part of the source code for the Apollo Guidance Computer (AGC)
012854,000006:                                                                                                  ##              for Skylab-2, Skylab-3, Skylab-4, and ASTP. No original listings of
012855,000007:                                                                                                  ##              this software are available; instead, this file was created via
012856,000008:                                                                                                  ##              disassembly of dumps of the core rope modules actually flown on
012857,000009:                                                                                                  ##              Skylab-2. Access to these modules was provided by the New Mexico
012858,000010:                                                                                                  ##              Museum of Space History.
012859,000011:                                                                                                  ## Assembler:   yaYUL
012860,000012:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
012861,000013:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
012862,000014:                                                                                                  ## Mod history: 2023-09-04 MAS  Created from Artemis 072.
012863,000015: 
012864,000016: 
012865,000017: 06,2000                                           SETLOC   IMUCOMP                               
012866,000018: 06,2000                                           BANK                                           
012867,000019: 06,3273  E3,1460                                  EBANK=   NBDX                                  
012868,000020: 
012869,000021: 06,3273                                           COUNT*   $$/ICOMP                              
012870,000022: 06,3273           33532        1/PIPA             CAF      LGCOMP                                #  SAVE EBANK OF CALLING PROGRAM
012871,000023: 06,3274           56003                           XCH      EBANK                                 
012872,000024: 06,3275           54163                           TS       MODE                                  
012873,000025: 
012874,000026: 06,3276           11477                           CCS      GCOMPSW                               #  BYPASS IF GCOMPSW NEGATIVE
012875,000027: 06,3277           13302                           TCF      +3                                    
012876,000028: 06,3300           13302                           TCF      +2                                    
012877,000029: 06,3301           13417                           TCF      IRIG1                                 #  RETURN
012878,000030: 
012879,000031: 06,3302           00004                           INHINT                                         #  ASSURE COMPLETE COMPENSATION OF DELV'S
012880,000032:                                                                                                  #  FOR DOWNLINK.
012881,000033: 
012882,000034: 06,3303           34777        1/PIPA1            CAF      FOUR                                  #  PIPAZ, PIPAY, PIPAX
012883,000035: 06,3304           77702                 +1        MASK     NEGONE                                
012884,000036: 06,3305           54132                           TS       BUF        +2                         
012885,000037: 
012886,000038: 06,3306           50132                           INDEX    BUF        +2                         
012887,000039: 06,3307           31453                           CA       PIPASCF                               #  (P.P.M.) X 2(-9)
012888,000040: 06,3310           00006                           EXTEND                                         
012889,000041: 06,3311           50132                           INDEX    BUF        +2                         
012890,000042: 06,3312           71304                           MP       DELVX                                 #  (PP) X 2(+14) NOW (PIPA PULSES) X 2(+5)
012891,000043: 06,3313           54002                           TS       Q                                     #  SAVE MAJOR PART
012892,000044: 
012893,000045: 06,3314           30001                           CA       L                                     #  MINOR PART
012894,000046: 06,3315           00006                           EXTEND                                         
012895,000047: 06,3316           74774                           MP       BIT6                                  #  SCALE 2(+9)   SHIFT RIGHT 9
012896,000048: 06,3317           50132                           INDEX    BUF        +2                         
012897,000049: 06,3320           55305                           TS       DELVX      +1                         #  FRACTIONAL PIPA PULSES SCALED 2(+14)
012898,000050: 
012899,000051: 06,3321           30002                           CA       Q                                     #  MAJOR PART
012900,000052: 06,3322           00006                           EXTEND                                         
012901,000053: 06,3323           74774                           MP       BIT6                                  #  SCALE 2(+9)   SHIFT RIGHT 9
012902,000054: 06,3324           50132                           INDEX    BUF        +2                         
012903,000055: 06,3325           21305                           DAS      DELVX                                 #  (PIPAI) + (PIPAI)(SFE)
012904,000056: 
012905,000057: 06,3326           50132                           INDEX    BUF        +2                         
012906,000058: 06,3327           41452                           CS       PIPABIAS                              #  (PIPA PULSES)/(CS) X 2(-6)
012907,000059: 06,3330           00006                           EXTEND                                         
012908,000060: 06,3331           71267                           MP       1/PIPADT                              #  (CS) X 2(+8) NOW (PIPA PULSES) X 2(+2)
012909,000061: 06,3332           00006                           EXTEND                                         
012910,000062: 06,3333           74777                           MP       BIT3                                  #  SCALE 2(+12) SHIFT RIGHT 12
012911,000063: 06,3334           50132                           INDEX    BUF        +2                         
012912,000064: 06,3335           21305                           DAS      DELVX                                 #  (PIPAI) + (PIPAI)(SFE) - (BIAS)(DELTAT)
012913,000065: 
012914,000066: 06,3336           10132                           CCS      BUF        +2                         #  PIPAZ, PIPAY, PIPAX
012915,000067: 06,3337           13304                           TCF      1/PIPA1    +1                         
012916,000068: 06,3340           00003                           RELINT                                         
012917,000069: 
012918,000070: 06,3341           55477        IRIGCOMP           TS       GCOMPSW                               #  INDICATE COMMANDS 2 PULSES OR LESS
012919,000071: 06,3342           54130                           TS       BUF                                   #  INDEX COUNTER - IRIGX, IRIGY, IRIGZ
012920,000072: 
012921,000073: 06,3343           00006        IRIGX              EXTEND                                         
012922,000074: 06,3344           41305                           DCS      DELVX                                 #  (PIPA PULSES) X 2(+14)
012923,000075: 06,3345           52155                           DXCH     MPAC                                  
012924,000076: 06,3346           31463                           CA       ADIAX                                 #  (GYRO PULSES)/(PIPA PULSE) X 2(-3)            *
012925,000077: 06,3347           03422                           TC       GCOMPSUB                              #  -(ADIAX)(PIPAX)       (GYRO PULSES) X 2(+14)
012926,000078: 
012927,000079: 06,3350           00006                           EXTEND                                         
012928,000080: 06,3351           41307                           DCS      DELVY                                 #  (PIPA PULSES) X 2(+14)
012929,000081: 06,3352           52155                           DXCH     MPAC                                  
012930,000082: 06,3353           41466                           CS       ADSRAX                                #  (GYRO PULSES)/(PIPA PULSE) X 2(-3)            *
012931,000083: 06,3354           03422                           TC       GCOMPSUB                              #  +(ADSRAX)(PIPAY)      (GYRO PULSES) X 2(+14)
012932,000084: 
012933,000085:                                                                                                  #                EXTEND                  ***
012934,000086:                                                                                                  #                DCS     DELVZ           *** (PIPA PULSES) X 2(+14)
012935,000087:                                                                                                  #                DXCH    MPAC            ***
012936,000088:                                                                                                  #                CA      ADOAX           *** (GYRO PULSES)/(PIPA PULSE) X 2(-3)  *
012937,000089:                                                                                                  #                TC      GCOMPSUB        *** -(ADOAX)(PIPAZ)     (GYRO PULSES) X 2(+14)
012938,000090: 
012939,000091: 06,3355           41460                           CS       NBDX                                  #  (GYRO PULSES)/(CS) X 2(-5)
012940,000092: 06,3356           03451                           TC       DRIFTSUB                              #  -(NBDX)(DELTAT)       (GYRO PULSES) X 2(+14)
012941,000093: 
012942,000094: 06,3357           00006        IRIGY              EXTEND                                         
012943,000095: 06,3360           41307                           DCS      DELVY                                 #  (PIPA PULSES) X 2(+14)
012944,000096: 06,3361           52155                           DXCH     MPAC                                  
012945,000097: 06,3362           31464                           CA       ADIAY                                 #  (GYRO PULSES)/(PIPA PULSE) X 2(-3)            *
012946,000098: 06,3363           03422                           TC       GCOMPSUB                              #  -(ADIAY)(PIPAY)       (GYRO PULSES) X 2(+14)
012947,000099: 
012948,000100: 06,3364           00006                           EXTEND                                         
012949,000101: 06,3365           41311                           DCS      DELVZ                                 #  (PIPA PULSES) X 2(+14)
012950,000102: 06,3366           52155                           DXCH     MPAC                                  
012951,000103: 06,3367           41467                           CS       ADSRAY                                #  (GYRO PULSES)/(PIPA PULSE) X 2(-3)            *
012952,000104: 06,3370           03422                           TC       GCOMPSUB                              #  +(ADSRAY)(PIPAZ)      (GYRO PULSES) X 2(+14)
012953,000105: 
012954,000106:                                                                                                  #                EXTEND                  ***
012955,000107:                                                                                                  #                DCS     DELVX           *** (PIPA PULSES) X 2(+14)
012956,000108:                                                                                                  #                DXCH    MPAC            ***
012957,000109:                                                                                                  #                CA      ADOAY           *** (GYRO PULSES)/(PIPA PULSE) X 2(-3)  *
012958,000110:                                                                                                  #                TC      GCOMPSUB        *** -(ADOAY)(PIPAX)     (GYRO PULSES) X 2(+14)
012959,000111: 
012960,000112: 06,3371           41461                           CS       NBDY                                  #  (GYRO PULSES)/(CS) X 2(-5)
012961,000113: 06,3372           03451                           TC       DRIFTSUB                              #  -(NBDY)(DELTAT)       (GYRO PULSES) X 2(+14)
012962,000114: 
012963,000115: 06,3373           00006        IRIGZ              EXTEND                                         
012964,000116: 06,3374           41307                           DCS      DELVY                                 #  (PIPA PULSES) X 2(+14)
012965,000117: 06,3375           52155                           DXCH     MPAC                                  
012966,000118: 06,3376           31470                           CA       ADSRAZ                                #  (GYRO PULSES)/(PIPA PULSE) X 2(-3)            *
012967,000119: 06,3377           03422                           TC       GCOMPSUB                              #  -(ADSRAZ)(PIPAY)      (GYRO PULSES) X 2(+14)
012968,000120: 
012969,000121: 06,3400           00006                           EXTEND                                         
012970,000122: 06,3401           41311                           DCS      DELVZ                                 #  (PIPA PULSES) X 2(+14)
012971,000123: 06,3402           52155                           DXCH     MPAC                                  
012972,000124: 06,3403           31465                           CA       ADIAZ                                 #  (GYRO PULSES)/(PIPA PULSE) X 2(-3)            *
012973,000125: 06,3404           03422                           TC       GCOMPSUB                              #  -(ADIAZ)(PIPAZ)       (GYRO PULSES) X 2(+14)
012974,000126: 
012975,000127:                                                                                                  #                EXTEND                  ***
012976,000128:                                                                                                  #                DCS     DELVX           *** (PIPA PULSE) X 2(+14)
012977,000129:                                                                                                  #                DXCH    MPAC            ***
012978,000130:                                                                                                  #                CS      ADOAZ           *** (GYRO PULSES)/(PIPA PULSE) X 2(-3)  *
012979,000131:                                                                                                  #                TC      GCOMPSUB        *** +(ADOAZ)(PIPAX)     (GYRO PULSES) X 2(+14)
012980,000132: 
012981,000133: 06,3405           31462                           CA       NBDZ                                  #  (GYRO PULSES)/(CS) X 2(-5)
012982,000134: 06,3406           03451                           TC       DRIFTSUB                              #  +(NBDZ)(DELTAT)       (GYRO PULSES) X 2(+14)
012983,000135: 
012984,000136: 06,3407           11477                           CCS      GCOMPSW                               #  ARE GYRO COMMANDS GREATER THAN 2 PULSES
012985,000137: 06,3410           13412                           TCF      +2                                    #  YES
012986,000138: 06,3411           13417                           TCF      IRIG1                                 #  NO
012987,000139: 
012988,000140: 06,3412           35072                           CA       PRIO21                                #  HIGHER THAN SERVICER-LESS THAN PRELAUNCH
012989,000141: 06,3413           05134                           TC       NOVAC                                 
012990,000142: 06,3414  E3,1460                                  EBANK=   NBDX                                  
012991,000143: 06,3414           03504 14063                     2CADR    1/CHECK                               
012992,000144: 
012993,000145: 06,3416           00003                           RELINT                                         
012994,000146: 06,3417           30163        IRIG1              CA       MODE                                  #  SET EBANK FOR RETURN
012995,000147: 06,3420           54003                           TS       EBANK                                 
012996,000148: 06,3421           14662                           TCF      SWRETURN                              
012997,000149: 
012998,000150: 06,3422           56154        GCOMPSUB           XCH      MPAC                                  #  ADIA OR ADSRA COEFFICIENT ARRIVES IN A
012999,000151: 06,3423           00006                           EXTEND                                         #  C(MPAC) = (PIPA PULSES) X 2(+14)
013000,000152: 06,3424           70154                           MP       MPAC                                  #  (GYRO PULSES)/(PIPA PULSE) X 2(-3)            *
013001,000153: 06,3425           52123                           DXCH     VBUF                                  #  NOW = (GYRO PULSES) X 2(+11)                  *
013002,000154: 
013003,000155: 06,3426           30155                           CA       MPAC       +1                         #  MINOR PART PIPA PULSES
013004,000156: 06,3427           00006                           EXTEND                                         
013005,000157: 06,3430           70154                           MP       MPAC                                  #  ADIA OR ADSRA
013006,000158: 06,3431           54001                           TS       L                                     
013007,000159: 06,3432           35003                           CAF      ZERO                                  
013008,000160: 06,3433           20123                           DAS      VBUF                                  #  NOW = (GYRO PULSES) X 2(+11)                  *
013009,000161: 
013010,000162: 06,3434           30122                           CA       VBUF                                  #  PARTIAL RESULT - MAJOR
013011,000163: 06,3435           00006                           EXTEND                                         
013012,000164: 06,3436           74766                           MP       BIT12                                 #  SCALE 2(+3)   SHIFT RIGHT 3                   *
013013,000165: 06,3437           50130                           INDEX    BUF                                   #  RESULT = (GYRO PULSES) X 2(+14)
013014,000166: 06,3440           21472                           DAS      GCOMP                                 #  HI(ADIA)(PIPAI)  OR  HI(ADSRA)(PIPAI)
013015,000167: 
013016,000168: 06,3441           30123                           CA       VBUF       +1                         #  PARTIAL RESULT - MINOR
013017,000169: 06,3442           00006                           EXTEND                                         
013018,000170: 06,3443           74766                           MP       BIT12                                 #  SCALE 2(+3)   SHIFT RIGHT 3                   *
013019,000171: 06,3444           54001                           TS       L                                     
013020,000172: 06,3445           35003                           CAF      ZERO                                  
013021,000173: 06,3446           50130                           INDEX    BUF                                   #  RESULT = (GYRO PULSES) X 2(+14)
013022,000174: 06,3447           21472                           DAS      GCOMP                                 #  (ADIA)(PIPAI)  OR  (ADSRA)(PIPAI)
013023,000175: 
013024,000176: 06,3450           00002                           TC       Q                                     
013025,000177: 
013026,000178: 06,3451           00006        DRIFTSUB           EXTEND                                         
013027,000179: 06,3452           22131                           QXCH     BUF        +1                         
013028,000180: 
013029,000181: 06,3453           00006                           EXTEND                                         #  C(A) = NBD    (GYRO PULSES)/(CS) X 2(-5)
013030,000182: 06,3454           71267                           MP       1/PIPADT                              #  (CS) X 2(+8)   NOW (GYRO PULSES) X 2(+3)
013031,000183: 06,3455           22155                           LXCH     MPAC       +1                         #  SAVE FOR FRACTIONAL COMPENSATION
013032,000184: 06,3456           00006                           EXTEND                                         
013033,000185: 06,3457           74776                           MP       BIT4                                  #  SCALE 2(+11)          SHIFT RIGHT 11
013034,000186: 06,3460           50130                           INDEX    BUF                                   
013035,000187: 06,3461           21472                           DAS      GCOMP                                 #  HI(NBD)(DELTAT)       (GYRO PULSES) X 2(+14)
013036,000188: 
013037,000189: 06,3462           30155                           CA       MPAC       +1                         #  NOW MINOR PART
013038,000190: 06,3463           00006                           EXTEND                                         
013039,000191: 06,3464           74776                           MP       BIT4                                  #  SCALE 2(+11)          SHIFT RIGHT 11
013040,000192: 06,3465           54001                           TS       L                                     
013041,000193: 06,3466           35003                           CAF      ZERO                                  
013042,000194: 06,3467           50130                           INDEX    BUF                                   #  ADD IN FRACTIONAL COMPENSATION
013043,000195: 06,3470           21472                           DAS      GCOMP                                 #  (NBD)(DELTAT)         (GYRO PULSES) X 2(+14)
013044,000196: 
013045,000197: 06,3471           35000        DRFTSUB2           CAF      TWO                                   #  PIPAX, PIPAY, PIPAZ
013046,000198: 06,3472           60130                           AD       BUF                                   
013047,000199: 06,3473           56130                           XCH      BUF                                   
013048,000200: 06,3474           50000                           INDEX    A                                     
013049,000201: 06,3475           11471                           CCS      GCOMP                                 #  ARE GYRO COMMANDS 1 PULSE OR GREATER
013050,000202: 06,3476           13500                           TCF      +2                                    #  YES
013051,000203: 06,3477           00131                           TC       BUF        +1                         #  NO
013052,000204: 
013053,000205: 06,3500           77702                           MASK     NEGONE                                
013054,000206: 06,3501           10000                           CCS      A                                     #  ARE GYRO COMMANDS GREATER THAN 2 PULSES
013055,000207: 06,3502           55477                           TS       GCOMPSW                               #  YES - SET GCOMPSW POSITIVE
013056,000208: 06,3503           00131                           TC       BUF        +1                         #  NO
013057,000209: 
013058,000210: 06,3504           31325        1/CHECK            CA       MODECADR                              
013059,000211: 06,3505           00006                           EXTEND                                         
013060,000212: 06,3506           13510                           BZF      1/GYRO                                
013061,000213: 06,3507           15220                           TCF      ENDOFJOB                              
013062,000214: 
013063,000215: 06,3510           34777        1/GYRO             CAF      FOUR                                  #  PIPAZ, PIPAY, PIPAX
013064,000216: 06,3511           54130                 +1        TS       BUF                                   
013065,000217: 
013066,000218: 06,3512           50130                           INDEX    BUF                                   #  SCALE GYRO COMMANDS FOR IMUPULSE
013067,000219: 06,3513           31472                           CA       GCOMP      +1                         #  FRACTIONAL PULSES
013068,000220: 06,3514           00006                           EXTEND                                         
013069,000221: 06,3515           74772                           MP       BIT8                                  #  SHIFT RIGHT 7
013070,000222: 06,3516           50130                           INDEX    BUF                                   
013071,000223: 06,3517           55472                           TS       GCOMP      +1                         #  FRACTIONAL PULSES SCALED
013072,000224: 
013073,000225: 06,3520           35003                           CAF      ZERO                                  #  SET GCOMP = 0 FOR DAS INSTRUCTION
013074,000226: 06,3521           50130                           INDEX    BUF                                   
013075,000227: 06,3522           57471                           XCH      GCOMP                                 #  GYRO PULSES
013076,000228: 06,3523           00006                           EXTEND                                         
013077,000229: 06,3524           74772                           MP       BIT8                                  #  SHIFT RIGHT 7
013078,000230: 06,3525           50130                           INDEX    BUF                                   
013079,000231: 06,3526           21472                           DAS      GCOMP                                 #  ADD THESE TO FRACTIONAL PULSES ABOVE
013080,000232: 
013081,000233: 06,3527           10130                           CCS      BUF                                   #  PIPAZ, PIPAY, PIPAX
013082,000234: 06,3530           67702                           AD       NEG1                                  
013083,000235: 06,3531           13511                           TCF      1/GYRO     +1                         
013084,000236: 06,3532           01471        LGCOMP             ECADR    GCOMP                                 #  LESS THAN ZERO IMPOSSIBLE
013085,000237: 
013086,000238: 06,3533           33532                           CAF      LGCOMP                                
013087,000239: 06,3534           04647                           TC       BANKCALL                              
013088,000240: 06,3535           17175                           CADR     IMUPULSE                              #  CALL GYRO TORQUING ROUTINE
013089,000241: 06,3536           04647                           TC       BANKCALL                              
013090,000242: 06,3537           17575                           CADR     IMUSTALL                              #  WAIT FOR PULSES TO GET OUT
013091,000243: 06,3540           13541                           TCF      +1                                    
013092,000244: 
013093,000245: 06,3541           34777        GCOMP1             CAF      FOUR                                  #  PIPAZ, PIPAY, PIPAX
013094,000246: 06,3542           54130                 +1        TS       BUF                                   
013095,000247: 
013096,000248: 06,3543           50130                           INDEX    BUF                                   #  RESCALE
013097,000249: 06,3544           31472                           CA       GCOMP      +1                         
013098,000250: 06,3545           00006                           EXTEND                                         
013099,000251: 06,3546           74772                           MP       BIT8                                  #  SHIFT MINOR PART LEFT 7 - MAJOR PART = 0
013100,000252: 06,3547           50130                           INDEX    BUF                                   
013101,000253: 06,3550           23472                           LXCH     GCOMP      +1                         #  BITS 8-14 OF MINOR PART WERE = 0
013102,000254: 
013103,000255: 06,3551           10130                           CCS      BUF                                   #  PIPAZ, PIPAY, PIPAX
013104,000256: 06,3552           67702                           AD       NEG1                                  
013105,000257: 06,3553           13542                           TCF      GCOMP1     +1                         
013106,000258: 06,3554           75252        OCT75252           OCT      75252                                 #  -15 DEGREES USED BY T4RUPT
013107,000259: 06,3555           15220                           TCF      ENDOFJOB                              
013108,000260: 
013109,000261: 06,3556           11477        NBDONLY            CCS      GCOMPSW                               #  BYPASS IF GCOMPSW NEGATIVE
013110,000262: 06,3557           13562                           TCF      +3                                    
013111,000263: 06,3560           13562                           TCF      +2                                    
013112,000264: 06,3561           15220                           TCF      ENDOFJOB                              
013113,000265: 
013114,000266: 06,3562           00004                           INHINT                                         
013115,000267: 06,3563           30076                           CA       FLAGWRD2                              
013116,000268: 06,3564           74763                           MASK     DRFTBIT                               
013117,000269: 06,3565           00006                           EXTEND                                         
013118,000270: 06,3566           15220                           BZF      ENDOFJOB                              
013119,000271: 
013120,000272: 06,3567           30025                           CA       TIME1                                 #  (CS) X 2(+14)
013121,000273: 06,3570           57267                           XCH      1/PIPADT                              #  PREVIOUS TIME
013122,000274: 06,3571           00003                           RELINT                                         
013123,000275: 06,3572           40000                           COM                                            
013124,000276: 06,3573           61267                           AD       1/PIPADT                              
013125,000277: 06,3574           10000        NBD2               CCS      A                                     #  CALCULATE ELAPSED TIME
013126,000278: 06,3575           65001                           AD       ONE                                   #  NO TIME1 OVERFLOW
013127,000279: 06,3576           13603                           TCF      NBD3                                  #  RESTORE TIME DIFFERENCE AND JUMP
013128,000280: 06,3577           13601                           TCF      +2                                    #  TIME1 OVERFLOW
013129,000281: 06,3600           15220                           TCF      ENDOFJOB                              #  IF ELAPSED TIME = 0 (DIFFERENCE = -0)
013130,000282: 
013131,000283: 06,3601           40000                           COM                                            #  CALCULATE ABSOLUTE DIFFERENCE
013132,000284: 06,3602           64761                           AD       POSMAX                                
013133,000285: 
013134,000286: 06,3603           00006        NBD3               EXTEND                                         #  C(A) = DELTAT         (CS) X 2(+14)
013135,000287: 06,3604           74770                           MP       BIT10                                 #  SHIFT RIGHT 5
013136,000288: 06,3605           52123                           DXCH     VBUF                                  
013137,000289: 06,3606           00006                           EXTEND                                         
013138,000290: 06,3607           30123                           DCA      VBUF                                  
013139,000291: 06,3610           52155                           DXCH     MPAC                                  #  DELTAT NOW SCALED (CS) X 2(+19)
013140,000292: 
013141,000293: 06,3611           35003                           CAF      ZERO                                  
013142,000294: 06,3612           55477                           TS       GCOMPSW                               #  INDICATE COMMANDS 2 PULSES OR LESS
013143,000295: 06,3613           54130                           TS       BUF                                   #  PIPAX, PIPAY, PIPAZ
013144,000296: 
013145,000297: 06,3614           41460                           CS       NBDX                                  #  (GYRO PULSES)/(CS) X 2(-5)
013146,000298: 06,3615           03633                           TC       FBIASSUB                              #  -(NBDX)(DELTAT)       (GYRO PULSES) X 2(+14)
013147,000299: 
013148,000300: 06,3616           00006                           EXTEND                                         
013149,000301: 06,3617           40123                           DCS      VBUF                                  
013150,000302: 06,3620           52155                           DXCH     MPAC                                  #  DELTAT SCALED (CS) X 2(+19)
013151,000303: 06,3621           31461                           CA       NBDY                                  #  (GYRO PULSES)/(CS) X 2(-5)
013152,000304: 06,3622           03633                           TC       FBIASSUB                              #  -(NBDY)(DELTAT)       (GYRO PULSES) X 2(+14)
013153,000305: 
013154,000306: 06,3623           00006                           EXTEND                                         
013155,000307: 06,3624           40123                           DCS      VBUF                                  
013156,000308: 06,3625           52155                           DXCH     MPAC                                  #  DELTAT SCALED (CS) X 2(+19)
013157,000309: 06,3626           41462                           CS       NBDZ                                  #  (GYRO PULSES)/(CS) X 2(-5)
013158,000310: 06,3627           03633                           TC       FBIASSUB                              #  +(NBDZ)(DELTAT)       (GYRO PULSES) X 2(+14)
013159,000311: 06,3630           11477                           CCS      GCOMPSW                               #  ARE GYRO COMMANDS GREATER THAN 2 PULSES
013160,000312: 06,3631           13510                           TCF      1/GYRO                                #  YES
013161,000313: 06,3632           15220                           TCF      ENDOFJOB                              #  NO
013162,000314: 
013163,000315: 06,3633           56002        FBIASSUB           XCH      Q                                     
013164,000316: 06,3634           54131                           TS       BUF        +1                         
013165,000317: 
013166,000318: 06,3635           30002                           CA       Q                                     #  NBD SCALED (GYRO PULSES)/(CS) X 2(-5)
013167,000319: 06,3636           00006                           EXTEND                                         
013168,000320: 06,3637           70154                           MP       MPAC                                  #  DELTAT SCALED (CS) X 2(+19)
013169,000321: 06,3640           50130                           INDEX    BUF                                   
013170,000322: 06,3641           21472                           DAS      GCOMP                                 #  HI(NBD)(DELTAT)       (GYRO PULSES) X 2(+14)
013171,000323: 
013172,000324: 06,3642           30002                           CA       Q                                     #  NOW FRACTIONAL PART
013173,000325: 06,3643           00006                           EXTEND                                         
013174,000326: 06,3644           70155                           MP       MPAC       +1                         
013175,000327: 06,3645           54001                           TS       L                                     
013176,000328: 06,3646           35003                           CAF      ZERO                                  
013177,000329: 06,3647           50130                           INDEX    BUF                                   
013178,000330: 06,3650           21472                           DAS      GCOMP                                 #  (NBD)(DELTAT)         (GYRO PULSES) X 2(+14)
013179,000331: 
013180,000332: 06,3651           13471                           TCF      DRFTSUB2                              #  CHECK MAGNITUDE OF COMPENSATION
013181,000333: 
013182,000334: 06,3652           04647        LASTBIAS           TC       BANKCALL                              
013183,000335: 06,3653           17145                           CADR     PIPUSE                                
013184,000336: 
013185,000337: 06,3654           11477                           CCS      GCOMPSW                               #  BYPASS IF GCOMPSW NEGATIVE
013186,000338: 06,3655           13660                           TCF      +3                                    
013187,000339: 06,3656           13660                           TCF      +2                                    
013188,000340: 06,3657           15220                           TCF      ENDOFJOB                              
013189,000341: 
013190,000342: 06,3660           37652                           CAF      PRIO31                                #  2 SECONDS SCALED (CS) X 2(+8)
013191,000343: 06,3661           57267                           XCH      1/PIPADT                              
013192,000344: 06,3662           40000                           COM                                            
013193,000345: 06,3663           61077                           AD       PIPTIME1   +1                         #  TIME AT PIPA1 =0
013194,000346: 06,3664           13574                           TCF      NBD2                                  
013195,000347: 
013196,000348: 06,3665           21450        90SECS             DEC      9000       B-14                       
013197,000349: 06,3666           16037        20DEGS             DEC      7199       B-14                       

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