Instruction Set ArchitectureIP2022 Users Manual
156
www.ubicom.com
INCSZ W,fr
Increment fr into W then Skip if Zero
Operation:
W = fr + 1; if result is 0, then skip next instruction
Bits affected:
None
Opcode:
0011 110f ffff ffff
Description:
This instruction increments the value in the
specified data memory location and moves the
result to W. The data memory location is left
unchanged.
If the result is zero, the next instruction in the
program
is
skipped.
Otherwise,
program
execution proceeds normally with the next
instruction.
Cycles:
1 if tested condition is false; 2 if tested condition
is true
Example:
incsz w,0x099;load 0x099 + 1 to W
ret ;return if 0x099 + 1 is 0
nop ;otherwise continue here
This example takes the contents of data memory
location 0x099, increments that value, and moves
the result to W. If the result is zero, the ret