fs3861 Fortune Semiconductor Corporation, fs3861 Datasheet - Page 33

no-image

fs3861

Manufacturer Part Number
fs3861
Description
Intelligent Charger Management Controller
Manufacturer
Fortune Semiconductor Corporation
Datasheet
SUBWFC
Syntax
Operation
Flag Affected
Description
Cycle
Example 1:
SUBWFC OPERAND, 1
Example 2:
SUBWFC OPERAND, 1
Example 3:
SUBWFC OPERAND, 1
XORLW
Syntax
Operation
Flag Affected
Description
Cycle
Example:
XORLW
Fortune Semiconductor Corp.
5Fh
Subtract W and Carry from f
SUBWFC f, d
0 ≤ f ≤ FFh
d ∈ [0,1]
[Destination] ← [f] – [W] –C
C, DC, Z
Subtract the content of the W
register from [f]. If d is 0, the result
is stored in the W register. If d is
1, the result is stored back in [f].
1
Before instruction:
After instruction:
Before instruction:
After instruction:
Before instruction:
After instruction:
OPERAND = FEh, C = 0, Z = 0
Exclusive OR literal with W
XORLW
0 ≤ k ≤ FFh
[W] ← [W] XOR k
Z
Exclusive OR the content of the
W register and the eight-bit literal
"k". The result is stored in the W
register.
1
Before instruction:
After instruction:
OPERAND = 33h, W = 01h
C = 1
OPERAND = 32h, C = 1, Z = 0
OPERAND = 02h, W = 01h
C = 0
OPERAND = 00h, C = 1, Z = 1
OPERAND = 04h, W = 05h
C = 0
W = ACh
W = F3h
k
33/34
XORWF
Syntax
Operation
Flag Affected
Description
Cycle
Example:
XORWF
OPERAND, 1
Exclusive OR W and f
0 ≤ f ≤ FFh
d ∈ [0,1]
[Destination] ← [W] XOR [f]
Z
Exclusive OR the content of the
W register and [f]. If d is 0, the
result is stored in the W register. If
d is 1, the result is stored back in
[f].
1
Before instruction:
After instruction:
XORWF
OPERAND = 5Fh, W = ACh
OPERAND = F3h
f, d
FS3861
Rev. 1.0

Related parts for fs3861