Application Note
AN1218 Rev. 2
6
Extended instructions can access any address in the memory map.
Extended instructions are three bytes long and contain the opcode and
the two-byte operand address.
Indexed instructions with no offset are one-byte instructions that utilize
the index register of the CPU. CPU08 also uses the H:X register
containing the high byte of the address operand.
Indexed, 8-bit offset instructions are two-byte instructions that utilize the
index register of the CPU to access data at any location in memory. The
8-bit unsigned offset following the opcode is added to the 16-bit
unsigned index register (H:X). The sum is the address used to access
data.
Indexed, 16-bit offset instructions are like the 8-bit offset instructions
except that they are three bytes long and add a 16-bit unsigned number
to the 16-bit index register (H:X).
Relativeaddressingisonlyusedforbranchinstructions. Ifthebranching
condition is true, the CPU finds the branch destination by adding the
offset operand to the PC counter. The offset is a two's complement byte
that gives a branching range of –128 to +127 bytes. This instruction is
two bytes long.
New HC 08
Addressing Modes
Stack pointer, 8-bit offset instructions operate like indexed, 8-bit offset
instructions except that they add the offset to the 16-bit SP. This mode
is available only on the CPU08. If interrupts are disabled, this
addressing mode allows the SP to be used as a second index register.
This instruction is three bytes long.
Stack pointer, 16-bit offset instructions are only available on the CPU08.
They are like the stack pointer, 8-bit offset instructions except that they
add a 16-bit value to the SP. This instruction is four bytes long.
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.