IP2022 Users ManualInstruction Set Architecture
www.ubicom.com
229
XOR W,fr
XOR W,fr into W
Operation:
W = W ^ fr
Bits affected:
Z
Opcode:
0001 100f ffff ffff
Description:
This instruction performs a bitwise exclusive OR
of the contents of W and the specified data
memory location, and writes the 8-bit result into
W. The data memory location is left unchanged. If
the result is 0x00, the Z bit is set.
Cycles:
1
Example:
xor w,0x099 ;move W XOR fr to W
This example performs a bitwise logical XOR of
the value stored in data memory location 0x099
with W. The result is written back to W.
For example, suppose that the data memory
location 0x099 holds the value 0x0F and W holds
the value 0x13. The instruction takes the logical
XOR of 0x0F and 0x13 and writes the result 0x1C
into W. The result is nonzero, so the Z bit is
cleared.