Tải bản đầy đủ (.pdf) (13 trang)

Thiết kế và lập trình hệ thống - Chương21

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (908.96 KB, 13 trang )

Systems Design & Programming 80x86 Assembly III CMPE 310
1 (Mar. 1, 2002)
UMBC
U M B C
U
N
I
V
E
R
S
I
T
Y


O
F


M
A
R
Y
L
A
N
D


B


A
L
T
I
M
O
R
E


C
O
U
N
T
Y
1

9

6

6
Systems Design & Programming 80x86 Assembly III CMPE 310
2 (Mar. 1, 2002)
UMBC
U M B C
U
N
I

V
E
R
S
I
T
Y


O
F


M
A
R
Y
L
A
N
D


B
A
L
T
I
M
O

R
E


C
O
U
N
T
Y
1

9

6

6
Stack Instructions
Systems Design & Programming 80x86 Assembly III CMPE 310
3 (Mar. 1, 2002)
UMBC
U M B C
U
N
I
V
E
R
S
I

T
Y


O
F


M
A
R
Y
L
A
N
D


B
A
L
T
I
M
O
R
E


C

O
U
N
T
Y
1

9

6

6
Stack Instructions
Stack Seg
push eax
0 7 F E
AH
AL
esp = esp-4
is performed
before the
PUSH
000007FA is
new value
0 0 1 0
+
Seg
Base
Paging
Trans.

FFFF6AB3
6 A B 3F F F F
0 0 0 0
Systems Design & Programming 80x86 Assembly III CMPE 310
4 (Mar. 1, 2002)
UMBC
U M B C
U
N
I
V
E
R
S
I
T
Y


O
F


M
A
R
Y
L
A
N

D


B
A
L
T
I
M
O
R
E


C
O
U
N
T
Y
1

9

6

6
Address Loading Instructions
lds edi, LIST ;Loads edi and ds.
lea eax,[ebx+ecx*4+100] ;Loads eax with computed address.

lfs esi, DATA1 ;Loads esi and fs.
Systems Design & Programming 80x86 Assembly III CMPE 310
5 (Mar. 1, 2002)
UMBC
U M B C
U
N
I
V
E
R
S
I
T
Y


O
F


M
A
R
Y
L
A
N
D



B
A
L
T
I
M
O
R
E


C
O
U
N
T
Y
1

9

6

6
Address Loading Instructions
mov ebx, edi
;Move the contents of edi into ebx.
lea ebx, [edi]
;Load the contents of edi into ebx.

mov ebx, [edi]
;Load the value at edi into ebx.

×