KEMBAR78
MP&MC Unit-2 | PDF
0% found this document useful (0 votes)
50 views15 pages

MP&MC Unit-2

Uploaded by

Kiran
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)
50 views15 pages

MP&MC Unit-2

Uploaded by

Kiran
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/ 15
voit-f BoBE Progam 6 Rroqpow Aevelopement Steps !— 4 Deining —the Probbm 2 Requivement Analy sis Ines jSmall pares | + progtom quit 3: Designing —4 orth 1 a .ostep by step prefedure, “O° cea Problem 4: Algorithm eestin r j ess s To Check correc 5: Coding Gc. Testing . Compiler used = Lise de evrors nevated b bby we + Evrors are vone deed ana vectttred by onc Td * covvect —the evors . Repeat esting > Documentation i" + Te Underseand the logic behind “the —the progiem, by mony Ulers 8. Pmplmen tation F ' + progum installed on the end Use machine 4A Mankainance , Enhanament and Evolua ton | © scanned with OKEN Scanner 9 a structions | a —> The Rowe Picre Proce S607 Supports @ types de Instruction: YS Dota -transtey Inst 2) Ahithmetic inst. 8) Bir manipulation Ths t— 4) Sting Tost 5) Proqtem Evecution tr 6) process Control inst A) Peervotion Contra) inst 8) Tntersupt Inst angtex Iinste ( Branch # op fost) 1) Data transfer Sash io are uted to transfer the destination operand under this geP These trnseructions dato hem the Sourte operand “0 “the Following ave the Use o, inst = Instruction +p transfer oO word Eg> Mov, PUSH, PoP, *ANG eter > Tnstiueron +o transfer “the odd ¥ess Egr Lea, ios, Les Foret Mod SONS OM transtev > tnerttnsttast iNhpor & ev pores Is, OUT A D> instruction 2 Ayan sder leg “es * Ege Lane, ‘Sane, PUSHF , POPF = + + Lv 4 4 + hy fm sme Mt Hay OQ —Arthmetic _Instructions —=aarn. oo =——— se ured 0 perform —Ebith metic octon, mottipt’ cation, ° These lnstructions ave operations Like, adaftfon, Suber cAivisfon Eke. 4 © scanned with OKEN Scanner DHfevent ype oly —Aiithme te Sinst: are a = Tnstructon to per-form -Addi tion Eg App, anc ONC. AAA ELC wttheanry | Oaivit af addition Pnshuction +o Per-form SvbStraction Fa: sue, 588, pec, eas. Ete, lth barre > il = Doastructon te Per-form Mutt pita Hon Eg Mut, TMvL. 4am ed catatio a > Dnstruction -to perform oc piv, Dav, Aae » Signed. Diviston ® Bit Manipulatten Instruction 5 ae fons, Where These inst ave Used +0 perform operations. sens is opevarrens sare involved that Ditferene —type of. Bit Manipulation Qn structions ave > Tostructions to pertorn Logical Egy NOT, AND, XOR, TEST ’ =) Pnstructions td perform shift opevatrons Eg SHL, SHR, SAR, SAL shite deke Shigy REP 5 Repeat come [Co cempare 38 ais => RePE /REPE qs | 1858 jos quot Bend => Qapvt Str > Repne | eer et ane se] OTs Not Gud Ot end => outs | oT > es [Seve sig sep ye String Word © program frecusfon Trapster Sn sesu Crfons + ea ave Used +O stranster | branch the Instvuction dorfog 9% Ge includes CMS invari Execution in steuctions °~ Auring = Tnstrucrons Usithoul- an. Eaecution Catt, RETIME eae “ey erans-fer sthe Ege > Fnstrucrtons an Execution with Egt JC, TH TF, INC, IE, To Ere SO Set SM Bute Vosetioa : Jump Ht ne cany Jomp if carry c 7, =e SS Control Tn structions ;— These inst are vied -Eo Centro! ~the Pro Ces e\ actisn by Setting /esetting the ~feag- Valuer 2 When ¥ Contre “the pretend ——_ =f How J Can Cmbvel the pwend STC - Lted -to Seb Cansy flag Cr tol r . eae ~ Vied 0 Cleat/verer Cany flag CF boo —Uied ty Pue Com = pUmenr Me “the State of Carr Ftas C) STR —Vied—to Sek the airection —tleg DF to! ! 77 CLB ~ Died +0 Cleav/yeter the Airctiow—fley “DF +00 —Uled “ED Set -the interwupr Enable Clog 0 | Some 1® st2 . Fe Enaby INTR Inpor— UD a Gist oe cee teenie anneie ieee J © scanned with OKEN Scanner Control Wn stru cio —— = PN gain ont 0.900) 6 M) CTNe proceso cleing Some third i 7 strucrons are Uled ko faecute the given 5 ° instwetfon for number ch times —fatowing Is the Lise of Gnstwetion Under this ger > Tstuctien until => Loop- used -tv loop 4 cup Ths ven ° ‘ ist ie = the condiHen sa8% ec age fag a qasup faseruction il) > Lope |Loopa — Used *? \oop a + Loctite qua Stee Te Satistted =BFeI 9 Cx=0 > Loopne/tooprg- red 0 loop a ques : 4 ; = — Logit net Gud satisted 2F=0 4 Cx=0 Onse- HU te Taperropr , oe in dew: = vied ey Call the _Fntewsph These Insteuceion s unfog progam Easestion => PNT t- “ted 0d Prteavupt the and calling Sewice Spectstied progum luring Eneeutin| one pro gor Austog Erecution DS INTO t— Uted to Interwpr the + : overttad i# oF=| te Sent ko w o ENT Ul PRET f Lsed -tv Veturo Hem 10 P He main progie © scanned with OKEN Scanner dd ‘i ; Addressing Modes [— Addaessing Mode 15 defined Spe cilyng the data -to he opexated as the way of ts an tmene diate by an_instwetion — ie Specifies thar the, geen cleto a ma Regi HOS lata (or) an addvess Te mds dseion “Types 7 —2in B08G MP we are Using LP, = . d fe ate ALP we COP sing mace Speetty th. data Atttennt wtf ti) Pmme diat® Odd ve 5 Gi) Register -€idd re ssing Mode dit) | Divect Memory Add vessing Mode iy Dndivect Addve ssing, Mode W) Register vetative “Addvessing Mode Cor) Base eave 5577} Mode Based fndered Addressing ™ indered Addressing wi ode WS Relative Based Mode (i) implied ~Gddre § Sing Mode |G) Immedvate Clddvessing Mode & mode, the dota is Specified in “the - — In this. Instruction tt Self —> Pata fs a pare od the fn s evuctor):- & azote date eh Mov BL) IaH 5 Dane BL ¢—l4H dota’ IGH immediately his fnstructon moves —the into BL vegistey ii) Register Addre ssing Mode o—_ -the cata Copexands) ave Spe ce-ti Pn -this mode a using Yegisters Or Mew Ax, Cx —this insevuction moves the Cantent: ‘Cx’ register into -Ax ax <—[ex] cK aad © scanned with OKEN Scanner J Mode 3— ffective addyess of the in the instrac 1N this mode, the 16 s AWyec tty Spe i a F Od ton Mov eh, Carri) dy wero Ane dota -from the Ly caer in moves “This Instuuct! Location igen in the 0S {nto CLe cL <— Luger ny (remy ers) Physical Qddiess o> PSH IOH +t UL AZ. Ei 05 = S000 => Boo Xion +4lAL > ear aH] 7 U- ct dddvessing, Mode t- the effective addvess 4. the -taken from one d “the Base Spea-fied To the ote i : Uv) Register ‘In this mode, mem ory Can be Negistev Cor) Pndexn vegistey ie Tnstructron By vsiny Bale weplin G Drew veqhira bo ye Ex. cx : = _ fed Cx 16 bit Registev cu [ex] (6 CH —CBxtt] Fis oe bye -dotey e - WV) Based Addyessing Mode cor) Registey Relative SElddiyessing: Med. The Effective Gddress of the data Specrtred by the Sum & Contents a ‘Bx/gP vegistey ts Beith ue Asplotement- Ex- Mov Dx, [Bx +04] restora aban Anyi vole Pi <— Oss [Rx+ou] Oke Os: TRBx +oudt] © scanned with OKEN Scanner Wi) Based ~ Pndened Add ve sstag Mode *- 6 = de . A she Effective addve ss ol, the operand Th this mode -the Base vegfs tev -Lo “the ts Computed by adding Conknrs a the tae ajrdee Vegistew Eas. pov at, [ext 52, som = st a ‘byre _frem the addtess Speci tied a de moves a eee by Bx +s2 in a +s fer+ sil (Wi) Relative bareq- Indened Addressing Teds t— °n “this mode the address d, the dare fs Computed as the Sum ol Base vegf stev, Inde Negistey % B-bit @v) Ib-bit Usplocement Ex mov ct, [Bx 4p2 aw] <> Te moves eee —the address fn BS the BS +0 ea Specitied “by 8X4 PL+NH CL vegiste® el WH Fmpved —Qaarsssing Mode operands ave 2 _pse [Bx ro2 +H] In this mode the implied and nok Specffed in the fastruction En o =e K STC —> sets the Carry flag * HLT - 1 © scanned with OKEN Scanner 6 ive ctives ave the the assem Al ssember Divectives of BaRG * Deffnations- “Ihe -ssemblew Used 0 indicate ossembud ard Specfal Tnstuctons bley how 9 progeny cvecard fn proper — > “These ave also Called which ave nd erecutable fs to bbe way as pseudo operations hy the Proce S6OL Ert--assume, BB, DW, DD, Oe.NT, * Eau, org, PROC. END, ENDP. ENDS, “EXTRN —tssume e et => Boge ‘has 4 physical Se a number gmentS 20S,CS, gs, ES of Logf cal Segment => 8086 also’ contains Seg ment— assfgns a ogi ca) > -Assvme Airective tf ony a -tfme +o Phystea Seqment- a Eat- -aqssume | Ds twata Assume CS % CODE Ly Oe refers the Logfcal Segment aS Code, ALIGN °_ aes — his dine ctive alfgns new Natiable ov) in struction ALEN ‘nembey : oe con ee a! 4, B doyle “ALIGN 4 used 0 for ce “the assember "40 eilign “the newt Se at an addvess “that Sible by 4. gment is Aivi- © scanned with OKEN Scanner TLL Gi tle dihhetetatel a EQut. sy es used Lo Vedletrne a data name Cox) Variable with another Name Cov) Value Eau etpresson name EXS one Eau FHS Rome Caw cAtxinyy? ORG ~ Torginot’] <> This) ditective changes -the starting off set adress: of =the . data , ORG erpre SsiON ; ORG oooh —» Set, the Location -by \000H Trns tw Chon This aligns nett Vora ble cov) +o even byte : Jr | Page *_ this aivective helps #0. Conttel the foimet | oo Usting ck an -Aisiem bed prey PAGE Chen gh], [width| 34, 46 Ls 34 Unes pet poy "a G) Chavarreys per Une STAck }~ — provides the Shovk cub fq Stack Segment Stack [size] > Stac . Lane Ee < 50) > “This veserver so bytes for the Stack operation © scanned with OKEN Scanner * Shortcut tn defination Of the Code PSI MERE @ < At shorrcut fn defination of the cota oes" of OW. DD, Da and OT fo ean oe eae Anno ove U.eal eaee Clectine clit-fevent type ob, Vawables Cov) clota —bypes 1 -> ft ts vied Fo BB) Define Byte (declare 9 bute type Le so dy Varvable ) ut number DB lon, Poh OH sat ' , > :Dechted arroy o 3 bytes nord Numba DW + DW Define Word = fe ts Used Acfine Votables 4, dye Ege Expt PW 23 uh BusGh , S61eh De detine’ povble werd DO‘ Define Guod word Or f-Nefine Ten Byt4 : fi «nal ExTRN f— this Anective fnarcates eT 7) Astined Symbols abelS veteved bo as external 17 ce cored —> Names and 1G — publi module muit be EytrN VaR®FaR Np ce ° > End do the progiem wm © scanned with OKEN Scanner ge PRoc_and_ END? t- Lk proce due wited 10 “the. > fb defines tHe rene Pere Name PROC type Ex Fact PROC» FAR This. divective ideneiffes the’ Storr S & prote- named ve ts —for Fact-and the Precedure : | ' é wroted ve ENDP & fndicate the end of ther P es Fact proc FAR Enop SEGMENT and ENDS ®— a ‘ oe 7? The —Gerembly danquys Progem jn sEXE Consists o one o¢ Move Segments 13 7 th > Seaqmenr Ae ctives defines the stare the Segment : > ENDs *~ fndvcate “the end of the Seg ment- Ext CopE SEGMENT Cone ENDS "AACR and enim + MACRO Divective diffnes the Start a. ~the macros fh -the Progen MOM > Th Irnavcate “the end &-the moero qm INIT Macro; eNom : © scanned with OKEN Scanner PBLYe f+ DuPt— This cltvective is Used ~to Initial be ® Seveval locaton and assign “the value Name Data-kype Num DvP (vale) =18- TABLE NB Io DUPCo) —>Resevves an array 4 10 by tex of, meroaiy a a Gyovp - Group ‘elated Seg rent *LeaeeL Name DFFSE Ty ORG — originate Proc -— Procedure * PTR - Pointer « SEGMENT SHORT © Wee. Oos Function Calls 1— 4H oot % Terminate “the progiom GH 1K $ Reasl the Key board Ai 02h % write faa Standavd %/P devi Ce At OBH ®% Read toa Standard f/ P withovt < code Segment Code de the PIOG™ START = Mov €x%, Nor a (UL Mov 6x, Nor ) a oy ee eee cen oe ee . Sub Eracerm i . CoDE ENDS id nob mention ENO start Scere teninten oat AK © scanned with OKEN Scanner Fts sem bly Longugt _pregem cleveloping -Lools 4- - Editor i- -An editor Ts o Program wh a le Contatning -(he assembly dongug of, =— Voq\em, - q [ q Ly To Conve Asclland srore 7 RAIA ch allows “ou -Lo Cte abe sratemenes ol 2. Assembler §- cole Seetene: a sseerrehy An assemble’ progiom ts used +o transl Speco F language a corre s poner Es then wo Ton “the assemble, wveads the sourte ile ot Lhe disk, where +“ have Saved tour progrom hom the attey editin : obsect file ane assembler Use te generate Ewo fe reg ON ee S- Linker 4 Linker fe obiect: file Obseck files into One Low: obseck —Hles into ons _—™ hus — genevate two Link mop 4. Locatt— Locard is a progiem used Ee assign “the -—.Crt alluws> you 0 Syseem Memoly ebug © scanned with OKEN Scanner

You might also like