Table Example 2: Compressed Table - Motorola CPU32 Reference Manual

Hide thumbs Also See for CPU32:
Table of Contents

Advertisement

The table instruction is executed with the following bit pattern in Dx:
31
NOT USED
Table Entry Offset → Dx [8:15] = $A3 = 163
Interpolation Fraction → Dx [0:7] = $80 = 128
Using this information, the table instruction calculates dependent variable Y:
Y = 1669 + (128 (1679 – 1669)) / 256 = 1674

4.6.2 Table Example 2: Compressed Table

Y
CPU32
REFERENCE MANUAL
Entry
Number
Value
128*
32768
162
41472
163
41728
164
41984
165
42240
192*
49152
*These values are the end points of the range.
All entries between these points fall on the line.
16
256
512
INDEPENDENT VARIABLE
Figure 4-4 Table Example 2
INSTRUCTION SET
X
Y
Value
1311
1659
1669
1679
1690
1966
15
1 0
1
0
0
0
786
X
1
1
1
0 0
0
0
0
1024
MOTOROLA
0
0
0
4-189

Advertisement

Table of Contents
loading

Table of Contents