This the multi-page printable view of this section.Click here to print.

Return to the regular view of this page.

SRA Rotate bits right with Carry and store in register

Undocumented Rotate bits right with carry and store in register

Table of Contents

This instruction performs an SRA (IX+dd) or SRA (IX+dd) operation but then also stores the result in a register as well as in the memory location.

Visualisation of the SRA instruction

76543210
 
SRA r,(IX+d)
11011101DD
11001011CB
d
00101r
 
SRA r,(IY+d)
11111101FD
11001011CB
d
00101r
Registers
Registerr
B000
C001
D010
E011
H100
L101
A111

Note: r=%110 does exist. It doesn't do a copy into a register as it's the existing official, documented instruction.

Opcode Matrix
ABCDEHL
(IX+d)
SRA A,(IX+d)
DDCBnn2F
SRA B,(IX+d)
DDCBnn28
SRA C,(IX+d)
DDCBnn29
SRA D,(IX+d)
DDCBnn2A
SRA E,(IX+d)
DDCBnn2B
SRA H,(IX+d)
DDCBnn2C
SRA L,(IX+d)
DDCBnn2D
(IY+d)
SRA A,(IY+d)
FDCBnn2F
SRA B,(IY+d)
FDCBnn28
SRA C,(IY+d)
FDCBnn29
SRA D,(IY+d)
FDCBnn2A
SRA E,(IY+d)
FDCBnn2B
SRA H,(IY+d)
FDCBnn2C
SRA L,(IY+d)
FDCBnn2D
Opcode Matrix Legend
Instruction Opcode hex
 Undocumented