Download Print this page

ZiLOG Z80380 User Manual page 68

Advertisement

Z
ILOG
CP
COMPARE (BYTE)
CP [A,]src
Operation:
A – src
The source operand is compared with the accumulator and the flags are set accordingly.
The contents of the accumulator and the source are unaffected. Two's complement
subtraction is performed.
Flags:
S:
Set if the result is negative; cleared otherwise
Z:
Set if the result is zero; cleared otherwise
H:
Set if there is a borrow from bit 4 of the result; cleared otherwise
V:
Set if arithmetic overflow occurs, that is, if the operands are of different signs and the
result is of the same sign as the source; cleared otherwise
N:
Set
C:
Set if there is a borrow from the most significant bit of the result; cleared otherwise
Addressing
Mode
Syntax
R:
CP [A,]R
RX:
CP [A,]RX
CP [A,]n
IM:
IR:
CP [A,](HL)
X:
CP [A,](XY+d)
Field Encodings: r:
per convention
y: 0 for IX, 1 for IY
w: 0 for high byte, 1 for low byte
5-34
src = R, RX, IM, IR, X
Instruction Format
10111-r-
11y11101 1011110w
11111110 ——n—
10111110
11y11101 10111110 ——d—
U
SER
Execute
Time
Note
2
2
2
2+r
4+r
I
DC-8297-03
Z380
'
M
S
ANUAL

Advertisement

loading
Need help?

Need help?

Do you have a question about the Z80380 and is the answer not in the manual?

Questions and answers