User’s Manual
35
3.3.4 Register-to-Register Move
Any of the 8-bit registers, A, B, C, D, E, H, and L, can be moved to any other 8-bit regis-
ter, for example:
LD A,c
LD d,b
LD e,l
The alternate 8-bit registers can be a destination, for example:
LD a’,c
LD d’,b
These instructions are unique to the Rabbit and require 2 bytes and four clocks because of
the required prefix byte. Instructions such as
LD A,d’
or
LD d’,e’
are not allowed.
Several 16-bit register-to-register move instructions are available. Except as noted, these
instructions all require 2 bytes and four clocks. The instructions are listed below.
LD dd’,BC ; where dd’ is any of HL’, DE’, BC’ (2 bytes, 4 clocks)
LD dd’,DE
LD IX,HL
LD IY,HL
LD HL,IY
LD HL,IX
LD SP,HL ; 1-byte, 2 clocks
LD SP,IX
LD SP,IY
Other 16-bit register moves can be constructed by using 2-byte moves.
3.3.5 Register Exchanges
Exchange instructions are very powerful because two (or more) moves are accomplished
with one instruction. The following register exchange instructions are implemented.
EX af,af’ ; exchange af with af’
EXX ; exchange HL, DE, BC with HL’, DE’, BC’
EX DE,HL ; exchange DE and HL
The following instructions are unique to the Rabbit.
EX DE’,HL ; 1 byte, 2 clocks
EX DE, HL’ ; 2 bytes, 4 clocks
EX DE’, HL’ ; 2 bytes, 4 clocks
The following special instructions (Rabbit and Z180/Z80) exchange the 16-bit word on
the top of the stack with the HL register. These three instructions are each 2 bytes and 15
clocks.
EX (SP),HL
EX (SP),IX
EX (SP),IY
Summary of Contents for Rabbit 2000
Page 2: ...Rabbit 3000 Microprocessor User s Manual 019 0108 040731 O ...
Page 9: ...Rabbit 3000 Microprocessor ...
Page 29: ...20 Rabbit 3000 Microprocessor ...
Page 64: ...User s Manual 55 5 PIN ASSIGNMENTS AND FUNCTIONS ...
Page 79: ...70 Rabbit 3000 Microprocessor ...
Page 80: ...User s Manual 71 6 RABBIT INTERNAL I O REGISTERS ...
Page 123: ...114 Rabbit 3000 Microprocessor ...
Page 137: ...128 Rabbit 3000 Microprocessor ...
Page 157: ...148 Rabbit 3000 Microprocessor ...
Page 207: ...198 Rabbit 3000 Microprocessor ...
Page 249: ...240 Rabbit 3000 Microprocessor ...
Page 255: ...246 Rabbit 3000 Microprocessor ...
Page 277: ...268 Rabbit 3000 Microprocessor ...
Page 343: ...334 Rabbit 3000 Microprocessor ...
Page 345: ......