Académique Documents
Professionnel Documents
Culture Documents
ADDRESSING MODE
Addressing modes are an aspect of the instruction set
architecture in most central processing unit (CPU)
designs.
The various addressing modes that are defined in a
given instruction set architecture define how machine
language instruction in that architecture identify the
operand (or operands) of each instruction.
An addressing mode specifies how to calculate the
effective memory address of an operand by using
information held in registers and/or constants contained
within a machine instruction or elsewhere.
3 BASIC ADDRESSING MODES
IMMEDIATE ADDRESSING - This is the simplest form of addressing. Here, the
operand is given in the instruction itself. This mode is used to define a constant or set
initial values of variables.
EX. MOV AL,20h , MOV AX, 1234h
INDIRECT ADDRESSING - the address field of the instruction refers to the address
of a word in memory, which in turn contains the full length address of the operand. It
requires two fetch operation to obtain an operand value.
EX. MOV AX, [BX]
RELATIVE ADDRESSING
One of the commonest address construction techniques is relative
addressing, in which the operand field contains a relative address, also
called an offset or displacement.
The instruction also implicitly or explicitly identifies other storages locations
R1, R2,. . .Rk (usually CPU registers) containing additional addressing
information. The effective address A of an operand is then some function
(D,R1,R2,Rk).
In most cases of interest, each operand is associated with a single address
register R from a set of general-purpose registers, and A is computed by
adding D to the contents of R, that is,
A := R + D
REASONS FOR USING RELATIVE ADDRESSING