This the multi-page printable view of this section.Click here to print.

Return to the regular view of this page.

CP

Comparison

Table of Contents

\(A - s\)

76543210
 
CP r
10111r
 
CP n
11111110FE
n
 
CP (HL)
10111110BE
 
CP (IX+d)
11011101DD
10111110BE
d
 
CP (IY+d)
11111101FD
10111110BE
d
Registers
Registerr
B000
C001
D010
E011
H100
L101
A111
Flags Affected
Flags
sz-h-p/v-c
sset if result negative
zset if result is 0
hset if borrow from bit 4
p/vset if overflow
cset if borrow
Opcode Matrix
ABCDEHL(HL)(IX+d)(IY+d)n
Op
CP A
BF14
CP B
B814
CP C
B914
CP D
BA14
CP E
BB14
CP H
BC14
CP L
BD14
CP (HL)
BE17
CP (IX+d)
DDBEnn319
CP (IY+d)
FDBEnn319
CP n
FEnn27
Opcode Matrix Legend
Instruction Opcode hexSize bytesCycle count
 Register Memory Implicit