Z-80 Instructions: Part G.


ROTATE AND SHIFT GROUP

Mnemonic
Symbolic
Operation
Flags OP-Code No. of
Bytes
No. of
M Cycles
No. of
T Cycles

Comments
C Z P/V S N H 76 543 210
RLCA 0 0 00 000 111 1 1 4 Rotate left circular
accumulator
RLA 0 0 00 010 111 1 1 4 Rotate left
accumulator
RRCA 0 0 00 001 111 1 1 4 Rotate right circular
accumulator
RRA 0 0 00 011 111 1 1 4 Rotate right
accumulator
RLC r  
 
 
 
 

          r,(HL),(IX+d),(IY+d)
P 0 0 11 001 011
00 000   r  
2 2 8 Rotate left circular
register r
 
   r    Reg 
 000   B 
 001   C 
 010   D 
 011   E 
 100   H 
 101   L 
 111   A 
RLC (HL) P 0 0 11 001 011
00 000 110
2 4 15
RLC (IX+d) P 0 0 11 011 101
11 001 011
← d →
00 000 110
4 6 23
RLC (IY+d) P 0 0 11 111 101
11 001 011
← d →
00 000 110
4 6 23
RL m
        m≡r,(HL),(IX+d),(IY+d)
P 0 0      010              Instruction format and
states are as shown
for RLC,m. To form
new OP-code, replace
000 of RLC,m with
shown code.
RRC m
        m≡r,(HL),(IX+d),(IY+d)
P 0 0      001             
RR m
        m≡r,(HL),(IX+d),(IY+d)
P 0 0      011             
SLA m
        m≡r,(HL),(IX+d),(IY+d)
P 0 0      100             
SRA m
        m≡r,(HL),(IX+d),(IY+d)
P 0 0      101             
SRL m
        m≡r,(HL),(IX+d),(IY+d)
P 0 0      111             
RLD P 0 0 11 101 101
01 101 111
2 5 18 Rotate digit left and
right between the
accumulator
and location (HL).
The content of the
upper half of the
accumulator is
unaffected.
RRD P 0 0 11 101 101
01 100 111
2 5 18

 Flag Notation:   • = flag not affected, 0 = flag reset, 1 = flag set, X = flag is unknown, 
   ↕ = flag is affected according to the result of the operation.