S3F84B8_UM_REV 1.00
6.3.73 XOR — LOGICAL EXCLUSIVE OR
dst,src
XOR
dst dst XOR src
Operation:
Source operand is logically exclusive-ORed with destination operand. The result is stored in
destination. The exclusive-OR operation results in a "1" bit being stored whenever the
corresponding bits in the operands are different; otherwise, a "0" bit is stored.
C: Unaffected.
Flags:
Z: Set if the result is "0"; cleared otherwise.
S: Set if the result bit 7 is set; cleared otherwise.
V: Always reset to "0".
D: Unaffected.
H: Unaffected.
Format:
opc
opc
opc
Given R0 = 0C7H, R1 = 02H, R2 = 18H, register 00H = 2BH, register 01H = 02H, and register
Examples:
02H = 23H:
XOR
XOR
XOR
XOR
XOR
In the first example, if working register R0 contains the value 0C7H and register R1 contains the
value 02H, the statement "XOR R0,R1" logically exclusive-ORs the R1 value with the R0 value
and stores the result (0C5H) in the destination register R0.
dst | src
src
dst
dst
src
R0,R1
R0,@R1
00H,01H
00H,@01H
00H,#54H
Bytes
2
3
3
R0 = 0C5H, R1 = 02H
R0 = 0E4H, R1 = 02H, register 02H = 23H
Register 00H = 29H, register 01H = 02H
Register 00H = 08H, register 01H = 02H, register 02H = 23H
Register 00H = 7FH
6-85
6 INSTRUCTION SET
Cycles
Opcode
(Hex)
4
B2
6
B3
6
B4
6
B5
6
B6
Addr Mode
dst
src
r
r
r
lr
R
R
R
IR
R
IM