Addressing Modes - PowerPoint PPT Presentation

1 / 24
About This Presentation
Title:

Addressing Modes

Description:

One must calculate the PA (physical address) Register Operand Addressing. MOV AX, BX ... Used to load information to some registers. MOV AX,2550h ... Example ... – PowerPoint PPT presentation

Number of Views:210
Avg rating:3.0/5.0
Slides: 25
Provided by: eed37
Category:

less

Transcript and Presenter's Notes

Title: Addressing Modes


1
Addressing Modes
  • When the 8088 executes an instruction, it
    performs the specified function on data
  • These data, called operands,
  • May be a part of the instruction
  • May reside in one of the internal registers
  • May be stored in memory
  • To access these operands, 8088 is provided with
    various addressing modes
  • An addressing mode is a method of specifying an
    operand

2
  • Register Operand Addressing
  • MOV AX, BX
  • Immediate Operand Addressing Mode
  • MOV AL,15h
  • Memory Addressing Modes
  • One must calculate the PA (physical address)

3
Register Operand Addressing
MOV AX, BX
C38B16
Before execution
4
After execution
5
Immediate Addressing Mode
  • In immediate addressing, source operand is a
    constant
  • Used to load information to some registers
  • MOV AX,2550h
  • MOV CX, 625 decimal 625
  • MOV BL,40h

6
MOV AL, 15H15B016
7
(No Transcript)
8
Direct Addressing ModeMOV CX, 1234h12340E8B16
9
(No Transcript)
10
Register Indirect Addressing ModeMOV AX, SI
048B16
11
(No Transcript)
12
Based Addressing Mode MOV CX,BX10 PA
(DS)0 (BX) 10 MOV AL,BP5 PA (SS)0
(BP) 5
13
MOV BX1234H,AL1234878816
14
(No Transcript)
15
Indexed Addressing Mode MOV DX,SI5 PA (DS)
0 (SI) 5 MOV CL,DI20 PA (DS) 0 DI 20
16
MOV AL, SI 1234H 1234848A16
17
(No Transcript)
18
Based Indexed Addressing Mode
  • MOV CX,BXDI8h PA (DS)0 (BX) (DI) 8h
  • MOV AH,BPSI29 PA (SS)0 (BP) (SI) 2
  • Other notations possible MOV AH,BPSI29
  • or MOV AH, SIBP29
  • HoweverMOV AX, SIDI displacement is illegal

19
(No Transcript)
20
Example Based-Indexed Addressing ModesMOV AH,
BXSI 1234H1234A08A16
21
(No Transcript)
22
Segment Override
23
The PTR Operator
  • MOV AL,20h 8 bit data copied into AL
  • MOV AX,20h 16 bit data copied into AX
  • INC 20h 8 bit or 16 bits incremented?
  • Byte or word or doubleword?
  • To clarify we use the PTR operator
  • INC BYTE PTR 20h
  • INC WORD PTR 20h
  • INC DWORD PTR 20h

24
Example
  • Copy the contents of a block of memory (16 bytes)
    starting at location 20100H to another block of
    memory starting at 20120H
  • MOV AX, 2000H
  • MOV DS, AX
  • MOV SI, 100h
  • MOV DI, 120h
  • MOV CX, 10h
  • NXTPT MOV, AH, SI
  • MOV DI, AH
  • INC SI
  • INC DI
  • DEC CX
  • JNZ NXTPT
Write a Comment
User Comments (0)
About PowerShow.com