EasyManua.ls Logo

Omron SYSMAC CV Series - Page 275

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...
263
Note With version-2 CVM1 CPUs, mathematics instructions can use symbols. The
instructions corresponding to SUB(081) and SUBL(085) are –C(412) and –
CL(413). In addition, Overflow (A50009) and Underflow (A50010) Flags are
added.
Refer to page 115 for general precautions on operand data areas.
Flags ER (A50003): Content of *DM word is not BCD when set for BCD.
CY (A50004): The result is negative, i.e., when Mi is less than Su plus CY.
EQ (A50006): The result is 0.
N (A50008): Shows the status of bit 15 of R.
Example The following example demonstrates the use of SBB(081) in an 8-digit subtrac-
tion. In actual practice, 8-digit binary numbers can be subtracted more quickly
and easily using the DOUBLE BINARY SUBTRACT: SBBL(085) instruction
instead of a combination of SBB(081) instructions.
CY is tested following the first two subtractions to see if the result is negative. If it
is, the first result (the complement) is subtracted from zero to obtain the true re-
sult, and either 0000 or 0001 is placed in CIO 0102 (0001 indicates a negative
result).
(079)
CLC
(081)
SBB 0010 D00100 1210
(081)
SBB 0011 D00101 1211
(079)
CLC
(081)
SBB #0000 1210 1210
(081)
SBB #0000 1211 1211
(030)
MOV #0000 1212
0000
00
A500
04
A500
04
TR 0
00000 LD 000000
00001 OUT TR0
00002 CLC(079)
00003 SBB(081)
0010
D00100
1210
00004 SBB(081)
0011
D00101
1211
00005 AND A50004
00006 CLC(079)
00007 SBB(081)
#0000
1210
1210
00008 SBB(081)
#0000
1211
1211
00009 LD TR0
00010 AND NOT A50004
00011 MOV(30)
#0000
1212
00012 LD TR0
00013 AND A50004
00014 MOV(30)
#0001
1212
Address Instruction Operands
(030)
MOV #0001 1212
A500
04
Precautions
Binary Calculation Instructions Section 5-19

Table of Contents

Related product manuals