Instruction Set Architecture—IP2022 User’s Manual 230 www.ubicom.com XOR W,#lit8 XOR W,Literal into W Operation: W = W ^ lit8 Bits affected: Z Opcode: 0111 1111 kkkk kkkk Description: This instruction performs a bitwise exclusive OR
of the contents of W and an 8-bit literal value, and
writes the 8-bit result into W. If the result is 0x00,
the Z bit is set.
Cycles: 1 Example: xor    w,0x#0F ;complement W3:0 This example performs a bitwise logical XOR of
W with the literal value 0x0F. The result is written
back to W.
For  example,  suppose  that  W  holds  the  value
0x51. The instruction takes the logical XOR of this
value with 0x0F and writes the result 0x5E into W.
The result is nonzero, so the Z bit is cleared.