English
Language : 

PIC16F627A_05 Datasheet, PDF (130/180 Pages) Microchip Technology – Flash-Based, 8-Bit CMOS Microcontrollers with nanoWatt Technology
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
literal ‘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
register. 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
DS40044D-page 128
© 2005 Microchip Technology Inc.