Propeller Manual

Table Of Contents
3: Assembly Language Reference – WZ
WZ
Effect: Cause assembly instruction to modify the Z flag.
Label Condition Instruction Operands WZ
Result: Z flag is updated with status from the Instruction‘s execution.
Label is an optional statement label. See Common Syntax Elements on page 250.
Condition is an optional execution condition. See Common Syntax Elements on page 250.
Instruction is the desired assembly instruction.
Operands is zero, one, or two operands as required by the Instruction.
Explanation
WZ (Write Z flag) is one of four optional effects (NR, WR, WC, and WZ) that influence the
behavior of assembly instructions.
WZ causes an executing assembly instruction to modify the
Z flag in accordance with its results.
For example, the
CMP (Compare Unsigned) instruction compares two values (destination and
source) but does not automatically write the results to the C and Z flags. You can determine
if the destination value is equal to the source value by using the
CMP instruction with the WZ
effect:
cmp value1, value2 WZ 'Z = 1 if value1 = value2
The above CMP instruction compares value1 with value2 and sets Z high (1) if value1 is
equal to
value2.
See Effects on page 291 for more information.
Propeller Manual v1.1 · Page 377