<< Previous | Next >>

MULU     Multiply Unsigned     Rabbit 4000/5000 Instruction

Opcode
Instruction
Operation
A7 MULU HL:BC = BC · DE (unsigned)

8-Bit Access
16-Bit Unaligned
16-Bit Aligned
Rabbit 4000
12
n/a
n/a
Rabbit 5000
12
12
12

Flags ALTD IOI/IOE
S
Z
L/V
C
F
R
SP
S
D
-
-
-
-

Description

An unsigned multiplication operation is performed on the 16-bit binary integers in the BC and DE registers. The unsigned 32-bit result is loaded in HL (bits 31 through 16) and BC (bits 15 through 0).

Examples:


LD BC, 0FFFFh    ;BC gets 65,535
LD DE, 0FFFFh    ;DE gets 65,535
MULU             ;HL|BC = 4,294,836,225 HL gets 0xFFFE, BC gets 0x0001

LD BC, 0FFFFh    ;BC gets 65,535
LD DE, 00001h    ;DE gets 1
MULU             ;HL|BC = 65,535, HL gets 0x0000, BC gets 0xFFFF

Rabbit Instructions << Previous | Next >> rabbit.com