1996 Microchip Technology Inc.
Advance Information
DS40139A-page 43
PIC12C5XX
INCF
Syntax:
Operands:
Increment f
[ label INCF f,d
0
≤
f
≤
31
d
∈
[0,1]
(f) + 1
→
(dest)
Z
Operation:
Status Affected:
Encoding:
Description:
0010
10df
ffff
The contents of register 'f' are incre-
mented. If 'd' is 0 the result is placed in
the W register. If 'd' is 1 the result is
placed back in register 'f'.
1
1
Words:
Cycles:
Example:
Before Instruction
CNT
Z
After Instruction
CNT
Z
INCF
CNT,
1
=
=
0xFF
0
=
=
0x00
1
INCFSZ
Syntax:
Operands:
Increment f, Skip if 0
[ label INCFSZ f,d
0
≤
f
≤
31
d
∈
[0,1]
(f) + 1
→
(dest), skip if result = 0
None
Operation:
Status Affected:
Encoding:
Description:
0011
11df
ffff
The contents of register 'f' are incre-
mented. If 'd' is 0 the result is placed in
the W register. If 'd' is 1 the result is
placed back in register 'f'.
If the result is 0, then the next instruc-
tion, which is already fetched, is dis-
carded and an NOP is executed
instead making it a two cycle instruc-
tion.
1
1(2)
Words:
Cycles:
Example:
HERE INCFSZ CNT, 1
GOTO LOOP
CONTINUE
Before Instruction
PC
=
address
(HERE)
After Instruction
CNT
=
CNT + 1;
if CNT
=
0,
PC
=
address
(CONTINUE)
;
if CNT
≠
0,
PC
=
address
(HERE +1)
IORLW
Syntax:
Operands:
Operation:
Status Affected:
Encoding:
Description:
Inclusive OR literal with W
[ label IORLW k
0
≤
k
≤
255
(W) .OR. (k)
→
(W)
Z
1101
kkkk
kkkk
The contents of the W register are
OR’ed with the eight bit literal 'k'. The
result is placed in the W register.
1
1
Words:
Cycles:
Example:
Before Instruction
W
After Instruction
W
Z
IORLW
0x35
=
0x9A
=
=
0xBF
0
IORWF
Syntax:
Operands:
Inclusive OR W with f
[ label IORWF f,d
0
≤
f
≤
31
d
∈
[0,1]
(W).OR. (f)
→
(dest)
Z
Operation:
Status Affected:
Encoding:
Description:
0001
00df
ffff
Inclusive OR the W register with regis-
ter 'f'. If 'd' is 0 the result is placed in
the W register. If 'd' is 1 the result is
placed back in register 'f'.
1
1
Words:
Cycles:
Example:
Before Instruction
RESULT =
W
After Instruction
RESULT =
W
Z
IORWF
RESULT, 0
0x13
0x91
=
0x13
0x93
0
=
=