M68HC08RG/AD
14
M68HC08 Family Reference Guide
MOTOROLA
Addressing Modes
Inherent (INH)
The inherent addressing mode has no operand because the opcode contains
all information necessary to carry out the instruction. Most inherent instructions
are one byte long.
Immediate (IMM)
The operand in immediate mode instructions is contained in the byte(s)
immediately following the opcode. The immediate value is one or two bytes,
depending on the size of the register involved in the instruction.
Direct (DIR)
Most direct mode instructions can access any of the first 256 memory
addresses with two bytes. The first byte is the opcode, and the second byte is
the low byte of the operand address. The high byte of the address is assumed
to be $00.
Extended (EXT)
Extended mode instructions are three bytes in length and can access any
address in a 64-Kbyte memory map. The first byte is the opcode. The following
two bytes are the operand addresses.
Indexed (IX, IX1,
and IX2)
Indexed mode instructions access data with variable addresses. The effective
address (EA) of the operand is determined by the contents of the register (H:X)
added to a zero, 8-bit, or 16-bit offset. For one-byte, zero-offset mode
instructions (IX), X (index register low) contains the low byte of the EA of the
operand. The value of H (index register high) is $00 if none of the HC08
instructions that modify H are used, assuring source code compatibility with
HC05 Family instructions. The sum of H:X is the EA of the operand. For two-
byte, 8-bit offset mode instructions (IX1) the unsigned bytes in H:X added to the
unsigned byte following the opcode constitutes the EA of the operand. For
three byte, 16-bit offset mode instructions (IX2), the unsigned bytes in H:X
added to the 16-bit unsigned word following the opcode constitute the EA of the
operand.
Stack Pointer
(SP1 and SP2)
Stack pointer (SP) mode instructions operate like indexed instructions, except
that the offset is added to the 16-bit SP. Stack pointer, 8-bit offset instructions
(SP1) are three-byte instructions. The EA of the operand is formed by adding
the unsigned byte in the SP register to the unsigned byte following the opcode.
Stack pointer, 16-bit offset instructions (SP2) are four-byte instructions. The EA
of the operand is formed by adding the unsigned bytes in the 16-bit SP register
to the 16-bit unsigned word following the opcode.
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
.
..