Motorola CPU32 Reference Manual page 204

Hide thumbs Also See for CPU32:
Table of Contents

Advertisement

TBLS
TBLSN
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 TBLS. The assumed radix point described pre-
viously 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 calcu-
lated as a fractional number in the range 0 ≤ X ≤ 255. On the contrary, X
should be considered 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
TBLS/TBLSN 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.
V
Set if the integer portion of an unrounded long result is not in the range, – (2
≤ Result ≤ (2
C
Always cleared.
Instruction Format:
Table lookup and interpolate:
15
14
13
1
1
1
0
REGISTER Dx
MOTOROLA
4-156
Table Lookup and Interpolate (Signed)
V
C
*
0
23
) – 1. Cleared otherwise.
12
11
10
9
1
1
0
0
1
R
0
INSTRUCTION SET
8
7
6
5
0
0
0
1
SIZE
0
TBLS
TBLSN
4
3
2
1
EFFECTIVE ADDRESS
MODE
REGISTER
0
0
0
0
REFERENCE MANUAL
23
)
0
0
CPU32

Advertisement

Table of Contents
loading

Table of Contents