
eZ8
™
CPU Core
User Manual
UM012820-0810 CP Instruction
121
CP
Definition
Compare.
Syntax
CP dst, src
Operation
dst - src
Description
The source operand is compared to (subtracted from) the destination oper-
and and the flags are set according to the results of the operation. The
contents of both the source and destination operands are unaffected.
Flags
Attributes
C Set if a borrow is required by bit 7; reset otherwise
Z Set if the result is zero; reset otherwise
S Set if Bit 7 of the result is set; reset otherwise
V Set if an arithmetic overflow occurs; reset otherwise
D Unaffected
H Unaffected
Mnemonic
Destination,
Source
Op
Code
(Hex) Operand 1 Operand 2 Operand 3
CP r1, r2 A2 {r1, r2} — —
CP r1, @r2 A3 {r1, r2} — —
Comentários a estes Manuais