PIC17C75X
Exclusive OR Literal with
WREG
XORWF
Syntax:
Exclusive OR WREG with f
[ label ] XORWF f,d
0 ≤ f ≤ 255
XORLW
Syntax:
[ label ] XORLW k
Operands:
d
[0,1]
Operands:
Operation:
Status Affected:
Encoding:
0 ≤ k ≤ 255
Operation:
(WREG) .XOR. (f) → (dest)
(WREG) .XOR. k → (WREG)
Status Affected:
Encoding:
Z
Z
0000
110d
ffff
ffff
1011
0100
kkkk
kkkk
Exclusive OR the contents of WREG
with register 'f'. If 'd' is 0 the result is
stored in WREG. If 'd' is 1 the result is
stored back in the register 'f'.
Description:
The contents of WREG are XOR’ed
with the 8-bit literal 'k'. The result is
placed in WREG.
Description:
Words:
Cycles:
1
1
Words:
Cycles:
1
1
Q Cycle Activity:
Q1
Q Cycle Activity:
Q1
Q2
Q3
Q4
Q2
Q3
Q4
Decode
Read
literal 'k'
Process
Data
Write to
WREG
Decode
Read
register 'f'
Process
Data
Write to
destination
XORLW 0xAF
= 0xB5
Example:
XORWF
REG, 1
Example:
Before Instruction
Before Instruction
WREG
REG
WREG
=
=
0xAF
0xB5
After Instruction
WREG
=
0x1A
After Instruction
REG
WREG
=
=
0x1A
0xB5
1997 Microchip Technology Inc.
DS30264A-page 217