PIC17C75X
INCF
Increment f
INCFSZ
Syntax:
Increment f, skip if 0
Syntax:
Operands:
[ label ] INCF f,d
[ label ] INCFSZ f,d
0 ≤ f ≤ 255
Operands:
0 ≤ f ≤ 255
d
[0,1]
d
[0,1]
Operation:
(f) + 1 → (dest)
Operation:
(f) + 1 → (dest)
skip if result = 0
Status Affected:
Encoding:
OV, C, DC, Z
Status Affected:
Encoding:
None
0001
010d
ffff
ffff
0001
111d
ffff
ffff
The contents of register 'f' are incre-
mented. If 'd' is 0 the result is placed in
WREG. If 'd' is 1 the result is placed
back in register 'f'.
Description:
The contents of register 'f' are incre-
mented. If 'd' is 0 the result is placed in
WREG. If 'd' is 1 the result is placed
back in register 'f'.
Description:
Words:
Cycles:
1
1
If the result is 0, the next instruction,
which is already fetched, is discarded,
and an NOP is executed instead mak-
ing it a two-cycle instruction.
Q Cycle Activity:
Q1
Q2
Q3
Q4
Words:
Cycles:
1
Decode
Read
register 'f'
Process
Data
Write to
destination
1(2)
Q Cycle Activity:
Q1
INCF
CNT, 1
Example:
Q2
Q3
Q4
Before Instruction
Decode
Read
register 'f'
Process
Data
Write to
destination
CNT
Z
C
=
=
=
0xFF
0
?
If skip:
Q1
Q2
Q3
Q4
After Instruction
No
operation
No
operation
No
operation
No
operation
CNT
Z
C
=
=
=
0x00
1
1
HERE
NZERO
ZERO
INCFSZ
:
:
CNT, 1
Example:
Before Instruction
PC
=
Address (HERE)
After Instruction
CNT
If CNT
PC
If CNT
PC
=
=
=
≠
=
CNT + 1
0;
Address(ZERO)
0;
Address(NZERO)
1997 Microchip Technology Inc.
DS30264A-page 199