Datasheet
FS98O22
Rev. 1.6 135/146
ADDWFC
Add W, f and Carry
Syntax ADDWFC f, d
0 ≤ f ≤ FFh
d ∈ [0,1]
Operation
[Destination] ← [f] + [W] + C
Flag Affected C, DC, Z
Description Add the content of the W register, [f] and Carry bit.
If d is 0, the result is stored in the W register.
If d is 1, the result is stored back in f.
Cycle 1
Example
ADDWFC OPERAND,1
Before instruction:
C = 1
OPERAND = 02h
W = 4Dh
After instruction:
C = 0
OPERAND = 50h
W = 4Dh
ANDLW
AND literal with W
Syntax ANDLW k
0 ≤ k ≤ FFh
Operation
[W] ← [W] AND k
Flag Affected Z
Description AND the content of the W register with the eight-bit literal “k”.
The result is stored in the W register.
Cycle 1
Example:
ANDLW 5Fh
Before instruction:
W = A3h
After instruction:
W = 03h
ANDWF
AND W and f
Syntax ANDWF f, d
0 ≤ f ≤ FFh
d ∈ [0,1]
Operation
[Destination] ← [W] AND [f]
Flag Affected Z
Description AND the content of the W register with [f].
If d is 0, the result is stored in the W register.
If d is 1, the result is stored back in f.
Cycle 1
Example 1:
ANDWF OPERAND,0
Before instruction:
W = 0Fh, OPERAND = 88h
After instruction:
W = 08h, OPERAND = 88h
Example 2:
ANDWF OPERAND,1
Before instruction:
W = 0Fh, OPERAND = 88h
After instruction:
W = 88h, OPERAND = 08h
FORTUNE'
Properties
For Reference Only