Automationdirect.com DirectLOGIC DL205 Series User Manual page 312

Table of Contents

Advertisement

Multiply Double (MULD)
Multiply Double is a 32-bit instruction that multiplies the 8-
230
digit BCD value in the accumulator by the 8-digit BCD value
240
in the two consecutive V-memory locations specified in the
250-1
instruction. The lower 8 digits of the results reside in the
accumulator. Upper digits of the result reside in the
260
accumulator stack.
Operand Data Type
V-memory
Pointer
Discrete Bit Flags
SP63
SP70
SP75
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on, the constant Kbc614e hex will be loaded into the
accumulator. When converted to BCD the number is "12345678". That number is stored in
V1400 and V1401. After loading the constant K2 into the accumulator, we multiply it times
12345678, which is 24691356.
DS
Used
DirectSOFT
HPP Used
Handheld Programmer Keystrokes
$
STR
SHFT
SHFT
GX
OUT
SHFT
SHFT
GX
OUT
DL250-1 Range
A
V
All V-mem (See page 3 - 55)
P
All V-mem (See page 3 - 55)
On when the result of the instruction causes the value in the accumulator to be zero.
On anytime the value in the accumulator is negative.
On when a BCD instruction is executed and a NON-BCD number was encountered.
X1
Load the hex equivalent
LDD
of 12345678 decimal into
Kbc614e
the accumulator.
Convert the value to
BCD
BCD format. It will
occupy eight BCD digits
(32 bits).
Output the number to
OUTD
V1400 and V1401 using
V1400
the OUTD instruction.
Load the constant K2
LD
into the accumulator.
K2
Multiply the accumulator
MULD
contents (2) by the
V1400
8-digit number in V1400
and V1401.
Move the result in the
OUTD
accumulator to V1402
V1402
and V1403 using the
OUTD instruction.
B
ENT
1
L
D
D
PREV
ANDST
3
3
B
C
D
ENT
1
2
3
D
B
E
SHFT
3
1
4
L
D
C
PREV
ANDST
3
2
M
U
L
D
ORST
ISG
ANDST
3
D
B
E
SHFT
3
1
4
Chapter 5: Standard RLL Instructions - Math
aaa
All V-mem (See page 3 - 56)
All V-mem (See page 3 - 56)
Description
1
2
3
4
5
V1401
1
2
3
4
5
X
Acc.
2
4
6
9
1
2
4
6
9
1
V1403
B
C
G
B
SHFT
SHFT
1
2
6
A
A
ENT
0
0
ENT
B
E
A
A
ENT
1
4
0
0
A
C
ENT
0
2
DL205 User Manual, 4th Edition, Rev. B
MULD
A aaa
DL260 Range
aaa
(Accumulator)
6
7
8
V1400
6
7
8
2
(Accumulator)
3
5
6
3
5
6
V1402
E
E
SHFT
ENT
1
4
4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
5–95

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DirectLOGIC DL205 Series and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents

Save PDF