
CPU32+
MC68360 USER’S MANUAL
the result is 0, the condition is false. For example, the T condition is always true, and the EQ
condition is true only if the Z-bit condition code is true.
Table 5-12 lists each condition test.
5.3.4 Using the TBL Instructions
There are four TBL instructions. TBLS returns a signed, rounded byte, word, or long-word
result. TBLSN returns a signed, unrounded byte, word, or long-word result. TBLU returns an
unsigned, rounded byte, word, or long-word result. TBLUN returns an unsigned, unrounded
byte, word, or long-word result. All four instructions support two types of interpolation data:
an n-element table stored in memory and a two-element range stored in a pair of data reg-
isters. The latter form provides a means of performing surface (3D) interpolation between
two previously calculated linear interpolations.
The following examples show how to compress tables and use fewer interpolation levels
between table entries. Example 1 (see
Figure 5-7) demonstrates TBL for a 257-entry table,
allowing up to 256 interpolation levels between entries. Example 2 (see
Figure 5-8) reduces
table length for the same data to four entries. Example 3 (see
Figure 5-9) demonstrates use
of an 8-bit independent variable with an instruction.
Two additional examples show how TBLSN can reduce cumulative error when multiple table
lookup and interpolation operations are used in a calculation. Example 4 demonstrates addi-
tion of the results of three table interpolations. Example 5 illustrates use of TBLSN in surface
interpolation.
Table 5-12. Condition Tests
Mnemonic
Condition
Encoding
Test
T
True
0000
1
F*
False
0001
0
HI
High
0010
C
Z
LS
Low or Same
0011
C + Z
CC
Carry Clear
0100
C
CS
Carry Set
0101
C
NE
Not Equal
0110
Z
EQ
Equal
0111
Z
VC
Overflow Clear
1000
V
VS
Overflow Set
1001
V
PL
Plus
1010
N
MI
Minus
1011
N
GE
Greater or Equal
1100
N
V + N V
LT
Less Than
1101
N
V + N V
GT
Greater Than
1110
N
V Z + N V Z
LE
Less or Equal
1111
Z + N
V + N V
* Not available for the Bcc instruction.
=Boolean AND
+=Boolean OR
N=Boolean NOT
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
..
.