IP2022 Users ManualInstruction Set Architecture
www.ubicom.com
151
INC W,fr
Increment fr into W
Operation:
W = fr + 1
Bits affected:
Z
Opcode:
0010 100f ffff ffff
Description:
This instruction increments the value in the
specified register file by one and moves the 8-bit
result into W. The data memory location is left
unchanged.
If the data memory location holds 0xFF, the value
moved into W is 0x00 and the Z bit is set.
Otherwise, the Z bit is cleared.
Cycles:
1
Example:
inc w,0x099
This example increments the value at data
memory location 0x099 and moves the result into
W. For example, if the data memory location
holds 0x75, the value 0x76 is loaded into W, and
the Z bit is cleared. The data memory location still
holds 0x75 after execution of the instruction.