Double Bcd Add - Addl(54) - Omron CPM1 Programming Manual

Hide thumbs Also See for CPM1:
Table of Contents

Advertisement

BCD Calculation Instructions
Description
Flags
Example
00000
Dd: HR 09
0
0
0
5-20-7 DOUBLE BCD ADD – ADDL(54)
Limitations
290
When the execution condition is OFF, DIV(33) is not executed and the pro-
gram 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.
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. Example data and calculations are shown below the program.
Quotient
Remainder
R: DM 0017
1
1
5
0
Dd: IR 216
3
4
5
2
3
Ladder Symbols
ADDL(54)
Au
Ad
R
DM 6143 to DM 6655 cannot be used for R.
Remainder
R+1
Dr
Address Instruction
DIV(33)
216
HR 09
DM 0017
R + 1: DM 0018
0
0
0
2
@ADDL(54)
Au
Ad
R
Section 5-20
Quotient
R
Dd
Operands
00000
LD
00001
DIV(33)
HR
DM
Operand Data Areas
Au: First augend word (BCD)
IR, SR, AR, DM, HR, TC, LR
Ad: First addend word (BCD)
IR, SR, AR, DM, HR, TC, LR
R: First result word
IR, SR, AR, DM, HR, LR
00000
216
09
0017

Advertisement

Table of Contents
loading

Table of Contents