<< Previous | Next >>

LDDR
LDIR
    Byte Copy
    Rabbit 2000/3000/4000/5000 Instruction

Opcode
Instruction
Operation
ED B8 LDDR    (DE) = (HL)
   BC = BC - 1
   DE = DE - 1
   HL = HL - 1
repeat while { BC != 0 }
ED B0 LDIR    (DE) = (HL)
   BC = BC - 1
   DE = DE + 1
   HL = HL + 1
repeat while { BC != 0 }

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

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

Description

If either of these instructions is prefixed by IOI or IOE, the destination will be in the specified I/O space. If the prefix is IOI, add 1 clock for each iteration. If the prefix is IOE, add 2 clocks plus the number of I/O wait states enabled.

The V flag is cleared when BC transitions from 1 to 0, which ends the block copy.

Interrupts can occur between different repeats (after the registers have been updated), but not within an iteration. Return from the interrupt is to the first byte of the instruction, which is the I/O prefix byte if there is one.


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