
1999 Microchip Technology Inc.
DS30292B-page 141
PIC16F87X
COMF
Syntax:
Operands:
Complement f
[ label COMF f,d
0
≤
f
≤
127
d
∈
[0,1]
(f)
→
(destination)
Z
The contents of register ’f’ are
complemented. If ’d’ is 0, the
result is stored in W. If ’d’ is 1, the
result is stored back in register ’f’.
Operation:
Status Affected:
Description:
DECF
Syntax:
Operands:
Decrement f
[label DECF f,d
0
≤
f
≤
127
d
∈
[0,1]
(f) - 1
→
(destination)
Z
Decrement register ’f’. If ’d’ is 0,
the result is stored in the W regis-
ter. If ’d’ is 1, the result is stored
back in register ’f’.
Operation:
Status Affected:
Description:
DECFSZ
Syntax:
Operands:
Decrement f, Skip if 0
[ label DECFSZ f,d
0
≤
f
≤
127
d
∈
[0,1]
(f) - 1
→
(destination);
skip if result = 0
None
The contents of register ’f’ are
decremented. If ’d’ is 0, the result
is placed in the W register. If ’d’ is
1, the result is placed back in reg-
ister ’f’.
If the result is 1, the next instruc-
tion is executed. If the result is 0,
then a
NOP
is executed instead
making it a 2T
CY
instruction.
Operation:
Status Affected:
Description:
GOTO
Syntax:
Operands:
Operation:
Unconditional Branch
[ label GOTO k
0
≤
k
≤
2047
k
→
PC<10:0>
PCLATH<4:3>
→
PC<12:11>
None
GOTO
is an unconditional branch.
The eleven bit immediate value is
loaded into PC bits <10:0>. The
upper bits of PC are loaded from
PCLATH<4:3>.
GOTO
is a two
cycle instruction.
Status Affected:
Description:
INCF
Syntax:
Operands:
Increment f
[ label INCF f,d
0
≤
f
≤
127
d
∈
[0,1]
(f) + 1
→
(destination)
Z
The contents of register ’f’ are
incremented. If ’d’ is 0, the result
is placed in the W register. If ’d’ is
1, the result is placed back in reg-
ister ’f’.
Operation:
Status Affected:
Description:
INCFSZ
Syntax:
Operands:
Increment f, Skip if 0
[ label INCFSZ f,d
0
≤
f
≤
127
d
∈
[0,1]
(f) + 1
→
(destination),
skip if result = 0
None
The contents of register ’f’ are
incremented. If ’d’ is 0, the result is
placed in the W register. If ’d’ is 1,
the result is placed back in regis-
ter ’f’.
If the result is 1, the next instruc-
tion is executed. If the result is 0, a
NOP
is executed instead making it
a 2T
CY
instruction.
Operation:
Status Affected:
Description: