Instruction Reference Manual 141
Description
Arithmetically shifts to the right the bits in r (any of the registers A, B, C, D, E, H, or L). Bits 7 through 1 are
shifted to the next lowest-order bit position (bit 7 is shifted to bit 6, etc.). Bit 7 is also copied to itself. Bit 0 is
shifted to the C flag. See Figure 8 on page 140.
SRA r
Opcode Instruction Clocks Operation
——
CB 2F
CB 28
CB 29
CB 2A
CB 2B
CB 2C
CB 2D
SRA r
SRA A
SRA B
SRA C
SRA D
SRA E
SRA H
SRA L
4 (2,2)
4 (2,2)
4 (2,2)
4 (2,2)
4 (2,2)
4 (2,2)
4 (2,2)
4 (2,2)
r ={r[7],r[7,1]}; CF = r[0]
A = {A[7],A[7,1]}; CF = A[0]
B = {B[7],B[7,1]}; CF = B[0]
C = {C[7],C[7,1]}; CF = C[0]
D = {D[7],D[7,1]}; CF = D[0]
E = {E[7],E[7,1]}; CF = E[0]
H = {H[7],H[7,1]}; CF = H[0]
L = {L[7],L[7,1]}; CF = L[0]
Flags ALTD I/O
S Z L/V C F R SP S D
• • L • • •