Motorola CPU32 Reference Manual page 241

Hide thumbs Also See for CPU32:
Table of Contents

Advertisement

First, the results of each TLI are rounded with the TBLS round-to-nearest-even algo-
rithm. The following values would be returned by TBLS:
Summing, the following result is obtained:
Now, using the same TLI results, the sum is first calculated and then rounded accord-
ing to the same algorithm:
Rounding yields:
The second result is preferred. The following code sequence illustrates how addition
of a series of table interpolations can be performed without loss of precision in the in-
termediate results:
L0:
TBLSN.B
TBLSN.B
TBLSN.B
ADD.L
ADD.L
ASR.L#8,
BCC.B
ADDQ.B
L1: . . .
CPU32
REFERENCE MANUAL
TLI # 1
TLI # 2
TLI # 3
TLI # 1
TLI # 2
TLI # 3
0010 0000 .
0011 1111 .
0000 0001 .
0110 0000 .
0010 0000 . 0111 0000
0011 1111 . 0111 0000
0000 0001 . 0111 0000
0110 0001 . 0101 0000
0110 0001 .
〈ea〉, Dx
〈ea〉, Dx
〈ea〉, Dl
Dx, Dm
Long addition avoids problems with carry
Dm, Dl
Dl
Move radix point
L1
Fraction MSB in carry
#1, Dl
INSTRUCTION SET
0010 0000 . 0111 0000
0011 1111 . 0111 0000
0000 0001 . 0111 0000
0010 0000 .
0011 1111 .
0000 0001 .
MOTOROLA
4-193

Advertisement

Table of Contents
loading

Table of Contents