MM - Lab (Expt - 10 To 13)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Date 1/10/222

Espt No 10 Page No.

AIM OF TH ExreRLMENTTo chek wbeth a gven


btthuxadetmal nurmbs a palladreme De
uif CES creprecc4so

E SUIPMENT REQUIRED
ECLS micrepmeceser trainae ktt-DNA 25s
CAHEXKeyboord
C3) Pensr upplycherd
Inttruciian manual

ALGeRITHM
l iIniialtiRqrder B t h an 2-b hexadecfroa number
d' Bay DD H)
Intliala regitier C tth hevalue Q0H or checkEng
thCodends regeater BL palRndrorme cr Dot
t Capand mave thecamdends a Bta th accumuladee
lgztse A)
Roiate the centens oi the accumu latar ourdne and
Ctompar t aidh th Corderds_ regfadez B
TH cendards ol thiaccmulatarr and regiatsr B_are
cQua theo fncrLosnt h value o reqfLter C one

SR& h cedente o reqfator C f t de sPred


nimezy lccalkan

PROGRAM CoDE (TN AsSEMBLy LANGUAAE )


MimorAddret Machfo Cod Mnemanfc Commeoti
COOO MVI 8, DDH B DD.
DD
Con2 OF MVT C 0OH C-o0
Teacher's Signature
Date 1 1 o / 2 2
Expt. No. 10 Page No 49

Mncx AddrctMachtne Code Mnumontca Commends-


Coo O0
Cocy Mov AB A B
Rotat e accurnusotor

COD5 RLC CEderds le1 onci

Cco RLC
CcO RLC
RLC Cormpace B
Coca B2 CMP B accunl
Jump te CoOEH
CODA C2 JNZ CoDE HL
LonB OE
Cocc CO Tnceement C
LOOD TNR C
A<C2
CoDE Mov A Store accumulator

CcCE STA Co13 H Conent ot Loi3


Co1O 13

CO11 Co
CoL CE HLT STOP

ExecuILON COE PROGRAM


la Eucutfen ktop
Raset dhprPEOgKam
lEPre a0 and enter tazing addre ofaapragram
abich CoCoH
EE Pre EXEcuTE T1 "Eriand ie dizplayad meani
h eogomL RuccAdullyexecutd

b) Duput
Memc Addres Data Siar ed
01 Tue)
Teacher's Signature
Date 13iel22
10
Page No.

Ta ise hecutput
nRet the EcQKAm.
Pess SET hutter andantse he addresi Co13 H
) Prsu on TNRbuiten encs

CONCLuSTONE B variduinqthe reutt Jae conaluda-


that Kom.leiai ucceidully ped execLuted ad
ne deakredre ult wa ohtained A Psen- 2-btt
bexadsclomainumber nai cbecked a
palfndreme er Det

SushtlKunar Kaikia
1aocS D1GEL
Date 13l1ol22
Expt. No. 11 Page No. 31

ATM OETHEExPERIMENT To md oe Aquar ractO


a Aen 2-bR bexadecloal Dumbetusi4 2025
micieoproceAIOIE

EQUTPMENTREQUTRE D
tL) 2085 mfcroprocessor cafnee ke DYNA 25
T
aHEX keyboard
(3Poer upply chard-
(uTnztruatfan manual

ALAORITHM
D|TnikalfiereQfder B it h 8-btA bexadleciomaDumbsx
whei 1quarroat tahCaleulated
Maks the condeote o reqlalor A laccumulaor zero
iiCaapaee he Contents o eqistor B Nththe carten
thaceenulador TH he arqua,then idare
the aocumulator contente fatha de ofrred msmar
locatfan a the squaretaot
T contants _ol regFter B andaceumulator are not
qualtoen fa21Palistregertsc Csith t value OLH
and re9Ptor D aftb 0OH "(regirtar D fl 2tore and
updadete sqLuar Toot)
AddAdd h cantenbs egfgterCand aceucoulatz and
tor a t h e RurO n accumlator
Canapar conte ntt ACumuuloter and reqfttar B
Tfaccurnulodor cantent i la han D, thsn
Rocrernsnt C i a an zteps (y) and )
&tty T accumulatarconten i eqiualt B, then fncre-
ment DD.b 1 TA i i areater thanB, hentaree
Teacher's Signature
Dote 13/Lo/22
Expt. No. 11
Page No. 3 2

D Cctentsa tne dutred DLtaIt Jcalfn


f Nhtlerepattn siep (v)and ),tncement value
D D

PROARArM CoDE (IN AsSEMBL LANGUAGEE)


Memory Addreu Macbn Coda Mnemenfe Commeot
CoLY O6 MVT B 8A H B-LA
Ceis 8A
CoL SUB A A A=A
CCL Comparee B conten
B& CMP B aithAc Amulatg
CoLR CA TZ CoAD H TumP B P
Jump e coaD

Co19
Co1A Co
Co1B Mov CA- c A
CoiC 5+ Mov D A_ D cb
LneEemept C
CoiD OC TNR C
CoLE 81 ADD C- A A+C
Co1F BA CMP BB
CA IZ Co26 H
Tump to B
Coab t
CO20 =O

CCA1
CO2 CO
JNC Co2C H Tump t Coac
Co22 D2 A BB
CO4
CO25 Co
Inceement D by
COA 14 TNR D-
OC TNR C
CO29 OC TNRC C
CO29 TMP Co1E H TumP
AmP CoLE
addeesE

Cc2A 1E
Teacher's Signature
Date 1 2 1 e l a a

Page No. 33
Lxpt. No. 11

MarmeryAddre Machine Cod Mnemonfc 3 Comments


CO
Ca2c MOV A,D- A S
CORD 3 STA C031 H- Co91 A
31
COAF Co
COB0 CF HLT 3TOP

EXECUTLON QE PROGRAM .
ali) Resek thepEgmr
L Presu Goand ender atalfeqaddre o aprngram
wbichP Coy H
EPxe 'ExEUTE' TA Erland i dEzplauad, meankd
Progom ii Auccesduully executed
Toee the outpuk
Rese theprogeam
PrLSET buttonand ontortn
ttaddre Coai4

CoCLUSTONBerdytnga eult,ole conelude tho


in progao alas uccesskullyyped, exeeuted ane he
desired u t asohtained The auare roat o a
g e n 2-b bexadecieon Dumber Calulaled.

Suai Kunear Katkifa


130c3o16

Teacher's Signature
Date 13/10L2
Ixpt. No. 12 PageNo._34

ATM OF THE EXPERLMENT TD md he facturtal o a


n 2btbexadecirma rursber usirq 20S mYeeo-

EQUIPMENT REQUIRED>
EO35-miccEop.roceAL.oerofnee kR _DYNA 25
La)HEX keybaar
(2 PoNe Rup ply_chard
Tntrucdon manual
ALGORITHM
2Tntizal?sareq8rder C thadetred 8-bit baxadecional
vaue raaxiroum OR H
Mal Mak th cantents ~accunAuladar (regtelsr A) zero
HETnikalkz H=L roqfkter poair aith th value Oc01 H.
tCampauren ceodents otreqfater C alt thosL o
accunulator, ReRtuftbout ineremeniloq h lader'a
Contents andHon a incremerding i oneR
T P o tberCake he contek areequal hen kBor
the H-Lpair Conteott n deiiredconsecutive
MenAr ocafen
Ca Cante.nts are Dot equal,thea
FotltalPz rePater E aith antents_o re der C and
reqfder D ithdh value O0 H
v Decreoment he ConteDts od C lay
iRIn4EalfreH-Lpoir a h o0oOH_and mave C contents

LxAdd condent od H- ondD-Ere9f4der pa?ra, and


torethe 2LLrO b-H= pafr
Teacher's Signature
Date 1/10/22

Page No. 35
Expt. No. 12

DCremant B ay one
Ixi RepeatepiH) t o to lx) undl the alue fn B

xii Exchang th oodeols of H-Land D- E eqirtepairi


xitRepea p i (ye) to lxfE) undlhe value in
bceme zsro
RExcba h a ccodeds n H- and DE _regPiier poirl
Then store H- pair conde atHhada tired
CoDiiCudfre onecmbr ototlcni

PRoaRAM CoDE (TN AssEMBLy LaNaLAGE)


MamKAddre Machin Code Masoanic Commeots
QE MVI C O6H CEO6

CORS 06
Co3y AF XRA A A ADA_
Co95 21 LXT HCoo1H HL 0001
CoB6
CO91 OO
Compae C wh
CO9 B9 CMP C o'ccunuaep
Tump to CoS

COa CA JZ Co55H
55
Co3A
COBB Co
TnerementA
COAC 3C INR A-
CoBD BO CMP C
CA J7 Co55H TumP CosS E
CoE
COBE 55
COuo CO
Deceemen
COy1 3D DCR A
Cou2 59 MOv FC
Teacher's Signature
Date 13/1o/22
Expt. No. 12
Paye No. 36

MemorAddr LLMachine Code Mnemenfe Cornments


Cou3 5 Mov D,A D
Deccernent
A. C by
Coyy OD DCR C
Cous Tump to CosY 7
CA JZ CO5uH C iszUD
CouG 54
Coy CO
Coy& Mov H, A- H A
Coya 6F Moy LA A
CoUA
MOV Bc B C
CouB 19 DAD D HL HL+ DE
Dece men*
Coyc DCR B-
CouD Tump to CoYB 7
C2 JNZ COUB H
CoYE UB
COyF CO
Co50 EB XCHG HL DE
Cos1 C JMP CoyuH_ Tumpto CoyY
Co52 44
COS3 CO
Cosy EB XCHG
CoSq
Co55 SHLD Co59 H COSA =H_
CoS6 5
CO S Co
COS3 CF HLT STOP

ExEcuTION OF PRoG RAM


a( Reist tbe program-
PreR GO -and enterr he ztardenq addre of the
the
progcam sbfch f CO32 H
EXECUTE' Ti "Eriend PidiAplayad, mani
Teacher's Signature
Date 13/10/22
Expt. No. 12 Page No. 31

the p ram ii uccE&fully xeculed


To tbu cuuput
PeeuSET buHors. and sndeethe addrceAS CoS4 H
Pxsu eo TNR btutde Hbe lonier Crde
e
G Prcas on INR butcn ance agafn toAeL b
haherortdcr te o he

LONCLUSION B xantiytoq dbe reut, JalaLonelude


thattheProgran islaA Rucceaidully ypad xacuted and
h detsd èeut aohdatned T e facdoral od an
R-bftbexadecimal Dumber wa calculated ars tarod
fn dbg desfrcd menoE ocadfen

Susbel Kuma Kodkfa


1a0c01 63
Date 131o 22
Expt. No. 1 3 Page No. 38

ATM OETHE ExPERIMENI T praduce he Ethtnacci ede


upto he nh deEm utq 8085 mitKoproceLDE

EQuTPMENI REQUIRED
RO85 micraproce.ar brakaee kel= DYNA 25
L HEX kaybaard
i( Tnstrucfan oanual

ALGORIIHM
IntitalEi accurulater reqtcher A) wtth t hxadecimal
equivalent nuoher 'n bscause FiLanacc sarfei ups
nth Harm ba h 4ensratecdi mfoiraun and maximu
dHand OF H Apeclacely

LTEalP2sH-Eegfitenpafr tth to addre


MemOry locadias Hromiabere hegenerated E:bonacci
serlesV h e dorod
RTnRlall2e tbemamerynoadionpoRtedh y H=L pai
l s t h O0H
Cacpare condends ad accuouladanath valu ol H
1 heare equa the balt hprocei keprooes

Teorement th H=L pairComtenby on and ooe tha


Nalue O1H Roa memo Jacallanpefded ay
VD Cormpas Condenls o aceuouMator_afth toe yalue 2H

proCLedN Jutoer
Subdrach 02H frara tna accumulatar ondent and tare the
dterene fn heaceunmlato
Teacher's Signature.
Date 13/1Lol22
Expt. No. Page No. 39

ME Dec.emaniH=L-pair cotant y on
EMak b Cetenks adcutnulalor zeeo

x 2Add tocentents _et th acumuladorand ontentso


h meme o.cadonpofotedta loyH-Lpairtand
tor the uo o th accuoLulator neement H-L
poit content b ong Rapeatatep (x)tfce
IsMaxe condents aCcucoulato r t o dh menet .ccattan
CUrEentlypofntcd o lby theH-Lpoir ane decKement
the pairConde a-
xRE) Decrement h corends reqittssB
xire Rapaat teplEx) tnLxtr) uE etee B_cendent
beoocoe cqual ozero

PaaaRAM ConE IN AsSEMBLY LANGUAGE)


MemarAddreaMachineCode Mnemenici= Cormments
Co5B MVI A 0RH A-O
CO5C
Co5D 1 LXI H, CoIEH HL CoF
CoSE
CoSF CO
COGO 96 MVI M 00H M OD
CO61 O0
CO62 FE CPT 01H valugO1H-
Co63
Tunpro CoTE
Co6 CA TZ co4E H A-0LH
CO
Inerament H4L paa
Co6 23 INX HH yalu by
CoG MVI M, 0LH M OL
Teacher's Signalure
Date19/Lo2
Expt. No. 19 Page No. 40

MmoyAddresiMachinCode
Memos CodeMnmonfc Comments
co61 Cornparre A wh
CO6A FE CPI O2H. OLH-
CO6B 02
Jup to COFE P
COG
CasD
CA JZ cOLE H up-O2H
COGE CO
CoGF D SUT O9H. A A-02

COHO O2
COL Mov B, A- B
COT2 Dectement
alu HL pa
DCx H
CO+3 SUB A A AA A
COTY 86 ADD M A A+M
COT5 23 INX H
COt6 26 ADD M
COTE INX HL
COR MOV M A- M A_
CO4 AB DCX H
Decrenoent B b
CoTA OS DCR B.
COTB C2 NZ COF3 H Turf 00.
TumPto cOT9
Cog
COTD CO
COTF CF HIT STOP

ExEcuTION COF PROGRAM


Ha Executien 8tepi i
ReRet the progrom
GE)Prag Goand enter dne staring addr c &o the
DKcaram abdh ik COSB H
Teacher's Signature
Dete 12/1ol 22
13 Tage No 41

tPeA ExECUTe I1Ftnd dtaplad, t4 mean th


ptoatam iucceafully exeusd
(b)Cusput
Meme Addre Data Stored
coaE
CoSO
OL
CoRS
CO83 03
CoRy O5
Co8S 08
OD
Tac the cutput i=
IDruSET' button and entsr ths addreu CoHEH

stic9occateel, Horso n memar

CONCLUSION
NBy veriAyingdbe reult, conelude tea
h prccam alakLuccLadully-ad executed andthe
delcid u l t a r obtafnsd Th Etbonacoi acrie wa
ncaled upt dhenh Herm andtored n
CcnLsCulfve maoerylocatians

SuahtlKurnar Katkta
1a0cS0164

Teacher's Signaturee

You might also like