English
Language : 

PIC16F627A Datasheet, PDF (126/168 Pages) Microchip Technology – FLASH-Based 8-Bit CMOS Microcontrollers
PIC16F627A/628A/648A
XORLW
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Example:
Exclusive OR Literal with W
[ label ] XORLW k
0 ≤ k ≤ 255
(W) .XOR. k → (W)
Z
11
1010 kkkk kkkk
The contents of the W register
are XOR’ed with the eight bit lit-
eral 'k'. The result is placed in
the W register.
1
1
XORLW 0xAF
Before Instruction
W = 0xB5
After Instruction
W = 0x1A
XORWF
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Words:
Cycles:
Example
Exclusive OR W with f
[ label ] XORWF f,d
0 ≤ f ≤ 127
d ∈ [0,1]
(W) .XOR. (f) → (dest)
Z
00
0110 dfff ffff
Exclusive OR the contents of the
W register with register 'f'. If 'd' is
0 the result is stored in the W reg-
ister. If 'd' is 1 the result is stored
back in register 'f'.
1
1
XORWF REG1, 1
Before Instruction
REG1 = 0xAF
W = 0xB5
After Instruction
REG1 = 0x1A
W = 0xB5
DS40044A-page 124
Preliminary
 2002 Microchip Technology Inc.