Multiply Top of Stack (MULS)
Multiply Top of Stack is a 16-bit instruction that multiplies a
230
4-digit BCD value in the first level of the accumulator stack
240
by a 4-digit BCD value in the accumulator. The result resides
250-1
in the accumulator. The value in the first level of the
accumulator stack is is removed and all stack values are moved
260
up one level.
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 value in V1400 will be loaded into the
accumulator using the Load instruction. The value in V1420 is loaded into the accumulator
DS
Used
using the Load instruction, pushing the value previously loaded in the accumulator onto the
HPP Used
accumulator stack. The BCD value in the first level of the accumulator stack is multiplied by
the BCD value in the accumulator using the Multiply Stack instruction. The value in the
accumulator is copied to V1500 and V1501 using the Out Double instruction.
DirectSOFT
X1
LD
V1400
LD
V1420
MULS
OUTD
V1500
Handheld Programmer Keystrokes
$
B
STR
1
L
D
SHFT
ANDST
3
L
D
SHFT
ANDST
3
M
U
L
SHFT
ORST
ISG
ANDST
GX
D
SHFT
OUT
3
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.
Load the value in V1400 into
the accumulator
Load the value in V1420 into
the accumulator
Multiply the value in
the accumulator with the
value in the first level
of the accumulator stack
Copy the value in the
accumulator to V1500
and V1501
ENT
B
E
A
A
1
4
0
0
B
E
C
A
1
4
2
0
S
ENT
RST
B
F
A
A
1
5
0
0
Chapter 5: Standard RLL Instructions - Math
Description
V1400
5
0
0
0
The unused accumulator
bits are set to zero
0
0
0
0
5
0
0
0
Acc.
V1420
0
2
0
0
The unused accumulator
bits are set to zero
0
0
0
0
0
2
0
0
Acc.
0
1
0
0
0
0
0
0
Acc.
0
1
0
0
0
0
0
0
V1501
V1500
ENT
ENT
ENT
DL205 User Manual, 4th Edition, Rev. B
MULS
Accumulator stack
after 1st L DD
Level 1
X
X
X
X X
X
X
X
Level 2
X
X
X
X X
X
X
X
Level 3
X
X
X
X X
X
X
X
Level 4
X
X
X
X X
X
X
X
Level 5
X
X
X
X X
X
X
X
Level 6
X
X
X
X X
X
X
X
Level 7
X
X
X
X X
X
X
X
Level 8
X
X
X
X X
X
X
X
Accumulator stack
after 2nd L DD
Level 1
0
0
0
0 5
0
0
0
X
X
X
X X
X
X
X
Level 2
Level 3
X
X
X
X X
X
X
X
X
X
X
X X
X
X
X
Level 4
Level 5
X
X
X
X X
X
X
X
X
X
X
X X
X
X
X
Level 6
Level 7
X
X
X
X X
X
X
X
X
X
X
X X
X
X
X
Level 8
5–115
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Need help?
Do you have a question about the DirectLOGIC DL205 Series and is the answer not in the manual?