Source Code

These source code files are a reconstruction of Sundance, the Apollo 9 LM (Lunar Module) AGC (Apollo Guidance Computer) flight software, created from binary dumps of original core rope program modules, as follows:
  • B1 — Revision 292
  • B2 — Revision 302
  • B3 — Revision 302
  • B4 — Revision 302
  • B5 — Revision 292
  • B6 — Revision 306
This means that source code does not represent a specific historical revision of Sundance, but rather a mixture of the three released versions. Nonetheless, it is capable of flying the whole Apollo 9 mission. This source code matches the binary dumps, as closely as feasible, but 100% match is not possible, due mostly to changes in memory addresses at which code and variables were allocated in different revisions of Sundance. Refer to this list of explanations for each binary mismatch.

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

011876,000002:                                                                                                  ## Copyright:   Public domain.
011877,000003:                                                                                                  ## Filename:    IMU_COMPENSATION_PACKAGE.agc
011878,000004:                                                                                                  ## Purpose:     A section of a reconstructed, mixed version of Sundance
011879,000005:                                                                                                  ##              It is part of the reconstructed source code for the Lunar
011880,000006:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 9.
011881,000007:                                                                                                  ##              No original listings of this program are available;
011882,000008:                                                                                                  ##              instead, this file was created via disassembly of dumps
011883,000009:                                                                                                  ##              of various revisions of Sundance core rope modules.
011884,000010:                                                                                                  ## Assembler:   yaYUL
011885,000011:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
011886,000012:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
011887,000013:                                                                                                  ## Mod history: 2020-06-17 MAS  Created from Luminary 69.
011888,000014: 
011889,000015:                                                                                                  ## Sundance 302
011890,000016: 07,2622                                           BANK     7                                     
011891,000017: 06,2000                                           SETLOC   IMUCOMP                               
011892,000018: 06,2000                                           BANK                                           
011893,000019: 
011894,000020: 06,3277  E3,1460                                  EBANK=   NBDX                                  
011895,000021: 
011896,000022: 06,3277                                           COUNT*   $$/ICOMP                              
011897,000023: 06,3277           33531        1/PIPA             CAF      LGCOMP                                #  SAVE EBANK OF CALLING PROGRAM
011898,000024: 06,3300           56003                           XCH      EBANK                                 
011899,000025: 06,3301           54163                           TS       MODE                                  
011900,000026: 
011901,000027: 06,3302           11477                           CCS      GCOMPSW                               #  BYPASS IF GCOMPSW NEGATIVE
011902,000028: 06,3303           13306                           TCF      +3                                    
011903,000029: 06,3304           13306                           TCF      +2                                    
011904,000030: 06,3305           13422                           TCF      IRIG1                                 #  RETURN
011905,000031: 
011906,000032: 06,3306           35024        1/PIPA1            CAF      FOUR                                  #  PIPAZ, PIPAY, PIPAX
011907,000033: 06,3307           54132                           TS       BUF        +2                         
011908,000034: 
011909,000035: 06,3310           50132                           INDEX    BUF        +2                         
011910,000036: 06,3311           31453                           CA       PIPASCF                               #  (P.P.M.) X 2(-9)
011911,000037: 06,3312           00006                           EXTEND                                         
011912,000038: 06,3313           50132                           INDEX    BUF        +2                         
011913,000039: 06,3314           71211                           MP       DELVX                                 #  (PP) X 2(+14) NOW (PIPA PULSES) X 2(+5)
011914,000040: 06,3315           54002                           TS       Q                                     #  SAVE MAJOR PART
011915,000041: 
011916,000042: 06,3316           30001                           CA       L                                     #  MINOR PART
011917,000043: 06,3317           00006                           EXTEND                                         
011918,000044: 06,3320           75021                           MP       BIT6                                  #  SCALE 2(+9)   SHIFT RIGHT 9
011919,000045: 06,3321           50132                           INDEX    BUF        +2                         
011920,000046: 06,3322           55212                           TS       DELVX      +1                         #  FRACTIONAL PIPA PULSES SCALED 2(+14)
011921,000047: 
011922,000048: 06,3323           30002                           CA       Q                                     #  MAJOR PART
011923,000049: 06,3324           00006                           EXTEND                                         
011924,000050: 06,3325           75021                           MP       BIT6                                  #  SCALE 2(+9)   SHIFT RIGHT 9
011925,000051: 06,3326           50132                           INDEX    BUF        +2                         
011926,000052: 06,3327           21212                           DAS      DELVX                                 #  (PIPAI) + (PIPAI)(SFE)
011927,000053: 

Lines from here to the bottom of the page angle and start to overlap. The code until the MP BIT4 is legible. It is assumed that the illegible portions are identical to their Luminary 99 counterparts. - RRB 2017
The comments are legible, except that the last line is rather tricky, and can be verified directly. - RSB 2017

011931,000057: 06,3330           50132                           INDEX    BUF        +2                         
011932,000058: 06,3331           41452                           CS       PIPABIAS                              #  (PIPA PULSES)/(CS) X 2(-5)             *
011933,000059: 06,3332           00006                           EXTEND                                         
011934,000060: 06,3333           71075                           MP       1/PIPADT                              #  (CS) X 2(+8) NOW (PIPA PULSES) X 2(+3) *
011935,000061: 06,3334           00006                           EXTEND                                         
011936,000062: 06,3335           75023                           MP       BIT4                                  #  SCALE 2(+11) SHIFT RIGHT 11            *
011937,000063: 06,3336           50132                           INDEX    BUF        +2                         
011938,000064: 06,3337           21212                           DAS      DELVX                                 #  (PIPAI) + (PIPAI)(SFE) - (BIAS)(DELTAT)
011939,000065: 
011940,000066: 06,3340           10132                           CCS      BUF        +2                         #  PIPAZ, PIPAY, PIPAX
011941,000067: 06,3341           67721                           AD       NEG1                                  
011942,000068: 06,3342           13307                           TCF      1/PIPA1    +1                         
011943,000069: 06,3343           13344                           NOOP                                           #  LESS THAN ZERO IMPOSSIBLE
011944,000070: 
011945,000071: 06,3344           55477        IRIGCOMP           TS       GCOMPSW                               #  INDICATE COMMANDS 2 PULSES OR LESS.
011946,000072: 06,3345           54130                           TS       BUF                                   #  INDEX COUNTER . IRIGX, IRIGY, IRIGZ.
011947,000073: 
011948,000074: 06,3346           00006        IRIGX              EXTEND                                         
011949,000075: 06,3347           41212                           DCS      DELVX                                 #  (PIPA PULSES) X 2(+14)
011950,000076: 06,3350           52155                           DXCH     MPAC                                  
011951,000077: 06,3351           31463                           CA       ADIAX                                 #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)            *
011952,000078: 06,3352           03425                           TC       GCOMPSUB                              #  -(ADIAX)(PIPAX)          (GYRO PULSES) X 2(+14)
011953,000079: 
011954,000080: 06,3353           00006                           EXTEND                                         #  
011955,000081: 06,3354           41214                           DCS      DELVY                                 #        (PIPA PULSES) X 2(+14)
011956,000082: 06,3355           52155                           DXCH     MPAC                                  #  
011957,000083: 06,3356           41466                           CS       ADSRAX                                #        (GYRO PULSES)/(PIPA PULSE) X 2(-6)      *
011958,000084: 06,3357           03425                           TC       GCOMPSUB                              #        -(ADSRAX)(PIPAY)   (GYRO PULSES) X 2(+14)
011959,000085: 
011960,000086: 06,3360           41460                           CS       NBDX                                  #  (GYRO PULSES)/(CS) X 2(-5)
011961,000087: 06,3361           03454                           TC       DRIFTSUB                              #  -(NBOX)(DELTAT)   (GYRO PULSES) X 2(+14)
011962,000088: 
011963,000089: 06,3362           00006        IRIGY              EXTEND                                         
011964,000090: 06,3363           41214                           DCS      DELVY                                 #  (PIPA PULSES) X 2(+14)
011965,000091: 06,3364           52155                           DXCH     MPAC                                  
011966,000092: 06,3365           31464                           CA       ADIAY                                 #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)            *
011967,000093: 06,3366           03425                           TC       GCOMPSUB                              #  -(ADIAY)(PIPAY)          (GYRO PULSES) X 2(+14)
011968,000094: 
011969,000095: 06,3367           00006                           EXTEND                                         
011970,000096: 06,3370           41216                           DCS      DELVZ                                 #  (PIPA PULSES) X 2(+14)
011971,000097: 06,3371           52155                           DXCH     MPAC                                  
011972,000098: 06,3372           41467                           CS       ADSRAY                                #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)            *
011973,000099: 06,3373           03425                           TC       GCOMPSUB                              #  +(ADSRAY)(PIPAZ)              (GYRO PULSES) X 2(+14)
011974,000100: 
011975,000101: 06,3374           41461                           CS       NBDY                                  #  (GYRO PULSES)/(CS) X 2(-5)
011976,000102: 06,3375           03454                           TC       DRIFTSUB                              #  -(NBDY)(DELTAT)   (GYRO PULSES) X 2(+14)
011977,000103: 
011978,000104: 06,3376           00006        IRIGZ              EXTEND                                         
011979,000105: 06,3377           41214                           DCS      DELVY                                 #  (PIPA PULSES) X 2(+14)
011980,000106: 06,3400           52155                           DXCH     MPAC                                  
011981,000107: 06,3401           31470                           CA       ADSRAZ                                #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)            *
011982,000108: 06,3402           03425                           TC       GCOMPSUB                              #  -(ADSRAZ)(PIPAY)        (GYRO PULSES) X 2(+14)
011983,000109: 
011984,000110: 06,3403           00006                           EXTEND                                         
011985,000111: 06,3404           41216                           DCS      DELVZ                                 #  (PIPA PULSES) X 2(+14)
011986,000112: 06,3405           52155                           DXCH     MPAC                                  
011987,000113: 06,3406           31465                           CA       ADIAZ                                 #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)            *
011988,000114: 06,3407           03425                           TC       GCOMPSUB                              #  -(ADIAZ)(PIPAZ)          (GYRO PULSES) X 2(+14)
011989,000115: 
011990,000116: 06,3410           31462                           CA       NBDZ                                  #  (GYRO PULSES)/(CS) X 2(-5)
011991,000117: 06,3411           03454                           TC       DRIFTSUB                              #  +(NBDZ)(DELTAT)   (GYRO PULSES) X 2(+14)
011992,000118: 
011993,000119: 06,3412           11477                           CCS      GCOMPSW                               #  ARE GYRO COMMANDS GREATER THAN 2 PULSES
011994,000120: 06,3413           13415                           TCF      +2                                    #  YES   SEND OUT GYRO TORQUING COMMANDS.
011995,000121: 06,3414           13422                           TCF      IRIG1                                 #  NO    RETURN
011996,000122: 
011997,000123: 06,3415           35101                           CA       PRIO21                                #  PRIO GREATER THAN SERVICER
011998,000124: 06,3416           05142                           TC       NOVAC                                 #  SEND OUT GYRO TORQUING COMMANDS.
011999,000125: 06,3417  E3,1460                                  EBANK=   NBDX                                  
012000,000126: 06,3417           03507 14063                     2CADR    1/GYRO                                
012001,000127: 
012002,000128: 06,3421           00003                           RELINT                                         
012003,000129: 06,3422           30163        IRIG1              CA       MODE                                  #  RESTORE CALLERS EBANK
012004,000130: 06,3423           54003                           TS       EBANK                                 
012005,000131: 06,3424           14670                           TCF      SWRETURN                              
012006,000132: 
012007,000133: 06,3425           56154        GCOMPSUB           XCH      MPAC                                  #  ADIA OR ADSRA COEFFICIENT ARRIVES IN A
012008,000134: 06,3426           00006                           EXTEND                                         #  C(MPAC) = (PIPA PULSES) X 2(+14)
012009,000135: 06,3427           70154                           MP       MPAC                                  #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)            *
012010,000136: 06,3430           52123                           DXCH     VBUF                                  #  NOW = (GYRO PULSES) X 2(+8)                   *
012011,000137: 
012012,000138: 06,3431           30155                           CA       MPAC       +1                         #  MINOR PART PIPA PULSES
012013,000139: 06,3432           00006                           EXTEND                                         
012014,000140: 06,3433           70154                           MP       MPAC                                  #  ADIA OR ADSRA
012015,000141: 06,3434           54001                           TS       L                                     
012016,000142: 06,3435           35030                           CAF      ZERO                                  
012017,000143: 06,3436           20123                           DAS      VBUF                                  #  NOW = (GYRO PULSES) X 2(+8)                   *
012018,000144: 
012019,000145: 06,3437           30122                           CA       VBUF                                  #  PARTIAL RESULT - MAJOR
012020,000146: 06,3440           00006                           EXTEND                                         
012021,000147: 06,3441           75016                           MP       BIT9                                  #  SCALE 2(+6)   SHIFT RIGHT 6                   *
012022,000148: 06,3442           50130                           INDEX    BUF                                   #  RESULT = (GYRO PULSES) X 2(+14)
012023,000149: 06,3443           21472                           DAS      GCOMP                                 #  HI(ADIA)(PIPAI) OR HI(ADSRA)(PIPAI)
012024,000150: 
012025,000151: 06,3444           30123                           CA       VBUF       +1                         #  PARTIAL RESULT - MINOR
012026,000152: 06,3445           00006                           EXTEND                                         
012027,000153: 06,3446           75016                           MP       BIT9                                  #  SCALE 2(+6)   SHIFT RIGHT 6                   *
012028,000154: 06,3447           54001                           TS       L                                     
012029,000155: 06,3450           35030                           CAF      ZERO                                  
012030,000156: 06,3451           50130                           INDEX    BUF                                   #  RESULT = (GYRO PULSES) X 2(+14)
012031,000157: 06,3452           21472                           DAS      GCOMP                                 #  (ADIA)(PIPAI) OR (ADSRA)(PIPAI)
012032,000158: 
012033,000159: 06,3453           00002                           TC       Q                                     
012034,000160: 
012035,000161: 06,3454           00006        DRIFTSUB           EXTEND                                         
012036,000162: 06,3455           22131                           QXCH     BUF        +1                         
012037,000163: 
012038,000164: 06,3456           00006                           EXTEND                                         #  C(A) = NBD    (GYRO PULSES)/(CS) X 2(-5)
012039,000165: 06,3457           71075                           MP       1/PIPADT                              #  (CS) X 2(+8)  NOW (GYRO PULSES) X 2(+3)
012040,000166: 06,3460           22155                           LXCH     MPAC       +1                         #  SAVE FOR FRACTIONAL COMPENSATION
012041,000167: 06,3461           00006                           EXTEND                                         
012042,000168: 06,3462           75023                           MP       BIT4                                  #  SCALE 2(+11)  SHIFT RIGHT 11
012043,000169: 06,3463           50130                           INDEX    BUF                                   
012044,000170: 06,3464           21472                           DAS      GCOMP                                 #  HI(NBD)(DELTAT)       (GYRO PULSES) X 2(+14)
012045,000171: 
012046,000172: 06,3465           30155                           CA       MPAC       +1                         #  NOW MINOR PART
012047,000173: 06,3466           00006                           EXTEND                                         
012048,000174: 06,3467           75023                           MP       BIT4                                  #  SCALE 2(+11)          SHIFT RIGHT 11
012049,000175: 06,3470           54001                           TS       L                                     
012050,000176: 06,3471           35030                           CAF      ZERO                                  
012051,000177: 06,3472           50130                           INDEX    BUF                                   #  ADD IN FRACTIONAL COMPENSATION
012052,000178: 06,3473           21472                           DAS      GCOMP                                 #  (NBD)(DELTAT)         (GYRO PULSES) X 2(+14)
012053,000179: 
012054,000180: 06,3474           35025        DRFTSUB2           CAF      TWO                                   #  PIPAX, PIPAY, PIPAZ
012055,000181: 06,3475           60130                           AD       BUF                                   
012056,000182: 06,3476           56130                           XCH      BUF                                   
012057,000183: 06,3477           50000                           INDEX    A                                     
012058,000184: 06,3500           11471                           CCS      GCOMP                                 #  ARE GYRO COMMANDS 1 PULSE OR GREATER
012059,000185: 06,3501           13503                           TCF      +2                                    #  YES
012060,000186: 06,3502           00131                           TC       BUF        +1                         #  NO
012061,000187: 
012062,000188: 06,3503           73553                           MASK     COMPCHK                               #  DEC -1
012063,000189: 06,3504           10000                           CCS      A                                     #  ARE GYRO COMMANDS GREATER THAN 2 PULSES
012064,000190: 06,3505           55477                           TS       GCOMPSW                               #  YES - SET GCOMPSW POSITIVE
012065,000191: 06,3506           00131                           TC       BUF        +1                         #  NO
012066,000192: 
012067,000193: 06,3507           35024        1/GYRO             CAF      FOUR                                  #  PIPAZ, PIPAY, PIPAX
012068,000194: 06,3510           54130                           TS       BUF                                   
012069,000195: 
012070,000196: 06,3511           50130                           INDEX    BUF                                   #  SCALE GYRO COMMANDS FOR IMUPULSE
012071,000197: 06,3512           31472                           CA       GCOMP      +1                         #  FRACTIONAL PULSES
012072,000198: 06,3513           00006                           EXTEND                                         
012073,000199: 06,3514           75017                           MP       BIT8                                  #  SHIFT RIGHT 7
012074,000200: 06,3515           50130                           INDEX    BUF                                   
012075,000201: 06,3516           55472                           TS       GCOMP      +1                         #  FRACTIONAL PULSES SCALED
012076,000202: 
012077,000203: 06,3517           35030                           CAF      ZERO                                  #  SET GCOMP = 0 FOR DAS INSTRUCTION
012078,000204: 06,3520           50130                           INDEX    BUF                                   
012079,000205: 06,3521           57471                           XCH      GCOMP                                 #  GYRO PULSES
012080,000206: 06,3522           00006                           EXTEND                                         
012081,000207: 06,3523           75017                           MP       BIT8                                  #  SHIFT RIGHT 7
012082,000208: 06,3524           50130                           INDEX    BUF                                   
012083,000209: 06,3525           21472                           DAS      GCOMP                                 #  ADD THESE TO FRACTIONAL PULSES ABOVE
012084,000210: 
012085,000211: 06,3526           10130                           CCS      BUF                                   #  PIPAZ, PIPAY, PIPAX
012086,000212: 06,3527           67721                           AD       NEG1                                  
012087,000213: 06,3530           13510                           TCF      1/GYRO     +1                         
012088,000214: 06,3531           01471        LGCOMP             ECADR    GCOMP                                 #  LESS THAN ZERO IMPOSSIBLE
012089,000215: 
012090,000216: 06,3532           33531                           CAF      LGCOMP                                
012091,000217: 06,3533           04655                           TC       BANKCALL                              
012092,000218: 06,3534           17234                           CADR     IMUPULSE                              #  CALL GYRO TORQUING ROUTINE
012093,000219: 06,3535           04655                           TC       BANKCALL                              
012094,000220: 06,3536           17625                           CADR     IMUSTALL                              #  WAIT FOR PULSES TO GET OUT
012095,000221: 06,3537           15225                           TCF      ENDOFJOB                              #  TEMPORARY
012096,000222: 
012097,000223: 06,3540           35024        GCOMP1             CAF      FOUR                                  #  PIPAZ, PIPAY, PIPAX
012098,000224: 06,3541           54130                           TS       BUF                                   
012099,000225: 
012100,000226: 06,3542           50130                           INDEX    BUF                                   #  RESCALE
012101,000227: 06,3543           31472                           CA       GCOMP      +1                         
012102,000228: 06,3544           00006                           EXTEND                                         
012103,000229: 06,3545           75017                           MP       BIT8                                  #  SHIFT MINOR PART LEFT 7 - MAJOR PART = 0
012104,000230: 06,3546           50130                           INDEX    BUF                                   
012105,000231: 06,3547           23472                           LXCH     GCOMP      +1                         #  BITS 8-14 OF MINOR PART WERE = 0
012106,000232: 
012107,000233: 06,3550           10130                           CCS      BUF                                   #  PIPAZ, PIPAY, PIPAX
012108,000234: 06,3551           67721                           AD       NEG1                                  
012109,000235: 06,3552           13541                           TCF      GCOMP1     +1                         
012110,000236: 06,3553           77776        COMPCHK            DEC      -1         B-14                       #  LESS THAN ZERO IMPOSSIBLE
012111,000237: 06,3554           15225                           TCF      ENDOFJOB                              
012112,000238: 
012113,000239: 06,3555           11477        NBDONLY            CCS      GCOMPSW                               #  BYPASS IF GCOMPSW NEGATIVE
012114,000240: 06,3556           13561                           TCF      +3                                    
012115,000241: 06,3557           13561                           TCF      +2                                    
012116,000242: 06,3560           15225                           TCF      ENDOFJOB                              
012117,000243: 
012118,000244: 06,3561           00004                           INHINT                                         
012119,000245: 06,3562           10076                           CCS      FLAGWRD2                              #  PREREAD T3RUPT MAY COINCIDE
012120,000246: 06,3563           15225                           TCF      ENDOFJOB                              
012121,000247: 06,3564           15225                           TCF      ENDOFJOB                              
012122,000248: 06,3565           13566                           TCF      +1                                    
012123,000249: 
012124,000250: 06,3566           30025                           CA       TIME1                                 #  (CS) X 2(+14)
012125,000251: 06,3567           57075                           XCH      1/PIPADT                              #  PREVIOUS TIME
012126,000252: 06,3570           00003                           RELINT                                         
012127,000253: 06,3571           40000                           COM                                            
012128,000254: 06,3572           61075                           AD       1/PIPADT                              #  PRESENT TIME - PREVIOUS TIME
012129,000255: 06,3573           10000        NBD2               CCS      A                                     #  CALCULATE ELAPSED TIME
012130,000256: 06,3574           65026                           AD       ONE                                   #  NO TIME1 OVERFLOW
012131,000257: 06,3575           13602                           TCF      NBD3                                  #  RESTORE TIME DIFFERENCE AND JUMP
012132,000258: 06,3576           13600                           TCF      +2                                    #  TIME1 OVERFLOW
012133,000259: 06,3577           15225                           TCF      ENDOFJOB                              #  IF ELAPSED TIME = 0  (DIFFERENCE = -0)
012134,000260: 
012135,000261: 06,3600           40000                           COM                                            #  CALCULATE ABSOLUTE DIFFERENCE
012136,000262: 06,3601           65006                           AD       POSMAX                                
012137,000263: 
012138,000264: 06,3602           00006        NBD3               EXTEND                                         #  C(A) = DELTAT         (CS) X 2(+14)
012139,000265: 06,3603           75015                           MP       BIT10                                 #  SHIFT RIGHT 5
012140,000266: 06,3604           52123                           DXCH     VBUF                                  
012141,000267: 06,3605           00006                           EXTEND                                         
012142,000268: 06,3606           30123                           DCA      VBUF                                  
012143,000269: 06,3607           52155                           DXCH     MPAC                                  #  DELTAT NOW SCALED (CS) X 2(+19)
012144,000270: 
012145,000271: 06,3610           35030                           CAF      ZERO                                  
012146,000272: 06,3611           55477                           TS       GCOMPSW                               #  INDICATE COMMANDS 2 PULSES OR LESS
012147,000273: 06,3612           54130                           TS       BUF                                   #  PIPAX, PIPAY, PIPAZ
012148,000274: 
012149,000275: 06,3613           41460                           CS       NBDX                                  #  (GYRO PULSES)/(CS) X 2(-5)
012150,000276: 06,3614           03632                           TC       FBIASSUB                              #  -(NBDX)(DELTAT)    (GYRO PULSES) X 2(+14)
012151,000277: 
012152,000278: 06,3615           00006                           EXTEND                                         
012153,000279: 06,3616           40123                           DCS      VBUF                                  
012154,000280: 06,3617           52155                           DXCH     MPAC                                  #  DELTAT SCALED (CS) X 2(+19)
012155,000281: 06,3620           31461                           CA       NBDY                                  #  (GYRO PULSES)/(CS) X 2(-5)
012156,000282: 06,3621           03632                           TC       FBIASSUB                              #  -(NBDY)(DELTAT)    (GYRO PULSES) X 2(+14)
012157,000283: 
012158,000284: 06,3622           00006                           EXTEND                                         
012159,000285: 06,3623           40123                           DCS      VBUF                                  
012160,000286: 06,3624           52155                           DXCH     MPAC                                  #  DELTAT SCALED (CS) X 2(+19)
012161,000287: 06,3625           41462                           CS       NBDZ                                  #  (GYRO PULSES)/(CS) X 2(-5)
012162,000288: 06,3626           03632                           TC       FBIASSUB                              #  +(NBDZ)(DELTAT)    (GYRO PULSES) X 2 (+14)
012163,000289: 
012164,000290: 06,3627           11477                           CCS      GCOMPSW                               #  ARE GYRO COMMANDS GREATER THAN 2 PULSES
012165,000291: 06,3630           13507                           TCF      1/GYRO                                #  YES
012166,000292: 06,3631           15225                           TCF      ENDOFJOB                              #  NO
012167,000293: 
012168,000294: 06,3632           56002        FBIASSUB           XCH      Q                                     
012169,000295: 06,3633           54131                           TS       BUF        +1                         
012170,000296: 
012171,000297: 06,3634           30002                           CA       Q                                     #  NBD SCALED (GYRO PULSES)/(CS) X 2(-5)
012172,000298: 06,3635           00006                           EXTEND                                         
012173,000299: 06,3636           70154                           MP       MPAC                                  #  DELTAT SCALED (CS) X 2(+19)
012174,000300: 06,3637           50130                           INDEX    BUF                                   
012175,000301: 06,3640           21472                           DAS      GCOMP                                 #  HI(NBD)(DELTAT)       (GYRO PULSES) X 2(+14)
012176,000302: 
012177,000303: 06,3641           30002                           CA       Q                                     #  NOW FRACTIONAL PART
012178,000304: 06,3642           00006                           EXTEND                                         
012179,000305: 06,3643           70155                           MP       MPAC       +1                         
012180,000306: 06,3644           54001                           TS       L                                     
012181,000307: 06,3645           35030                           CAF      ZERO                                  
012182,000308: 06,3646           50130                           INDEX    BUF                                   
012183,000309: 06,3647           21472                           DAS      GCOMP                                 #  (NBD)(DELTAT)         (GYRO PULSES) X 2(+14)
012184,000310: 
012185,000311: 06,3650           13474                           TCF      DRFTSUB2                              #  CHECK MAGNITUDE OF COMPENSATION
012186,000312: 
012187,000313: 06,3651           35025        NORMBIAS           CAF      TWO                                   
012188,000314: 06,3652           05501                           TC       NEWPHASE                              
012189,000315: 06,3653           00005                           OCT      5                                     
012190,000316: 06,3654           00004                           INHINT                                         
012191,000317: 06,3655           35011                           CAF      PRIO20                                
012192,000318: 06,3656           05155                           TC       FINDVAC                               
012193,000319: 06,3657  E7,1472                                  EBANK=   DVCNTR                                
012194,000320: 06,3657           02355 66067                     2CADR    NORMLIZE                              
012195,000321: 
012196,000322: 06,3661           04655        LASTBIAS           TC       BANKCALL                              
012197,000323: 06,3662           17204                           CADR     PIPUSE                                
012198,000324: 
012199,000325: 06,3663           11477                           CCS      GCOMPSW                               
012200,000326: 06,3664           13667                           TCF      +3                                    
012201,000327: 06,3665           13667                           TCF      +2                                    
012202,000328: 06,3666           15225                           TCF      ENDOFJOB                              
012203,000329: 
012204,000330: 06,3667           37670                           CAF      PRIO31                                #  2 SECONDS SCALED (CS) X 2(+8)
012205,000331: 06,3670           57075                           XCH      1/PIPADT                              
012206,000332: 06,3671           40000                           COM                                            
012207,000333: 06,3672           61234                           AD       PIPTIME    +1                         
012208,000334: 06,3673           13573                           TCF      NBD2                                  
012209,000335: 
012210,000336: 06,3674           33531        GCOMPZER           CAF      LGCOMP                                #  ROUTINE TO ZERO GCOMP BEFORE FIRST
012211,000337: 06,3675           56003                           XCH      EBANK                                 #  CALL TO 1/PIPA
012212,000338: 06,3676           54163                           TS       MODE                                  
012213,000339: 
012214,000340: 06,3677           35030                           CAF      ZERO                                  
012215,000341: 06,3700           55477                           TS       GCOMPSW                               
012216,000342: 06,3701           55471                           TS       GCOMP                                 
012217,000343: 06,3702           55472                           TS       GCOMP      +1                         
012218,000344: 06,3703           55473                           TS       GCOMP      +2                         
012219,000345: 06,3704           55474                           TS       GCOMP      +3                         
012220,000346: 06,3705           55475                           TS       GCOMP      +4                         
012221,000347: 06,3706           55476                           TS       GCOMP      +5                         
012222,000348: 
012223,000349: 06,3707           30163                           CA       MODE                                  
012224,000350: 06,3710           54003                           TS       EBANK                                 
012225,000351: 06,3711           14670                           TCF      SWRETURN                              #  RETURN TO CALLER

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