<< Previous | Next >>

> MULU Multiply Unsigned Rabbit 4000 Instruction

> Opcode | Instruction | Clocks | Operation
> A7 | MULU | 12 (2,10) | HL:BC = BC · DE (unsigned)

> 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

<< Previous | Next >>