DL205 User Manual, 4th Edition, Rev. B
5–115
Chapter 5: Standard RLL Instructions - Math
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Multiply Top of Stack (MULS)
Multiply Top of Stack is a 16-bit instruction that multiplies a
4-digit BCD value in the first level of the accumulator stack
by a 4-digit BCD value in the accumulator. The result resides
in the accumulator. The value in the first level of the
accumulator stack is is removed and all stack values are moved
up one level.
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
using the Load instruction, pushing the value previously loaded in the accumulator onto the
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.
ý
ý
ý
þ
230
240
2
5
0
-1
2
6
0
M
U
L
S
LD
V1400
X1
Load the value in V1400 into
the accumulator
LD
V1420
Load the value in V1420 into
the accumulator
OUTD
V1500
Copy the value in the
accumulator to V1500
and V1501
X X X X X X X X
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
0 0 0 0 5 0 0 0
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
MULS
Multiply the value in
the accumulator with the
value in the first level
of the accumulator stack
Acc.
V1400
5 0 0 0
0 0 0 0
5 0 0 0
Acc.
V1420
0 2 0 0
0 0 0 0
0 2 0 0
Accumulator stack
after 1st LDD
Accumulator stack
after 2nd LDD
Acc. 0 1 0 0
0 0 0 0
0 1 0 0
0 0 0 0
V1500
V1501
The unused accumulator
bits are set to zero
The unused accumulator
bits are set to zero
Handheld Programmer Keystrokes
SHFT
ANDST
L
3
D
STR
$
SHFT
ORST
M
ISG
U
ANDST
L
OUT
GX
SHFT
3
D
1
B
5
F
0
A
0
A
ENT
1
B
ENT
1
B
4
E
0
A
0
A
ENT
ENT
SHFT
ANDST
L
3
D
1
B
4
E
2
C
0
A
RST
S
ENT
Direct
SOFT
Discrete Bit Flags
Description
SP63
On when the result of the instruction causes the value in the accumulator to be zero.
SP70
On anytime the value in the accumulator is negative.
SP75
On when a BCD instruction is executed and a NON-BCD number was encountered.
DS
Used
HPP Used