<< Previous | Next >>

SRA r     Shift Right Arithmetical     Rabbit 2000/3000/4000 Instruction
Opcode
Instruction
Clocks
Operation
---- SRA r 4 (2,2)) r = {r[7],r[7,1]}; CF = r[0]

CB 2F

SRA A

4 (2,2)

A = {A[7],A[7,1]}; CF = A[0]

CB 28

SRA B

4 (2,2)

B = {B[7],B[7,1]}; CF = B[0]

CB 29

SRA C

4 (2,2)

C = {C[7],C[7,1]}; CF = C[0]

CB 2A

SRA D

4 (2,2)

D = {D[7],D[7,1]}; CF = D[0]

CB 2B

SRA E

4 (2,2)

E = {E[7],E[7,1]}; CF = E[0]

CB 2C

SRA H

4 (2,2)

H = {H[7],H[7,1]}; CF = H[0]

CB 2D

SRA L

4 (2,2)

L = {L[7],L[7,1]}; CF = L[0]


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

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 the figure below.

Figure 22: The bit logic of the SRA instruction.

<< Previous | Next >>