0% found this document useful (0 votes)
3 views3 pages

MPU3 Short

The document outlines the addressing modes of the 8086 microprocessor, which describe how data can be accessed during programming. It details various modes including Register, Immediate, Direct, Indirect, and several others, providing examples for each. The document serves as a guide for understanding how data is moved within the processor using assembly language instructions.

Uploaded by

thwabahlhmali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views3 pages

MPU3 Short

The document outlines the addressing modes of the 8086 microprocessor, which describe how data can be accessed during programming. It details various modes including Register, Immediate, Direct, Indirect, and several others, providing examples for each. The document serves as a guide for understanding how data is moved within the processor using assembly language instructions.

Uploaded by

thwabahlhmali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Microprocessor, Lecture#3a

8086 Addressing Modes


The programming model of the 8086 is
considered to be program visible because its
registers are used during application
programming.

Addressing mode
The different ways in which a processor can
access data are referred to as its addressing
modes. The data could be transferred using
MOV instruction in assembly language:
MOV Destination , Source
The Source could be immediate data, a specific register, or memory location. While the Destination could
be a specific register, or memory location.

Addressing Modes

Register -1 Immediate -2 Memory String I/O Implied


Addressing Addressing Addressing Addressing Addressing Addressing
Mode Mode Mode Mode Mode Mode

Direct -8 9- Indirect
Port Addressing Port Addressing

Direct -3 Register -4 Based -5 Register -6 Relative Based -7


Indirect Indexe Relative Indexed

1. Register Addressing Mode


Use a register as a source and destination operands for an instruction.
Examples:
MOV AX , CX ;AX ¬ CX (Copy the content of CX register into AX register)

MOV BL , DL ;BL ¬ DL (Copy the content of DL register into BL register)

2. Immediate Addressing Mode


An immediate number is used as a source of data for an instruction.
Examples:
MOV DX, 05h ;DX ¬ 5 )Put the number 0005H in the DX register(

MOV AL, 2Fh ;AL ¬ 2Fh (Put the number 2Fh in the AL register)

1
Microprocessor, Lecture#3a
3. Direct Addressing Mode
Data at any memory location is addressed “Directly” by a number.
Examples:
MOV AH, [0001] ;AH ¬ DS:[0001] (Copy one byte of the memory location at DS:[0001] into the AH register).

MOV SS:[0009], 04 ;SS:[0009] ¬ 04 (Put the number 4 in the memory byte addressed by SS:[0009])

4. Register indirect Addressing Mode


Data at any memory location is addressed by a register (BX, BP, DI, or SI).
Examples:
MOV DH, [BX] ;DH ¬ DS:[BX]

MOV [BP] , 22 ;SS:[BP] ¬ 22

MOV WORD PTR [BX], 2Fh ;DS:[BX] ¬ 2Fh & DS:[BX+1] ¬ 00h

5. Base Indexed indirect Addressing Mode


Uses one base register (BP or BX) and one index register (DI or SI) to indirectly address memory.
Examples:
MOV CH, [BX+DI] ;CH ¬ DS:[BX+DI]

MOV [BP-SI], AL ;SS:[BP-SI] ¬ AL

6. Register Relative Addressing Mode


Data in a segment of memory are addressed by adding the displacement to the contents of a base or/and an
index register (BP, BX, DI, or SI).
Examples:
MOV [BP-1Fh], DH ;SS:[BP-1Fh] ¬ DH

MOV AX, [BP+3] ;AL ¬ SS:[BP+3] & AH ¬ SS:[BP+4]

7. Relative Based Indexed Addressing Mode


This mode is similar to base indexed addressing mode, in addition, it adds a displacement besides the base
and index register.
Examples:
MOV AL, [BX-DI+2] ;AL ¬ DS:[BX-DI+2]

MOV [BP+SI-1], CL ;SS:[BP+SI-1]¬ CL

8. Direct IO port Addressing Mode


If the port address (port #) is 8 bits it can be written immediately.
Examples:
IN AL, 3CH ;AL ¬ port #3CH
2
Microprocessor, Lecture#3a
OUT 78H, AL ;port#78H ¬ AL

9. Indirect IO port Addressing Mode


If the port address (port #) is a 16 bits number, the DX register must be used.
Examples:
MOV DX, 0378H ;DX ¬ 0378H
IN AL, DX ;AL ¬ port #378H

MOV DX, 048FH ; DX ¬ 048FH


OUT DX,AL ;Port#048FH ¬ AL

Note: you can use Indirect IO port addressing even if the port address is an 8 bit.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy