Source Code

These source-code files were from the printout at the MIT Museum, with many thanks to Deborah Douglas, the Museum's Curator of Science and Technology, for releasing it to us. The printout was digitally photographed by Paul Fjeld. A team of volunteers transcribed the source code manually from these images or, where appropriate, modified already-transcribed but similar source Luminary 131 (Apollo 13) source code to agree with the images from the printout. Note that the page images presented online are of reduced quality, and that higher-quality images are available. Report any conversion errors or legibility problems in page images to info@sandroid.org. Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 001 OF AGC PROGRAM LMY99 BY NASA 2021112-061
	20'35 OCT. 28,1968
Note that the date is the date of the printout, not the date of the program revision.

013633,000002:                                                                                                  ## Copyright:   Public domain.
013634,000003:                                                                                                  ## Filename:    IMU_COMPENSATION_PACKAGE.agc
013635,000004:                                                                                                  ## Purpose:     Part of the source code for Luminary 1A build 099.
013636,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
013637,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 11.
013638,000007:                                                                                                  ## Assembler:   yaYUL
013639,000008:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
013640,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo.
013641,000010:                                                                                                  ## Pages:       326-337
013642,000011:                                                                                                  ## Mod history: 2009-05-16 RSB  Adapted from the corresponding 
013643,000012:                                                                                                  ##                              Luminary131 file, using page 
013644,000013:                                                                                                  ##                              images from Luminary 1A.
013645,000014:                                                                                                  ##              2009-06-07 RSB  Corrected a typo.
013646,000015:                                                                                                  ##              2016-12-14 RSB  Proofed text comments with octopus/ProoferComments
013647,000016:                                                                                                  ##                              and corrected the errors found.
013648,000017:                                                                                                  ##              2017-03-07 RSB  Comment-text fixes noted in proofing Luminary 116.
013649,000018:                                                                                                  ##
013650,000019:                                                                                                  ## This source code has been transcribed or otherwise adapted from
013651,000020:                                                                                                  ## digitized images of a hardcopy from the MIT Museum.  The digitization
013652,000021:                                                                                                  ## was performed by Paul Fjeld, and arranged for by Deborah Douglas of
013653,000022:                                                                                                  ## the Museum.  Many thanks to both.  The images (with suitable reduction
013654,000023:                                                                                                  ## in storage size and consequent reduction in image quality as well) are
013655,000024:                                                                                                  ## available online at www.ibiblio.org/apollo.  If for some reason you
013656,000025:                                                                                                  ## find that the images are illegible, contact me at info@sandroid.org
013657,000026:                                                                                                  ## about getting access to the (much) higher-quality images which Paul
013658,000027:                                                                                                  ## actually created.
013659,000028:                                                                                                  ##
013660,000029:                                                                                                  ## Notations on the hardcopy document read, in part:
013661,000030:                                                                                                  ##
013662,000031:                                                                                                  ##      Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
013663,000032:                                                                                                  ##      16:27 JULY 14, 1969 
013664,000033: 

Page 326

013666,000035: 07,2667                                           BANK     7                                     
013667,000036: 06,2000                                           SETLOC   IMUCOMP                               
013668,000037: 06,2000                                           BANK                                           
013669,000038: 
013670,000039: 06,3263  E3,1460                                  EBANK=   NBDX                                  
013671,000040: 
013672,000041: 06,3263                                           COUNT*   $$/ICOMP                              
013673,000042: 06,3263           33531        1/PIPA             CAF      LGCOMP                                #  SAVE EBANK OF CALLING PROGRAM
013674,000043: 06,3264           56003                           XCH      EBANK                                 
013675,000044: 06,3265           54163                           TS       MODE                                  
013676,000045: 
013677,000046: 06,3266           11477                           CCS      GCOMPSW                               #  BYPASS IF GCOMPSW NEGATIVE
013678,000047: 06,3267           13272                           TCF      +3                                    
013679,000048: 06,3270           13272                           TCF      +2                                    
013680,000049: 06,3271           13353                           TCF      IRIG1                                 #  RETURN
013681,000050: 
013682,000051: 06,3272           34751        1/PIPA1            CAF      FOUR                                  #  PIPAZ, PIPAY, PIPAX
013683,000052: 06,3273           54132                           TS       BUF        +2                         
013684,000053: 
013685,000054: 06,3274           50132                           INDEX    BUF        +2                         
013686,000055: 06,3275           31453                           CA       PIPASCF                               #  (P.P.M.) X 2(-9)
013687,000056: 06,3276           00006                           EXTEND                                         
013688,000057: 06,3277           50132                           INDEX    BUF        +2                         
013689,000058: 06,3300           70324                           MP       DELVX                                 #  (PP) X 2(+14) NOW (PIPA PULSES) X 2(+5)
013690,000059: 06,3301           54002                           TS       Q                                     #  SAVE MAJOR PART
013691,000060: 
013692,000061: 06,3302           30001                           CA       L                                     #  MINOR PART
013693,000062: 06,3303           00006                           EXTEND                                         
013694,000063: 06,3304           74746                           MP       BIT6                                  #  SCALE 2(+9)   SHIFT RIGHT 9
013695,000064: 06,3305           50132                           INDEX    BUF        +2                         
013696,000065: 06,3306           54325                           TS       DELVX      +1                         #  FRACTIONAL PIPA PULSES SCALED 2(+14)
013697,000066: 
013698,000067: 06,3307           30002                           CA       Q                                     #  MAJOR PART
013699,000068: 06,3310           00006                           EXTEND                                         
013700,000069: 06,3311           74746                           MP       BIT6                                  #  SCALE 2(+9)   SHIFT RIGHT 9
013701,000070: 06,3312           50132                           INDEX    BUF        +2                         
013702,000071: 06,3313           20325                           DAS      DELVX                                 #  (PIPAI) + (PIPAI)(SFE)
013703,000072: 
013704,000073: 06,3314           50132                           INDEX    BUF        +2                         
013705,000074: 06,3315           41452                           CS       PIPABIAS                              #  (PIPA PULSES)/(CS) X 2(-5)             *
013706,000075: 06,3316           00006                           EXTEND                                         
013707,000076: 06,3317           71075                           MP       1/PIPADT                              #  (CS) X 2(+8) NOW (PIPA PULSES) X 2(+3) *
013708,000077: 06,3320           00006                           EXTEND                                         
013709,000078: 06,3321           74750                           MP       BIT4                                  #  SCALE 2(+11) SHIFT RIGHT 11            *
013710,000079: 06,3322           50132                           INDEX    BUF        +2                         
013711,000080: 06,3323           20325                           DAS      DELVX                                 #  (PIPAI) + (PIPAI)(SFE) - (BIAS)(DELTAT)
013712,000081: 
013713,000082: 06,3324           10132                           CCS      BUF        +2                         #  PIPAZ, PIPAY, PIPAX
013714,000083: 06,3325           67747                           AD       NEG1                                  
013715,000084: 06,3326           13273                           TCF      1/PIPA1    +1                         

Page 327

013717,000086: 06,3327           13330                           NOOP                                           #  LESS THAN ZERO IMPOSSIBLE
013718,000087: 

Page 328

013720,000089: 06,3330           55477        IRIGCOMP           TS       GCOMPSW                               #  INDICATE COMMANDS 2 PULSES OR LESS.
013721,000090: 06,3331           54130                           TS       BUF                                   #  INDEX COUNTER.  IRIGX, IRIGY, IRIGZ.
013722,000091: 
013723,000092: 06,3332           03356                           TC       IRIGX                                 #  COMPENSATE ACCELERATION TERMS
013724,000093: 
013725,000094: 06,3333           41460                           CS       NBDX                                  #  (GYRO PULSES)/(CS) X 2(-5)
013726,000095: 06,3334           03454                           TC       DRIFTSUB                              #  -(NBOX)(DELTAT)       (GYRO PULSES) X 2(+14)
013727,000096: 
013728,000097: 06,3335           03373                           TC       IRIGY                                 #  COMPENSATE ACCELERATION TERMS
013729,000098: 
013730,000099: 06,3336           41461                           CS       NBDY                                  #  (GYRO PULSES)/(CS) X 2(-5)
013731,000100: 06,3337           03454                           TC       DRIFTSUB                              #  -(NBDY)(DELTAT)       (GYRO PULSES) X 2(+14)
013732,000101: 
013733,000102: 06,3340           03410                           TC       IRIGZ                                 #  COMPENSATE ACCELERATION TERMS
013734,000103: 
013735,000104: 06,3341           31462                           CA       NBDZ                                  #  (GYRO PULSES)/(CS) X 2(-5)
013736,000105: 06,3342           03454                           TC       DRIFTSUB                              #  +(NBDZ)(DELTAT)       (GYRO PULSES) X 2(+14)
013737,000106: 
013738,000107: 06,3343           11477                           CCS      GCOMPSW                               #  ARE GYRO COMMANDS GREATER THAN 2 PULSES
013739,000108: 06,3344           13346                           TCF      +2                                    #  YES   SEND OUT GYRO TORQUING COMMANDS.
013740,000109: 06,3345           13353                           TCF      IRIG1                                 #  NO    RETURN
013741,000110: 
013742,000111: 06,3346           35031                           CA       PRIO21                                #  PRIO GREATER THAN SERVICER
013743,000112: 06,3347           05072                           TC       NOVAC                                 #  SEND OUT GYRO TORQUING COMMANDS.
013744,000113: 06,3350  E3,1460                                  EBANK=   NBDX                                  
013745,000114: 06,3350           03507 14063                     2CADR    1/GYRO                                
013746,000115: 
013747,000116: 06,3352           00003                           RELINT                                         
013748,000117: 06,3353           30163        IRIG1              CA       MODE                                  #  RESTORE CALLERS EBANK
013749,000118: 06,3354           54003                           TS       EBANK                                 
013750,000119: 06,3355           14631                           TCF      SWRETURN                              
013751,000120: 

Page 329

013753,000122: 06,3356           00006        IRIGX              EXTEND                                         
013754,000123: 06,3357           22156                           QXCH     MPAC       +2                         #  SAVE Q
013755,000124: 06,3360           00006                           EXTEND                                         
013756,000125: 06,3361           40325                           DCS      DELVX                                 #  (PIPA PULSES) X 2(+14)
013757,000126: 06,3362           52155                           DXCH     MPAC                                  
013758,000127: 06,3363           31463                           CA       ADIAX                                 #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)            *
013759,000128: 06,3364           03425                           TC       GCOMPSUB                              #  -(ADIAX)(PIPAX)          (GYRO PULSES) X 2(+14)
013760,000129: 
013761,000130: 06,3365           00006                           EXTEND                                         #  
013762,000131: 06,3366           40327                           DCS      DELVY                                 #        (PIPA PULSES) X 2(+14)
013763,000132: 06,3367           52155                           DXCH     MPAC                                  #  
013764,000133: 06,3370           41466                           CS       ADSRAX                                #        (GYRO PULSES)/(PIPA PULSE) X 2(-6)      *
013765,000134: 06,3371           03425                           TC       GCOMPSUB                              #        -(ADSRAX)(PIPAY)   (GYRO PULSES) X 2(+14)
013766,000135: 
013767,000136:                                                                                                  #                EXTEND                  ***
013768,000137:                                                                                                  #                DCS     DELVZ           ***     (PIPA PULSES) X 2(+14)
013769,000138:                                                                                                  #                DXCH    MPAC            ***
013770,000139:                                                                                                  #                CA      ADOAX           ***     (GYRO PULSES)/(PIPA PULSE) X 2(-6)      *
013771,000140:                                                                                                  #                TC      GCOMPSUB        ***     -(ADOAX)(PIPAZ)    (GYRO PULSES) X 2(+14)
013772,000141: 
013773,000142: 06,3372           00156                           TC       MPAC       +2                         
013774,000143: 
013775,000144: 06,3373           00006        IRIGY              EXTEND                                         
013776,000145: 06,3374           22156                           QXCH     MPAC       +2                         #  SAVE Q
013777,000146: 06,3375           00006                           EXTEND                                         
013778,000147: 06,3376           40327                           DCS      DELVY                                 #  (PIPA PULSES) X 2(+14)
013779,000148: 06,3377           52155                           DXCH     MPAC                                  
013780,000149: 06,3400           31464                           CA       ADIAY                                 #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)            *
013781,000150: 06,3401           03425                           TC       GCOMPSUB                              #  -(ADIAY)(PIPAY)          (GYRO PULSES) X 2(+14)
013782,000151: 
013783,000152: 06,3402           00006                           EXTEND                                         
013784,000153: 06,3403           40331                           DCS      DELVZ                                 #  (PIPA PULSES) X 2(+14)
013785,000154: 06,3404           52155                           DXCH     MPAC                                  
013786,000155: 06,3405           41467                           CS       ADSRAY                                #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)            *
013787,000156: 06,3406           03425                           TC       GCOMPSUB                              #  +(ADSRAY)(PIPAZ)              (GYRO PULSES) X 2(+14)
013788,000157: 
013789,000158:                                                                                                  #                EXTEND                  ***
013790,000159:                                                                                                  #                DCS     DELVX           ***     (PIPA PULSES) X 2(+14)
013791,000160:                                                                                                  #                DXCH    MPAC            ***
013792,000161:                                                                                                  #                CA      ADOAY           ***     (GYRO PULSES)/(PIPA PULSE) X 2(-6)      *
013793,000162:                                                                                                  #                TC      GCOMPSUB        ***     -(ADOAY)(PIPAX)   (GYRO PULSES) X 2(+14)
013794,000163: 
013795,000164: 06,3407           00156                           TC       MPAC       +2                         
013796,000165: 
013797,000166: 06,3410           00006        IRIGZ              EXTEND                                         
013798,000167: 06,3411           22156                           QXCH     MPAC       +2                         #  SAVE Q
013799,000168: 06,3412           00006                           EXTEND                                         
013800,000169: 06,3413           40327                           DCS      DELVY                                 #  (PIPA PULSES) X 2(+14)
013801,000170: 06,3414           52155                           DXCH     MPAC                                  
013802,000171: 06,3415           31470                           CA       ADSRAZ                                #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)            *

Page 330

013804,000173: 06,3416           03425                           TC       GCOMPSUB                              #  -(ADSRAZ)(PIPAY)        (GYRO PULSES) X 2(+14)
013805,000174: 
013806,000175: 06,3417           00006                           EXTEND                                         
013807,000176: 06,3420           40331                           DCS      DELVZ                                 #  (PIPA PULSES) X 2(+14)
013808,000177: 06,3421           52155                           DXCH     MPAC                                  
013809,000178: 06,3422           31465                           CA       ADIAZ                                 #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)            *
013810,000179: 06,3423           03425                           TC       GCOMPSUB                              #  -(ADIAZ)(PIPAZ)          (GYRO PULSES) X 2(+14)
013811,000180: 
013812,000181:                                                                                                  #                EXTEND                  ***
013813,000182:                                                                                                  #                DCS     DELVX           ***     (PIPA PULSE) X 2(+14)
013814,000183:                                                                                                  #                DXCH    MPAC            ***
013815,000184:                                                                                                  #                CS      ADOAZ           ***     (GYRO PULSES)/(PIPA PULSE) X 2(-6)      *
013816,000185:                                                                                                  #                TC      GCOMPSUB        ***     +(ADOAZ)(PIPAX)    (GYRO PULSES) X 2(+14)
013817,000186: 
013818,000187: 06,3424           00156                           TC       MPAC       +2                         
013819,000188: 

Page 331

013821,000190: 06,3425           56154        GCOMPSUB           XCH      MPAC                                  #  ADIA OR ADSRA COEFFICIENT ARRIVES IN A
013822,000191: 06,3426           00006                           EXTEND                                         #  C(MPAC) = (PIPA PULSES) X 2(+14)
013823,000192: 06,3427           70154                           MP       MPAC                                  #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)            *
013824,000193: 06,3430           52123                           DXCH     VBUF                                  #  NOW = (GYRO PULSES) X 2(+8)                   *
013825,000194: 
013826,000195: 06,3431           30155                           CA       MPAC       +1                         #  MINOR PART PIPA PULSES
013827,000196: 06,3432           00006                           EXTEND                                         
013828,000197: 06,3433           70154                           MP       MPAC                                  #  ADIA OR ADSRA
013829,000198: 06,3434           54001                           TS       L                                     
013830,000199: 06,3435           34755                           CAF      ZERO                                  
013831,000200: 06,3436           20123                           DAS      VBUF                                  #  NOW = (GYRO PULSES) X 2(+8)                   *
013832,000201: 
013833,000202: 06,3437           30122                           CA       VBUF                                  #  PARTIAL RESULT - MAJOR
013834,000203: 06,3440           00006                           EXTEND                                         
013835,000204: 06,3441           74743                           MP       BIT9                                  #  SCALE 2(+6)   SHIFT RIGHT 6                   *
013836,000205: 06,3442           50130                           INDEX    BUF                                   #  RESULT = (GYRO PULSES) X 2(+14)
013837,000206: 06,3443           21472                           DAS      GCOMP                                 #  HI(ADIA)(PIPAI) OR HI(ADSRA)(PIPAI)
013838,000207: 
013839,000208: 06,3444           30123                           CA       VBUF       +1                         #  PARTIAL RESULT - MINOR
013840,000209: 06,3445           00006                           EXTEND                                         
013841,000210: 06,3446           74743                           MP       BIT9                                  #  SCALE 2(+6)   SHIFT RIGHT 6                   *
013842,000211: 06,3447           54001                           TS       L                                     
013843,000212: 06,3450           34755                           CAF      ZERO                                  
013844,000213: 06,3451           50130                           INDEX    BUF                                   #  RESULT = (GYRO PULSES) X 2(+14)
013845,000214: 06,3452           21472                           DAS      GCOMP                                 #  (ADIA)(PIPAI) OR (ADSRA)(PIPAI)
013846,000215: 
013847,000216: 06,3453           00002                           TC       Q                                     
013848,000217: 

Page 332

013850,000219: 06,3454           00006        DRIFTSUB           EXTEND                                         
013851,000220: 06,3455           22131                           QXCH     BUF        +1                         
013852,000221: 
013853,000222: 06,3456           00006                           EXTEND                                         #  C(A) = NBD    (GYRO PULSES)/(CS) X 2(-5)
013854,000223: 06,3457           71075                           MP       1/PIPADT                              #  (CS) X 2(+8)  NOW (GYRO PULSES) X 2(+3)
013855,000224: 06,3460           22155                           LXCH     MPAC       +1                         #  SAVE FOR FRACTIONAL COMPENSATION
013856,000225: 06,3461           00006                           EXTEND                                         
013857,000226: 06,3462           74750                           MP       BIT4                                  #  SCALE 2(+11)  SHIFT RIGHT 11
013858,000227: 06,3463           50130                           INDEX    BUF                                   
013859,000228: 06,3464           21472                           DAS      GCOMP                                 #  HI(NBD)(DELTAT)       (GYRO PULSES) X 2(+14)
013860,000229: 
013861,000230: 06,3465           30155                           CA       MPAC       +1                         #  NOW MINOR PART
013862,000231: 06,3466           00006                           EXTEND                                         
013863,000232: 06,3467           74750                           MP       BIT4                                  #  SCALE 2(+11)          SHIFT RIGHT 11
013864,000233: 06,3470           54001                           TS       L                                     
013865,000234: 06,3471           34755                           CAF      ZERO                                  
013866,000235: 06,3472           50130                           INDEX    BUF                                   #  ADD IN FRACTIONAL COMPENSATION
013867,000236: 06,3473           21472                           DAS      GCOMP                                 #  (NBD)(DELTAT)         (GYRO PULSES) X 2(+14)
013868,000237: 
013869,000238: 06,3474           34752        DRFTSUB2           CAF      TWO                                   #  PIPAX, PIPAY, PIPAZ
013870,000239: 06,3475           60130                           AD       BUF                                   
013871,000240: 06,3476           56130                           XCH      BUF                                   
013872,000241: 06,3477           50000                           INDEX    A                                     
013873,000242: 06,3500           11471                           CCS      GCOMP                                 #  ARE GYRO COMMANDS 1 PULSE OR GREATER
013874,000243: 06,3501           13503                           TCF      +2                                    #  YES
013875,000244: 06,3502           00131                           TC       BUF        +1                         #  NO
013876,000245: 
013877,000246: 06,3503           73553                           MASK     COMPCHK                               #  DEC -1
013878,000247: 06,3504           10000                           CCS      A                                     #  ARE GYRO COMMANDS GREATER THAN 2 PULSES
013879,000248: 06,3505           55477                           TS       GCOMPSW                               #  YES - SET GCOMPSW POSITIVE
013880,000249: 06,3506           00131                           TC       BUF        +1                         #  NO
013881,000250: 

Page 333

013883,000252: 06,3507           34751        1/GYRO             CAF      FOUR                                  #  PIPAZ, PIPAY, PIPAX
013884,000253: 06,3510           54130                           TS       BUF                                   
013885,000254: 
013886,000255: 06,3511           50130                           INDEX    BUF                                   #  SCALE GYRO COMMANDS FOR IMUPULSE
013887,000256: 06,3512           31472                           CA       GCOMP      +1                         #  FRACTIONAL PULSES
013888,000257: 06,3513           00006                           EXTEND                                         
013889,000258: 06,3514           74744                           MP       BIT8                                  #  SHIFT RIGHT 7
013890,000259: 06,3515           50130                           INDEX    BUF                                   
013891,000260: 06,3516           55472                           TS       GCOMP      +1                         #  FRACTIONAL PULSES SCALED
013892,000261: 
013893,000262: 06,3517           34755                           CAF      ZERO                                  #  SET GCOMP = 0 FOR DAS INSTRUCTION
013894,000263: 06,3520           50130                           INDEX    BUF                                   
013895,000264: 06,3521           57471                           XCH      GCOMP                                 #  GYRO PULSES
013896,000265: 06,3522           00006                           EXTEND                                         
013897,000266: 06,3523           74744                           MP       BIT8                                  #  SHIFT RIGHT 7
013898,000267: 06,3524           50130                           INDEX    BUF                                   
013899,000268: 06,3525           21472                           DAS      GCOMP                                 #  ADD THESE TO FRACTIONAL PULSES ABOVE
013900,000269: 
013901,000270: 06,3526           10130                           CCS      BUF                                   #  PIPAZ, PIPAY, PIPAX
013902,000271: 06,3527           67747                           AD       NEG1                                  
013903,000272: 06,3530           13510                           TCF      1/GYRO     +1                         
013904,000273: 06,3531           01471        LGCOMP             ECADR    GCOMP                                 #  LESS THAN ZERO IMPOSSIBLE
013905,000274: 
013906,000275: 06,3532           33531                           CAF      LGCOMP                                
013907,000276: 06,3533           04616                           TC       BANKCALL                              
013908,000277: 06,3534           17323                           CADR     IMUPULSE                              #  CALL GYRO TORQUING ROUTINE
013909,000278: 06,3535           04616                           TC       BANKCALL                              
013910,000279: 06,3536           17716                           CADR     IMUSTALL                              #  WAIT FOR PULSES TO GET OUT
013911,000280: 06,3537           15155                           TCF      ENDOFJOB                              #  TEMPORARY
013912,000281: 
013913,000282: 06,3540           34751        GCOMP1             CAF      FOUR                                  #  PIPAZ, PIPAY, PIPAX
013914,000283: 06,3541           54130                           TS       BUF                                   
013915,000284: 
013916,000285: 06,3542           50130                           INDEX    BUF                                   #  RESCALE
013917,000286: 06,3543           31472                           CA       GCOMP      +1                         
013918,000287: 06,3544           00006                           EXTEND                                         
013919,000288: 06,3545           74744                           MP       BIT8                                  #  SHIFT MINOR PART LEFT 7 - MAJOR PART = 0
013920,000289: 06,3546           50130                           INDEX    BUF                                   
013921,000290: 06,3547           23472                           LXCH     GCOMP      +1                         #  BITS 8-14 OF MINOR PART WERE = 0
013922,000291: 
013923,000292: 06,3550           10130                           CCS      BUF                                   #  PIPAZ, PIPAY, PIPAX
013924,000293: 06,3551           67747                           AD       NEG1                                  
013925,000294: 06,3552           13541                           TCF      GCOMP1     +1                         
013926,000295: 06,3553           77776        COMPCHK            DEC      -1         B-14                       #  LESS THAN ZERO IMPOSSIBLE
013927,000296: 06,3554           15155                           TCF      ENDOFJOB                              
013928,000297: 

Page 334

013930,000299: 06,3555           11477        NBDONLY            CCS      GCOMPSW                               #  BYPASS IF GCOMPSW NEGATIVE
013931,000300: 06,3556           13561                           TCF      +3                                    
013932,000301: 06,3557           13561                           TCF      +2                                    
013933,000302: 06,3560           15155                           TCF      ENDOFJOB                              
013934,000303: 
013935,000304: 06,3561           00004                           INHINT                                         
013936,000305: 06,3562           10076                           CCS      FLAGWRD2                              #  PREREAD T3RUPT MAY COINCIDE
013937,000306: 06,3563           15155                           TCF      ENDOFJOB                              
013938,000307: 06,3564           15155                           TCF      ENDOFJOB                              
013939,000308: 06,3565           13566                           TCF      +1                                    
013940,000309: 
013941,000310: 06,3566           30104                           CA       FLAGWRD8                              #  IF SURFACE FLAG IS SET, SET TEM1
013942,000311: 06,3567           74744                           MASK     BIT8                                  #  POSITIVE SO THAT THE ACCELERATION TERMS
013943,000312: 06,3570           54141                           TS       TEM1                                  #  WILL BE COMPENSATED.
013944,000313: 06,3571           00006                           EXTEND                                         
013945,000314: 06,3572           13575                           BZF      +3                                    #  ARE WE ON THE SURFACE
013946,000315: 
013947,000316: 06,3573           04674                           TC       IBNKCALL                              #  ON THE SURFACE
013948,000317: 06,3574           77544                           CADR     PIPASR     +3                         #  READ PIPAS, BUT DO NOT SCALE THEM
013949,000318: 
013950,000319: 06,3575           30025                           CA       TIME1                                 #  (CS) X 2(+14)
013951,000320: 06,3576           57075                           XCH      1/PIPADT                              #  PREVIOUS TIME
013952,000321: 06,3577           00003                           RELINT                                         
013953,000322: 06,3600           40000                           COM                                            
013954,000323: 06,3601           61075                           AD       1/PIPADT                              #  PRESENT TIME - PREVIOUS TIME
013955,000324: 06,3602           64736        NBD2               AD       HALF                                  #  CORRECT FOR POSSIBLE TIME1 TICK
013956,000325: 06,3603           64736                           AD       HALF                                  
013957,000326: 06,3604           56001                           XCH      L                                     #  IF TIME1 DID NOT TICK, REMOVE RESULTING
013958,000327: 06,3605           56001                           XCH      L                                     #  OVERFLOW.
013959,000328: 
013960,000329: 06,3606           00006        NBD3               EXTEND                                         #  C(A) = DELTAT         (CS) X 2(+14)
013961,000330: 06,3607           74742                           MP       BIT10                                 #  SHIFT RIGHT 5
013962,000331: 06,3610           52125                           DXCH     VBUF       +2                         
013963,000332: 
013964,000333: 06,3611           34755                           CA       ZERO                                  
013965,000334: 06,3612           55477                           TS       GCOMPSW                               #  INDICATE COMMANDS 2 PULSES OR LESS.
013966,000335: 06,3613           54130                           TS       BUF                                   #  INDEX X, Y, Z.
013967,000336: 
013968,000337: 06,3614           10141                           CCS      TEM1                                  #  IF SURFACE FLAG IS SET,
013969,000338: 06,3615           03356                           TC       IRIGX                                 #  COMPENSATE ACCELERATION TERMS.
013970,000339: 
013971,000340: 06,3616           00006                           EXTEND                                         
013972,000341: 06,3617           30125                           DCA      VBUF       +2                         
013973,000342: 06,3620           52155                           DXCH     MPAC                                  #  DELTAT NOW SCALED (CS) X 2(+19)
013974,000343: 
013975,000344: 06,3621           41460                           CS       NBDX                                  #  (GYRO PULSES)/(CS) X 2(-5)
013976,000345: 06,3622           03644                           TC       FBIASSUB                              #  -(NBOX)(DELTAT)       (GYRO PULSES) X 2(+14)
013977,000346: 
013978,000347: 06,3623           10141                           CCS      TEM1                                  #  IF SURFACE FLAG IS SET,
013979,000348: 06,3624           03373                           TC       IRIGY                                 #  COMPENSATE ACCELERATION TERMS.

Page 335

013981,000350: 06,3625           00006                           EXTEND                                         
013982,000351: 06,3626           40125                           DCS      VBUF       +2                         
013983,000352: 06,3627           52155                           DXCH     MPAC                                  #  DELTAT SCALED (CS) X 2(+19)
013984,000353: 06,3630           31461                           CA       NBDY                                  #  (GYRO PULSES)/(CS) X 2(-5)
013985,000354: 06,3631           03644                           TC       FBIASSUB                              #  -(NBDY)(DELTAT)       (GYRO PULSES) X 2(+14)
013986,000355: 
013987,000356: 06,3632           10141                           CCS      TEM1                                  #  IF SURFACE FLAG IS SET,
013988,000357: 06,3633           03410                           TC       IRIGZ                                 #  COMPENSATE ACCELERATION TERMS
013989,000358: 
013990,000359: 06,3634           00006                           EXTEND                                         
013991,000360: 06,3635           40125                           DCS      VBUF       +2                         
013992,000361: 06,3636           52155                           DXCH     MPAC                                  #  DELTAT SCALED (CS) X 2(+19)
013993,000362: 06,3637           41462                           CS       NBDZ                                  #  (GYRO PULSES)/(CS) X 2(-5)
013994,000363: 06,3640           03644                           TC       FBIASSUB                              #  +(NBDZ)(DELTAT)       (GYRO PULSES) X 2(+14)
013995,000364: 
013996,000365: 06,3641           11477                           CCS      GCOMPSW                               #  ARE GYRO COMMANDS GREATER THAN 2 PULSES
013997,000366: 06,3642           13507                           TCF      1/GYRO                                #  YES
013998,000367: 06,3643           15155                           TCF      ENDOFJOB                              #  NO
013999,000368: 

Page 336

014001,000370: 06,3644           56002        FBIASSUB           XCH      Q                                     
014002,000371: 06,3645           54131                           TS       BUF        +1                         
014003,000372: 
014004,000373: 06,3646           30002                           CA       Q                                     #  NBD SCALED (GYRO PULSES)/(CS) X 2(-5)
014005,000374: 06,3647           00006                           EXTEND                                         
014006,000375: 06,3650           70154                           MP       MPAC                                  #  DELTAT SCALED (CS) X 2(+19)
014007,000376: 06,3651           50130                           INDEX    BUF                                   
014008,000377: 06,3652           21472                           DAS      GCOMP                                 #  HI(NBD)(DELTAT)       (GYRO PULSES) X 2(+14)
014009,000378: 
014010,000379: 06,3653           30002                           CA       Q                                     #  NOW FRACTIONAL PART
014011,000380: 06,3654           00006                           EXTEND                                         
014012,000381: 06,3655           70155                           MP       MPAC       +1                         
014013,000382: 06,3656           54001                           TS       L                                     
014014,000383: 06,3657           34755                           CAF      ZERO                                  
014015,000384: 06,3660           50130                           INDEX    BUF                                   
014016,000385: 06,3661           21472                           DAS      GCOMP                                 #  (NBD)(DELTAT)         (GYRO PULSES) X 2(+14)
014017,000386: 
014018,000387: 06,3662           13474                           TCF      DRFTSUB2                              #  CHECK MAGNITUDE OF COMPENSATION
014019,000388: 
014020,000389: 06,3663           04616        LASTBIAS           TC       BANKCALL                              
014021,000390: 06,3664           17277                           CADR     PIPUSE1                               
014022,000391: 
014023,000392: 06,3665           11477                           CCS      GCOMPSW                               
014024,000393: 06,3666           13671                           TCF      +3                                    
014025,000394: 06,3667           13671                           TCF      +2                                    
014026,000395: 06,3670           15155                           TCF      ENDOFJOB                              
014027,000396: 
014028,000397: 06,3671           30104                           CA       FLAGWRD8                              #  IF SURFACE FLAG IS SET, SET TEM1
014029,000398: 06,3672           74744                           MASK     SURFFBIT                              #  POSITIVE SO THAT THE ACCELERATION TERMS
014030,000399: 06,3673           54141                           TS       TEM1                                  #  WILL BE COMPENSATED.
014031,000400: 
014032,000401: 06,3674           37716                           CAF      PRIO31                                #  2 SECONDS SCALED (CS) X 2(+8)
014033,000402: 06,3675           57075                           XCH      1/PIPADT                              
014034,000403: 06,3676           40000                           COM                                            
014035,000404: 06,3677           61235                           AD       PIPTIME    +1                         
014036,000405: 06,3700           13602                           TCF      NBD2                                  
014037,000406: 
014038,000407: 06,3701           33531        GCOMPZER           CAF      LGCOMP                                #  ROUTINE TO ZERO GCOMP BEFORE FIRST
014039,000408: 06,3702           56003                           XCH      EBANK                                 #  CALL TO 1/PIPA
014040,000409: 06,3703           54163                           TS       MODE                                  
014041,000410: 
014042,000411: 06,3704           34755                           CAF      ZERO                                  
014043,000412: 06,3705           55477                           TS       GCOMPSW                               
014044,000413: 06,3706           55471                           TS       GCOMP                                 
014045,000414: 06,3707           55472                           TS       GCOMP      +1                         
014046,000415: 06,3710           55473                           TS       GCOMP      +2                         
014047,000416: 06,3711           55474                           TS       GCOMP      +3                         
014048,000417: 06,3712           55475                           TS       GCOMP      +4                         

Page 337

014050,000419: 06,3713           55476                           TS       GCOMP      +5                         
014051,000420: 
014052,000421: 06,3714           13353                           TCF      IRIG1                                 #  RESTORE EBANK AND RETURN
014053,000422: 

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