The contents of B 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.
sra
Operands
sra r | sra (rr) | sra (ii+dd),r | sra (ii+dd)Variants
Every form of sra the assembler accepts. The cycles column counts clock
cycles, written as taken/not taken for the conditional forms.
| Instruction | Description | Flags | Bytes | Cycles |
|---|---|---|---|---|
| sra b | The contents of B 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. | CN=0P/V=PH=0ZS | 2 | 8 |
| sra c | The contents of C 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. | CN=0P/V=PH=0ZS | 2 | 8 |
| sra d | The contents of D 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. | CN=0P/V=PH=0ZS | 2 | 8 |
| sra e | The contents of E 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. | CN=0P/V=PH=0ZS | 2 | 8 |
| sra h | The contents of H 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. | CN=0P/V=PH=0ZS | 2 | 8 |
| sra l | The contents of L 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. | CN=0P/V=PH=0ZS | 2 | 8 |
| sra (hl) | The 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. | CN=0P/V=PH=0ZS | 2 | 15 |
| sra a | The contents of A 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. | CN=0P/V=PH=0ZS | 2 | 8 |
| sra (ix+dd),b undocumented | The contents of the memory location pointed to by IX plus | CN=0P/V=PH=0ZS | 4 | 23 |
| sra (ix+dd),c undocumented | The contents of the memory location pointed to by IX plus | CN=0P/V=PH=0ZS | 4 | 23 |
| sra (ix+dd),d undocumented | The contents of the memory location pointed to by IX plus | CN=0P/V=PH=0ZS | 4 | 23 |
| sra (ix+dd),e undocumented | The contents of the memory location pointed to by IX plus | CN=0P/V=PH=0ZS | 4 | 23 |
| sra (ix+dd),h undocumented | The contents of the memory location pointed to by IX plus | CN=0P/V=PH=0ZS | 4 | 23 |
| sra (ix+dd),l undocumented | The contents of the memory location pointed to by IX plus | CN=0P/V=PH=0ZS | 4 | 23 |
| sra (ix+dd) | The contents of the memory location pointed to by IX plus | CN=0P/V=PH=0ZS | 4 | 23 |
| sra (ix+dd),a undocumented | The contents of the memory location pointed to by IX plus | CN=0P/V=PH=0ZS | 4 | 23 |
| sra (iy+dd),b undocumented | The contents of the memory location pointed to by IY plus | CN=0P/V=PH=0ZS | 4 | 23 |
| sra (iy+dd),c undocumented | The contents of the memory location pointed to by IY plus | CN=0P/V=PH=0ZS | 4 | 23 |
| sra (iy+dd),d undocumented | The contents of the memory location pointed to by IY plus | CN=0P/V=PH=0ZS | 4 | 23 |
| sra (iy+dd),e undocumented | The contents of the memory location pointed to by IY plus | CN=0P/V=PH=0ZS | 4 | 23 |
| sra (iy+dd),h undocumented | The contents of the memory location pointed to by IY plus | CN=0P/V=PH=0ZS | 4 | 23 |
| sra (iy+dd),l undocumented | The contents of the memory location pointed to by IY plus | CN=0P/V=PH=0ZS | 4 | 23 |
| sra (iy+dd) | The contents of the memory location pointed to by IY plus | CN=0P/V=PH=0ZS | 4 | 23 |
| sra (iy+dd),a undocumented | The contents of the memory location pointed to by IY plus | CN=0P/V=PH=0ZS | 4 | 23 |