High−level Instructions
3 − 118
Explanation of example
Contents of
DT11
Contents of
DT20
Contents of
DT21
Higher 16 bits Lower 16 bits
Contents of DT10
← Quotient is stored in DT31 and DT30.
÷
(Division)
To DT31 To DT30
← The lower 16 bits of the remainder is stored in DT9015/DT90015 and
the higher 16 bits of the remainder is stored in DT9016/DT90016.
To DT9016/
DT90016
To DT9015/
DT90015
Description
The 8-digit BCD equivalent constant or the 8-digit BCD data specified by S1 is divided by the 8-digit BCD
equivalent constant or the 8-digit BCD data specified by S2. The quotient is stored in the areas specified by
D+1 and D, and the remainder is stored in special data registers DT9016 and DT9015 (DT90016 and
DT90015 for FP0 T32/FP0R/FPΣ/FP−X/FP2/FP2SH/FP10SH).
Dividend data
Quotient
S1: lower 4-digit
S1+1: higher 4-digit
D: lower 4-digit
D+1: higher 4-digit
÷
S2: lower 4-digit
S2+1: higher 4-digit
Divisor
Remainder
DT9015/DT90015
DT9016/DT90016
....
When processing 8-digit BCD data, the higher 16-bit areas (S1+1, S2+1, D+1) are automatically determined
once the lower 16-bit areas (S1, S2, D) are specified.
With the FP0 T32/FP0R/FPΣ/FP−X/FP2/FP2SH/FP10SH and FP0 C10, C14, C16, C32/FP−e, the numbers
of the special data registers are different.
Type
Special data register
FP0 C10, C14, C16, C32/FP−e DT9015
FP0T32/FP0R/FPΣ/FP−X/FP2/FP2SH/FP10SH DT90015
Flag conditions
・Error flag (R9007): Turns on and stays on when:
・Error flag (R9008): Turns on for an instant when:
− The area specified using the index modifier exceeds the limit.
− The data is not BCD data.
− The 8-digit BCD equivalent constant or the 8-digit BCD data for the divisor
(specified by S2) is 0.
・= flag (R900B): Turns on for an instant when the calculated result (quotient) is recognized as
“0”.