MP Unit 1
MP Unit 1
Memoyy
Inteaface
Bus
B
U.
ES
CS
SS Intssuchon Byte
DS
ueue2
IP
Decodes
ConoL
Unit
Bus
AH AL AX
E. BH eL Bx
U. CH CL Cx
DH DL
SP
DX
ALUCI6)/
BP
SI
OpecGnds
FLAGS (16)
Pipelined 1&o&6
This fe tching is perfomed 1 810 oh1le ijsub
*) Hhis Codo bytë k Stored
Isgethig execufed
s chm yeue C1)
Register Organisation of 80g86
genesal Puspose Registers- C Al are 16 bit negistes)
( A L l Can be used as 8 bit registers)
Ax-
)16 bit Accumulator egistes
prefessed registea to use in aath metic, logical ond
data tronsfes IHStSucHon
*) Must be used tn Multipliation ond division opea tin
Default SHegi'ste tos zlo Telated opeaation S.
StoredL
qddress of q
This egistes Phovides
Segment (ES) Regístes- 1n the e x t
memorH l o c a n preSent
Exhra
extsa
he
segment of the memosy
Contqins eneal dats
Segment memoTy
Ths registes. is used point
to a memory
stack sgment( ss) Reqishel-
locaton in the stock Spgment of
memoYy
Helated to Subroutrhg
which holds Hhe datq
t has 26 Locat ms
Let C.S regSteL = 234 H
cS (64KB)
Then Stastng add-ress ef Code ss ment
ill be
123 40 H starhn9 et
this nibble (4bits) Code segmet
Contoins O OoDo
cohich must be added cohie cal culathng address
oF any segment are
*Eoch will bits
segment
qddress
tegiste
4 ZeroS must
hove
be added at
l6 cohile calulathng 20bi
lowe nibble to ma ke the
adedresS 20 bit.
4 DI)-
ndex Regicteh (3I gddress of Datq segment during
S1)-8 *) S1 holds ofset
Source Index (
string op esanon
Data segment octs 9 s
*) Duain9 stsing operathm
Source ot data
Durin9 strng opeation Exrq Segment (ES)
Destinaton Tncex CDT) DI
gct os destinati) of data , so the
provides offset address forr ES
Code Seg ment Tepreetahm -% added loweh
nibole(OH)
et CsReg 348A H
2/4 H
IP Rag= 4 A 8
3 4
Memo CS
IP 42 4
Physica 38A B 4
adaress (0 blh) End of 2 0 b i t adds-
Code S e g m e n t
Code byle
and Computah'c
20 bit address fosmaha) diagsam
Ha8-
also
Explain OTher Segsments
simloy we Con
SFFEO H- Data
SP FFEOoH
start of S s
added lowe 5 0000 H -V
hibble (oH) SS 5o00H
SS: 5 0 oolol H
SP FFFE H
5FFFE H physial add ress Sats
The Segment Re9iste
To
oHfset Registes. will funchon togeTh e
generote 20 bit addre sS.
CS IP Psogom Code
DS Bx
General Data
SI
SOurce for stoing opeatims
ES B? DI Destinotion for stsing opeation
SS BP/SP stock Helated opehatonsS
2 6
exp 2 et CS 2411H
IP 1001H
CSX ioH = 2 4 L 1o H
oo 1 H
P
25 L 11 H (20 bit)
address CS
C
xxxx o D T zx AcPxc
Casry Flag- C 1 It there is a
Carty out of MS8In addition
Casry In to MS8 th Subtsoch)
Pority Flag (P) - Pi if no of 15 (one's) 1n the lowes byte is EVEN
otheswise it is o.
Auxilliory Comy(Ac)-2 AC= i if Hhere is a corry from Lotsest nibble (Dto D4)
O
borro to Lowes nibble (D teDg
Zero Flag (z) - Zi it all Hhe bits of 1esult ase zeso (o)
S MSsB
Trop Flaga (T) -: i-T= L 8086 l l enter l sirgle step execuhon mode
that means, psocesso will aenerate iñteupt
aktes 1 shuchm and TSR sill 8et execae
ecch
Do not
T O perfosm Single stcppi
Interrupt Flag()- if I=1 then 8o&86 oill 1ecognigethe extesnol
0tempts (th means hen I=1, then
all Hhe extena 1otessupts will beactivated)
All totevrupts coill be disabled
I=O
Direchen Flea (D) - s Used by staig manipulation iishruchans
*) if DO hen he sting will be proce ssec
rom locwa adds to highe address(auto
Cenent mode)
*) D=1 ,the smng coill be psocessed fsom
mode).
Flag (o) Hhese s oveshloo hen OF:i
-
Ovestlo
1 Cose of 8 bit signed opelah) qHeslt
IS of ore Thon 7 bits then OF = 1) |
Segment2 F F F F
DO00H 4000H (Starhng add) FFFEH.
overlappe
Tegon Segment
Segment1
FFFFH CS2,1P o00oH
/25000H oO0OH 2Soo (starhng addr:) 1ADIH
34FFFH *1css, IP
IS
.MB is divided 1nto 16 Segments s o m LAoL H to FfFPH
each f 64 KB oveapped areq which can eiheel
with ulized by seg ar ceg2
be
Segment address Combi0
offset addhess( oo00H FFFF
H) to *) let 6gment useSThi ola
ana Thon itS adda. angt eny be
prm 20 bit address
*) Fach segment nOn-ovelap
uitá (1 Ao1H &FFF H)
e t adds.
othon sgment
Advontoge_ot_Memary Segmenfaho
*)Allows the 8o86 to complete 20 bit address aauinement ysI n
6 bi+ Sseament and s e t ugusta |
Allows placing t Code genera dal9 Gnd stock dáta of same
Progoam 1 di Fferent segments ot memory for data code protecthm-
R e l o cation ot dafa IS Possjble. C 9t 1s not ne Cessory to stote he
Program and/oT its datg into same area of memoy)
74LS3733
LATCH
A-A1g
A16 S3-Ai9/ss
74LS373
8086 LATH
ADADs VAD- AIS Ag-AIs
ALE 74LS373
LATCM
ADo-AD7, Ae-A7
74LS 24S
8086 Bute
DT/R
ADg-ADISDIR Dg-Dis
OEN EN
ADo
ADIs 74LS 24s|
Do-D
DIR
EN
hb) ByHleaung eats bus o s&o R6
8086 PIN DISCRIPT1ON
Minimum mocle Maximum mode
4
a COTR
ADi 15 6 So DEN)
ADo 6 2 &So CALE)
NMI 2.4 S1 CINTA)
tNTR18 23 TEST
LA 9 22 READY
BHE AO
O ALU will psocess 16 bit datq
O Odd memory bank coill beGchivc (AIs -As will Caryy bits)
(UPpe byte from/to odd muney banK)
O Even memory bgnk will be achve
It8036 pesmits the acce sSS ihen it nases HLDA pin to HIGH". So HLDA - |
meuns 808% iS eady to aive the Lon hcL of bu ses
Group-33 Mazímum mode L MN M o]
S2 ,3 ,So These aTe He status Signals to ndi care the typc o
opesa hon
Interupt AcrotwlegC
Read
Wute | o
Halt
Ccde ucce ss
1 Rcad MemoYy
rToikc Mencry
1 Passive
These signals should be Gctive dusing Ta. cf prevlous macb1ne yelc and remain
active dusing Ti cand T2 of Cusent bus cycle ( machine cycle) .
No opeanon
6ueue
Finst oy te of epcode rom
Empty Gueue
RQ-Request Gnant
*)R6|GTo have highe pichity "than R GTi
K)These pins ae bidínechionaL
T+T T2
SLAULr
CuTreot cycdeic NEzt Cycle >loweed by 8o&G
the (o0 sol
HOLD naised by Bo$6 atTes gethng
R/GTo
RLquest tron anothe qnothe devi ce want to give back he.
CcnoLof buses
derice to go86
KaGT
Grant Frem Bog36
tto aohej devjce
Addre ssing Medes of 8086
Addressing mode de scribes he type of opeand and he way Hhey
ase qccessed om memoy IO
for executing Hhe incthychon.
) Lmmediate addesS nq mode - In his gddressing mode Immediafe
lato IS a pat of 1óstruchion
Exp MOV AX, SoooH
MoV CL, 81 H
*) The mediate dato Con be of 8 bit as 16 bit.
2) Diaec Addessin9 mode- In his mode 16 bit otfset oddress
IS diecFly Speafied in Hhe
instruehian
Exp MOV Ax ,L5o00H1
I1idicates address
)So0 H offset oddress. as we oYe
accessiÒg daf, So oato segment u )
be used
Complete memoTy address = DS * 10H + So00H
In Hhis mede
6 Based AddresE 9 mode (Registes helotive)-
he address of he cato 1s for med by
coith he
adduing 8/16 bit displacement+
pointe Hegistes ( BX, BP, SI Os o1).
) MOV AX, So CBx Memosy addre SS
10% DS + SI + 527oH
L 16 bit displacement
Memory addye ss BX
SI = 21 0 O
1 7 LOO
20 bit address
otdata
8) Relative Bas ed Index addye SSIQ9 Made-
The 20 bit qddess of memory fosmsd lby addng 8/16
is
Io his mode, and Index reg.
coith Sum of Base eg1ste (Bx os BP)
bit displacement
(SI O DI).
MOV Ax, 2700 L8x1[sT]
Exp Bx and s i , s
as DS the default segment reg ister of
* DS 6 o o o o
Let OS = 60o0 H lo H L6 0 O H
16 00 H
Bx: 1 oO O H
10 00 H
6 o
6 2
Memory
Seg ment 1
Memery Segmet 2
ntraseament AddressIg MedeS
X-
segmentndinecaddressi8 mode-
2) Lofra
Address specified Indineetly
s through q MegiaTes.
BX, BP, SI,DTT
) h e hegiste con be displqcement e n also be used.
glong coith
hegis
C8x+ o6S2 H ;Bx+ 00s2H will get loaded
JMP 1IP regikla
JMP LSI +BK
Let Bx 2 Soo H and IP= 1000 H
displace mentz otS
OOS2H
Bx 2 o0
p o2
2S2 IPne = 1000+ 25s2 H 3s52 H
oddress willbe 3s2H
Sothe new off-cet
m to 3ss2H withis
progsam conke ill3et ranSfes 1000H
Code Segsment.
Code segment
Content of CS and IP Oi get cha nge
Neuo IP New CS
C Bx]
DS = 2 oooH, Bx= 100O H
Exp Let Data segmen
CALL C8x+OsH] h e neo locaion
gddh 1 stored in DS
coith oHset Bx tosH