61
CHAPTER 5 EXPLANATION OF INSTRUCTIONS
User's Manual U12326EJ4V0UM
Exclusive Or
XOR Exclusive Logical Sum of Byte Data
[Instruction format] XOR dst, src
[Operation] dst dst src
[Operand]
Mnemonic Operand(dst,src) Mnemonic Operand(dst,src)
XOR A, #byte XOR A, !addr16
saddr, #byte A, [HL]
A, r Note A, [HL+byte]
r, A A, [HL+B]
A, saddr A, [HL+C]
Note Except r = A
[Flag]
ZACCY
×
[Description]
The bit-wise exclusive logical sum is obtained from the destination operand (dst) specified by the 1st operand
and the source operand (src) specified by the 2nd operand and the result is stored in the destination operand
(dst).
Logical negation of all bits of the destination operand (dst) is possible by selecting #0FFH for the source
operand (src) with this instruction.
If the exclusive logical sum shows that all bits are 0, the Z flag is set (1). In all other cases, the Z flag is
cleared (0).
[Description example]
XOR A, L; The bit-wise exclusive logical sum of the A and L registers is obtained and the result is stored in
the A register.