Indexed

When using the indexed addressing mode, an index register is used as reference to access the instruction's operand. For the RS08, the index registers are located at $000F (register X) and $000E (register D[X]). The D[X] register is called the index data register, and can be designated by either one of the D[X] or, X notations. As a restriction, when the use of, X would lead to double commas in the assembly source, the use of, X is not allowed.

Example:

             XDEF Entry

  MyData:    SECTION

  data:      DS.B 1

  MyCode:    SECTION

  Entry:

  main:      
  CLR D[X] ; equivalent to CLR ,X


             CLR X  

In this example the contents of both X and D[X] registers are replaced by zeros.