sra
Shift right arithmetic
Shifts a register or memory byte right one bit, keeping bit 7 and copying bit 0 to C.
- ● set from the result
- 0 always 0
Forms
-
The contents of
rare shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged. sra2 bytes · 15 cyclesThe contents of (HL) are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged.
-
The contents of the memory location pointed to by IX plus
ddare shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged.
Undocumented 1 row
Left out of Zilog's manual, but the Z80 runs them, and so does this emulator.
-
The contents of the memory location pointed to by IX plus
ddare shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged. The result is then stored inr.
Operands
.org 0x8000
ld b, 3
sra b
halt