Microprocessor and microcontroller record.pdf

MalligaarjunanN 39 views 18 slides May 05, 2024
Slide 1
Slide 1 of 18
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18

About This Presentation

MPMC record pdf


Slide Content

ADDRESs
4100
Al02
4103
4104
4105
A107
4108
4109
4 10A
410D
OPcoDE
OE
8 8 aß
21
45
7E
86
D2
23
77
23
76
LABEL
START
Li
MNEMONICS oPERAND
MV)
LXI
MOV
INX
AbD
JNC
1NR
MOV
HLT
H, 4 5DO
A,M
H
M
H
M,A
M,C
cOMMENT
clear e register
Intiaize
4SO0
Tramte frst data o accwlat
Inrement HL meq to print
next
menory
bation
Add fst mmber to
accwulato content
Jump to
veslt does
cary
Lnvement
acc
Lnrenent
nert meorY
rguter
Location f
yiele
to
not
Trans fer the result from
meDy
C reguster
HL reg to pot
Cocatio
Inonement
nemt momoy
HL neg. to pont
Lotation
Move carry neo ry
stop progvan
Exp. No:
Date
AIM:
To
APPA RATUS. REQLULRED
acd o 8-bit maabes
Locatia and also
ALaORTAM
ADDITION oF TWO
NUMBE RS
-BIT
UsINGn 8o35
accamalator
Page No.:
stared at conse caate
esult
L Lailiaize meaay pointes ta data lacatian
2. Get the font nunbes fnsa nenasy im accusalade
3.Chet the secenc Mnloe qad add it to tlae
4.store Hae ans nen at anothesc enaonly lacalion

OUTPUT
NITHOUT CARRY
ApDRESS
4s00
iNPUT
WITH
IN PUT
ADDRES>
4501
DATA
O3
CARRY
DATA
23
oU TPUT
ADDRES3
450 2
4503
oUTPUT
ADDRES s
A502
DATA
4503
DA TA
Exp. No:
Date
RESULT!
ae
Thsthe e-bit naasber stoned
added amd the esA lt stored
Page No.:

ADDRESS
A\01
Al02
4lo4
4105
4106
4l07
410A
410C
á10D
4106
410F
410
4131
4112
4113
O PLODE
OE
21
45
23
96
D2
oF
41
2f
C6
23
77
23
76
LABE L MNEMONICS oPERAND
SJART
MOV
IN
SUB
JNC
INR
CMA
IN
MOV
1N
HLT
A,M
M
L
O1
M,A
cOMMENT
clear C reg.
Lnitialize HLreg to
4500
Tromster fist data to
acwnlator
Lnenement H meq o
suttrat frst mmber
m accmnlator coent
Jup to lo tation i
rerutt loes not yielol
Tnerement c reguter
Complement to ace
Content
Add o) to content
of ace wnlato
Lnenemert HL veg
pont nent memoy
location
Trams fer result fom
accwmlator to memoy
Lncnement HL reg. to
pont eat memo ry
biaticn
Move cary t me mo
Stop he progra
Exp. No :
Date
ALM
A PPARAT VS
|AL aORTHM
SUBTRACTIO N
NUMBERS
To sultract Tann
coseaae naesaaony Locatisn and also to ver ity
RECUlRE D
OF TUwo
8-B1T
SO35 nacopsosesor it , keykoasd , Pawer sppy
acaunatator
5. storre the
Page No.:
8-bit nasaber staed
LLaatialhze
henaany posilir to dala Locatioa
2. aet the fit nmbr faowm naeaony im acumuatar
3.aet the seand naabes nd sblaoct ham
acciaasalatoy
4.1f result yielda a baynow
accnudatan
is causplenented aud
to it (2's coplenent) A reqister is cleaecl and the.
content
that eguter
diectly laken
Contentof the
added.
no booN hess coatent of
Msea at neat anemony opaton
pomt veat neno vy
bor ow
the

OUTPUT
WITHOT
INPUT
ADDRE
4500
INPUT
AvDR.ESS
4500
4501
BO RROw
DATA
BORROV
o5
DATA
OUTPUT
AppRESs DATA
4502
DUTPUT
ADDRESs
4502
453
DATA
Exp. No:
Date
RESULT
4201
Tasss the s-bit abee
4203
Page No.:
Subtaacted cd xeat is stored

ADDRESSoDELABEL
A100
4lo1
4)02
AI03
A104
41o9
À \0A
410E
4114
A13
4114
4115
h16
21
4
23
3E
36
D2
4
o5
C2
A
17
)
76
START
NEXT
MNEMoNCS
LX1
MOV
MV)
MV)
APD
JNC
INR
DCR
JNC
INX
MOV
INX
Mov
HLT
PERATND
H, 45DO
B, M
A,o0
M
NEXT
B
L
M,A
M,C
CoMMENT
Tntialize HL
to 4s00
Tramsfer fmt data to veg. B
regutr
Lnenewent He va to pot
nert memony lot atin
clear acenmnlator
Clear c reguter jer
Cary
Addd multiphcand amd
maltiplier times
Juwp to nent ere
camy
Iyenent
Tncrenent B eqstr
Jwwp to L it B
not zero
Tnerement HL reg. to pot
nont memoy lor oitien
Tramster vesult fom
acumwlator to emory
Inrement BL regster to povn
nent emony boaon
Transter vealt frow crg
Stop prag am
Exp. No:
Date
AIM
cOnseatie
Yesult the
MULTIPLICA TION OF TNO 8-BITN
MBERS
To mltaply hao &-bit
USING
APPARATUS REAUIRED:
AL aORAM:
8035
haabe stored at
wAehaory lacation aand also
SO85 mCAo proes0r kit keylboaxd, Pol
Page No.:
3. Maue naultaplier to anthise registes
4cleay the accAmalato
Enatiaze memory powmtesr to data locao
2.Maue nltislicauncd to regiate
S.Add hltilicand to accumalator
6.pecseimeat nltiplin
1Repeat slaps watil manltiplien
Sipply
3. ae result which is M accnanla ton s
Machay lacataan
stoned

oUTPUT:
WITHOUT CARRY
INPUT
AbDRESS
45oO
4501
DATA
WITH CARRY
INPUT
4500
03
AbaRESS DTA
4501 2
OUTPU T
ADDREs
A502
4503
DUTPUT
Ap RESS
A50
DATA
4503
9
DATA
Exp. No:
Date
RESULT*
Page No.:
Ths &-bit maltiplicaton was done m go85
is venfed

4101
4103
4104
4105
A106
4107
A108
410A
416B
A10D
410E
410F
4110
411
4112
OPKODE
45
23
96
D2
05
23
23
70
76
LABEL
LOoP
MUEMOS
MVI
L1
MON
IN%
SUB
JNC
ADD
DLR
MOU
Hov
HLT
OPERAND
B, 00
H,490O
A,M
H
M
LOP
M,A
H
MB
caMMENT
qusient
"gutr for
Ltraize HL
4y00 H
Tramtjer diridend to ac
Lnerement HL to point Yeg
nort memony ocótion
Sultract dursor fom dindd
Tnerement B regia ter
Jwmp ta loop it meult
does not yeld borrow
Add diisoY to accumnatoy
Decremet B Tegis tar
Inerement HL veq. to pount
vent meoy ootion
Tramsfer remamder jran
aLCymlotor to nmemory
Inerement HL eq. to povnt
vont memory ocation
Tromsjer quetient from s
reg. memory locaion
stop program
Exp. No:
Date
LAIM'
D1visiO3 oF Two s-BT
oMeERS
To dawhide thrO -bit esabes stared
APPAA TUS REGUIgED
ALaORITHM:
LLoad dinrisoY and diricd
2.Suboat disiao fm disrided
equals tlhe quctiast
Page lio
4.stop sabtraion nhon diidod is leas thass e
dinisy hedistdod non becaaes tae eaisnder
thswie go to tep 2
5. Stap the poam couatie

OUTPUT:
WITHO CARRY
INPUT
ADDAES>
4500
450)
INDUT
WITH CARRY
ADDRESS
4500
DATA ADDRES>
80
DATA
o8
oVTPVT
o3
4 502
4502
DATA
OVTUT
4502
o8
ADD RESS DATA
4503
O2
Exp. No:
Date
RESULT!
Tas aAn ALP
also the result
Page No.:
yNas NLttenfor -bit cison
is sented

A DDRESS
4102
405
A106
410
410E
4)
415
A1OA D2,0E,4)
OPLoDE
OUTPUT:
4500
o6,00
2A00,45
4501
4502
2A,o,4sl
WTHOUT
4503
EB
22, o4, 4 s LooP
INPUT
78
32,0b, s
ADDRES > DATA
76
LÀBEL MNE MONcs oPRAND
CARRY
MV)
LHLD
KCHG
4S05
LHLD
DAD
JNC
INR
SHLD
MOV
STA
HLT
OUTPUT
ADDR ES DATA
404 O5
B, oo H
D
LooP
B
4902, M Load data 2 to HL regster par
4504. H
A,B
Clear
4506, A
Load dala i to HL reg. pan
COMMENT
Add the content t HL and DE
Yog pa
Ineremwnt B
store e resutt
Move Cancy from B reg. to
accumator
s tore the cawy
w)TH
Stop the program
INPT
4 500
CARRY
A DDRES DATA
4501
rogister
A3
B
4502 C2
4503 D
oUTPUT
AppR Ss
4504
45 05
4506
DATA
64
86
Exp. No;
Date
ALM
To wte
addihon
|APPARATUS RAGUIRIED:
ALGORIthM
HL
ADD0TI ON
NUMBER
the content
L stast the pqan
&.5tore the
RESVLT
VSING 80 05
MIcROPROsoR
16-bitE
SoR5 msca pxoass kit , Kayboarcl, Poer Supply
I6-BIT
assambly lamguage puagam fo
Exchange the conlint o L
xegistir pai
data dinactly
DE
2. Lnatialze a a-bit carn regiats withEero
3.Load the fat la-bit data f addition
agistr paist
5. Add th l6-bit
Page No.:
8935
mto
increment The canhy xeguate by aha
laaus the asseuh ly Language pragzaa for additioa

AbDRE SS
407
QUTPUT
NITHUT
AspRESS
4200
4201
4202
OPCODE
6203
|2A, o0,A5
INPUT
EB
2A,02, 4s
OE,00
78
95
32, 0445
TA
32,05,4 5
76
BORROw
DAsA
05
LABEL
oUTPUT
ARORESs
4204
4205
4206
MNEMONICSOPERAND
LHLD
LHLD
MOV
SUB
STA
MoV
SBS
STA
DATA
4S02 H
C. 0o H
A,¬
4S04 H
A,D
4soS H
Load he data i o HL eqoi
Exchamge the content o DE
nd HL egis ter par
Load the dala2 to HL eg pa
MIH
Move the content to c ntqister
4200
420)
COMMENtS
Trangfer fst data to
acCAmtator
ADRES
Susthact L meg. rith
accumlator
store the resut
4202
hove orrow f D
rlqis teto acceumlatoy
store the esult
INUT
Stop
BORRO
DATA
the Pogna
AppRESS DATA
4204
4205
UTT
4206
F9
F6
Exp. No:
Date
AIM
APPARATUS
SUBTRALTION OF TWO
shbtraction of l6 bit namaes
ALOORTHM
REQuRED:
lb BIT
MICROPROCESS OR
aucably languagepogvam for tlaa
Sats casproas kat, kauboond. oute sly
start ae progaM
2.Inatialize an f bit cary reqistr th zeo
3.Laad the fast t6 bit data f subtaoction nta
RESVLT:
Page No.:
4.Exchange the ontent af HL 8giatees mt E
5. Load the secanck is bit ata fer sublanation
th aclunmalatox countet nitk kboaxam
2.Stop the progx
R.stare the esalt im a specfc memeylaloa
9.Mavethe hagher byle f HL egiatet paie ista acnmalatos
enecutted succesa fully
to HL
NUMBERS US1 NG 8Od5

AnDRESS OPCODE
A102
A103
4106
ALO7
A2
OUTPUT:
21
42
o5
23
BE
D2
41
7E
c2
41
32
42
76
INNT
ADDRESS
4200
4201
42c2
420 3
LASEL MNENON OPERAND
DATA
04
12
o3
LOOP
LgoP
Lxl
MV)
DCR
INA
CMP
4205
JNC
MOV
DeR
JN
HLT
oUTPUT
ADDRESS DATA
12
H, 20o H
B, o4
A,M
H
M
LOOP
A,M
B
LOOP I
4205
4200 H
COMMENT
HL regutr to
Iniiaize E req. th mwmbe
TYansfe fast data to accumalato
Decvmnont
TwcoewMt HL eg, to pownt nent
memory loation
Cowpare
M and A
tf A s greater than M,
hen go to lo
Tramster data jron m to A vegittr
Deremnent B register
tf B is not zeo, g0
store the est v a
memoyloathone
stop the program
Exp. No:
Date
AIM:
APBARATUS
To find the langest slaonent.
&o85
ALhoR)THM
/ELND THE
LARGEST ELE MENT
IN THE
REAU1RED:
1 Place all the elesmets ot
cOnAee enoy Localaan
a aYay
ARRAY UsING
Lamd oad t m tlae acclatos
2 Fetkh the fost eleet fonm the memon
4. DecaeNAQuñ the counter by
3.Iwitiaize a contex with total o t elemeat m
8085
RESULT
foumd
Page No.:t
shaiaement the memmony pounter to poat tb next elsmaet
2. Decartnaeat the couler by
locatio
6. Canspal the acaanulato cautont thesn mae the Mcanteet
e0ny caatent Clangest) to accaulatoy elee cantiaue
9. Rapeat slop 5 to ntill tlae cownter reaches zeYo
1o.Store tlhe Yesult im the pecafied neony Loation
Taas the larqest ywmbes m the gitn Omay has

ADDRES5
4103
4)04
A105
4106
4107
4\08
4169
410A
410B
410C
410D
410F
4110
4111
4112
413
OPCODE
2
UTPUT:
42
7
23
BE
DA
OE
05
4
32, 05,42
0NPUT
4200
420|
42 03
4203
ADDRESS
LABE L
o9
DATA
LooPI
LoOP
NENONc oPERAND
LX
4205
MVI
MoV
DCR
eMP
Mov
DCR
STA
HLT
OUTPUT
H,420o
ADDRESS DATA
O2
B, 04
JNZ LooP
AM
B
LOOP
A, M
4205
COMMENT
Ttialize HL Yeg to 4200
Imtialize B reg with mnber
comrsons Cn-)
Trasfe fst data to acc.
Decremet B regster
Lnerenent
nert
to pout
menory Locatio
Conpare and A
Lf A s lesser than M,
Uhen go to oop
Tramste data from M to acc
Decrment B reguser
store the yesut in a memory
tocation
Stop e progam
Exp. No:
Date
AIM
Ta foad the
APPARATUS
ALGORTHM:
RE QUURÊD
Sod5 micaprocessx, keyboaadl
FIND THE SMALLEST ELEMENT
(N
ARRAY US|NG S085
Smallest element im
2.Fotch the
acmulatoy
3.Lunthalize a cowntr wih total
9. Store
Plase all elenment of aYay m consetne meAN localiad
flt eeanent fam memmoy and aad it ia
4. DeremARnt the counter buy
AeSVLT:
faund
5Incoenent the memany paisate to pauat b nest elenent
cConzane the accunalator nitl menaory else continee
1pecsemeat tlho caunter by
Page No.:
the nesult im tlae
Poner Supply
Thuws tae smallest elesnesnt
of elenment
peifiedwenany laakans

ADDRESS
A103
404
4L09
QuTPUT:
OPCODE
3A
45
FE
OA
DA
OA
c6
32
75
INRJT
AoDRESS
4500
LABEL
OF
LOOP
DATA
MNEMO NCS
LDA
CPI
JC
ADI
ADl
STA
OUTPUT
DATA
35
46
OPERAND
4500
OA
LooP
O7
30
4501
COMMENT
Load the data
Cowjone
data with A
Junyo n carmy
Add wwmeciate data to
Add mediate data to
store accmeator contet
stop the progy@m
Exp. No:
Date
AIM:
To wte aA
APPARATUS
Lconwerson o hexadecsMal ta AsCi gORSmacaopoKOY
REAU1RED:
ALGaORIIHM:
). start the
HEXA To AscCIl cONVERSIO N
2. Load the data fam addas
pagaa
3. Move data fom accunanlatar to c
4.Mare data hom M to
5. Adc data 30to A
b. Decrennesnt coutont af egister
RESULT
7 stop tae pgasA if c is
S. Jumap o stiap 5
qEnd te pga
to As) coce
Page No.:
4200 to A
HL pas to aLcANAalator
LanNerion
Thus asembly laqaage pogsan fo hakial

ADDRES3
4100
A101
4102
4103
4104
4106
4L07
4108
4109
A0A
410D
410E
410F
OPCODE LAEL
OUTPUT:
AbDRESS
4500
4500
3A
4500
45
30
FE
OA
DA
41
D6
INPUT
32
45
76
DATA
41
35
46
SKIP
MNEMONC OPE RAND
4501
LDA
4501)
4501
33B
CMP
JNC
SUB
OUTPUT
STA
A DDRESs
HLT
DATA
OA
o5
4500
oF
B0
oA
SKIP
4501
COMMENT
Load the
3utrat mwnediate data
trom
acc
Compae the data with A
store
data
Subtract mnediate data
m 450)
stop
cary
acccnulator contont
the prognam
Exp. No:
Date
AIM
To write
peafona
|APPARATUS
8085
ALaORTHM
AscI)
cOAvesion
REQUIRED
TO HExA
assemably language pagra to
\, start the progYam
REsULT
CoNNERS1ON
3, Mone data ham acumalalar to c
9 End the
af Ascll to aeecdecnaal
2. Load the data fon addess 4200 to A
Tuwp to step 5
pagran
5. 5ubtaet data 30 fon A
6 Decoement catent of egister
4. Move data om M o AL pai t acUmulator
Page No.:
PoNeN
hexadecinal cado conwersion
Tasas assealbly lancuage progTn f
aing
AsCI to
from acc.

ADDRESs
4100
4101
A102
Ato3
A104
4105
A106
4109
4 10B
A10D
A12
An3
415
4110
418
419
OPCODE
OUTPUT :
3
42
8B
42
D8
13
41
89
OE
o
42
39
04
42
FA
LABEL
Ly
IN PUT
MNEMONIC S
ApDRESS DATA
4200 OO04
4202. o002
Mo
MOV
MOV
ADD
JNC
INC
MOV
MOU
HLT
OPERAND
Cx, oO4
Bx, A2o2]
Ax, Bx
L
OUTPUT
CX
42043,Ax
ADDRESS DATA
4204 boo6
4206 Oo00
COMMENT
Intiaize counter c*
Get fst data m Ax
rogiater
Get second data m Bx
vogister
Add coutent ot both Ax
and Bxregister
check for canry
f camy exists, merement c reg.
store the cary
store the sum
stop the prgram
Exp. No:
Date
AIM:
APPARAJUS REQw RED
To nnite consaquiaae assewnldlay lamguage pragama (ALP)
sO86
ALnoRITHM
ADDITION OF TWo l6 BIT
NUMBERS UING 886
wmAepseSOY kit , pones chand
LInitialize M3BS of
2. Get te fiost numsbe
RESULT:
SuAn to o
3 Add tae sacond naber to fiast meaale
5. store LSBS ot Su
Page No.:
exeuted successfally
3 8

AvDRESS
4100
4101
4102
A103
4104
Al05
4106
4107
A101
410A
410D
A1OE
A10F
410
41|2
413
4114
415
4117
419
OUTPUT:
OPC ODE
88
42
88
O2
42
29
D8
73
OE
42
O4
42
F4
LABEL
INPUT
ADDRESS
LI
4200
MNEMONICS
DATA
4 202 o303
MOV
NOV
SUB
JNC
INC
MOV
MO
HLT
OPERAND
4204
Cx, 000OH
42 o
Bx, 202
|AK, 4200) Get fst data n Ax
Ax, Bx
OVTPUT
LI
CX
|4206], CX
ADDRESS DATA
02 o4
COMMENT
0000
Tnitiaize Cownter cx
register
Got second datoa m Bx
megister
Subtract content of BX
check for borrow
f borow ansts merement cx
store boTTOW
store diffetnce
Stp proram
Exp. No:
Date
AIM
the
APPARATUS
To wzite
assomtly language pagpas frt penfmasing
sultaaction opesation f tano
ALaORITHM :
SUBTRACTION OF TWO 16-BIT
REQVIRED:
LTustialize MsBS of difesene to o
2.hek fst nansalben
RESULI
5 Soe LSBS af dafeatnce
6stove MSBS of dafertnce
Page No.:
3. Sulotaact secand. nmbe fn fat naber
16-bit nanbens
Thass sukitactioM of taaD
NUMBERS US NG go86

ADDRESS
4100
A101
4102
AI03
A104
4108
4109
A10B
410C
A10F
Ano
412
413
4114
ORLODE
OUTPUT:
8B
o
42
8B
42
F7
E3
89
06
42
89
Do
06
42
F4
INPUT
ADDRESS
4200
4202
ABEL
DATA
MNEMONcs
MoU
MOU
MUL
MOV
MOV
HLT
OPERAND
o004 42 04
Ax CA2c
Bx, E2c2)
OUTPUT
ADDRESSDATA
O000
BX
A2043,
Ax,DX
000c
2043, Ax
COHMENT
Ged ist data
het second data
Multiple botlh atas
Stor owes ordir
praduct
Copy higher rder poduet
b Ax
stove the igher ordir
poduct
stp the prograwm
Exp. No:
Date
AIM2
APPARATUS
B yrteassenlaly lanquage pagoascALe) for
ALaORITHM
MULTIPLICATION
NUHBERS
REGURED
sO86 sproceOr kit Panes chard
2.Get mutipkcaud
S. Iaitialize prodt
oF Two 6-BrT
UsING 3ofb
RESULT:
4 Produt -Pradut + Multiplicand
5.Decocenent tlae haultidie ay
ctlhemwse store poduct
Page No.:
Sosb icaoprcesor s erecuted ad verifiad suceessfullay
0003 4206
Ax

ADDRESS
4101
4103
4104
405
Aio
4108
A12
413
414
OUTPUT:
ORO DE
8B
42
8B
1E
O2
42
F7
F3
89
DA
42
89
DO
89
06
06
42
F4
INPUT
ADDRESS DATA
4200
4202
LABEL
MNEMONICS OPERAND
ADDRESS
MOV
4206
MoV
DIV
MoV
MoV
Mov
OUTPUT
HLT
DATA
4204 00o1
Oo00
Ax, ao0
Bx, 4202]
BX
A204], Ax
Ax, DA
203, Ax
Get
cOMMENT
fint
data
het secnd dtta
Dunde diidend by the
diiisor
Stove thequiotient
Mae D register contet
to A eg.
stove the remandder
stop the progra
Exp. No:
Date
ALM
perfaring
APPARA[US
ALaORITHM:
Ta wit asaaaly language paga a
diision opesxaticoa. fbbit mabers
REQUIRED:
1. Get diidend
2. aet dinsoy
DIVIsION OF TWo
16 BIT
RESVLT
NUMBERS USING go36
Pbwer cho
3. Taatialize the quálient too
Page No.:
4 Duidend = Diaclend-Dur[so
51f the diiaoy is geale stae quatieat ad go ta step
hf diicend is quatieat quotuent tl, epeat fo stepá
Stoe the cindend value as Yemaundex
wcpraustot is okeced and erifod sceLsfulliy