sra
Shift right arithmetic
Shifts a register or memory byte right one bit, keeping bit 7 and copying bit 0 to C.
SZHP/VNC ●●0●0●
- ● depends on the result
- 0 always 0
Forms
-
Shifts
rright one bit position. Copies bit 0 to the carry flag and leaves bit 7 unchanged. sra2 bytes15 cyclesShifts (HL) right one bit position. Copies bit 0 to the carry flag and leaves bit 7 unchanged.
-
Shifts the memory location pointed to by IX plus
ddright one bit position. Copies bit 0 to the carry flag and leaves bit 7 unchanged.
Undocumented 1 row
Zilog’s manual does not list these forms, but the Z80 runs them.
-
Shifts the memory location pointed to by IX plus
ddright one bit position. Copies bit 0 to the carry flag and leaves bit 7 unchanged. Also stores the result inr.
Operands
.org 0x8000
ld b, 3
sra b
halt