Source Code

These source-code files derive from a printout of Luminary 210 (Apollo 15-17 Lunar Module guidance computer program), from the personal library of original AGC developer Don Eyles, digitally photographed at archive.org, financially sponsored by Jim Lawton, and transcribed to source code by a team of volunteers. This colorized, syntax-highlighted form was created by assembling that transcribed source code. Note that the full page images are available on the Virtual AGC project page at archive.org, while reduced-size images are presented at the VirtualAGC project website. Report or fix any transcription errors at the Virtual AGC project code repository.

Notations on the program listing read, in part:

	GAP: ASSEMBLE REVISION 210 OF AGC PROGRAM LUMINARY 
	BY NASA 2021112-161 17:11 MAR. 19,1971
Note that the date is the date of the printout, not the date of the program revision.

014771,000002:                                                                                                  ## Copyright:   Public domain.
014772,000003:                                                                                                  ## Filename:    IMU_COMPENSATION_PACKAGE.agc
014773,000004:                                                                                                  ## Purpose:     A section of Luminary revision 210.
014774,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
014775,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 15-17.
014776,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
014777,000008:                                                                                                  ##              that the code format has been changed to conform to the
014778,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
014779,000010:                                                                                                  ##              original YUL assembler.
014780,000011:                                                                                                  ## Reference:   pp. 338-349
014781,000012:                                                                                                  ## Assembler:   yaYUL
014782,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
014783,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
014784,000015:                                                                                                  ## Mod history: 2016-11-17 JL   Created from Luminary131 version.
014785,000016:                                                                                                  ##              2016-11-24 HG   Transcribed
014786,000017:                                                                                                  ##              2016-12-23 RSB  Proofed comment text with octopus/ProoferComments
014787,000018:                                                                                                  ##                              and fixed all errors found.
014788,000019:                                                                                                  ##              2017-03-07 RSB  Comment-text fixes noted in proofing Luminary 116.
014789,000020:                                                                                                  ##              2017-03-15 RSB  Comment-text fixes identified in 6-way
014790,000021:                                                                                                  ##                              side-by-side diff of Sunburst 120 and Luminary 
014791,000022:                                                                                                  ##                              69/99/116/131/210.
014792,000023: 

Page 338

014794,000025: 07,2607                                           BANK     7                                     
014795,000026: 06,2000                                           SETLOC   IMUCOMP                               
014796,000027: 06,2000                                           BANK                                           
014797,000028: 
014798,000029: 06,3333  E3,1460                                  EBANK=   NBDX                                  
014799,000030: 
014800,000031: 06,3333                                           COUNT*   $$/ICOMP                              
014801,000032: 06,3333           33601        1/PIPA             CAF      LGCOMP                                #  SAVE EBANK OF CALLING PROGRAM
014802,000033: 06,3334           56003                           XCH      EBANK                                 
014803,000034: 06,3335           54163                           TS       MODE                                  
014804,000035: 
014805,000036: 06,3336           11477                           CCS      GCOMPSW                               #  BYPASS IF GCOMPSW NEGATIVE
014806,000037: 06,3337           13342                           TCF      +3                                    
014807,000038: 06,3340           13342                           TCF      +2                                    
014808,000039: 06,3341           13423                           TCF      IRIG1                                 #  RETURN
014809,000040: 
014810,000041: 06,3342           34742        1/PIPA1            CAF      FOUR                                  #  PIPAZ, PIPAY, PIPAX
014811,000042: 06,3343           54132                           TS       BUF        +2                         
014812,000043: 
014813,000044: 06,3344           50132                           INDEX    BUF        +2                         
014814,000045: 06,3345           31453                           CA       PIPASCF                               #  (P.P.M.) X 2(-9)
014815,000046: 06,3346           00006                           EXTEND                                         
014816,000047: 06,3347           50132                           INDEX    BUF        +2                         
014817,000048: 06,3350           70324                           MP       DELVX                                 #  (PP) X 2(+14) NOW (PIPA PULSES) X 2(+5)
014818,000049: 06,3351           54002                           TS       Q                                     #  SAVE MAJOR PART
014819,000050: 
014820,000051: 06,3352           30001                           CA       L                                     #  MINOR PART
014821,000052: 06,3353           00006                           EXTEND                                         
014822,000053: 06,3354           74737                           MP       BIT6                                  #  SCALE 2(+9)   SHIFT RIGHT 9
014823,000054: 06,3355           50132                           INDEX    BUF        +2                         
014824,000055: 06,3356           54325                           TS       DELVX      +1                         #  FRACTIONAL PIPA PULSES SCALED 2(+14)
014825,000056: 
014826,000057: 06,3357           30002                           CA       Q                                     #  MAJOR PART
014827,000058: 06,3360           00006                           EXTEND                                         
014828,000059: 06,3361           74737                           MP       BIT6                                  #  SCALE 2(+9)   SHIFT RIGHT 9
014829,000060: 06,3362           50132                           INDEX    BUF        +2                         
014830,000061: 06,3363           20325                           DAS      DELVX                                 #  (PIPAI) + (PIPAI)(SFE)
014831,000062: 
014832,000063: 06,3364           50132                           INDEX    BUF        +2                         
014833,000064: 06,3365           41452                           CS       PIPABIAS                              #  (PIPA PULSES)/(CS) X 2(-3)            *
014834,000065: 06,3366           00006                           EXTEND                                         
014835,000066: 06,3367           71074                           MP       1/PIPADT                              #  (CS) X 2(+8) NOW (PIPA PULSES) X 2(+5)*
014836,000067: 06,3370           00006                           EXTEND                                         
014837,000068: 06,3371           74737                           MP       BIT6                                  #  SCALE 2(+9) SHIFT RIGHT 9             *
014838,000069: 06,3372           50132                           INDEX    BUF        +2                         
014839,000070: 06,3373           20325                           DAS      DELVX                                 #  (PIPAI) + (PIPAI)(SFE) - (BIAS)(DELTAT)
014840,000071: 
014841,000072: 06,3374           10132                           CCS      BUF        +2                         #  PIPAZ, PIPAY, PIPAX
014842,000073: 06,3375           67770                           AD       NEG1                                  
014843,000074: 06,3376           13343                           TCF      1/PIPA1    +1                         
014844,000075: 

Page 339

014846,000077: 06,3377           13400                           NOOP                                           #  LESS THAN ZERO IMPOSSIBLE
014847,000078: 

Page 340

014849,000080: 06,3400           55477        IRIGCOMP           TS       GCOMPSW                               #  INDICATE COMMANDS 2 PULSES OR LESS.
014850,000081: 06,3401           54130                           TS       BUF                                   #  INDEX COUNTER . IRIGX, IRIGY, IRIGZ.
014851,000082: 
014852,000083: 06,3402           03426                           TC       IRIGX                                 #  COMPENSATE ACCELERATION TERMS
014853,000084: 
014854,000085: 06,3403           41460                           CS       NBDX                                  #  (GYRO PULSES)/(CS) X 2(-5)
014855,000086: 06,3404           03524                           TC       DRIFTSUB                              #  -(NBOX)(DELTAT)   (GYRO PULSES) X 2(+14)
014856,000087: 
014857,000088: 06,3405           03443                           TC       IRIGY                                 #  COMPENSATE ACCELERATION TERMS
014858,000089: 
014859,000090: 06,3406           41461                           CS       NBDY                                  #  (GYRO PULSES)/(CS) X 2(-5)
014860,000091: 06,3407           03524                           TC       DRIFTSUB                              #  -(NBDY)(DELTAT)   (GYRO PULSES) X 2(+14)
014861,000092: 
014862,000093: 06,3410           03460                           TC       IRIGZ                                 #  COMPENSATE ACCELERATION TERMS
014863,000094: 
014864,000095: 06,3411           31462                           CA       NBDZ                                  #  (GYRO PULSES)/(CS) X 2(-5)
014865,000096: 06,3412           03524                           TC       DRIFTSUB                              #  +(NBDZ)(DELTAT)   (GYRO PULSES) X 2(+14)
014866,000097: 
014867,000098: 06,3413           11477                           CCS      GCOMPSW                               #  ARE GYRO COMMANDS GREATER THAN 2 PULSES
014868,000099: 06,3414           13416                           TCF      +2                                    #  YES  SEND OUT GYRO TORQUING COMMANDS.
014869,000100: 06,3415           13423                           TCF      IRIG1                                 #  NO   RETURN
014870,000101: 
014871,000102: 06,3416           35022                           CA       PRIO21                                #  PRIO GREATER THAN SERVICER
014872,000103: 06,3417           05063                           TC       NOVAC                                 #  SEND OUT GYRO TORQUING COMMANDS.
014873,000104: 06,3420  E3,1460                                  EBANK=   NBDX                                  
014874,000105: 06,3420           03557 14063                     2CADR    1/GYRO                                
014875,000106: 
014876,000107: 06,3422           00003                           RELINT                                         
014877,000108: 06,3423           30163        IRIG1              CA       MODE                                  #  RESTORE CALLERS EBANK
014878,000109: 06,3424           54003                           TS       EBANK                                 
014879,000110: 06,3425           14622                           TCF      SWRETURN                              
014880,000111: 

Page 341

014882,000113: 06,3426           00006        IRIGX              EXTEND                                         
014883,000114: 06,3427           22156                           QXCH     MPAC       +2                         #  SAVE Q
014884,000115: 06,3430           00006                           EXTEND                                         
014885,000116: 06,3431           40325                           DCS      DELVX                                 #  (PIPA PULSES) X 2(+14)
014886,000117: 06,3432           52155                           DXCH     MPAC                                  
014887,000118: 06,3433           31463                           CA       ADIAX                                 #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)     *
014888,000119: 06,3434           03475                           TC       GCOMPSUB                              #  -(ADIAX)(PIPAX)   (GYRO PULSES) X 2(+14)
014889,000120: 
014890,000121: 06,3435           00006                           EXTEND                                         
014891,000122: 06,3436           40327                           DCS      DELVY                                 #  (PIPA PULSES) X 2(+14)
014892,000123: 06,3437           52155                           DXCH     MPAC                                  
014893,000124: 06,3440           41466                           CS       ADSRAX                                #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)     *
014894,000125: 06,3441           03475                           TC       GCOMPSUB                              #  -(ADSRAX)(PIPAY)  (GYRO PULSES) X 2(+14)
014895,000126: 
014896,000127:                                                                                                  #                EXTEND                             ***
014897,000128:                                                                                                  #                DCS             DELVZ              ***    (PIPA PULSES) X 2(+14)
014898,000129:                                                                                                  #                DXCH            MPAC               ***
014899,000130:                                                                                                  #                CA              ADOAX              ***    (GYRO PULSES)/(PIPA PULSE) X 2(-6)     *
014900,000131:                                                                                                  #                TC              GCOMPSUB           ***    -(ADOAX)(PIPAZ)   (GYRO PULSES) X 2(+14)
014901,000132: 
014902,000133: 06,3442           00156                           TC       MPAC       +2                         
014903,000134: 
014904,000135: 06,3443           00006        IRIGY              EXTEND                                         
014905,000136: 06,3444           22156                           QXCH     MPAC       +2                         #  SAVE Q
014906,000137: 06,3445           00006                           EXTEND                                         
014907,000138: 06,3446           40327                           DCS      DELVY                                 #  (PIPA PULSES) X 2(+14)
014908,000139: 06,3447           52155                           DXCH     MPAC                                  
014909,000140: 06,3450           31464                           CA       ADIAY                                 #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)    *
014910,000141: 06,3451           03475                           TC       GCOMPSUB                              #  -(ADIAY)(PIPAY)   (GYRO PULSES) X 2(+14)
014911,000142: 
014912,000143: 06,3452           00006                           EXTEND                                         
014913,000144: 06,3453           40331                           DCS      DELVZ                                 #  (PIPA PULSES) X 2(+14)
014914,000145: 06,3454           52155                           DXCH     MPAC                                  
014915,000146: 06,3455           41467                           CS       ADSRAY                                #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)     *
014916,000147: 06,3456           03475                           TC       GCOMPSUB                              #  +(ADSRAY)(PIPAZ)  (GYRO PULSES) X 2(+14)
014917,000148: 
014918,000149:                                                                                                  #                EXTEND                              ***
014919,000150:                                                                                                  #                DCS             DELVX               ***   (PIPA PULSES) X 2(+14)
014920,000151:                                                                                                  #                DXCH            MPAC                ***
014921,000152:                                                                                                  #                CA              ADOAY               ***   (GYRO PULSES)/(PIPA PULSE) X 2(-6)     *
014922,000153:                                                                                                  #                TC              GCOMPSUB            ***   -(ADOAY)(PIPAX)   (GYRO PULSES) X 2(+14)
014923,000154: 
014924,000155: 06,3457           00156                           TC       MPAC       +2                         
014925,000156: 
014926,000157: 06,3460           00006        IRIGZ              EXTEND                                         
014927,000158: 06,3461           22156                           QXCH     MPAC       +2                         #  SAVE Q
014928,000159: 06,3462           00006                           EXTEND                                         
014929,000160: 06,3463           40327                           DCS      DELVY                                 #  (PIPA PULSES) X 2(+14)
014930,000161: 06,3464           52155                           DXCH     MPAC                                  
014931,000162: 06,3465           31470                           CA       ADSRAZ                                #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)    *
014932,000163: 

Page 342

014934,000165: 06,3466           03475                           TC       GCOMPSUB                              #  -(ADSRAZ)(PIPAY)  (GYRO PULSES) X 2(+14)
014935,000166: 
014936,000167: 06,3467           00006                           EXTEND                                         
014937,000168: 06,3470           40331                           DCS      DELVZ                                 #  (PIPA PULSES) X 2(+14)
014938,000169: 06,3471           52155                           DXCH     MPAC                                  
014939,000170: 06,3472           31465                           CA       ADIAZ                                 #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)     *
014940,000171: 06,3473           03475                           TC       GCOMPSUB                              #  -(ADIAZ)(PIPAZ)   (GYRO PULSES) X 2(+14)
014941,000172: 
014942,000173:                                                                                                  #                EXTEND                              ***
014943,000174:                                                                                                  #                DCS             DELVX               ***   (PIPA PULSE) X 2(+14)
014944,000175:                                                                                                  #                DXCH            MPAC                ***
014945,000176:                                                                                                  #                CS              ADOAZ               ***   (GYRO PULSES)/(PIPA PULSE) X 2(-6)     *
014946,000177:                                                                                                  #                TC              GCOMPSUB            ***   +(ADOAZ)(PIPAX)   (GYRO PULSES) X 2(+14)
014947,000178: 
014948,000179: 06,3474           00156                           TC       MPAC       +2                         
014949,000180: 

Page 343

014951,000182: 06,3475           56154        GCOMPSUB           XCH      MPAC                                  #  ADIA OR ADSRA COEFFICIENT ARRIVES IN A
014952,000183: 06,3476           00006                           EXTEND                                         #  C(MPAC) = (PIPA PULSES) X 2(+14)
014953,000184: 06,3477           70154                           MP       MPAC                                  #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)      *
014954,000185: 06,3500           52123                           DXCH     VBUF                                  #  NOW = (GYRO PULSES) X 2(+8)             *
014955,000186: 
014956,000187: 06,3501           30155                           CA       MPAC       +1                         #  MINOR PART PIPA PULSES
014957,000188: 06,3502           00006                           EXTEND                                         
014958,000189: 06,3503           70154                           MP       MPAC                                  #  ADIA OR ADSRA
014959,000190: 06,3504           54001                           TS       L                                     
014960,000191: 06,3505           34746                           CAF      ZERO                                  
014961,000192: 06,3506           20123                           DAS      VBUF                                  #  NOW = (GYRO PULSES) X 2(+8)             *
014962,000193: 
014963,000194: 06,3507           30122                           CA       VBUF                                  #  PARTIAL RESULT - MAJOR
014964,000195: 06,3510           00006                           EXTEND                                         
014965,000196: 06,3511           74734                           MP       BIT9                                  #  SCALE 2(+6)      SHIFT RIGHT 6          *
014966,000197: 06,3512           50130                           INDEX    BUF                                   #  RESULT = (GYRO PULSES) X 2(+14)
014967,000198: 06,3513           21472                           DAS      GCOMP                                 #  HI(ADIA)(PIPAI)  OR  HI(ADSRA)(PIPAI)
014968,000199: 
014969,000200: 06,3514           30123                           CA       VBUF       +1                         #  PARTIAL RESULT - MINOR
014970,000201: 06,3515           00006                           EXTEND                                         
014971,000202: 06,3516           74734                           MP       BIT9                                  #  SCALE 2(+6)      SHIFT RIGHT 6          *
014972,000203: 06,3517           54001                           TS       L                                     
014973,000204: 06,3520           34746                           CAF      ZERO                                  
014974,000205: 06,3521           50130                           INDEX    BUF                                   #  RESULT = (GYRO PULSES) X 2(+14)
014975,000206: 06,3522           21472                           DAS      GCOMP                                 #  (ADIA)(PIPAI)  OR  (ADSRA)(PIPAI)
014976,000207: 
014977,000208: 06,3523           00002                           TC       Q                                     
014978,000209: 

Page 344

014980,000211: 06,3524           00006        DRIFTSUB           EXTEND                                         
014981,000212: 06,3525           22131                           QXCH     BUF        +1                         
014982,000213: 
014983,000214: 06,3526           00006                           EXTEND                                         #  C(A) = NBD    (GYRO PULSES)/(CS) X 2(-5)
014984,000215: 06,3527           71074                           MP       1/PIPADT                              #  (CS) X 2(+8)   NOW (GYRO PULSES) X 2(+3)
014985,000216: 06,3530           22155                           LXCH     MPAC       +1                         #  SAVE FOR FRACTIONAL COMPENSATION
014986,000217: 06,3531           00006                           EXTEND                                         
014987,000218: 06,3532           74741                           MP       BIT4                                  #  SCALE 2(+11)     SHIFT RIGHT 11
014988,000219: 06,3533           50130                           INDEX    BUF                                   
014989,000220: 06,3534           21472                           DAS      GCOMP                                 #  HI(NBD)(DELTAT)   (GYRO PULSES) X 2(+14)
014990,000221: 
014991,000222: 06,3535           30155                           CA       MPAC       +1                         #  NOW MINOR PART
014992,000223: 06,3536           00006                           EXTEND                                         
014993,000224: 06,3537           74741                           MP       BIT4                                  #  SCALE 2(+11)     SHIFT RIGHT 11
014994,000225: 06,3540           54001                           TS       L                                     
014995,000226: 06,3541           34746                           CAF      ZERO                                  
014996,000227: 06,3542           50130                           INDEX    BUF                                   #  ADD IN FRACTIONAL COMPENSATION
014997,000228: 06,3543           21472                           DAS      GCOMP                                 #  (NBD)(DELTAT)     (GYRO PULSES) X 2(+14)
014998,000229: 
014999,000230: 06,3544           34743        DRFTSUB2           CAF      TWO                                   #  PIPAX, PIPAY, PIPAZ
015000,000231: 06,3545           60130                           AD       BUF                                   
015001,000232: 06,3546           56130                           XCH      BUF                                   
015002,000233: 06,3547           50000                           INDEX    A                                     
015003,000234: 06,3550           11471                           CCS      GCOMP                                 #  ARE GYRO COMMANDS 1 PULSE OR GREATER
015004,000235: 06,3551           13553                           TCF      +2                                    #  YES
015005,000236: 06,3552           00131                           TC       BUF        +1                         #  NO
015006,000237: 
015007,000238: 06,3553           73623                           MASK     COMPCHK                               #  DEC -1
015008,000239: 06,3554           10000                           CCS      A                                     #  ARE GYRO COMMANDS GREATER THAN 2 PULSES
015009,000240: 06,3555           55477                           TS       GCOMPSW                               #  YES - SET GCOMPSW POSITIVE
015010,000241: 06,3556           00131                           TC       BUF        +1                         #  NO
015011,000242: 

Page 345

015013,000244: 06,3557           34742        1/GYRO             CAF      FOUR                                  #  PIPAZ, PIPAY, PIPAX
015014,000245: 06,3560           54130                           TS       BUF                                   
015015,000246: 
015016,000247: 06,3561           50130                           INDEX    BUF                                   #  SCALE GYRO COMMANDS FOR IMUPULSE
015017,000248: 06,3562           31472                           CA       GCOMP      +1                         #  FRACTIONAL PULSES
015018,000249: 06,3563           00006                           EXTEND                                         
015019,000250: 06,3564           74735                           MP       BIT8                                  #  SHIFT RIGHT 7
015020,000251: 06,3565           50130                           INDEX    BUF                                   
015021,000252: 06,3566           55472                           TS       GCOMP      +1                         #  FRACTIONAL PULSES SCALED
015022,000253: 
015023,000254: 06,3567           34746                           CAF      ZERO                                  #  SET GCOMP = 0 FOR DAS INSTRUCTION
015024,000255: 06,3570           50130                           INDEX    BUF                                   
015025,000256: 06,3571           57471                           XCH      GCOMP                                 #  GYRO PULSES
015026,000257: 06,3572           00006                           EXTEND                                         
015027,000258: 06,3573           74735                           MP       BIT8                                  #  SHIFT RIGHT 7
015028,000259: 06,3574           50130                           INDEX    BUF                                   
015029,000260: 06,3575           21472                           DAS      GCOMP                                 #  ADD THESE TO FRACTIONAL PULSES ABOVE
015030,000261: 
015031,000262: 06,3576           10130                           CCS      BUF                                   #  PIPAZ, PIPAY, PIPAX
015032,000263: 06,3577           67770                           AD       NEG1                                  
015033,000264: 06,3600           13560                           TCF      1/GYRO     +1                         
015034,000265: 06,3601           01471        LGCOMP             ECADR    GCOMP                                 #  LESS THAN ZERO IMPOSSIBLE
015035,000266: 
015036,000267: 06,3602           33601                           CAF      LGCOMP                                
015037,000268: 06,3603           04607                           TC       BANKCALL                              
015038,000269: 06,3604           17310                           CADR     IMUPULSE                              #  CALL GYRO TORQUING ROUTINE
015039,000270: 06,3605           04607                           TC       BANKCALL                              
015040,000271: 06,3606           17735                           CADR     IMUSTALL                              #  WAIT FOR PULSES TO GET OUT
015041,000272: 06,3607           13610                           TCF      +1                                    
015042,000273: 
015043,000274: 06,3610           34742        GCOMP1             CAF      FOUR                                  #  PIPAZ, PIPAY, PIPAX
015044,000275: 06,3611           54130                           TS       BUF                                   
015045,000276: 
015046,000277: 06,3612           50130                           INDEX    BUF                                   #  RESCALE
015047,000278: 06,3613           31472                           CA       GCOMP      +1                         
015048,000279: 06,3614           00006                           EXTEND                                         
015049,000280: 06,3615           74735                           MP       BIT8                                  #  SHIFT MINOR PART LEFT 7 - MAJOR PART = 0
015050,000281: 06,3616           50130                           INDEX    BUF                                   
015051,000282: 06,3617           23472                           LXCH     GCOMP      +1                         #  BITS 8-14 OF MINOR PART WERE = 0
015052,000283: 
015053,000284: 06,3620           10130                           CCS      BUF                                   #  PIPAZ, PIPAY, PIPAX
015054,000285: 06,3621           67770                           AD       NEG1                                  
015055,000286: 06,3622           13611                           TCF      GCOMP1     +1                         
015056,000287: 06,3623           77776        COMPCHK            DEC      -1         B-14                       #  LESS THAN ZERO IMPOSSIBLE
015057,000288: 06,3624           15146                           TCF      ENDOFJOB                              
015058,000289: 

Page 346

015060,000291: 06,3625           11477        NBDONLY            CCS      GCOMPSW                               #  BYPASS IF GCOMPSW NEGATIVE
015061,000292: 06,3626           13631                           TCF      +3                                    
015062,000293: 06,3627           13631                           TCF      +2                                    
015063,000294: 06,3630           15146                           TCF      ENDOFJOB                              
015064,000295: 
015065,000296: 06,3631           00004                           INHINT                                         
015066,000297: 06,3632           10076                           CCS      FLAGWRD2                              #  PREREAD T3RUPT MAY COINCIDE
015067,000298: 06,3633           15146                           TCF      ENDOFJOB                              
015068,000299: 06,3634           15146                           TCF      ENDOFJOB                              
015069,000300: 06,3635           13636                           TCF      +1                                    
015070,000301: 
015071,000302: 06,3636           30104                           CA       FLAGWRD8                              #  IF SURFACE FLAG IS SET, SET TEM1
015072,000303: 06,3637           74735                           MASK     BIT8                                  #  POSITIVE SO THAT THE ACCELERATION TERMS
015073,000304: 06,3640           54141                           TS       TEM1                                  #  WILL BE COMPENSATED.
015074,000305: 06,3641           00006                           EXTEND                                         
015075,000306: 06,3642           13645                           BZF      +3                                    #  ARE WE ON THE SURFACE
015076,000307: 
015077,000308: 06,3643           04665                           TC       IBNKCALL                              #  ON THE SURFACE
015078,000309: 06,3644           77543                           CADR     PIPASR     +3                         #  READ PIPAS, BUT DO NOT SCALE THEM
015079,000310: 
015080,000311: 06,3645           30025                           CA       TIME1                                 #  (CS) X 2(+14)
015081,000312: 06,3646           57074                           XCH      1/PIPADT                              #  PREVIOUS TIME
015082,000313: 06,3647           00003                           RELINT                                         
015083,000314: 06,3650           40000                           COM                                            
015084,000315: 06,3651           61074                           AD       1/PIPADT                              #  PRESENT TIME - PREVIOUS TIME
015085,000316: 06,3652           64727        NBD2               AD       HALF                                  #  CORRECT FOR POSSIBLE TIME1 TICK
015086,000317: 06,3653           64727                           AD       HALF                                  
015087,000318: 06,3654           56001                           XCH      L                                     #  IF TIME1 DID NOT TICK, REMOVE RESULTING
015088,000319: 06,3655           56001                           XCH      L                                     #  OVERFLOW.
015089,000320: 
015090,000321: 06,3656           00006        NBD3               EXTEND                                         #  C(A) = DELTAT    (CS) X 2(+14)
015091,000322: 06,3657           74733                           MP       BIT10                                 #  SHIFT RIGHT 5
015092,000323: 06,3660           52125                           DXCH     VBUF       +2                         
015093,000324: 
015094,000325: 06,3661           34746                           CA       ZERO                                  
015095,000326: 06,3662           55477                           TS       GCOMPSW                               #  INDICATE COMMANDS 2 PULSES OR LESS.
015096,000327: 06,3663           54130                           TS       BUF                                   #  INDEX  X, Y, Z.
015097,000328: 
015098,000329: 06,3664           10141                           CCS      TEM1                                  #  IF SURFACE FLAG IS SET,
015099,000330: 06,3665           03426                           TC       IRIGX                                 #  COMPENSATE ACCELERATION TERMS.
015100,000331: 
015101,000332: 06,3666           00006                           EXTEND                                         
015102,000333: 06,3667           30125                           DCA      VBUF       +2                         
015103,000334: 06,3670           52155                           DXCH     MPAC                                  #  DELTAT NOW SCALED (CS) X 2(+19)
015104,000335: 
015105,000336: 06,3671           41460                           CS       NBDX                                  #  (GYRO PULSES)/(CS) X 2(-5)
015106,000337: 06,3672           03714                           TC       FBIASSUB                              #  -(NBOX)(DELTAT)   (GYRO PULSES) X 2(+14)
015107,000338: 
015108,000339: 06,3673           10141                           CCS      TEM1                                  #  IF SURFACE FLAG IS SET,
015109,000340: 06,3674           03443                           TC       IRIGY                                 #  COMPENSATE ACCELERATION TERMS.
015110,000341: 

Page 347

015112,000343: 06,3675           00006                           EXTEND                                         
015113,000344: 06,3676           40125                           DCS      VBUF       +2                         
015114,000345: 06,3677           52155                           DXCH     MPAC                                  #  DELTAT SCALED (CS) X 2(+19)
015115,000346: 06,3700           31461                           CA       NBDY                                  #  (GYRO PULSES)/(CS) X 2(-5)
015116,000347: 06,3701           03714                           TC       FBIASSUB                              #  -(NBDY)(DELTAT)   (GYRO PULSES) X 2(+14)
015117,000348: 
015118,000349: 06,3702           10141                           CCS      TEM1                                  #  IF SURFACE FLAG IS SET,
015119,000350: 06,3703           03460                           TC       IRIGZ                                 #  COMPENSATE ACCELERATION TERMS
015120,000351: 
015121,000352: 06,3704           00006                           EXTEND                                         
015122,000353: 06,3705           40125                           DCS      VBUF       +2                         
015123,000354: 06,3706           52155                           DXCH     MPAC                                  #  DELTAT SCALED (CS) X 2(+19)
015124,000355: 06,3707           41462                           CS       NBDZ                                  #  (GYRO PULSES)/(CS) X 2(-5)
015125,000356: 06,3710           03714                           TC       FBIASSUB                              #  +(NBDZ)(DELTAT)   (GYRO PULSES) X 2(+14)
015126,000357: 
015127,000358: 06,3711           11477                           CCS      GCOMPSW                               #  ARE GYRO COMMANDS GREATER THAN 2 PULSES
015128,000359: 06,3712           13557                           TCF      1/GYRO                                #  YES
015129,000360: 06,3713           15146                           TCF      ENDOFJOB                              #  NO
015130,000361: 

Page 348

015132,000363: 06,3714           56002        FBIASSUB           XCH      Q                                     
015133,000364: 06,3715           54131                           TS       BUF        +1                         
015134,000365: 
015135,000366: 06,3716           30002                           CA       Q                                     #  NBD SCALED (GYRO PULSES)/(CS) X 2(-5)
015136,000367: 06,3717           00006                           EXTEND                                         
015137,000368: 06,3720           70154                           MP       MPAC                                  #  DELTAT SCALED (CS) X 2(+19)
015138,000369: 06,3721           50130                           INDEX    BUF                                   
015139,000370: 06,3722           21472                           DAS      GCOMP                                 #  HI(NBD)(DELTAT)   (GYRO PULSES) X 2(+14)
015140,000371: 
015141,000372: 06,3723           30002                           CA       Q                                     #  NOW FRACTIONAL PART
015142,000373: 06,3724           00006                           EXTEND                                         
015143,000374: 06,3725           70155                           MP       MPAC       +1                         
015144,000375: 06,3726           54001                           TS       L                                     
015145,000376: 06,3727           34746                           CAF      ZERO                                  
015146,000377: 06,3730           50130                           INDEX    BUF                                   
015147,000378: 06,3731           21472                           DAS      GCOMP                                 #  (NBD)(DELTAT)      (GYRO PULSES) X 2(+14)
015148,000379: 
015149,000380: 06,3732           13544                           TCF      DRFTSUB2                              #  CHECK MAGNITUDE OF COMPENSATION
015150,000381: 
015151,000382: 06,3733           04607        LASTBIAS           TC       BANKCALL                              
015152,000383: 06,3734           17264                           CADR     PIPUSE1                               
015153,000384: 
015154,000385: 06,3735           11477                           CCS      GCOMPSW                               
015155,000386: 06,3736           13741                           TCF      +3                                    
015156,000387: 06,3737           13741                           TCF      +2                                    
015157,000388: 06,3740           15146                           TCF      ENDOFJOB                              
015158,000389: 
015159,000390: 06,3741           30104                           CA       FLAGWRD8                              #  IF SURFACE FLAG IS SET, SET TEM1
015160,000391: 06,3742           74735                           MASK     SURFFBIT                              #  POSITIVE SO THAT THE ACCELERATION TERMS
015161,000392: 06,3743           54141                           TS       TEM1                                  #  WILL BE COMPENSATED.
015162,000393: 
015163,000394: 06,3744           37737                           CAF      PRIO31                                #  2 SECONDS SCALED (CS) X 2(+8)
015164,000395: 06,3745           57074                           XCH      1/PIPADT                              
015165,000396: 06,3746           40000                           COM                                            
015166,000397: 06,3747           61234                           AD       PIPTIME    +1                         
015167,000398: 06,3750           13652                           TCF      NBD2                                  
015168,000399: 
015169,000400: 06,3751           33601        GCOMPZER           CAF      LGCOMP                                #  ROUTINE TO ZERO GCOMP BEFORE FIRST
015170,000401: 06,3752           56003                           XCH      EBANK                                 #  CALL TO 1/PIPA
015171,000402: 06,3753           54163                           TS       MODE                                  
015172,000403: 
015173,000404: 06,3754           34746                           CAF      ZERO                                  
015174,000405: 06,3755           55477                           TS       GCOMPSW                               
015175,000406: 06,3756           55471                           TS       GCOMP                                 
015176,000407: 06,3757           55472                           TS       GCOMP      +1                         
015177,000408: 06,3760           55473                           TS       GCOMP      +2                         
015178,000409: 06,3761           55474                           TS       GCOMP      +3                         
015179,000410: 06,3762           55475                           TS       GCOMP      +4                         
015180,000411: 

Page 349

015182,000413: 06,3763           55476                           TS       GCOMP      +5                         
015183,000414: 
015184,000415: 06,3764           13423                           TCF      IRIG1                                 #  RESTORE EBANK AND RETURN
015185,000416: 

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