Immediate Addressing Mode - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

Immediate Addressing Mode

Description:

Immediate Addressing Mode AL 00 Mov AL, 3CH AL 3C Register Addressing Mode Direct Addressing Mode Register Indirect Addressing Mode Base + Displacement Base + Index ... – PowerPoint PPT presentation

Number of Views:234
Avg rating:3.0/5.0
Slides: 10
Provided by: msst155
Category:

less

Transcript and Presenter's Notes

Title: Immediate Addressing Mode


1
Immediate Addressing Mode
AL 00
Mov AL, 3CH
AL 3C
2
Register Addressing Mode
AL 00 BL 4D
Mov AL, BL
AL 4D BL 4D
3
Direct Addressing Mode
Mov CL, 0020H
Memory (data)
CL 78
Mov CX, 0020H
CX 5678
Mov ECX, 0020H
ECX 12345678
Little Endian Format The little end of the
number is stored first.
4
Register Indirect Addressing Mode
Mov SI, 0022H
SI 0022
Mov CL, SI
CL 34
In the 8086, only BX, BP, SI and DI may be used
as memory pointers. Later processors dont have
this restriction.
5
Base Displacement
Mov BX, 0020H
BX 0020
Mov AL, BX 2
AL 34
Useful when accessing individual elements in an
array. Note that the array begins with element 0,
element 2 corresponds to the third location in
the array. The displacement corresponds to byte
offset from the base, not element number in the
array.
6
Base Index Displacement
(Useful when accessing individual elements in an
record)
Mov BX, 0020H BX points to record starting
address
BX 0020
Mov SI, 000CH SI points to record three
(4 elements per record x 3
records 000C)
SI 000C
Mov AL, BXSI1 AL now has the data in
element 1 of record 3 (assumes
elements are 1 byte)
7
Instruction Addressing Modes
  • Base Displacement
  • Mov AL, BX 4
  • Base Index Displacement
  • Mov AL, BXSI3
  • Base IndexScale Displacement
  • Mov AL,BXSI43
  • Immediate
  • Mov AL, 4CH
  • Register
  • Mov AL, BL
  • Direct
  • Mov AL, 20H
  • Register Indirect
  • Mov AL, SI

8
Direct Addressing Direct-Offset Addressing
.data Bytelist db 35h, 63h , 79h Wordlist
dw 1234h, 5678h .code Mov al, Bytelist
al 35 Mov al, Bytelist1 al 63 Mov bx,
Wordlist bx 1234 Mov bx, Wordlist2 bx
5678
Offset operator returns the 16-bit address of
the variable. Good for strings and arrays.
9
Direct-Offset Addressing with Strings
.data aString db ASTRING .code Mov al,
aString al 41 Mov al, aString1 al
53 Mov al, aString2 al 54 Mov al,
aString3 al 52
Write a Comment
User Comments (0)
About PowerShow.com