You are on page 1of 19

BIU

/PA = Seg X 1OH\


6-Byte
pre-fetch
+offset queue

Control Unit

EU -AX
AHAL General
BH BL --BX Purpose
CH CL -CX ALU
DH DL-DX Registers
SP
BP
Operands
S
DI Flags
GND

ADs
A 37
AD
APa
AD
A
32
AD
ADa
AD
AD
ADa LK
AD 14 M/TO)
P
ADN 15
An
AIM (ALE
'1T
NTK
i19 22

DIAGsAM 0F ot6
PI

The o8G 's tHe's firts lG bt P havinc +h Kenerth


addris u s
databus TS I bit and h length ottne
Othe
tG btt data at a
TS Ro btt, tt meani he kw86 tP Can acees s

tMB o
addness" memory Ro catrons .anc
time and con
t $rtom ooo0oH to FFFEFH
ne addrte Ss Tangi
he total 1MG memoru ts egmento
As in ccaee D UP

addrte s& Can be teprteenkd in terms


he ao bt phystcal
enert adelntos anol o}|et aedelrees

address offret address


Pystcot Sement
OddoeSS
16 bit) (t6bit)
oit)
addres& Klo t ohtaet addree es
agroet
adedress
he ctoK 4rreqenty of 82&6 AP Yariet rom
808G 5MHX
D C): 8 MM

The intrtnat rchik tHturte o oAC 10P i's dtvided tmo too

un clinal unir,
a Bus itertfaet unit (Biu)
bExecation unit ¢fu)
The out intsttaee und Conststo0 memory ntertfaca
callat the
loqie unit ohch t cued to physfcal addrtess,
ond
t n Struuchn qutue tegistrt, Segmet qsters
Anctsuctton ponter
inctruuchm
the buu inHertdaca unit *r ued to tetth
instrutton m he C byt
trtem memoru and to stove the

nstrekron qLne qTrten


tt uued ton th exeucton o the
e ex e cution unit
mtrurtim ched. by elu
hort h e exeutton h execton untt cometst o neral

arerthmetie
Arpoe gsterte , poitort, melex rteqtstert ,

nd o r e unit taq neTstn and a contrrol Systen


aruthmettc od legre tuir s ned to pen fory
The
The
arithmetre opaattm and loocas operotm: ike nn,
OR,X-oR t
The Comtrrol SyJtem tt h e r e inrtde the Eu to cenerat

Csntriel Siqnals u pertore opeT ations ke memor e ad,

,T/0 vead and to write.


memoru weite
The bue ntdact unit & (*eevteor unit operatts
Aimultoneoncly t or febcheng and exeentom o an struttisn.
wnen
The Eu execttes an rnstructin at +he same fime BJU Can

ctch nexi ingtruuctian from the memor


On hts um uppost a prtograrn cmtaTn 1o inst gucHsnI, So,
nen the Eu ex edes me 51 inctuuetisn the intta
unt con t c h the instruuetion frram mesnoru.

wnen the exLLLettor) unttr exeste1 he 7 instcucign at

he Aame time me AU can ckch 3rrd instruetim ard Ao


TM type o orcchiteture is Known as prpelineng archie curtt
As the EU 4 B1u gperoter simulian onky to ex eute an
instructton the 8oIG AAP is atso eauecl a poralle prtocesiene.

Regstrs of 8086 AP

The o£G LLP Crmststs of 14 16-bit reqtshens can

drided tto
tdouhng ertoups
1 Geneva urepose reishrs
a eqment rteqtthns

pointert ancd tndex negtstrtt


4.Hlag rtegtsttrts

1. (generat purrpose Reqtstrts


The&o AaP is harmg general punpose rskr
A X > a cmulator

bX are oeotster
Cx Court rtetsot

DX-> Data tetstrt

cistert The Ax 7qtstt ts eed fort he qener al puepose

s btt reqit
dota cAYs age con be dirided coto potts to act as

Ax
A

tppen
n
peetat purrpose of the acunukatort t tt stures *he
tesutt qort the mutttpkicatio) and ivtTo) Gperreutom and tor
d
Sdbtt ulttolication the ono dtistrn he towert 16bit o
the resul horted in the Ax rte0t sttr
SX tstns: 1he Bx e qistert is atso ud orr gene ra

Purpoce data soage Can be dmded to act a1 8 bet rugiturs

BX

BH BL

btt

Te Spe traputposeof Bx Teatstrt ts tt can i nd t

stoe okhset addrert


The cx rtacqtstert Càn be ued
CX negrsturs
pe dmded cnto
a partts to act a s
Purpoce deta 6tre can

8bt zegistert

CH

uppe hit
he ount ralue
act a Coumen fo a t o e
Can be
perattom <s pAr forme
when Aome loos operatton or gtrunoj
a: a Cowtrt to
CL heqit trr acts
ore& btt optatton,

Atore Count valsue


atso tuled oqenemal
T e Dx veqTstr s
Px mqi turs egu r t
and a
AA 8 bit rt

Can
bt dmd ect
Pupot

DH DL

ower
UPpud
ott

ushen the p apersotion ti pettoroncd,it ca cwed t


Mene dhe vortabft poet adduert o o deites.
foT 4he division operatto h con be-ued he rtemoindert

and th 39 b t rullhplieclin
t shoted incide he Dx rteqrire torr
ti $thorced cnstde fhe bx reg'trt.
Grersahom,he uppar 6brt

grme Ktqisturs

oc04tn arre
os6 L0P 4he total1 MB od mecmory

dided evto ge2mets


Cod stqmut
Darta secmemt
Cxtra Jeamint

Sta.ck srnen

The mermorty adodtessin caparty ot each A2gmert s

adaneIs TDrt each sLgment rs 0000H to


CuK3 So h e Tange
cu 6lteet aldress Can be
FEFFH These addressei arte Knoum

toved ènatcle Pointert & mdex rteqitkrts


and
each kegrment he sgrment addtees tsed
ort
addrtess verues
tme ekkset above gment
To stoe h e Acgment address O the
cued
gnent neqtktt ert
rgistert)
CS cacie Atgonent
The cs ts wed to storte the incts cucttoy and he cs
to torce the segment addre s t o the cocle
Heqistert rs wd

nert
ate Lnerrt Teqtstre (,D $)

The Ds tsuued to store 4he cdata and he ni neqtst


s e d 4o ktorte 4he Aeqmem adelrtess othe data seqment

Ertrca segment reqisterc ES)


The t c e e t r f v e tht data oand Et rreqisk
tS usecd to
Sto at the 6eoment addre ss o he dataAegert
Stack segment tegrsten (ss) The $s tsCefort cta oK
Cmoty and s arqestet is uned to tore the segmant

acldrte cs ostack Acment


3. Po intert and
Tndex Reg{tterr
he porHert indlex reqts tt cán be ued Itorte oo
addste cses
a StacK Pomtert The Staepomtc can be wed to imctale
m m
he tack ryemortY Ort aluuays pomts to the t a tK top. .

The s e addnett ot the staCK Aonent ts Atre d mstcle


he staK po mttrt
the stack hegment can he reprenettd as SS SP

porturt to
Stack A2gment aclolrneCs
SS Statik To

SP O e add ress.

b. Baie pointrt h e hau pomter TS als0 uNo to shonethe

Pretrierei he data ytom


Ce the sta d memory
he stacK top.
e r u r e s he data
SSBe
om-he stack top)

Stgment tser
addoe s QdedresSS

uscd to shoye the


Ourte 2ndex
The si neqrs fcrr ts
t data 8tmert can
addrest ot data segmet
Ohhtet
Tpreentrd a

PS ST

Stgned bhser
addgess a ddresS
d dectinodton index The 1 rtetser( t *o u e to torme the

Ase addret ertta sment ad the eytta heg mevt Can

Instruu chon Pomntrt 7he mstruttion pointe Led to Htorte

and h e tode
cocle earnerrt
ne obbcet addrtess tor fhe
rteprteaertt d
CS1P.
Can loe
ACgmem

4. tlag Restskn

D1 Pr4 D13 P1 Dn Dio D Ds Da D Ds D4Da D D D

The glas Reqisiet is a to bit negtitorr (msrst o 5


The a e
and othert 3 jta ane
cohch c klag arte statui a
Tt
csoolag
COYTHttoltag

C-Cartr Hags T- trtap a


nterupt enchle Ha2g
P-paratHag 1
D ditection tla
AC Auxrary ftag
- 2erto Hag

S- Scgn Ha
0-Orer{low a
7att the
The Atactus tags oaq vruqister( can be Att or o
esult of 0
Pclepending m "he arrthmetic und loqce peratione.
the contrto| Rags con be retet ort set by the usen th ou

the instruuctBon.
Overttto ttag when the rteseuti o an apevtion ts cout o

s get otthermixe it esets.


rop the overlouw flag
Conelrttom otovet{lo
0801.1
Fort
or t an arthmete
an
ort
togie opesakon
opecoton i Carisu
cort oto MSB
io MSB
tS nol &ame as e Cortrte out 0 MSB, he
ovtHow fiag
Lohen ovtre lot oceeres also
the sa floq t nco rmec.
3. hen tot on A L ope-ration ,the Cortr to NSB T
e m e af
earts t o MSB , the oeo
HSB
Ex
Cayio O1O. 1.0. o o o0O
00 Olo loor
t0o lo
too o000

Cartry ouo Overtlow tag1


MSB
P l a g incaneet

d111 1111
11 1 1 0111

1 0111 01L0
MCB
i h Hsg Cay out o
Herte Cartra
0.
So owertlow Fla
ap Hag a
he taa tstort 1s
sap tag when the
the îmstreeetion of a pnogram
a
he toG /0P ex eewetes

mode
in cleboaaa
exeuton otcach suchon the INT,
T
In this modr, a{tst
exeeufed whic h clisplay rte sCut o each
Cntopl
inct otion Tn Sentpt soteeD Inthry wa bhe prtoc astor
Check tshelhert all intdxurlon ame cormect or not

TreTopt enabl Han: shen he intertrpt enab Re bct r

he E P Can
a 4he SKable nteetetsprts Occotor

ecognise o by thc top.


not
i99 s 7erco, ma skable înierupt e e : t art
e cegnised by fhe AP
skable i*roupt occeutc it caritbe 2gnorec b
a non nma

ti 1 or 0
he af shethert the 2 Hag
Dimecton He
Soutce Strung Desttnaton stran
500)H
5H
QSH 5002H
0oaH
o3H
5do4H
5bo5H
oo5H
coH SDOCH

81H SDOH
1aH 500tH

00H 5boAH

ES'DI
bssIL
w h e n the ditechon a g bi s zesto durtng the Strmej

gperotion he ST and DI qet incrtemernted


rresistor is 1,the
en he dimector ftag bet o the log|
ST Ord DI qets cdeetamenttd.
to eset cleat he dcrechm tla9
CAD instrusion 7c ueeo
or

STo instruuetion es used to set dtrection ftas

S16NAL DE SCRIION OF 8086 ALP


The to 86 kaP 1s CHo pin I¢. Depenclrmg uponthe mode
Dopeatton the tos 6 mP pns arte drvicled trB 3 parts
Common pins Pns in
minmum moce maxmury mode
AD,- ADis LOR
A! S AnlSe HOLD
RQ IGT
BHE 3 HLDA /4T
MN /N M/TO Sa.
D DT/A loCK
NMT DEN

NTR ALE
CLR INTA
TEST
READy
RESET
Vec

CoMMON PINS
1. MN/Mx - K i h e n h e HNJMR t htqh ,the to&t LP openatc

the 6T9nal om NNMX t l


2n mcnmcay mode and aohen
nmaymum mode
he oL6uP 6peraes 10

mode
(hrgh (+5v) ,
mencmu
NNJ
NN AX
ma kmury meda
Tow CGNO) ,

Tn mcntmtem moe 6n 6neP can be intempaetsed

Tth memore and Ilo derteef.


má nemum nmodR morte than &ne P can oe congeured

duTceA
2to
,

srth he memort| and

.AD,ADs Thete aute he addtets ecem) olrta bus 9 ms Can

be act a addeess but t Ao-A15 durng h T, stak od

macrn c
ana Can be act as datahu
ne bt Caete
he tett
o the States o the hus ceele
D.- Ds durunq
3.
Aic 3 -

A1/Sc- There oee -the addrtess Cm status pms


whmch carnttei acddtes durttmg e T State tt. frrom Atc -A
ond cartrtîes tattus nercmato) S to s, durting the rrest

oAhe tates (T.T3 %)

Su S operatton

Cxtrta Segmenr

Sto CK 6eament
Cecle seg met

data aemi

Ts alwerya loud and no operateon Ts pertoer


neAtgral on S
Stat
s 6 cAurine he T. Ta Ty
Cohen the înkrupt enable Aag btt s 1,he seanat m
the
S5 ts hèsgh and ohen he intorup enable Hag bt o
Hag reatsertti Kero , the Ktqnal n s_r l

4DHES (Bus high enable statu)


t
The fotak iMB o &ot HP aR-AP s dtreded

parts. (5ia KB)


ben, /hghert mermore bank.
Odd memorp
bank / lowert me mor bank, .
(S13 KB)
Erenmernor

Odd mernori bank

0 0003H, OOO0S H FFFFPH


O0001H,
e n neroor|anK
FFFFE H
00o00H, O0002H, O000uH
Laation
o&G AAP to Atore &8 dit dta 1. mrmone|
Cae
o
an odA addoesS o n a n e v e ) Addatess.

is TeANTTe{
nd totoe t6bit data a memorty locatton
n t eve addoee Gne next ome odd adclr ess
when he
ignal m BHE slow, orld mermorty bank o
t memort bank, îs enabked fort data reansk.
Dhen he
sqnel on BHt s hqh, odd mernoru nk,r
gh mernort bank ii dtsablec.
when 4he &tqnat n A, is low, erenms mernory bark

's enck.Qed tert data troonst


1f diuokkd.
eer, hecoory bonK
when-the tqnal an A, is h,

BHE opematr mp

tGbtt data trran est


oc
8 bit data trranctere trram an
O addrriss

on an erte
8 btt data trransks
address

1 no data trrane

3-01.19
eren adolritse d n b u
trtanskert s bit data tem an

o
ReNOT machme eycle ts rreqATTAC
Cycle o e
odd addrttii
mi
b
to rransut bit olata ort ar

Cyete roachne Ce
ts rteouind.
o n ven
addrtess,he data
is storted m
a IG btt data

TS@liqned.
data 1a34H

0bOH
ootH
data ii aliqned

tG btt datatom
dn eren ackdrcess Me
t o rronstest
Cycle/ machcne cycle ts rçe9uiTeet.

I bet data tf 6hoxt crom a edd ddess the olata


T a

v licned.
7)
Ex Odatas 29A H

TAH
SDOIM
turO u
ocld addrcags
Arrant lc bit ata tarn an
So,
lowert
4rhe 11 hus uycle
Cyotes mchtne Cyole tevittd. Durin
ts tonstestred a add adodrte?s and dununa

he Aeconcl u t Cyelthighert e bit data is trearnskrreac or


x nxd cmg ecuteve Cen addrcecS
ord Ty
deurting the T.T
The seqnal on Sqts ouoays high
bu cyete.
ta othe
5RD Reacd csntrol siqmal)
RD
korcmecfhe stqmal
on
ts pert
ohen Tmad ope rotion

inteoaupt)
6NMT n o n maskable
ooltcctet nsn

Chen h e stgnat on NMT Ts htqh, tt


cohteh cas F bL iqnorted
masaobke mkTupt o c c r t s
t mdtcetes
Vohen he stqnat an INTR TS htgh,
INTR
oCcurts htch can be T9Nortac
mask able t m e u p t rteouest*

loweit prroretty
14 is the moskale interupt havin
Can be
CLK Ths Es the clock înrt pn ot &O8GLaP
pm of asy ClockK
dirte cRH Conneckd h he clocK p
Ymeeessary ClCK freqency
nerortor Lohtch prtovrdes
ocKrtenueney Craystal frteq

5 MHT

8AHZ
1ONHX
REAP The giqa an REAn is low he f urill
o
Sfa t means a leort dlevite is not synchntnthed
tor d a t a
Or data tan gdert ot a device is not e ady

trtansket
dere
wnen 4he on REAoy 1 high, a slooes
ATg
wmthef Brt
Anc hutentged nd neady for dota transhut
Atatt.
the ker omes out he wait
w l be
lo. TEST- When th stqalon TEST b is hègh, the p
wart
Atoe the ins fructims
a t o r e s t tete. 9n his
uwrll be execeutd by me &ox P
csmes out
TEST is los, he to&t MP
I*he Atqnal on

wait nstruuekoms tt any


h oait tot t t tate and
A.
2n h e prroqram can e 2qnored oy tm

he atqal on
REsET 7P
operaton
RESET- Forr he RESET
o T StateS ort Clock cyelRs
artound
shoutd be htgh s
ts pert kormed,
atL me da
CDhe RESET peration
and
Kreord instde general ppose rteqir tertt, porrt
tegrttt, Aeqment rteqTstrtt a extapt
ndex e qtttert, ag h e addreSs o
eTasd and
ane
Code kacment Reqrstet
tare omFFFOH

he Cede hegment
(+5v)
Tt tsHhe opecating roltage
12 Vce
to o vota
nEQly emal
1 . GRD

Pins i rmmmum modle

when h t wrcit peratidn ts per korcmed h e giqnal

6)wR louw
Tnts
3. HLDA t kneun as DMA a cKnOXed ptm o t
4 /T when erneroperattón putkorcrne,4the Arqna)
on H o is high ard ahen /a apration tr perc kertmed ,he

iqnal on M/To is low

SDT/R- Data 41tanrnit /Receive


when da-ta is trtancnittecl np t o nernorty 0t 1

deviCe ort shen KAd opersation ts pertort med ,the T/R

when data ts Tecore d hy he P rsm


Snal tr
htqh.
memort on to devices, the eignal on DTIR d

GDEN pata mble)


enabkes 89&e bidinetin
Cohen the stoal on DEN 1s low, it
tha
u rane cerert crt data frtan stest bidirectiorollty betuwten

4o deCS
JP and memor ort
tt enaktu 82ta
ALE_ when the tqnal on ALE is htgh,
+o Ratch h e addrnërs
Ap-A|t rtoT) AD,-AD5 durm
Latch
the T Stateof the bus Czyele.

6 INTA This ts Knoun as the iterpt acK of oi6 MP

Pme i) maxmum modR

RQIGT. and Ro/G7 Request & Jmot pim)


m*he
thepe pme Orte med o OnA opeTation

Ae

RQ uAed }ort DMA deest


GST. GT, ued ort Dng acknowfetemet
n 4e nanum ade o 0G AP ad afme derces

Can Prnd et ai
DM epest Stqrals hioqh Ra/GT. Cr

s KR/ G, t Ra/GT. harinq the highert prttortt


(10
a S, So $1ottc iqmt to na. moce)
he , S , and S can bedeeneloed by 2R bus tarrtrro/lert
e
(aatt Vartour Cartro) iqnals n he TnyTensrr)

0perodion

Interoupt ack INTA


91oread CTORe
wrcrte Towe, ATOw)
O1 1
Hatt CHLT)
pode Feteh CMRDC

101 nemoruy read NRDC


11 0 memoy STute (MwTC AMWC
111 io opeation NO)

mad Cantrtol 9T¢mal


LoRe 1
Lowe o writ Contrrol tgnal
Advanca vorit comtrtol Arqnal
ATCwe
Csntttol STqnal
ROC Memor

w r i k control stqnal
MWTC
Memory
memortySTUR
Contiol stqnat.
AMWC- Adrance

ohen the sianLoCK is ou,the matruct an


LOCK
tnstractcom
only Can be executd
by the Xock
prtetixec
a x m e i nocle Cg t he same tme
e 8og G RP
addtese u ! , e data
bus R e l t as he contrro! u
Hne

wilt net u e d by othest afP

sond Qs. The cto a qs, Rnt Qs mdracter the


A4ck of G bie nctraefco) meue ereqisiese
S
rs
actian yreue (eqrt+er
4he r o s t r u c t i n tetthed by
s btr of
e metrur tion oue q1str
ernpty,
straetion e u e tegTs tert

he 7nctruction t:tched by
11 ne r tgof
m e t e t cfis) O u u l
r egistert
Vss 40 Vcc
39 ADIS
AD4
38 AD/S
AD1
AD2 4 37 AD,/S
AD 36 AD/
AD 6 35 AD,S
34 BHE' S
AD,
AD 33 MNIMx
32 RD'
AD
31ROGT HOLD
AD 10

8086 30 Ro GT HLDA
AD 11
AD 12 29 LocK' WR
28 s Io'IM
AD,13
AD 14 27s DTIR
AD 15 26 DEN
AD 16 25 Qs ALE

NMI17 24 Qs, INTA

INTR 23 TEST
CLK 19 22 READY
Vss 21 RESET

Pin diagram of 8086 Microprocessor

You might also like