© 2000 Scenix Semiconductor, Inc. All rights reserved. 103 SX User’s Manual Rev. 3.1 www.scenix.com Chapter 3 Instruction Set 3.6.33    MOVSZ W, --fr Move (fr-1) to W and Skip if Zero Operation: W = fr - 1; if 0, then skip next instruction Bits affected: none Opcode: 0010 110f ffff Description: This instruction decrements the value in the specified file register and moves the re-
sult to W. The file register 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: movsz W,--$1F ;move register 1Fh -1 into W ret ;return from subroutine if 0 nop ;execution continues here otherwise This example takes the contents of file  register  1Fh, decrements that value, and
moves the result to W. If the result is zero, the device skips the “ret” instruction and
proceeds with the “nop” instruction. If the result is nonzero, the device executes the
“ret” instruction.