Addressing Modes; Inherent; Immediate; Direct - Motorola MC68HC05T16 Technical Data Manual

Table of Contents

Advertisement

11.3

Addressing modes

Ten different addressing modes provide programmers with the flexibility to optimize their code for
all situations. The various indexed addressing modes make it possible to locate data tables, code
conversion tables and scaling tables anywhere in the memory space. Short indexed accesses are
single byte instructions; the longest instructions (three bytes) enable access to tables throughout
memory. Short absolute (direct) and long absolute (extended) addressing are also included. One
or two byte direct addressing instructions access all data bytes in most applications. Extended
addressing permits jump instructions to reach all memory locations.
The term 'effective address' (EA) is used in describing the various addressing modes. The
effective address is defined as the address from which the argument for an instruction is fetched
or stored. The ten addressing modes of the processor are described below. Parentheses are used
to indicate 'contents of' the location or register referred to. For example, (PC) indicates the
contents of the location pointed to by the PC (program counter). An arrow indicates 'is replaced
by' and a colon indicates concatenation of two bytes. For additional details and graphical
illustrations,
refer
to
Microprocessor User's Manual or to the M68HC05 Applications Guide.
11.3.1

Inherent

In the inherent addressing mode, all the information necessary to execute the instruction is
contained in the opcode. Operations specifying only the index register or accumulator, as well as
the control instruction, with no other arguments are included in this mode. These instructions are
one byte long.
11.3.2

Immediate

In the immediate addressing mode, the operand is contained in the byte immediately following the
opcode. The immediate addressing mode is used to access constants that do not change during
program execution (e.g. a constant used to initialize a loop counter).
11.3.3

Direct

In the direct addressing mode, the effective address of the argument is contained in a single byte
following the opcode byte. Direct addressing allows the user to directly address the lowest 256
bytes in memory with a single two-byte instruction.
Address bus high ← 0; Address bus low ← (PC+1)
MC68HC05L1
M6805
HMOS/M146805
the
EA = PC+1; PC ← PC+2
EA = (PC+1); PC ← PC+2
CPU CORE AND INSTRUCTION SET
CMOS
Family
Microcomputer/
MOTOROLA
11
TPG
11-11

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mc68hc705t16

Table of Contents