DL205 User Manual, 4th Edition, Rev. B
5–105
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 Binary (MULB)
The Multiply Binary instruction multiplies a 16-bit number
A(aaa) by the value stored in the accumulator. The number
in the accumulator can be up to 32 bits long. The source of
the 16-bit operand can be a constant or a data value located
in V-memory. Multiply Binary performs the multiplication operation on the full binary
representation of the operands, which distinguishes it from the Multiply instruction (see page
5-94), which treats the operands as BCD numbers. Although the multiplication operation is
performed on the underlying binary values, the native display format is hexadecimal. For that
reason you will need to load constants in hex.
The product of the Multiply Binary operation occupies the full 32-bit accumulator and
requires an Out Double to move the product to V-memory. If the value in the accumulator
occupies fewer than 32 bits, leading zeros are loaded in the left-most empty bit positions.
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 binary value in V1420 is multiplied by the
binary value in the accumulator using the Multiply Binary instruction. The value in the
accumulator is copied to V1500 - V1501 using the Out Double instruction.
ý
ý
þ
þ
230
240
2
5
0
-1
2
6
0
MULB
A aaa
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.
Handheld Programmer Keystrokes
LD
V1400
X1
MULB
V1420
The binary value in V1420 is
multiplied by the binary
value in the accumulator
OUTD
V1500
0
0
0
0
V1400
A 0 1
0 0 0
A 0 1
0 2 E
The unused accumulator
bits are set to zero
2 E
0 0 0 1
C
C
C
V1500
C 2 E
V1501
0 0 0 1
Acc.
STR
1
D
1
4
0
0
1
5
0
0
1
4
0
M
2
SHFT
B
SHFT
D
ENT
SHFT
L
ENT
U
L
ENT
ENT
Copy the value of the accumulator
to V1500 and V1501
Use either OR Constant
V-memory
LD
BIN
K2561
Load the value in V1400
into the lower 16 bits of
the accumulator
x
Direct
SOFT
(
Accumulator
)
A01
(
Hex
)
=
2561
(
decimal
)
(
V1420
)
2E
(
Hex
)
=
46
(
decimal
)
(
Accumulator
)
1CC2E
(
Hex
)
=
11
78
06
(
decimal
)
(
V1500 - V1501 value
=
11
78
06 decimal
)
OUT
Operand Data Type
DL250-1 Range
DL260 Range
A
aaa
aaa
V-memory V
All (See page 3 - 55)
All (See page 3 - 56)
Pointer P
All V mem (See page 3 - 55)
All V mem (See page 3 - 56)
Constant K
0-FFFF
0-FFFF
DS
Used
HPP Used