RES b,s

Reset bit b of operand s.
Function: sb <- 0
 
Format: s: may be r, (HL), (IX + d), (IY + d)
 
r  
 
1100 1011
 
byte 1: CB
 
10bb brrr
 
byte 2
 
(HL)  
 
1100 1011
 
byte 1: CB
 
10bb b110
 
byte 2
 
(IX + d)  
 
1101 1101
 
byte 1: DD
 
1100 1011
 
byte 2: CB
 
dddd dddd
 
byte 3: offset data
 
10bb b110
 
byte 4
 
(IY + d)  
 
1111 1101
 
byte 1: FD
 
1100 1011
 
byte 2: CB
 
dddd dddd
 
byte 3: offset data
 
10bb b110
 
byte 4
 
b may be any one of:
0
000
1
001
2
010
3
011
4
100
5
101
6
110
7
111
r may be any one of:
A
111
B
000
C
001
D
010
E
011
H
100
L
101
Description: The specified bit of the location determined by s is reset. s is defined in the description of the similar BIT instructions.
 
Data Flow:
 
Timing:
s: M cycles: T states: usec
@ 2 MHz:
r
(HL)
(IX + d)
(IY + d)
2
4
6
6
8
15
23
23
4
7.5
11.5
11.5
 
Addressing Mode: r: implicit; (HL): indirect; (IX + d), (IY+d): indexed.
 
Byte Codes:
RES  b,r
r:ABCDEHL
CB +b:087808182838485
18F88898A8B8C8D
297909192939495
39F98999A9B9C9D
4A7A0A1A2A3A4A5
5AFA8A9AAABACAD
6B7B0B1B2B3B4B5
7BFB8B9BABBBCBD
 
b:01234567
RES  b,(HL)
CB +868E969EA6AEB6BE
RES  b,(IX + d)
DDCB +
RES  b,(IY + d)
FDCB +
 
Flags:
 
(no effect)
 
Example:
RES  1,H

OBJECT CODE
Before:
 
After: