<< Previous | Next >>

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

> Opcode | Instruction | Clocks | Operation
> ED C0 | UMA | 8+8i (2,2,2, (2,2,3,1)i,2) | {CF:DE':(HL)} = (IX) + [(IY)* DE + DE' + CF] BC = BC - 1; IX = IX + 1 IY = IY + 1; HL = HL + 1 repeat while BC != 0

> 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.

<< Previous | Next >>