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

Chapter-05 Arithmetic And Logic Instructions

Microprocesssor

Uploaded by

sawrav das
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
9 views

Chapter-05 Arithmetic And Logic Instructions

Microprocesssor

Uploaded by

sawrav das
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 12
* Chapter - s © Arithmetic and Logic ~ 4nxtructiom 1 ‘The contents — of AY BX cx and py ane acted +9-fmm « 16-bit ADD AX, BX App AL App = AX, PY 2) _Smmedicte_ Addie ——_(yhenrorcanlant oF Youn dot ame ddded) (i) bag 3H +284 * }2ng0t1 001 r [4.0010 0010, 2 ‘ ; 01010101 Wor pL, 33H nis 5 Sat oa 0001 0010 ADD Ly 33H OOll ool} 0100 O101 bo Ly ia! 5 j 3}, Meme gi_sausn 8 va Ad two Conieutive byte of deta, Atoned at the data Aegment offaet Wncatiom NUMB ond NUMB-+4, +9 AL Register) - MOV OT, oFFseT NUMB Mov DT, OFFSET NUMP Mov MO ‘cae App = AL, Lor] ‘PibbA ae AD TOH) App Ab, [or +4] INC pr ADD av (00) : Ay cro tAmmay _Additiont —Suppoye thet an away of data (ARRAY) “Contain 10 bytes, Muunbened trom element 9 throug) element 9 A program Arowing how she contents oF anmay ate odled elementA 3,5 and FA a topetbet Mov ALO Moy 51,3 | eee App AL, ARRAY [51] Hei re) ua pop AL, ARRAY [$143] SEO Sy : I Hep Av, ARRAY [sx +4] Het wove e HEE a gaa 1clQ oots6 A 6) Werte 6 procedure that Aum ARRAY. clement SF Fic get Sab: Hod yeas yp return the! eauHteiwi aL» and 10 - gees at Laasye Mov “ALyO nays avrlwatiiagd, sug lemoitipny ¢ gd sswetiet — ellearnet Sh S + gllowyet ‘Av, ARRAY i Aue 1] Ay Array (St+2} ay Aeray Grhes) 0 saave a@at A short Aequence oF inatauchins ADD ADD ADD s (that aubtmact AH frum RH en, 5 a ey ; sup (HAIR % (Biot): sisal oon 0010 RY ime baw Shino.) 0%s OH & ©" Compaiiin:, Cone) —Suirmaction,.. that changer only the flag bits - - Destination operand newer changes - — Nowmally followed by a Conditional jump - Pree gnam nara SAE inmtmuction fortows the MAE SUBER Companion” 4+ Causes +h nthe prognay, Ao continue at soiq memory Toren SUBER jf the value in AL i« 0H Om above - o> (ompone and Exchange: ( CHPXCHG) i helt = cwpxcHe { Cydy iy) Oceys then AX =py t Ohenwit AX = Cy — ih ee 7) on ete program “She gotieies DX=BLX CL: aKUA yroaisa tmsin) Mov BLS if yet wh to pranieay 3 Moy ALCL we opt Mov DX, AX (@ ML ce 4 “5 > A in rmbtiplied bg CL: a th ianed product “ GA, uta. + 1 Undigt wed gaieds canmgong A 1? AY Syd babivib MBL capmpaxtt % (iy MUL j 5 by (Ky ath ~ cokto unsigned products in . ; alt 4... ae igo Daca Tha. orbarilgitt iq : Ao ahor program thet divider The aig x “OX Jdsxd— Mabompnge ad SUS ay tm unigned context edi Contents emony ‘ums by 3 of memory tocetin MUMBA - Mov AH, 0 __Witnragd pv NUMBSPeuprn! piled , : SADIIAES a6 lee MOV ORNST AE 39 UM) 4 vi haw baopiniy ani WO. ANSRE AR ees es 5 program —Ahowing how 2 x Program: 1B vided Wy a hPa ie a ® Mide ¥ ee ae _seorbanit oui” = AG Ain, om SOiNOT LO + ED s(t ones coon pH Mowey pd owen > +a. GdgiAG}) bap GY wee o> or in two's omit ‘ rete ¥ Cai ea gy Lge te ~ gab gnaaj) sat Casey Hh number ; Apecified by a - wy ig er na Shift ® = Two direction: (tert abit, Mubtiplicetion by go wer of Z. and (i) Right abiFt Diviaion by prwent of a-n ut J. . i Rotate sewige Hamough) the Conny flag - Evommple (SHIFT) nT, (i) Ci) mubtipty (iit) Mattel Murtiply Ax AX by Dae a Iw: eat — ———— SS SHL AX, SHL AY (Mov BY, Ay Mov BX, AX mov BILAX SHE AXA She AX,2 SHLAA) ADD AX eY foo At, By App MY, BY Difference: ; — 4F Ch ia used for ag reotee Count, it doean’+ change . Aa with — yhifte, the Court in (1 iA molule-3 oun BASIC _Loauc_znsraperins_ f (AND, oR) ‘ ry l a ‘ ra | “operct ‘ s: - oR openction sets any bit | he AND | jon cleans ay aden Acs XK fey AND () fost Lito qoa Goon)” ep meg MD Sdll>e ys gy (J Sieh typ aT Pree XXX KA, X bon 200 Or TI Nae Bak Wan wp ig 0.00.0 Xxx ¥ @ eens ian “Te rth Hehe fi AME AND opeeciO® > Wirt out Ye, oe _ 4 = or Hegemon of an AND Rete : Adana Fo ati © yi’ COD- The operation vt tne aD anc” a irae? ¢ . Xx xxx X | Valo Numben ow a XKKX TP TL Oo Rewtt T i WwW oa “fa the truth fable fe yee of ‘pan (5) The logic Caymbsl oF an OF bate maf Sete Soth gy iste etka , i Ha OMA te tig (OTe operetn Of the ok functor Othiarh qua . BOM 4A sat ty ecitymoan og Ang, OY HA OF 8 vmunber qo sal 1 Ban Ria ~ AM td vied coi weda, ane ack 8 OMe * F'4 (6) cr Abpuipg how the OR gett yet (VY) ane pit oF 4 > binamy — nuymbert “The tight mott Fue bit? ret» whener he teHtmort foun. bit emai uinchanged one, iF in coaq thet OR operon 40% ee ee AND operation — cleans "4 vit. & ® Difference é ea Hoa] 1) Exclusive OR (¥0R) ya Wi) Snelasive- oR (on) ¢ tr ae iia op ear AAA Condition oF the OR. Function pmeducer a 45 tid fasarttar an, . Mt Hy —_— COnattien, of the KOR openation (See & MEbrHing } : mote 3h Crest“ es (ii) Pet (me: oi TEST inatnuction roumany ect a dingie bit Wheear TE CMP insinacion Feta he entime byte Word, om daubleunes - Se anol \. €49 219 pothd soda a re eal Me aa a es ag ATS i tid va RN D2 changer the oa reco, a aber! dot — chmge he destination apetane “ ee eS % A Ahortt program ahet TEST Aly) qnz Rant Youth He mightmot! test lab Vas and, lettinert bi nz oLeFT puition oF tne AL register - at a : Khat giinarnew E ino Sted ait iE nommple - 5-25 i BTS aC Here, ars, th a al BTS O51 cep vogigi | BTR —D Clana bE im : BIR ux,0 : bao2ge -Avikouitapp.. oat : Bra’! out ye BTS0 125 Ge bE in OX mela ot 5 8m 406 "id* at Aaemb\y Langues ¢ > br — BT a bt — BTR nik js cred and prc —> Invent! bits in Cy Openehisn — tet a bit Woe dortination operand apecitied 9 = Ane dowwce openany - Teas and complement a bit ce NAHE deHtinetion operant agectie# by the Aource oyerms - ~ Tata and vete a ait ih the sekeutination operand azecttiod by aque oper, \ eet inthe destneion OOM aneonerrs ayet

You might also like