![Omron CVM1D Operation Manual Download Page 256](http://html1.mh-extra.com/html/omron/cvm1d/cvm1d_operation-manual_742532256.webp)
251
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
Binary Calculation Instructions
Section 5-19
Summary of Contents for CVM1D
Page 462: ...SYSMAC CVM1D Duplex System Programmable Controllers Operation Manual Revised August 2001...
Page 463: ...iv...
Page 465: ...vi...