Table of Contents

Advertisement

.75
P
Â
CP
Compare
Instruction Format:
CP dst, src
OPC
OPC
OPC
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.
dst
src
src
dst
OPC (Hex)
A2
A3
A4
dst
A5
A6
src
A7
Address Mode
dst
src
r
r
r
Ir
R
R
R
IR
R
IM
IR
IM

Advertisement

Table of Contents
loading

Table of Contents