IP2022 User’s Manual—Instruction Set Architecture www.ubicom.com 137 DECSNZ fr   Decrement fr into fr then Skip if Not Zero Operation: fr  =  fr   -  1;  if  nonzero   result,  then   skip  next
instruction
Bits affected: None Opcode: 0100 111f ffff ffff Description: This instruction decrements the specified register
file by one and tests the new register value. If that
value is not zero, the next program instruction is
skipped. Otherwise, execution proceeds normally
with the next instruction.
Cycles: 1 if tested condition is false, 3 if tested condition
is true
Example: decsnz0x18
jmp    back1
mov    0x19,w
The    decsnz    instruction    decrements    data
memory   location   0x18.   If   the   result   is   zero,
execution    proceeds    normally    with    the    jmp
instruction to back1. If the result is nonzero, the
jmp   instruction    is    skipped,    and    the   mov instruction is executed.