Motorola CPU32 Reference Manual page 253

M68300 series central processor unit
Hide thumbs Also See for CPU32:
Table of Contents

Advertisement

III
x
x
y
(Subroutine) (Instruction)
0
0
0
1
256
16
2
512
32
3
768
48
4
1024
64
5
1280
80
6
1536
96
7
1792
112
8
2048
128
9
2304
112
10
2560
96
11
2816
80
12
3072
64
13
3328
48
14
3584
32
15
3840
16
16
4096
0
The first column is the value passed to the subroutine, the second column is the
value expected by the table instruction, and the third column is the result
returned by the subroutine.
The following value has been calculated for independent variable X:
31
16
15
0
NOT USED
0 0 0 0 0 0 0 0 1 0 1 1 1 1 0 1
Since X is an 8-bit value, the upper four bits are used as a table offset and the
lower four bits are used as an interpolation fraction. The following results are
obtained from the subroutine:
Table Entry Offset
~
Dx [4:7]
=
$8
=
11
Interpolation Fraction
~
Dx [0:3]
=
$D
=
13
Thus, Y is calculated as follows:
MOTOROLA
4-200
Y
=
80
+
(13 (64 - 80)) / 16
=
67
INSTRUCTION SET
CPU32 REFERENCE MANUAL

Advertisement

Table of Contents
loading

Table of Contents