Motorola CPU32 Reference Manual page 208

Hide thumbs Also See for CPU32:
Table of Contents

Advertisement

TBLU
TBLUN
For all sizes, the 8-bit fractional portion of the result is returned in the low byte of
the data register, Dx (7:0). User software can make use of the fractional data to re-
duce cumulative errors in lengthy calculations or implement rounding algorithms
different from those provided by other forms of TBLU. The assumed radix point de-
scribed previously places two restrictions on the programmer:
1. Tables are limited to 257 entries in length.
2. Interpolation resolution is limited to 1/256 the distance between consecutive ta-
ble entries.The assumed radix point should not, however, be construed by the
programmer as a requirement that the independent variable be calculated as a
fractional number in the range 0 ≤ X ≤ 255. On the contrary, X should be con-
sidered to be an integer in the range 0 ≤ X ≤ 65535, realizing that the table is
actually a compressed linear representation of a function in which only every
256th value is actually stored in memory.
See 4.6 Table Lookup and Interpolation Instructions for more information on the
TBLU/TBLUN instruction.
Condition Codes:
X
N
Z
*
*
X
Not affected.
N
Set if the most significant bit of the result is set. Cleared otherwise.
Z
Set if the result is zero. Cleared otherwise.
Set if the integer portion of an unrounded long result is not in the range,0 ≤
V
Result ≤ (2
C
Always cleared.
Instruction Format:
Table Lookup and Interpolate:
15
14
13
1
1
1
0
REGISTER Dx
MOTOROLA
4-160
Table Lookup and Interpolate (Unsigned)
V
C
*
0
24
) – 1. Cleared otherwise.
12
11
10
9
1
1
0
0
0
R
0
INSTRUCTION SET
8
7
6
5
0
0
0
1
SIZE
0
TBLU
TBLUN
4
3
2
1
EFFECTIVE ADDRESS
MODE
REGISTER
0
0
0
0
REFERENCE MANUAL
0
0
CPU32

Advertisement

Table of Contents
loading

Table of Contents