Rotate and Shift
The value in reg8
is rotated left by one bit position. Bit 7 is then copied into the carry flag and the previous contents of the carry flag are copied into bit 0 of reg8
. Also includes 1R + 1W + 1 cycle if reg8
is (hl)
.
The 8-bit value pointed to by regi
+ ofs8
is rotated left by one bit position. Bit 7 is then copied into the carry flag and the previous contents of the carry flag are copied into bit 0 of the value pointed to by regi
+ ofs8
.
The value in a
is rotated left by one bit position. Bit 7 is then copied into the carry flag and the previous contents of the carry flag are copied into bit 0 of a
.
- Opcode:
00010111
- Bytes: 1
- Flags:
- H: Reset
- N: Reset
- C: Data from bit 7 of
a
- Cycles: 1F
The value in reg8
is rotated left by one bit position. Bit 7 is then copied into the carry flag and is copied into bit 0 of reg8
as well. Also includes 1R + 1W + 1 cycle if reg8
is (hl)
.
The 8-bit value pointed to by regi
+ ofs8
is rotated left by one bit position. Bit 7 is then copied into the carry flag and is copied into bit 0 of the value pointed to by regi
+ ofs8
as well.
The value in a
is rotated left by one bit position. Bit 7 is then copied into the carry flag and is copied into bit 0 of a
as well.
- Opcode:
00000111
- Bytes: 1
- Flags:
- H: Reset
- N: Reset
- C: Data from bit 7 of
a
- Cycles: 1F
The contents of the low-order four bits of the 8-bit value pointed to by hl
are copied into the high-order four bits of the 8-bit value pointed to by hl
. The CPU then copies the previous contents of the high-order four bits of the 8-bit value pointed to by hl
into the low-order four bits of a
. Finally, the previous contents of the low-order four bits of a
are copied into the low-order four bits of the value pointed to by hl
.
The value in reg8
is rotated right by one bit position. Bit 0 is then copied into the carry flag and the previous contents of the carry flag are copied into bit 7 of reg8
. Also includes 1R + 1W + 1 cycle if reg8
is (hl)
.
The 8-bit value pointed to by regi
+ ofs8
is rotated right by one bit position. Bit 0 is then copied into the carry flag and the previous contents of the carry flag are copied into bit 7 of the value pointed to by regi
+ ofs8
.
The value in a
is rotated right by one bit position. Bit 0 is then copied into the carry flag and the previous contents of the carry flag are copied into bit 7 of a
.
- Opcode:
00011111
- Bytes: 1
- Flags:
- H: Reset
- N: Reset
- C: Data from bit 0 of
a
- Cycles: 1F
The value in reg8
is rotated right by one bit position. Bit 0 is then copied into the carry flag and is copied into bit 7 of reg8
as well. Also includes 1R + 1W + 1 cycle if reg8
is (hl)
.
The 8-bit value pointed to by regi
+ ofs8
is rotated right by one bit position. Bit 0 is then copied into the carry flag and is copied into bit 7 of the value pointed to by regi
+ ofs8
as well.
The value in a
is rotated right by one bit position. Bit 0 is then copied into the carry flag and is copied into bit 7 of a
as well.
- Opcode:
00001111
- Bytes: 1
- Flags:
- H: Reset
- N: Reset
- C: Data from bit 0 of
a
- Cycles: 1F
The contents of the low-order four bits of the 8-bit value pointed to by hl
are copied into the low-order four bits of a
. The CPU then copies the previous contents of the low-order four bits of a
into the high-order four bits of the 8-bit value pointed to by hl
. Finally, the previous contents of the high-order four bits of the 8-bit value pointed to by hl
are copied into the low-order four bits of the value pointed to by hl
.
The 8-bit value in reg8
is shifted left by one bit. Bit 7 is stored in the carry flag, and 0 is stored in bit 0. Also includes 1R + 1W + 1 cycle if reg8
is (hl)
.
The 8-bit value pointed to by regi
+ ofs8
is shifted left by one bit. Bit 7 is stored in the carry flag, and 0 is stored in bit 0.
The 8-bit value in reg8
is shifted right by one bit. Bit 0 is stored in the carry flag, and bit 7 is unchanged. Also includes 1R + 1W + 1 cycle if reg8
is (hl)
.
The 8-bit value pointed to by regi
+ ofs8
is shifted right by one bit. Bit 0 is stored in the carry flag, and bit 7 is unchanged.
The 8-bit value in reg8
is shifted right by one bit. Bit 0 is stored in the carry flag, and 0 is stored in bit 7. Also includes 1R + 1W + 1 cycle if reg8
is (hl)
.
The 8-bit value pointed to by regi
+ ofs8
is shifted right by one bit. Bit 0 is stored in the carry flag, and 0 is stored in bit 7.