rra

Rotate A right through carry

Rotates A right one bit, moving C into bit 7 and bit 0 into C.

1 byte · 4 cycles

SZHP/VNC ––0–0●
  • ● set from the result
  • 0 always 0
  • – not changed

Forms

  • rra

    The contents of A are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7.

        .org 0x8000
        ld a, 5
        rra
        halt