6 BASIC INSTRUCTIONS
6.2 Arithmetic Operation Instructions
277
6
• These instructions divide the BCD 4-digit data in the device specified by (s1) by the BCD 4-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 32 bits.
(d): Quotient
(d)+1: Remainder
• Quotient (BCD 4 digits)Stored in lower 16 bits.
• Remainder (BCD 4 digits)Stored in upper 16 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 9999.
The BCD data in the device specified by (s2) is out of the range, 0 to 9999.
(s1) (s2)
5 6 78 08 76 0
÷
(d)+1
0 06
(d)
0 4 22
Filled with 0.