Common Syntax Elements

When reading the syntax definitions in this chapter, keep in mind that all Propeller Assembly instructions have three common, optional elements: a label, a condition, and effects. Each Propeller Assembly instruction has the following basic syntax:

< Label > < Condition > Instruction Operands < Effects >

  • Label — an optional statement label. Label can be global (starting with an underscore '' or a letter) or can be local (starting with a colon ':'). Local _Labels must be separated from other same-named local labels by at least one global label. Label is used by instructions like JMP, CALL and COGINIT to designate the target destination. See Global and Local Labels on page for more information.
  • Condition — an optional execution condition (IF_C, IF_Z, etc.) that causes Instruction to be executed or not. See IF_x (Conditions) on page for more information.
  • Instruction and Operands — a Propeller Assembly instruction (MOV, ADD, COGINIT, etc.) and its zero, one, or two operands as required by the Instruction.
  • Effects — an optional list of one to three execution effects (WZ, WC, WR, and NR) to apply to the instruction, if executed. They cause the Instruction to modify the Z flag, C flag, and to write, or not write, the instruction's result value to the destination register, respectively. See Effects Effects (WC, WZ, WR, NR) for more information.

Since every instruction can include these three optional fields (Label, Condition, and Effects), for simplicity those common fields are intentionally left out of the instruction's syntax description.

So, when you read a syntax description such as this:

WAITCNT Target, < # > Delta

...remember that the true syntax is this:

< Label > < Condition > WAITCNT Target, < # > Delta < Effects >

This rule applies only to Propeller Assembly instructions; it does not apply to Propeller Assembly directives.

Syntax declarations always give descriptive names to the instruction's operands, such as WAITCNT's Target and Delta operands in the example above. The detailed descriptions refer to operands by these names, however, the opcode tables and truth tables always use the generic names (D, DEST, Destination, and S, SRC, Source) to refer to the instruction's bits that store the respective values.

Unless otherwise noted, content on this site is licensed under the
Creative Commons Attribution-ShareAlike 4.0 International License.