鈫?/div>
(dest);
None
00
1011
dfff
ffff
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 register 'f'.
If the result is 0, the next instruction,
which is already fetched, is discarded. A
NOP is executed instead making it a
two-cycle instruction.
skip if result = 0
Words:
Cycles:
Example
1
1
COMF
REG1,0
REG1
=
=
=
0x13
0x13
0xEC
Words:
Cycles:
Example
1
1(2)
DECFSZ
GOTO
CONTINUE 鈥?/div>
鈥?/div>
鈥?/div>
HERE
CNT, 1
LOOP
Before Instruction
After Instruction
REG1
W
Before Instruction
PC
=
address
HERE
CNT - 1
0,
address
CONTINUE
0,
address
HERE+1
After Instruction
CNT
if CNT
PC
if CNT
PC
=
=
=
鈮?/div>
=
DS40182A-page 70
Preliminary
漏
1998 Microchip Technology Inc.
prev
next