469
Special Math Instructions Section 3-13
Floating-point Division of Two BCD Numbers
In this example, the 4-digit BCD number in D0 is divided by the 4-digit BCD
number in D1 and the floating-point result is written to D2 and D3.
To perform the floating point division, the BCD value in D0 is converted to
floating-point format in D2001 and D2000 and the BCD value in D1 is con-
verted to floating-point format in D2003 and D2002.
1
2
3
4
@MOV
@MOV
@MOV
@MOV
@MOVD
@MOVD
@MOVD
@MOVD
@FDIV
0.00
#0
D2000
#0
D2002
D2001
D2003
#21
D2001
D0
#300
D1
#21
D2003
#300
D2002
D2000
D2002
D2
D0
D1
D2000