This section shows the syntax of the various instruction addressing modes. The following labels are used in the examples in this section:
Note: WRD1 has the word attribute and BYT1 has the byte attribute; NUM is of type null. These attributes only have meaning in a debugger; the assembler treats word, byte, and null attributes the same.
An immediate operand is specified with a #. Values must be in range -256 to 255; -256 is treated as 0, -1 as 255.
A register indirect operand is specified by [reg], where reg is X or B.
A register indirect operand with auto increment is specified by [B+]; [X+]. Auto decrement uses - instead of +.
The operand of one of the branch type instructions (JP, JMP, JMPL, JSR or JSRL) must be a null type expression, and the operand is normally defined in a section that has the ROM attribute. Assume you have the following program fragment:
Then:The assembler normally generates the minimal instruction size possible for each instruction. There may be cases in which you want the instruction to be the maximum size for ease of debugging. In these cases, the > operator is provided to force the maximum size for each operand. This operator can appear only at the start of the operand.