0% found this document useful (0 votes)
0 views

mpmc assignment 1

The document discusses the architecture and operations of the 8086 microprocessor, including its instruction set, addressing modes, and the organization of its components such as the execution unit and bus interface unit. It explains the various types of registers, their purposes, and how they interact with memory segments. Additionally, it covers the arithmetic and logical operations performed by the processor, along with examples of different addressing modes used in instruction execution.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

mpmc assignment 1

The document discusses the architecture and operations of the 8086 microprocessor, including its instruction set, addressing modes, and the organization of its components such as the execution unit and bus interface unit. It explains the various types of registers, their purposes, and how they interact with memory segments. Additionally, it covers the arithmetic and logical operations performed by the processor, along with examples of different addressing modes used in instruction execution.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Asizomtnt

t: -Explain the architecture oF tog6 p.


.
Explain thke regatey orgaui satin ard ue op
3.
explain the
togic opratons . in minimum mode
* Cxplan the addresking modrs
of to g6
¬xpl ain the caleul ation of
an addras wt
write an Ap for aith me tic
Wyite Oprations.
Qn
foy
Ay fr toqical operati'ons with txámpla
¬xplain the orgaus ation of interrupt Suvice rus
explain the ining diag àm of read
Agomen-I

55

Exautbr

lo-bit
divide d inte tue indeprudot
Tthe 8D$G cpu is
wnits ).
fntoface unit
xecutlon wnt CeU)
-
· Bus inty face -unít C6l0)

the instukton &uBLE


Address fueakon eircuit
insbruuion ponty aud
the sio con taüng the cfrcut toy phytal
oalucalatfon $ and a prdesding instrukton bun
byts
The instruut ion suecLe ts a fost tn first bus
(FIFo) Cucue
gono ates a 2o-hit physical
physical addres For Momy
aess.
1t fetchts nstnutiong tom the mtmong.
The Blu makey te syates bus sgnale Qvoilelle
for
CAtqyal intufauing of he devtecg.
This unit is veSpons tble for
fev atablrshing the
connectio)
Qnd
(ommunicatfon with xtynal devices
pophea ls Tnludinoy memong vG
via bu2,
1nstruton ueue-
To
ino case the ckecution speed tU
tne frm sin Fostraton bytes ahead t
six bytcK
byecs aye
aye hetd 0
ftst in fst Cut
Cuue -byteqiste caltd instnds
then a bytes have to be
6ne by r this qven
Blu
rnay pefetching upualtn (F
may be in panltel wtth ekrtuton
eKecution bpvan
which improves the Uecuton
of the instvutions
2
Eneutiùn unit CEu) i
-The main
purpoge vgistevsComponnts
qencal purpoge
fleg/ status t fAt Cm
the
Th BIU decodes and enecutep aithmetic
d oqc poatms using -the nl0.
Tt sends Contnl stg nals far fntonal data
knsfey opoattung wthin the micopnes07
to the sL0 t auess th
ends requrst stgnals
exteqpal module tt opates with ves peut to
tt
1-States not
ydes.
machint

Genoal pwrpoae registos ot


used as &-bt
(htse vegistos tan be
vegtstesTndivCduathy ty ton be ugcd as tG-bit
in par h have 4x,KX, Cx and DX
Is also khown as
Ax vegisty
operande foy aithmehc
Qutumuta a that stoves
and otate
operakiun s
optrand
Ax reqsty autt az a defautt
for Some avithmett opation

the stontng baße


a base Yegistoq- 1t helds
location within a data
location f a memuny

It is defined as a Cownty :
to
1E imavity uged in foop instnuttons
Stye
stue locg
loop Counte
reqistuy Dx vegtsty is wed t confain
pogt addvess for I(o in strukion.

Cs divcded into

Csde sgmtnt
Tt is ustd for addvessing memeny
the code tegment s where ehEutable
QYe Stored
() Data
points to the data seq ment ofF the mohny
data is stored.
whtye
R) Stak tegmont Css):
tt ts used for addv eas ing
of the memeny- the stak seqmert ia the sgt
which s s td to Stoyc Stack data
t Gxtra Segmnt Ces):
tt also vtevs to a scqmtnt in 4
which ié Gnctt.ey dato teqinnt

tnto
os6 has q lag and they ae did
categories
Status
a- cortol -flCord+i
og onoal flag
9taby flg
fla (Ap); paity ftag crF) Zen flug (zfl
flog CsF) and ouefloo ftag CoF):

cuntel flag e trap flag ( TF)"


intearupt fog cr) and dirabTun flag
80sG
808C ha poweful 6tt- f
These are
classtied int 4 trci i
) qneal purpose rgisteys
i Pointy and index rgistos.

are
-the cgisto A , 6X; CX and px
the gncoal pupost t6-bit
too 8bi aud
Yegtstos tL aud A# , which can be
conibintd togcthey and uscd ar a t6-bit
vgistey f Gntainß \ao ody by te t
the woy d and at contains highy ogd
operations
tecumulaog can be. used fog Tlo
nhate and sting mantpulation.
(5)
vgistn ?- This vegiste maànly
a4 a base " tt hold
vpitty the stang
otthin
bose location of a
dato Segment
segment It is used aa offret ttorage
in case of
Ty dorib phyaicat mode.
addycis
Certain oddressa
Yegisty ir It 8 uled as defautt county
OY Couit LOde of sting and leop
instruutDnb.4
Data reqistey oan be uscd.
numtbey in z(o operations nd pltci
ov destination in Case Vf fes
instruttontPerad
1ntegey 34-bit multiplicatien and divtóito
intthutton 0x Yegistey tontains, igbeyord
word of the initial or resulting numbo.

T6 Complete | mbyte memorit memeny


diwded into lG
toqcal segmnts
Eah 1tg
ment Contains C4r.8 of monony Thr e;
fruy
teiment vegites
Code Segment (cs)
tt is a 6bit
C4E5 eqmnt with processe) intrukon,
-the pocesjo
wes ode cqment for all
to
instrukions rMced býinstruton
peinte tu) egistoy
c5 tannot be Changed dirtl the cs regy
T6
auto va ticuli updated' dung fa jumps far
and fey vet retun tnstrutions.
1t used for locahioy
in the addvesing a memot
cgment F a
eecutable pgram
mogram iS Stord
Stauk segment Css) Qddyen
a l6-bt
reqistq Contain mg adsl
Pgram !taue
defaut , he pnceisug axums that and
at data
bosc po~nte)
Y(fuence d painty csp)
t6p)
aregat
insrution canttbeis changed divety ung
ustd for addressin9
seqment oF memeythe Itk temcnt
stauk

the sgment of mnerf whtch ig uted t


tfore Statk dakao
Date tegment tos) :
tt is a te-bit veqisteq ontaining
address 4t6 cgmnt uth pqram datd
defautt >the prnCesso assume that ale data
rdoreued by genceal veqites LAK,6X,Ca¢ Dx)
reutd (ocated in
is
ond index reqists (sr', DT)
he data tcgment changed diruty
Teqistq Can be
PPop,"Ds instrutibn& 1f point to the
tin data

is Yesid d
N) xtra segment (es): addred
contai nih
1t i8 a I6-bit regity
tgment pncuse with rgram
nuaty astumt7
defult the fat D
Yqity rtyeues the rgment in sting
Maripulatto n inttrution. Es registy can be
directty uting pop and LES instrutio ng.
nged
also efys to Segment which esentiatty
segment of he memery.
data datar
tont airf

Tointe and index reg stos


the pcintey& tont ain within the
tala kgmnts. the point ers IP BP JP
AContain s offsets with in the Codc ?
data and Itak egmcn ts reaptivey
Tt i8 a lç-bit
i) Shal point Csp:- tt
painting t ttauk in ttale Seg mtnt
i) Base pointy (Bp)i
JE8 a e-bit vegistq pointing
n
ualuy med
for basc d , bosed indts br registy indiret stdiay
Mode
) Source ndex (5L) -
Ustd
indxtd 9 based indextd and registy indirt
inaddvetsing
as wll as Source dáta -addreises
sting manipulaion instrukion 3.
iv) Destination ndex
eDI) -
indexed ) bastd
indexed and veqisty indiret
adaresjing ) as well as a deskor£tton data addrd
tn
String manipulatto instvution
flag rgjsto: 2

flo vegitq ae mainly divided baih


Ci) Status
flag

for untigr Tlag indicotes an ovesflaw Corndir


untigncd integty a'thmete
Ian opuation peaformed in
otbble
a eQmg bor roe from lowe
Lie Do -D3) t uppe npble (ie Dy-b9),

Parity flag trF)


Thys flag is usd to cndicake th ponity
IF lowe ord -bits of
4he Yesut Cuntaing
evn.umbth of 1'9 th
the
pauity dag
1'5 the paniy flog rot

Sign flag tse):


i8 fndiated by
result

Cortr) he opeatno 6f the cxecution untt


? Tra flar (T); Conto. 1t attews
t is wcd foy single Step
at a

dcbuging wihen trqp flag is iet


Yun in n Single t mode
intavupt flog (Ir) ;
Jt an taterrpt enable diaable flag If iE
mstable inttmupt f g is tnabled and i it
, the inttrrupt disablal: t cn be Jet by
Enstruti'on STI
ud cleaycd by
aud

Divuion lag (oF); string opciabin


qre aee eised from highey
Chony address to
ting bytes Qye Queised om (owy memoy
address to highy memny dda
Modes of o86 :

-The wy spuafying
f dota,
dota tn an
instrubio n t noon as addves cing
Addvesing moales
the
yra
the way. thcy uistd fer Atcuing an
Instrution
(3 tmmediat addres sing mode i
the jmmdiate addressing Mode,
Immcdiate data is a pasit f Tnstrton , and
the form of succecsive byte oy 'oytu
MoV AX 005 H

() Ditet add re sig miât i


ln diiect addresoing Mud e
ta
Mewong addrus tofret) oy an t(o addre!s
H
aliectly spuified in the instruut ion as a pat °f
loati
4fere, the data veg ides in hc
addre&s is
in the data 3egmtn t y whoße effective
catucutated

th) kegistq 1naddresig mede : ode,the

data
tht
Stred in a
addreaing
vegistey
Mdrefoyed
and

wing petieultan rgtte


MuV A} BX
Ap p ALy8L
Reqtste Tndtrect Mode :
Sometimes, the address ofht mmy
locatton which
Contan s the data br opciards
determined in an
indirect ay "fset
sgttoThis mede f add rentng .is kncan as
rojistq Prdireck mode

MUv Axy C6x]

) ndexed mode
the
tn this addresstn g ode., offset f
tperand is ghred inin tnt ofthe indx rgis.
the dehautt fegment for irdex

MoV Cx, [ pI]


v) Based indexed Mode :
addressong mode the data ts
this
Qvalsnle at an effective address torme by
Gddtng +he Content of base registy ( 8x er spJ
withthe content bf index registas CsE or DI ]
MoV A% (6y]CsT]

Mov (6x] (1], A


V) i
kegtsteq relative addresting modemode the data
In this addressing b1
availale at an tetive addresy formed
bil r le-bit dsplaement wth the
x]
Mov Ax, 50 H(6

() MOv loH(st) Ax.

vt) Relative based addresimg mude -


addvestng node the dak
Qvailable at th eftective address
add ing an -bit displauem ent ith
the
iunm off contnts of any one f basr
bae
rgtktq tbx er sp) and any one f indey T
CSI bY o).
MOV Ax, 501+[B3Cs)

ADD

) ntategmtnt diret mode -

tn this mode , the add rrsf to whts the


19 be transfered (tg in the samt
segment in ohtch the tontrol transfy instnhdn
end apcoqs directy in the inStrution a&

tmmediat e displacment mede


JMp SHORT LA6EL; LABEL lies within
fnn thf
CuYrent IP content
) tntasegment dsect mode t
In this mode he drsplaer mcnt t
the
to be tvansfered Ies
lies n the
in S
segmyt in
which the Contol trasfeg instvek
but it paased to tnstrution
TMI C8x]j Jump b eteve addres tortd
tn Bx.

1nteostgmcnt dre mode ;.


9 bIn his modes the address
t ohich

the contnl s
Ae o be trqns fuved ieg in a
igmen Tthig addrestng mmtde prvides
iffuent anothty
þyonchig frm bnt tode segment to
tode

bto0H 2000 H ump to eftetive addves

4 Calulafon f physical add resj i-


has a concept f mcmoy Segnmntakn.
to86 a
mthbd whee tht whole memorg
tmthtt tdivided) into Smaller pa vbs calltd
aYe
KgnentsThtse scgmnts
9 ode seqment (CS)
0)9 Data tgmnt (Ds)
(ss)

) tra SeqnentE S)
has aa lc-bit
t6-bit comespoveting
lah scgment has
the baze addre&s
ment rgistyy uki hotds
which
At any given tie , tos & can
seg hunk

address line So the


8o86 haf Dorbit
Qddvessd
vaBue of addres5 that can beCan address
tMK So ogG
elocatHon between OCO6 t to FFFFF H
i8 divtded into l6
) tach wth a
segmnts
T locate any address tn 4he
it, nteds phyliual addess f tht memony loca
tannot qet the ao-bit physical addyess uts
using loeot n
Addrss int o 6-bit scmnt regites
Hentt to 9et tht phyatcal add1es tad,
egment vgistuy' is associat ed uith an ofket

code
gmcnt ’

Data

exha teqnt ’ DI

Stauk seq ment


B

astdvess frm
Foy
geneaing der bit rhytal the ssgmnt
the
Sgment and offsee vegstuys bit wise
vegist addreys is Shiftrd let
thi^ Yesult , the Conttnt tonitnt 0f the 0f
and tbis
added

Phyteal add1ess Segment addrest)


offset addrcss

segment
ffset
addyess=
oddress
lo05 H
5555 H

gegment address ; oo5 4 - boo1 boUo 0cooolo


Atfted ltr 4 Positons:
0000

5 5
A 5 H

Address = 155A54

(0*):

’ (o #X 10e H) +(5555 H)
’ 155 A5 H

operalibns
56 ALp toy avthmetic
Code seqmtnt
a33ume cs: codk

MOV

al 22 t and Save in ab .
with al
add ab gal add ah

aud lave inbh.


bl
Subtraut bh wth
Tub bha hl

moV dh9 03 H
dh an
and Rave n9x.
div dh. pivide ax by dh

Code end
end.
Code teqncnt
assume cS:code
abyolH
al, o 4
and ahal
M bh 1) h.

moV a DO00b
not ax

code ends
tnd.

Interrupt Service yout ine (1Sr) :


At the ond of eauh instret on cycle !
to Bee if any intorupts have been requtttd.
1f an Tnttrrupt hag been requestrd , the so rUd
to inttrpt by sepring Stq8:
tanugh
the
ltuing
ca) deements the Sfatk pointu y 2 and
flag g'stej on the stak
twTE interupt hy clen
-the intorpt flag (IF) n the yosG
(e) IE rscts the trap ftay LT) n flag regist.
cd)
duremonts ak pintey by 22 and pushe
Pointy by
turent code egncnt rgsty Contents
derement the stank peintey again by aavd
Currnt instrutòn poikty entents on
push es the
the staik.

indirelt far jump to Stant of the


) tt dees an vatu es
petdure by loading cs andoutini/

Srat bf inturpt Sevie


instrution at the end of interrupt
lRet
excCutien to the Man
tonice utine return8

main
push ylo

tntrt
The wrking of mirnimum mode can be tatl.
undeshod by ing dhagramg
pressor8 bus cyce is of at teast 4T-
dddyess i5 giron by pncsi
the T, state t available on 4lhet bus
bnt T- State
In Te ,the bus is tri-stated for
divkon .-bf the b (n Case of datathangng
Yead ycde),
he data tranify tates plaue betorer Tatr
" if the addssed deice
ate is(s
slouoy then the
Tnseuted betuetn Ts and T.
At T 3tate ALE = 4, this iadiates that a valid
1
addvess is latchtd tn the address bys and MI to =ty
AdvesS
4uhich indicates
tndicates memey opuakion is in pogress
In Ta the addvess is remoN ed frn the lonl bun
Then the bus is
and i8 sent to the addres device
Aistated.
prestnt on the
klhtn RD' =0, the valid data is
data bus .
DeN'=0 , which enables trans/eiev ard
. During T indicates +hat the data s
DT|0 ,, which
rived
put on he data and prrcsso4
Durn9 13 ,data is
Veads it.
the geADy Ene high
Output device males paformed the
The outrut device make:
This means the klhen the
pcLSSO
output device will
data transfy prncessog cutput
, then
stgrat 4 driveqs. the
tht
skate its bus
dgain trstate

You might also like