CPU16
REFERENCE MANUAL
DATA TYPES AND ADDRESSING MODES
For More Information On This Product,
Go to: www.freescale.com
MOTOROLA
4-5
4.3.2 Extended Addressing Modes
Regular extended mode instructions contain ADDR[15:0] in the word following the op-
code. The effective address is formed by concatenating the EK field and the 16-bit byte
address. EXT20 mode is used only by JMP and JSR instructions. JMP and JSR in-
structions contain a complete 20-bit effective address —the operand is zero-extended
to 24 bits so that the instruction has an even number of bytes.
4.3.3 Indexed Addressing Modes
In the indexed modes, registers IX, IY, and IZ, together with their associated extension
fields, are used to calculate the effective address.
For 8-bit indexed modes an 8-bit unsigned offset contained in the instruction is added
to the value contained in an index register and its extension field.
For 16-bit modes, a 16-bit signed offset contained in the instruction is added to the val-
ue contained in an index register and its extension field.
For 20-bit modes, a 20-bit signed offset (zero-extended to 24 bits) is added to the val-
ue contained in an index register. These modes are used for JMP and JSR instructions
only.
4.3.4 Inherent Addressing Mode
Inherent mode instructions use information directly available to the processor to deter-
mine the effective address. Operands (if any) are system resources and are thus not
fetched from memory.
4.3.5 Accumulator Offset Addressing Mode
Accumulator offset modes form an effective address by sign-extending the content ac-
cumulator E to 20 bits, then adding the result to an index register and its associated
extension field. This mode allows use of an index register and an accumulator within
a loop without corrupting accumulator D.
4.3.6 Relative Addressing Modes
Relative modes are used for branch and long branch instructions. If a branch condition
is satisfied, a byte or word signed twos complement offset is added to the concatenat-
ed PK field and program counter. The new PK : PC value is the effective address.
4.3.7 Post-Modified Index Addressing Mode
Post-modified index mode is used only by the MOVB and MOVW instructions. A
signed 8-bit offset is added to index register X after the effective address formed by
XK
:
IX is used. Post-modified mode provides enhanced block-move capabilities —
programmers should carefully consider its effect on pointers.
F
Freescale Semiconductor, Inc.
n
.