<< Previous | Next >>

UMA     Unsigned Multiplication and Addition     Rabbit 3000A/4000/5000 Instruction

Opcode
Instruction
Operation
ED C0 UMA   {CF:DE':(HL)} =
  (IX) + [(IY)* DE + DE' + CF]
  BC = BC - 1; IX = IX + 1
  IY = IY + 1; HL = HL + 1
repeat while BC != 0

8-Bit Access
16-Bit Unaligned
16-Bit Aligned
Rabbit 3000A/4000
8+8i
n/a
n/a
Rabbit 5000
8+8i
8+8i
6+8i

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

Description

Performs the following operation:


{CF:DE':(HL)} = (IX) + [(IY) * DE + DE' + CF];

where HL, IX, and IY increment after each byte, repeated BC times. This fundamental operation allows the addition or subtraction of two arbitrarily-long unsigned integers after one is scaled by a single-byte value. This operation is common in many cryptographic operations.

The above operation results in a 24-bit value. The lowest 8 bits of this value are stored in memory at the address in HL, and the upper 16 bits are stored in the alternate register DE'.

Interrupts can occur between different repeats, but not within an iteration.


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