Motorola CPU32 Reference Manual page 218

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

Advertisement

TBlU
TBlUN
Table Lookup and Interpolate (Unsigned)
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 reduce cumulative errors in lengthy
calculations or implement rounding algorithms different from those provided by other forms of
TBLU. The assumed radix point described 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 table 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
o
~
X
~
255. On the contrary, X should be considered to be an integer in the range
o
~
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
theTBLU/TBLUN instruction.
Condition Codes:
x
N
Z
v
C
o
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.
V Set if the integer portion of an unrounded long result is not in the range,
o
~
Result
~
(224) -1. Cleared otherwise.
C Always cleared.
Instruction Format:
Table Lookup and Interpolate:
15
14
13
12
11
10
9
8
7
6
5
4
3
2
o
EFFECTIVE ADDRESS
1
1
1
1
1
0
0
0
0
0
REGISTERDx
0
R
0
1
SIZE
CPU32 REFERENCE MANUAL
INSTRUCTION SET
0
MODE
0 1 01
0
REGISTER
o
1
o
1 0
MOTOROLA
4-165
III

Advertisement

Table of Contents
loading

Table of Contents