Você está na página 1de 20

MICROPROCESSOR BASED SYSTEM

EE-411

Lecture # 8
The Addressing Modes of 8085
Microprocessor
Addressing Modes of 8085

To perform any operation, we have to give


the corresponding instructions to
the microprocessor.

In each instruction, programmer has to


specify 3 things:

◦ Operation to be performed.
◦ Address of source of data.
◦ Address of destination of result.
Addressing Modes of 8085
The method by which the address of
source of data or the address of
destination of result is given in the
instruction is called Addressing Modes.

The term addressing mode refers to


the way in which the operand of the
instruction is specified.
Types of Addressing Modes
Intel 8085 uses the following
addressing modes:

1. Direct Addressing Mode


2. Register Addressing Mode
3. Register Indirect Addressing Mode
4. Immediate Addressing Mode
5. Implicit Addressing Mode
Direct Addressing Mode
In this mode, the address of the
operand is given in the instruction
itself.
LDA 2500 H Load the contents of memory location
2500 H in accumulator.

LDA is the operation.


2500 H is the address of source.
Accumulator is the destination.
Direct Addressing Mode -Explanation
• Specified 3 byte instructions format.
• Byte 1-opcode , Byte 2-low order byte
and Byte 3-high order byte of the address
of theoperand ( 16- bit address)
• Requires a lot of program memory space

Example:
> LDA – Load A Direct (Refer The Figure
Below)
> Others Instructions: In, Out, STA, LHLD,
etc…
Direct Addressing Mode Explanation
Register Addressing Mode
In this mode, the operand is in general
purpose register.
MOV A, B Move the contents of register B to
A.

MOV is the operation.


B is the source of data.
A is the destination..
Register Addressing Mode, Explanation
• Many 8085 MPU instructions use register
addressing
• Specify one of the registers A through E, H or
L as well as the operation code.
• Use 1 byte or 2 byte instruction
• The operand is retrieved from internal CPU
Register
• Example,
>SUB L–Subtract L from A (Refer to the Figure
below)
First data : from Accumulator (Register A)
Second data : contained in register L
> Others Instructions: ADD A, ADC B, ANA C,
MOV A,L ,MOV A,L , MOV H,A , etc….
Register Addressing Mode, Explanation
>SUB L–Subtract L from A First data : from Accumulator
(Register A)Second data : contained in register L
Register Indirect Addressing Mode
In this mode, the address of operand
is specified by a register pair.
MOV A, M Move data from memory location
specified by H-L pair to accumulator.

MOV is the operation.


M is the memory location specified by
H-L register pair.
A is the destination.
Register Indirect Addressing Mode- Explnation
• The instructions reference memory using the
content of a register pair.
• The instruction MOV M,C moves the contents of
the C register into the memory address stored in the
H and L register pair.
• The instruction LDAX B loads the accumulator with
the byte of data specified by the address in the B and
C register pair.
• Example:
>MOV A,M – Move memory loc. (H&L) to A (Refer
The Figure)

>Others Instructions: ADD M ,PUSH H, CMP M ,


ANA M , etc…
Register Indirect Addressing Mode- Explnation
MOV A,M – Move memory loc. (H&L) to A
Immediate Addressing Mode
In this mode, the operand is specified within
the instruction itself.

MVI A, Move O5H in accumulator..


05 H

MVI is the operation.


05 H is the immediate data (source).
A is the destination.
Immediate Addressing Mode
• Data immediately follow the op code in program
memory.
• The operand comes from next byte in program
memory.
• The immediate instructions indicate immediate
data (add instruction is ADD - add immediate
instruction is ADI)
• Use 2 bytes instruction.
• Example:
> LXI SP - Load SP with immediate data (Refer
The Figure Below)
> Others Instructions: ADI , MVI A, MVI L , ORI
Immediate Addressing Mode
> LXI SP - Load SP with immediate data
Implicit Addressing Mode
If address of source of data as well as
address of destination of result is fixed,
then there is no need to give any
operand along with the instruction.
CMA Complement accumulator.

CMA is the operation.


A is the source.
A is the destination.
Implicit Addressing Mode
• Certain Instructions is implied by the
instruction’s function.
• Not A real addressing modes.

• Example :
>STC (set carry flag) instruction deals only
with the carry flag,
>Others Instructions : HLT, etc..
Implicit Addressing Mode
>STC (set carry flag) instruction deals only
with the carry flag,
THE END

Você também pode gostar