EasyManua.ls Logo

Omron SYSMAC CV Series - Double Bcd Multiply: Mull(076)

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...
257
The following example works much like that for single-word subtraction. In this
example, however, the 8-digit number in CIO 0121 and CIO 0120 is subtracted
from the 8-digit number in CIO 0201 and CIO 0200 when CIO 000003 is ON, and
the result is output to D00101 and D00100. If the result is negative, the comple-
ment is then subtracted from 0 to yield the actual number and CIO bit 002100 (a
self-holding bit) is turned ON to indicate the negative result.
00000 LD 000003
00001 OUT TR0
00002 CLC(079)
00003 SUBL(075)
1220
1200
D00100
00004 AND A50004
00005 BSET(041)
#0000
D00000
D00001
00006 CLC(079)
00007 SUBL(075)
D00000
D00100
D00100
00008 LD TR0
00009 AND A50004
00010 OR 122100
00011 OUT 122100
First
subtraction
Second
subtraction
Turned ON to
indicate nega-
tive result.
Address Instruction Operands
(079)
CLC
(075)
SUBL 1220 1200 D00100
(041)
BSET #0000 D00000 D00001
(079)
CLC
(075)
SUBL D00000 D00100 D00100
0000
03
A500
04
A500
04
1221
00
1221
00
TR0
5-18-9 DOUBLE BCD MULTIPLY: MULL(076)
Variations
j MULL(076)
(076)
MULL Md Mr R
Operand Data AreasLadder Symbol
Md: 1
st
multiplicand wd CIO, G, A, T, C, #, DM
R: 1
st
result word CIO, G, A, DM
Mr: 1
st
multiplier word CIO, G, A, T, C, #, DM
When the execution condition is OFF, MULL(076) is not executed. When the
execution condition is ON, MULL(076) multiplies the 8-digit content of Md and
Md+1 by the content of Mr and Mr+1, and places the result in R to R+3.
Md + 1 Md
Mr + 1 Mr
R + 1 RR + 3 R + 2
x
Note With version-2 CVM1 CPUs, mathematics instructions can use symbols. The
instructions corresponding to MUL(072) and MULL(076) are
*
B(424) and
*
BL(425).
Md, Md+1, Mr, and Mr+1 must be BCD.
Example
Description
Precautions
BCD Calculation Instructions Section 5-18

Table of Contents

Related product manuals