Specifications
mikroElektronika | Free Online Book | PIC Microcontrollers | Chapter 9: Instruction Set
Before instruction execution: REG = 0xFF
Z = 0
After instruction: REG = 0x00
Z = 1
INCFSZ - Increment f, Skip if 0
Syntax: [label] INCFSZ f, d
Description: Register f is incremented by one. If d = w or d = 0, the result is stored in
register W. If d = f or d = 1, the result is stored in register f. If the result is 0, then a NOP is
executed instead, making this a two-cycle instruction.
Operation: (f) + 1 -> d
Operand: 0 ≤ f ≤ 127, d[0,1]
Status affected: -
Number of cycles: 1 or 2 depending on the result.
EXAMPLE :
....
LAB_01 INCFSZ REG,f ; Increment REG by one
LAB_02 ....... ; Skip this line if result is 0
LAB_03 ....... ; Jump here if result is 0
The content of program counter Before instruction execution, PC= LAB_01address.
The content of REG after instruction, REG = REG+1. If REG=0, the program counter points to
the address of label LAB_03. Otherwise, the program counter points to address of the next
instruction, i.e. to LAB_02 address.
IORLW - Inclusive OR literal with W
Syntax: [label] IORLW k
Description: The content of the W register is OR’ed with the 8-bit literal k. The result is
stored in register W.
Operation: (W) OR (k) -> W
http://www.mikroe.com/en/books/picmcubook/ch9/ (19 of 35)5/3/2009 11:35:12 AM