Datasheet
1996 Microchip Technology Inc. DS30412C-page 141
PIC17C4X
XORLW
Exclusive OR Literal with
WREG
Syntax: [
label
] XORLW k
Operands: 0 ≤ k ≤ 255
Operation: (WREG) .XOR. k → (WREG)
Status Affected: Z
Encoding:
1011 0100 kkkk kkkk
Description:
The contents of WREG are XOR’ed
with the 8-bit literal 'k'. The result is
placed in WREG.
Words: 1
Cycles: 1
Q Cycle Activity:
Q1 Q2 Q3 Q4
Decode Read
literal 'k'
Execute Write to
WREG
Example:
XORLW 0xAF
Before Instruction
WREG = 0xB5
After Instruction
WREG = 0x1A
XORWF Exclusive OR WREG with f
Syntax: [
label
] XORWF f,d
Operands: 0 ≤ f ≤ 255
d ∈ [0,1]
Operation: (WREG) .XOR. (f) → (dest)
Status Affected: Z
Encoding:
0000 110d ffff ffff
Description:
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'.
Words: 1
Cycles: 1
Q Cycle Activity:
Q1 Q2 Q3 Q4
Decode Read
register 'f'
Execute Write to
destination
Example:
XORWF REG, 1
Before Instruction
REG = 0xAF
WREG = 0xB5
After Instruction
REG = 0x1A
WREG = 0xB5