Instruction Reference Manual
119
Description
Rotates to the left the data whose address is:
•
the data in HL, or
•
the sum of the data in IX and a displacement d, or
•
the sum of the data in IY and a displacement d.
Each bit in the register moves to the next highest-order bit position (bit 0 moves to bit 1, etc.) while bit 7
moves to both bit 0 and the C flag. See figure below.
Figure 3: The bit logic of the RLC instruction.
Example
If HL contains 0x4545, the byte in the memory location 0x4545 is 0110 1010, and the C flag is set, then after
the execution of the operation:
RLC (HL)
the byte in memory location 0x4545 will contain 1101 0100 and the C flag will be reset.
RLC (HL)
RLC (IX+
d
)
RLC (IY+
d
)
Opcode
Instruction
Clk
Operation
CB 06
RLC (HL)
10*
(HL) = {(HL)[6,0],(HL)[7]};
CF = (HL)[7]
DD CB
d
06
RLC (IX+
d
)
13**
(IX +
d
) = {(IX +
d
)[6,0],(IX +
d
)[7]};
CF = (IX+
d
)[7]
FD CB
d
06
RLC (IY+
d
)
13**
(IY +
d
) = {(IY +
d
)[6,0],(IY +
d
)[7]};
CF = (IY +
d
)[7]
Clk: Clocking: *10 (2,2,1,2,3)
**13 (2,2,2,2,2,3)
Flags
ALTD
I/O
S
Z
L/V
C
F
R
SP
S
D
•
•
L
•
•
•
•
7
0
CF
Summary of Contents for 2000
Page 2: ...ii Rabbit 2000 3000 Microprocessor...
Page 4: ...iv Rabbit 2000 Microprocessor...
Page 16: ...12 Rabbit 2000 3000 Microprocessor...
Page 164: ...160 Instruction Reference Manual...