Propeller Manual

Table Of Contents
WC – Assembly Language Reference
WC
Effect: Cause assembly instruction to modify the C flag.
Label Condition Instruction Operands WC
Result: C 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
WC (Write C flag) is one of four optional effects (NR, WR, WZ, and WC) that influence the behavior
of assembly instructions.
WC causes an executing assembly instruction to modify the C 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 less than the source value by using the
CMP instruction with the WC
effect:
cmp value1, value2 WC 'C = 1 if value1 < value2
The above CMP instruction compares value1 with value2 and sets C high (1) if value1 is
less than
value2.
See Effects on page 291 for more information.
Page 372 · Propeller Manual v1.1