Motorola MC68340 User Manual page 172

Integrated processor with dma
Hide thumbs Also See for MC68340:
Table of Contents

Advertisement

First, the results of each TBL are rounded with the TBLS round-to-nearest-even algorithm.
The following values would be returned by TBLS:
Summing, the following result is obtained:
Now, using the same TBL results, the sum is first calculated and then rounded according
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 intermediate
results:
L0:
TBLSN.B
ea Dx
TBLSN.B
ea Dx
TBLSN.B
ea Dl
ADD.L
Dx, Dm
ADD.L
Dm, Dl
ASR.L
#8, Dl
BCC.B
L1
ADDQ.B
#1, Dl
L1: . . .
MOTOROLA
Freescale Semiconductor, Inc.
TBL # 1
TBL # 2
TBL # 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 .
Long addition avoids problems with carry
Move radix point
Fraction MSB in carry
MC68340 USER'S MANUAL
For More Information On This Product,
Go to: www.freescale.com
0010 0000 .
0011 1111 .
0000 0001 .
5- 35

Advertisement

Table of Contents
loading

Table of Contents