EasyManua.ls Logo

Omron SYSMAC CV Series - Double Bcd Subtract: Subl(075)

Omron SYSMAC CV Series
636 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
256
The carry from the second addition is placed in D02003 by using another
ADD(070) with two all-zero constants.
(074)
ADDL 0020 D00010 D02000
(079)
CLC
00000
03
(070)
ADD 0022 D00012 D02002
(070)
ADD #0000 #0000 D02003
00000 LD 000003
00001 CLC(079)
00002 ADDL(074)
0020
D00010
D02000
00003 ADD(070)
0022
D00012
D02002
00004 ADD(070)
#0000
#0000
D02003
Address Instruction Operands
5-18-8 DOUBLE BCD SUBTRACT: SUBL(075)
Variations
j SUBL(075)
(075)
SUBL Mi Su R
Operand Data AreasLadder Symbol
Mi: 1
st
minuend word CIO, G, A, T, C, #, DM
R: 1
st
result word CIO, G, A, DM
Su: 1
st
subtrahend wordCIO, G, A, T, C, #, DM
When the execution condition is OFF, SUBL(075) is not executed. When the
execution condition is ON, SUBL(075) subtracts CY and the 8-digit content of Su
and Su+1 from the 8-digit value in Mi and Mi+1, and places the result in R and
R+1. If the result is negative, CY is set and the 10’s complement of the actual
result is placed in R. To convert the 10’s complement to the true result, subtract
the content of R from zero.
Mi + 1 Mi
Su + 1 Su
R + 1 R
CY
CY
Note With version-2 CVM1 CPUs, mathematics instructions can use symbols. The
instructions corresponding to SUB(071) and SUBL(075) are –BC(416) and –
BCL(417).
Mi and Su must be BCD.
Constants are input using eight digits.
Note Refer to page 115 for general precautions on operand data areas.
Flags ER (A50003): Content of Mi, Mi+1,Su or Su+1 is not BCD.
Content of *DM word is not BCD when set for BCD.
CY (A50004): There is a carry in the result.
EQ (A50006): The result is 0.
Description
Precautions
BCD Calculation Instructions Section 5-18

Table of Contents

Related product manuals