
<
2
.75
7UGT U/CPWCN
#FFTGUU5RCEG
=L/2*
7/<:
CP
Compare
Instruction Format:
CP dst, src
Operation:
dst - src
The source operand is compared to (subtracted from) the destination operand, and the appropriate flags are
set accordingly. The contents of both operands are unchanged.
Flags:
When the instruction is executed, the flags are set as follows:
C:
1 if a value is carried from the most significant bit of the result, otherwise, 0.
Z:
1 if the result is
0
; otherwise, 0.
S:
1 if bit 7 of the result is 1 (negative); otherwise, 0.
V:
1 if arithmetic overflow occurs; otherwise, 0.
D:
The value set by the preceding instruction.
H:
The value set by the preceding instruction.
OPC
dst
src
OPC
src
dst
OPC
dst
src
OPC (Hex)
Address Mode
dst src
A2
A3
r
r
r
Ir
A4
A5
R
R
R
IR
A6
A7
R
IR
IM
IM