rl
Rotate left through carry
Rotates a register or memory byte left one bit, moving C into bit 0 and bit 7 into C.
Used in
- 8-bit and 16-bit arithmetic, logic and bitsZ80 assembly
- Multiply and divide, with the remainderZ80 assembly
SZHP/VNC ●●0●0●
- ● depends on the result
- 0 always 0
Forms
-
Rotates
rleft one bit position. Copies bit 7 to the carry flag and the previous carry flag to bit 0. rl2 bytes15 cyclesRotates (HL) left one bit position. Copies bit 7 to the carry flag and the previous carry flag to bit 0.
-
Rotates the memory location pointed to by IX plus
ddleft one bit position. Copies bit 7 to the carry flag and the previous carry flag to bit 0.
Undocumented 1 row
Zilog’s manual does not list these forms, but the Z80 runs them.
-
Rotates the memory location pointed to by IX plus
ddleft one bit position. Copies bit 7 to the carry flag and the previous carry flag to bit 0. Also stores the result inr.
Operands
.org 0x8000
ld b, 3
rl b
halt