<< Previous | Next >>

SRA (HL)     Shift Right Arithmetic     Rabbit 2000/3000/4000/5000 Instruction

Opcode
Instruction
Operation
CB 2E SRA (HL) (HL) = {(HL)[7],(HL)[7,1]}
CF = (HL)[0]

8-Bit Access
16-Bit Unaligned
16-Bit Aligned
Rabbit 2000/3000/4000
10
n/a
n/a
Rabbit 5000
10
10
8

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

Description

Arithmetically shifts to the right the bits in the data whose address is HL.

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 22 for an illustration.


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