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

Cấu trúc máy tính - Bài 2 bộ vi xử lý 8086/88 docx

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 (260.39 KB, 50 trang )

bµi 2
bé vi xö
lý 8086/88

§
§

 !"#$
% & ' () ( (*
+
1. Giíi thiÖu chung

,-./$01234567

 89:(8;<=,>

 0*(?/@#)ABC%#<D/-

,D/-@!&*
E7977/@#)ABC7#<D/-@
E797%8%#<D/-@

0*89(*+

FG$(HHI#0(G/@:6JK

J <L E 797% - 4&M 
,*4*$.NN
 E7977-4&MBF
Tæ chøc bé VXL 8086/8088
Gåm 2 khèi chøc n¨ng



§¬n vÞ thùc hiÖn EU

§¬n vÞ giao tiÕp bus BIU
2. §¬n vÞ thùc hiÖn EU

 O3
P
 QR / @ <D / S

P
 F' @   &
/TP$U
P
 MV !' WX* * #$
-@W*
FYO!Z
H4!
PFR&*
P[/T$U\C
-
[  (? !V Z ậ
/.:<  /.  # M.ữ
<.:
P
F././-*
P
M. !. W* /- *
#.-*#
Bus dữ liệu

ALU
Các thanh ghi đoạn
BUS trong
của CPU
BUS ngoài
[P
[
Hàng đợi lệnh
Hình 2.1. Cấu trúc bộ vi xử lý 8086/8088
Các
thanh ghi
đa năng
Thanh ghi
con trỏ,
chỉ số
AX
BX
CX
DX
SP
BP
SI
DI
CS
DS
SS
ES
IP
Toán hạng
Khối điều

khiển của
EU

Bộ tạo địa chỉ
Điều khiển BUS
Thanh ghi cờ
Sau alu,
* Tổ chức đơn vị thực hiện EU
ALU
Nhng imchung
1)Thanh ghi co
2)
*]FR&*
E9*(*3
E 9 *  - ;: +
$
E9F*^
_ &*(*3`..*/
a.$.]

 H4  *  <D / `<**
.$.]%#/ \B:B: B:,Bà

 &*@M(bc$d<e(V/b
D=4&!'WX**

 & *  @M 8 V (bc *
/@4  d* 7 #Z d* *- `O  !f
g]@d*2`O!fC]


\g:\C:g:C: g: C:,g:,C
0 O3G4(&*

&*

>*4*
\B
\C
\g
B
B
C
,B
h>
h
,
Q:*:/i%#
Q:*:/i7#`
#M.]
Q:*:/i7#`
#M.]
CbD:MV(Y
>j:
/k
,MV:W*Ml
Q:*:/i&'
&*-&31'
&*-&j
&*-&
jNNJiA, CƯ

F*  - ; `9 *
]

*-;H4Z

 h> - ; 3 1' `h*!
>-.]

>-;$m`*$.>-.]

 C@ & *  % # @ !&
 *  (* 3: n
!T V * @  d* 7 #
(bc

FYO31'

 Q3 1' `$*!] /@  L - #) 
-(V/b&<D/=4^

 Q3 1' (bc $d <e ! b o
  4) / U b o -
*MpCn(8 >/b(*+X*/
 = @- 3 1' (V  b
o--kp

q 1-bo--k
p: > $r /2M (* + @M * !; $*!
(V'ebo


Q3 1' /@4    MI p Csi
`C*$s$i]
t0/f31'
P
hd<eh>`$*!-.](V
;('(+31'
P
[*+(-=31'/ hhà
P
[*+(GM(XX*(+3
1'/@hhZh>
F*+$`9*]

  *  + $ `<.1
a.$.](bc!f/@h@,

 C@ & *  % # @ !&
 *  (* 3: n
!T V * @  d* 7 #
(bc

uuuuu
h @ , (bc <L - & /
1d /f j @ &  ( (*
++$

 h `$-. <.1]Z + $ H
[* + (GM (X X* <D / H
/@,hZh


 , `<.$*- <.1]Z + $
( [* + (GM (X X* <D /
(/@,hZ,

 Fb^ c *- &  <D /
<=jo(*+jH
/@ ,hZh: ( * + j ( /@ị
hZ,
A<eZhd<e&*
h: , ' b o
MV 99 #M. S L 
h-.('L,.$
*],L31'
#]qT<L31'
a)
LEA SI, source>>TUY LA 16 BIT,NHUNG CU 8 BIT CHO 1 DIA
CHI,DUOC TINH TOAN THEO LENH,L C N Y NO LAM 8 BIT 1 IA CHIÚ À
LEA DI, dest
MOV CX, 50
LAP:
PUSH [SI]>>>TA PH I CH Y EN VIECẢ Ú Đ
POP [DI]
ADD SI,2
ADD DI,2
LOOP LAP
b)
MOV SI, OFFSET source
LEA DI, OFFSET dest
MOV CX, 100
LAP:

MOV AL, [SI]
MOV [DI], AL
INC SI
INC DI
LOOP LAP


     9 5 7 6 %      9

^
v v v v
i
s
,s s Fs hs ws
v
\s
v
>s
v
s
goF*^X*#)1d/f797%x77
F*^X*#)1d/f797%x77
0ýy*&^
F
F

^
&^ ý z Q8
4






%
\s
s
i
s
hs
>s
ws
\1/*M
s/*
*Ms/*
i.{/-|
s/*
hs/*
>*Ms/*
w.-s/*
^e\s}'#8$
^ s}'#Jh8
^ @ is } ' !' W0 bc
*
^ <2 hs } ' !' W0 4
`}#]
^ ~ >s } ' $ & $ 
~
^ K.- ws }  ' !' W0 #•
9

%^
=

&
6
7
5
,s
s
Fs
,.-
s/*
.
s/*
F*s/*
^ b ,s} ? (* +
04
^ pP #&- J> #' MI G
p
^ #€MP J> @- ' ()=M S
/
^
(?
!V

A <e Z B& ( 1.4 & 
$*0bm/I&^b
'@-u
MOV AL,9CH
MOV DH,64H

ADD AL,DH
#[$UP/T\C
`\4.*</-]
P [  $ UP/T \C H4
& 4= 8 4 e  
&   $ U -k /-
I & $     S
k#@-
P [V   (bc & 
 @M \C G $d <e &
*bO
q(?!VX*

 F-
! (? !V
 ` P --/
]X*84=04z/

 Jz / (bc (b* S #)  W* 
('(G@-X*#)04z

 & T   (bc S (G * $r
(bc (b* (' 4= =- 1 (?
!V

 J= =- 1 (? !V =- * &
<zM 1 e ) @- 4z / (V
(? !V -= () & #) R #I
-@#I-@ >
3. §¬n vÞ giao tiÕp bus

BIU

 O3Z

QR/@<D/S#I
-@HMV-


    1- o
MV !' WX*  (bc *
#I-@W*
3
FYO!Z
H4!Z
P[=-(*+
P[(?!V
Pg@(c/
3

×