B.1.9 new opcodes – Jameco Electronics Rabbit 3000 User Manual

Page 302

Advertising
background image

User’s Manual

293

B.1.9 New Opcodes

Eight new opcodes were added to the Rabbit 3000A. UMA and UMS allow multiply-and-
add and multiply-and-subtract operations on large integers, and were added to speed up
common cryptographic math used in public-key calculations. The remaining six expand
the block copy operations available, especially to and from I/O addresses (internal and
external). These opcodes are listed in Table B-18.

B.1.9.1 New UMA/UMS Opcodes

The new

UMA

and

UMS

opcodes perform the following operation:

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

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.

Table B-18. New Rabbit 3000 Opcodes

Instruction Bytes Clks A

I

S Z V C

Operation

UMA

2

8+8i

-

-

-

-

*

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

BC = BC-1; IX = IX+1; IY = IY+1; HL = HL+1;

repeat while BC !=0

UMS

2

8+8i

-

-

-

-

*

{CY:DE:(HL) = (IX) - [(IY) * DE + DE' + CY];

BC = BC-1; IX = IX+1; IY = IY+1; HL = HL+1;

repeat while BC !=0

LDDSR

2

6+7i

d

-

-

*

-

(DE) = (HL); BC = BC - 1; HL = HL - 1;
repeat while BC != 0

LDISR

2

6+7i

d

-

-

*

-

(DE) = (HL); BC = BC - 1; HL = HL + 1;
repeat while BC != 0

LSDR

2

6+7i

s

-

-

*

-

(DE) = (HL); BC = BC - 1; DE = DE - 1;
HL = HL - 1; repeat while BC != 0

LSIR

2

6+7i

s

-

-

*

-

(DE) = (HL); BC = BC - 1; DE = DE + 1;
HL = HL + 1; repeat while BC != 0

LSDDR

2

6+7i

s

-

-

*

-

(DE) = (HL); BC = BC - 1; DE = DE - 1;
repeat while BC != 0

LSIDR

2

6+7i

s

-

-

*

-

(DE) = (HL); BC = BC - 1; DE = DE + 1;
repeat while BC != 0

Advertising
This manual is related to the following products: