![background image](http://html1.mh-extra.com/html/omron/srm1-programing-02-2001/srm1-programing-02-2001_programming-manual_742414480.webp)
7-21
Section
BCD Calculation Instructions
462
When the execution condition is OFF, DIV(33) is not executed and the program
moves to the next instruction. When the execution condition is ON, Dd is divided
by Dr and the result is placed in R and R + 1: the quotient in R and the remainder
in R + 1.
R+1
R
Dd
Dr
Quotient
Remainder
Flags
ER:
Dd or Dr is not in BCD.
Indirectly addressed DM word is non-existent. (Content of
*
DM word is
not BCD, or the DM area boundary has been exceeded.)
EQ:
ON when the result is 0.
When IR 00000 is ON with the following program, the content of IR 216 is divided
by the content of HR 09 and the result is placed in DM 0017 and DM 0018. Exam-
ple data and calculations are shown below the program.
DIV(33)
216
HR 09
DM 0017
00000
R: DM 0017
R + 1: DM 0018
1
1
5
0
0
0
0
2
Dd: IR 216
3
4
5
2
Quotient
Remainder
Dd: HR 09
0
0
0
3
Address
Instruction
Operands
00000
LD
00000
00001
DIV(33)
216
HR
09
DM
0017
7-21-7
DOUBLE BCD ADD – ADDL(54)
Au
: First augend word (BCD)
IR, SR, AR, DM, HR, TC, LR
Ad
: First addend word (BCD)
IR, SR, AR, DM, HR, TC, LR
Ladder Symbols
Operand Data Areas
R
: First result word
IR, SR, AR, DM, HR, LR
ADDL(54)
Au
Ad
R
@ADDL(54)
Au
Ad
R
DM 6144 to DM 6655 cannot be used for R.
Description
Example
Limitations