© 2000 Scenix Semiconductor, Inc. All rights reserved.
SX Users Manual Rev. 3.1
Chapter 3 Instruction Set
3.6.33 MOVSZ W, --fr
Move (fr-1) to W and Skip if Zero
W = fr - 1; if 0, then skip next instruction
0010 110f ffff
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.
1 if tested condition is false; 2 if tested condition is true
;move register 1Fh -1 into W
;return from subroutine if 0
;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