Operand field: Addressing modes (HC(S)08)

The operand fields, when present, follow the operation field and are separated from it by a white space. When two or more operand subfields appear within a statement, a comma must separate them.

The following table lists the addressing mode notations allowed in the operand field:

Table 1. HC(S)08 addressing mode notation
Addressing Mode Notation Example
Inherent No operands RSP
Immediate #<expression> ADC #$01
Direct <expression> ADC byte
Extended <expression> ADC word
Indexed, no offset ,X ADC ,X
Indexed, 8-bit offset <expression>,X ADC Offset,X
Indexed, 16-bit offset <expression>,X ADC Offset,X
Relative <label> BRA Label
Stack Pointer, 8-bit offset <expression>,SP ADC Offset,SP
Stack Pointer, 16-bit offset <expression>,SP ADC Offset,SP
Memory-to-memory immediate-to-direct #<expression>,<expression> MOV #$05,MyDataByte
Memory-to-memory direct-to-direct <expression>,<expression> MOV DatLoc1,DatLoc2
Memory-to-memory indexed-to-direct with post- increment X+,<expression> MOV X+,<expression>
Memory-to-memory direct-to-indexed with post- increment <expression>,X+ MOV <expression>,X+
Indexed with post-increment X+ CBEQ X+, Data
Indexed, 8-bit offset, with post-increment #<expression>,X+ CBEQ #offset,X+,Data