PIC16F87X
13.1
Instruction Descriptions
Add Literal and W
ADDLW
ANDWF
Syntax:
AND W with f
Syntax:
[label] ADDLW
0 ≤ k ≤ 255
k
[label] ANDWF f,d
Operands:
Operation:
Operands:
0 ≤ f ≤ 127
d
[0,1]
(W) + k → (W)
Operation:
(W) .AND. (f) → (destination)
Status Affected: C, DC, Z
Status Affected:
Description:
Z
Description:
The contents of the W register
are added to the eight bit literal ’k’
and the result is placed in the W
register.
AND 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'.
BCF
Bit Clear f
ADDWF
Syntax:
Add W and f
Syntax:
Operands:
[label] BCF f,b
[label] ADDWF f,d
0 ≤ f ≤ 127
0 ≤ b ≤ 7
Operands:
0 ≤ f ≤ 127
d
[0,1]
Operation:
0 → (f<b>)
Operation:
(W) + (f) → (destination)
Status Affected: None
Status Affected: C, DC, Z
Description:
Bit 'b' in register 'f' is cleared.
Description:
Add 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 reg-
ister ’f’.
BSF
Bit Set f
Syntax:
Operands:
[label] BSF f,b
ANDLW
AND Literal with W
0 ≤ f ≤ 127
0 ≤ b ≤ 7
Syntax:
[label] ANDLW
k
Operands:
Operation:
Status Affected:
Description:
0 ≤ k ≤ 255
Operation:
1 → (f<b>)
(W) .AND. (k) → (W)
Status Affected: None
Description: Bit 'b' in register 'f' is set.
Z
The contents of W register are
AND’ed with the eight bit literal
'k'. The result is placed in the W
register.
1999 Microchip Technology Inc.
DS30292B-page 139