Keil™, An ARM® Company

8051 Instruction Set Manual

XRL

The XRL instruction performs a logical exclusive OR operation between the specified operands. The result is stored in the destination operand.

Note

When this instruction is used to modify an output port, the value used as the port data is read from the output data latch, not the pins of the port.

See Also: ANL, ORL

XRL A, #immediate
CACF0RS1RS0OV P
Bytes2
Cycles1
Encoding
01100100immediate
Operation
XRL
A = A XOR immediate
Example
XRL A, #0FFh
XRL A, @Ri
CACF0RS1RS0OV P
Bytes1
Cycles1
Encoding
0110011i
Operation
XRL
A = A XOR (Ri)
Example
XRL A, @R0
XRL A, direct
CACF0RS1RS0OV P
Bytes2
Cycles1
Encoding
01100101direct
Operation
XRL
A = A XOR (direct)
Example
XRL A, 34h
XRL A, Rn
CACF0RS1RS0OV P
Bytes1
Cycles1
Encoding
01101nnn
Operation
XRL
A = A XOR Rn
Example
XRL A, R7
XRL direct, #immediate
CACF0RS1RS0OV P
Bytes3
Cycles2
Encoding
01100011directimmediate
Operation
XRL
(direct) = (direct) XOR immediate
Example
XRL 34H, #0FFh
XRL direct, A
CACF0RS1RS0OV P
Bytes2
Cycles1
Encoding
01100010direct
Operation
XRL
(direct) = (direct) XOR A
Example
XRL 34h, A