© 2000 Scenix Semiconductor, Inc. All rights reserved.
81
SX Users Manual Rev. 3.1
www.scenix.com
Chapter 3 Instruction Set
3.6.13 DECSZ fr
Decrement fr and Skip if Zero
Operation:
fr = fr - 1
if 0, then skip next instruction
Bits affected:
none
Opcode:
0010 111f ffff
Description:
This instruction decrements the specified register file by one and tests the new reg-
ister value. If that value is 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:
decsz
$18
jmp
back1
mov
$19,W
The decsz instruction decrements file register 18h. If the result is nonzero,
execution proceeds normally with the jmp instruction. If the result is zero, the
device skips the jmp instruction and proceeds with the mov instruction.