4 - Addressing Modes
4 - Addressing Modes
COLLEGE OF ENGINEERING
Electronics Engineering Program
MICROPROCESSOR ARCHITECTURE
Addressing Modes
ADDRESSING MODES:
Types of Addressing Modes for 8086/8088
1. Data addressing modes
2. Program-Memory Addressing Modes
3. Stack-Memory Addressing Modes
ADDRESSING MODES:
Data Addressing Modes
An addressing mode means the method by which an operand can
be specified in a register or a memory location.
8086/8088 provide a seven Addressing Modes:
1. Register Addressing
2. Immediate Addressing
3. Direct Addressing
4. Register Indirect Addressing
3
5. Base–Plus–Index Addressing
6. Register Relative Addressing
7. Base Relative–Plus–Index Addressing
NO!!
Example:
MOV DS, 0123H ; illegal instruction!
The registers used for this purpose are SI, DI, and BX They must be
combined with DS in order to generate the 20-bit physical address.
12
13
15
16
17
25
26
27
28
29
30
31
32
33
34
35
36
37
Examples:
MOV AX, [BX+4H] ; move contents of DS:BX+4H into AX
Physical Address = DSx10 + BX+4H
MOV CH, [SI+5H] ; move contents of the DS:SI+5H into CH
Physical Address = DSx10 +SI+5H
MOV AH, [DI+1H] ; move contents of the DS:DI+1H into AH 39
Physical Address = DSx10 + DI+1H
MOV [BP+2H], AL ; move contents of AL into SS:BP+2H
Physical Address = SSx10 + BP+2H
1. MOV [BX+20H], AX
Solution:
Physical Address = segment reg. x 10 + (offset reg.) + displacement
1. DS:BX+20H location 47120H = (12H) and 47121H = (25H) 41
1. MOV [BX+20H], AX
2. MOV [SI+10H], AX
Solution:
Physical Address = segment reg. x 10 + (offset reg.) + displacement
1. DS:BX+20H location 47120H = (12H) and 47121H = (25H) 42
2. DS:SI+10H location 46496H = (12H) and 46497H = (25H )
1. MOV [BX+20H], AX
2. MOV [SI+10H], AX
3. MOV [DI+4H], AX
Solution:
Physical Address = segment reg. x 10 + (offset reg.) + displacement
1. DS:BX+20H location 47120H = (12H) and 47121H = (25H) 43
2. DS:SI+10H location 46496H = (12H) and 46497H = (25H )
3. DS:DI+4H location 4D504H = (12H) and 4D505H = (25H)
1. MOV [BX+20H], AX
2. MOV [SI+10H], AX
3. MOV [DI+4H], AX
4. MOV [BP+12H], AX
Solution:
Physical Address = segment reg. x 10 + (offset reg.) + displacement
1. DS:BX+20H location 47120H = (12H) and 47121H = (25H) 44
2. DS:SI+10H location 46496H = (12H) and 46497H = (25H )
3. DS:DI+4H location 4D504H = (12H) and 4D505H = (25H)
4. SS:BP+12H location 27826H = (12H) and 27827H = (25H)
45
46
47
48
49
50
53
MICROPROCESSOR ARCHITECTURE
Addressing Modes