6 BASIC INSTRUCTIONS
6.2 Arithmetic Operation Instructions
281
6
• These instructions divide the BCD 8-digit data in the device specified by (s1) by the BCD 8-digit data in the device specified
by (s2), and store the operation result in the device specified by (d).
• As the operation result, the quotient and remainder are stored in 64 bits.
• When (d) is a bit device, the remainder is not stored.
(d)+1, (d)+3: Upper 4 digits
(d), (d)+2: Lower 4 digits
• Quotient (BCD 8 digits)Stored in lower 32 bits.
• Remainder (BCD 8 digits)Stored in upper 32 bits.
Error code
(SD0)
Description
3400H The value (divisor) in the device specified by (s2) is 0.
3405H The BCD data in the device specified by (s1) is out of the range, 0 to 99999999.
The BCD data in the device specified by (s2) is out of the range, 0 to 99999999.
(s1)+1
5 6 78
(s1)
9 1 2
(s2)+1
10 23
(s2)
4 5 673
÷
0 1 23 3 6 08
(d)+1
0 0 00
(d)
0 0 45
(d)+3 (d)+2
RemainderQuotient
Filled with 0.