UM012811-0904
eZ8 CPU Instruction Set Description
eZ8 CPU
User Manual
195
XOR
Logical Exclusive OR
XOR dst, src
Operation
dst
←
dst XOR src
Description
The source operand is logically EXCLUSIVE OR’ed with the destination operand. An
XOR operation stores a 1 in the destination operand when the corresponding bits in the
two operands are different; otherwise XOR stores a 0. The contents of the source operand
are unaffected.
Flags
Attributes
Escaped Mode Addressing
Using Escaped Mode Addressing, address modes R or IR specify a Working Register. If
the high nibble of the source or destination address is
EH
(1110B), a Working Register is
inferred. For example, if Working Register R12 (
CH
) is the desired destination operand,
use
ECH
as the destination operand in the opcode. To access Registers with addresses
E0H
to
EFH
, either set the Working Group Pointer, RP[7:4], to
EH
or use indirect addressing.
C
Unaffected.
Z
Set if the result is zero; reset otherwise.
S
Set if Bit 7 of the result is set; reset otherwise.
V
Reset to 0.
D
Unaffected.
H
Unaffected.
Mnemonic
Destination, Source
Opcode (Hex)
Operand 1
Operand 2
Operand 3
XOR
r1, r2
B2
{r1, r2}
—
—
XOR
r1, @r2
B3
{r1, r2}
—
—
XOR
R1, R2
B4
R2
R1
—
XOR
R1, @R2
B5
R2
R1
—
XOR
R1, IM
B6
R1
IM
—
XOR
@R1, IM
B7
R1
IM
—