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.

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

Page 338

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

Page 339

014849,000077: 06,3377           13400                           NOOP                                           #  LESS THAN ZERO IMPOSSIBLE
014850,000078: 

Page 340

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

Page 341

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

Page 342

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

Page 343

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

Page 344

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

Page 345

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

Page 346

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

Page 347

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

Page 348

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

Page 349

015185,000413: 06,3763           55476                           TS       GCOMP      +5                         
015186,000414: 
015187,000415: 06,3764           13423                           TCF      IRIG1                                 #  RESTORE EBANK AND RETURN
015188,000416: 

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