
a 1APTER 6
ADDRESSING MODES
The majority of 68000 instructions have one or more operands. An
operand is used either as a source operand or a destination operand. A
source operand is always a data value that is only read by the instruction
and never modified. A destination operand may be read as well as
written. In other words, its value can be modified by the action of the
instruction.
The programmer normally explicitly specifies the operand or
operands of an instruction. A small number of instructions have implicit
operands. This means that a register is used as an operand without be
ing so specified. The JSR instruction is an example of this. As you will
see in the next two chapters, address register A7 is implicitly used by this
instruction.
Operands always ultimately specify a register or location in memory
where the data for the instruction is found. It is quite clear in
MOVE.L D0,D1
that the source operand is to be found in data register DO and the
destination operand is in data register Dl. If we write
MOVE.L (A0)+,D0
what does (AO) +mean? In order to answer this and many other questions
concerning operands, it is necessary to introduce the concept of an
addressing mode. The addressing mode is the method we specify for
the instruction to find a particular operand. The effective address of an
instruction is the actual location of the data. When a simple data register
is specified, the effective address is the data register itself. When an
instruction such as
ADD.L COUNT,DO
is specified, the effective address of the source operand is the location in
memory that contains the variable COUNT.
71
Komentáře k této Příručce