You are on page 1of 15
pu nit et Mh bi M/emprocester Thstmesion Sot @ One eo Ar Lay Programmer Medel Medel oF areie fa Snes sees BPR har 20 adduess Linas © he) IMR of Memon Br je divioled tne fh Segments each 64 eB : iss 2 4 $ ae General pupae te bic ge oe Ay Ie By i Eee eo SC [pel eZ) Speed: pes x bytes — ebit oi Higned — BH) bore, SW + werde — [6 bit Undijnad — ghee, bony -Tnbleger oe” hea Dreagers —F br + Ineegory — bse F Double Wem, ~ 3s bth + hong Integers — 32 \67% 4 tering a» Servier of tyres ©? sere, 0} Notda Stored jn Seqcencial MLE ann: Taseuction fete gem et marge herncen | t 6 byees 2 Lyre ; a ee [epee I baal Ngan onda = feces Ro] Pesister telyrom mesuny si wie re bspdace mene 4 tyre [pa] aT) [asere] ooo aT Lupiseer reomjeo memory with Arsplace 4 bye t Tromecliare eperoma t Mgt Arer. _— begre ‘- Ges) ’ [Tex pie) Wa vir] [extern] Py L gmmedinte Operand bo Memory with Me bir ei oe a oa : Cpernd pdobeessiog ©) addressing moi indioua, a Cocating dare Gor) aparmad ny @ sapietin admeig “et: Doto. bromifer béevewm to ROgPsvor Sota <& perxdaation - aye ree mtte yor hove peel © oR ch, AL @ Ax <—— BX owt + "4 FRID A+ BL Ghee, \ . At Be = @ Bramedinte Retina “ener When one Of he percnds Ig port OF the faster the addaessg mete 10 Lorrnectente KEL foe — 236) pov bx, BBhoH fe Moe At, WH es pce peel Mey BL, EH Abe pneee @ @ Dinece memutty Adovessy ects. In bie dorset Bddress to Por of we iweuction 2 Aigplacertene Held, Be treed lb be Gr) @ Lie rumeer. LOR Ae, [2RemHT — [Ax ye GD 00H 7 Mev Tipoou] jax Tapeony mse tne Ax Loan) Pere nddness © Re Pe ae ae date 00 Speged Oe Center Which contain OO cpergd nia keene od” 5" aeStited ” Phnough pointer Pegi prer a Dypclen ref! ber. a ke ye, ke, XoR 85) os Bs) 2 [ex] moe et | Adeling Content of ) Base ia Preex a @ jer € The Content of an gee LMEe (s£@) Dz) Bare Regis! (Bxev er) Mov Bd br, av a he a ow) ‘poy PBRHDT , AL Mey Ax, Ba Bed @ Register polacive Acle Ee aBEG POSES, 5, — a oa vinctex, addnessig rods Saas ng Bo FbiE-G) (6 ine ppecte haddrus Doplac mene = Mov A& Go : RAR the Connen : { oF Bx OP LE Mec pee T Teeth . oP Pthmert- (a8) | @ Bare plas trder Regictey Rilative Bore Pegistey Epa) Bx Trdlek RGStEY pr G) 96 Combination of “Bare pits “index ‘amd MeriSter Rebrcve_ ; @O Nath pddbressrs Nov SEX +02 4+2J, ct y Be i Ese walt pod Mov Lex] Epty Peay ,ct wait- yee 2 Mov + Ax wl else. @ s9 pddrssng mote ee e sing 4) the String eperanda 10 -tifterent > mcces ie A hem thag 0) the they Bppranch, [pFa=e] 4) SP ERE ax Pheremented (era SE EDT G4 Pecnementel Dineen Flag @ -seped Acdnessing eed (® yacn addressia posirce) pop omty le bitclerm t= /from Siren Back opancion SP &.BP OnE Heed, Pust px = |S Eon Pop ex 2 + «feet Ele | ‘ bg Hee i Jes p Sp | <— Jae 12 i TYPE —_—INSTRUCTION SOURCE ADDRESS GENERATION DESTINATION 1)REGISTER MOV AK,BX REGISTER REGISTER BK AX 2) MMEDIATE MOV CH3AE DATA REGISTER 3A cH DIRECT © MOV(124, AX —_| REGISTER (DS x 10H) + DISPLACEMENT MEMORY AK 112ME 10000E + 1234 REGISTER MOV[BX],CL REGISTER @sxi0H)+BK MENOEY, INDRECT a 103008 10000 + 03008 S)BASEPLUS MOV(EX+SI,EP [REGISTER (Osx 10+EK+S1 MEMORY INDEX BE 0500 100008 + 0300H + 02008 QREGSTER MOVCL,BX#] [MEMORY Sz 10) +BX+4 REGISTER RELATIVE 103048 oa 100008 + 03008 +4 TBASE MOV ARRAY [BX+SI], DX (REGISTER (DS x 10H) + ARRAY + BX+S1 MEMORY RELATIVE Dstt PLUS INDEX 1ogooH+10008+0300H02008 ete rene ered cl ication of Instruction Set “© Data Transfer Instructions “* Avithmetie Instructions “Bit Manipulation Insteuctions «Program Execution Transfer Instructions “String Instructions ‘= Prneaccar Conriel Incemierians Instruction Set of 8086 ‘An instruction isa binary partern designed inside a microprocessor to perform a specific fanction, ‘The entire group of instructions that a microprocessor supports is called Instruction Set © 8086 has more than 20,000 instructions. Data Transfer Instructions ‘s These instructions are used to transfer data from source to destination. The operand can be constant, memory location, register or 1/0 port address. Data Transfer Instructions = MOV Des, Sr: + Secopepm can bereits memorylocaton omen += Descen be ister nemorvocert + BothScc and Der cannot be remo lcationat the ame = MOVER ara = MowaL BL OVER pet Data Transfer Instructions |= PUSH operand. + lpuhestheepntad intotop of eae + EgiPUSHAX © POP Des = tepapetheopenan trom op osteo Des Data Transfer Instructions © XCHG Des, Se: + Thsinctructionechangesre with es, + eannotechangervo memory loestionsdizety + Bg:NCHGDX, AX, Data Transfer Instructions “AN Accomlator. Port Adres tenet ope fom specie pat toaster Eg oot + OUTPortAddiess Accuunelator “mani pen fe entre paced po. Data Transfer Instructions “LEA Register, Sre: + Teloads a 16-bit register with the offset ‘xldsess of Une data specified by the Ste. + Eg: LEA BX, [DI] «This instruction loads the contents of DI (oliset) nto the WX easter Data Transfer + LDS Der, Ste Instructions + load 32-Uepulse om memory coca detention sete al DS. ‘Theater isplace in the destination register andthe eeepc Toure mie tnemecon mewond ae Lover memory scikessm contin the offset and the wordt the igheredves me contin te eaunent + EesIDSBX, [oso Data Transfer Instructions © LES Des, Ste “Iles 2 be pine fr memory somes Teint mini +The oc apelin the dentin elt ents ‘segment paced in BS + Thisintruction every sir toLDS expe thtit snisnies tS neend of DS. + gs LES BK [ost Data Transfer Instructi ae, + esprit ptt ppt a eee ey eee + Rope estepee fap Arithmetic Instructions ADD Des, Ste: + Itadds a byte to byte ora word fo word + Itefeets AF, CP, OF, PP. SF, ZP flags Eas = ADDAL 74H |= ADD DK, AX + ADA [BX] Arithmetic Instructions © ADC Des, Ste: “Teas the two operands wth CF + Teelfets AF, CE, OF PF, SF, ZF flags. “Ee! + ADCAL aH + ADC DK AK, + ADCAK IB] Arithmetic Instructions SUB Des, Ste: + Tesubtact byte fom byte ora won! fom wor, « Reffecs AF.CF.OF FF. SF-ZF flags. + Forsuberacton, CF actsas bomow fag, Eg: + SUBAL, a suBER a + Supa, Arithmetic Instructions © SBB Des, Ste: « Ieeubtracts the p00 and also the borrow fom the rout « Teeflects AF, CF, OF, PF SF, ZF flags Eg: + SUBAL alt + SBBDK.AK + SBBAX, [Bx] Arithmetic Instructions SINC Ste: « Tkincrements the byteor wor by one. «The operand can bea segister of memory. location. « Iteffeets AF, OF, PF, SE, ZF flags © CFis not effected. + Eg: INCAX Arithmetic Instructions © DEC Ste: « Tedecrements the byte or word by one. «The operand can bea register or memory. location. + Ieeflects AF, OF, PE, SF, ZF flags © CFis not effected, + Eg: DECAX Arithmetic Instructions © AAA(ASCITAdjustafter Addition): faaS I,m parecer eH = 298 + Thbisnrotion lve ur ood the ASCH coder + Thisinszution doesnot hae any pean «= Other ASCT Instruction + AMS ASC Acs ser Sacto) © AMM (AEC Anan an) + AAD (ASCIL Aa toe Dros Arithmetic Instructions = DAA (Decimal Adjust after Addition) Tis ued ro make se tha theres fading two BCD. arian ee CD met Teta tae |= DAS (Decimal Adgust after Subtraction) 2D el pe et ert tog em [BCD sumnbessadjusted to bee conet BCD number: ‘ Tonlywecks on ALrepscee Arithmetic Instructions © NEG Src: eeeroater ae complamont of a given number, “That means, it changes the sign of number. Arithme' + CP Des, See eee + de rcand Desean be 2 constant, repstror memory fees, = ic Instructions Wit eetiatned ee feaueptantalcee™ + Te comparisons dane simply by intrnliyubeet person ply intemal teecoure ace nas bt Tevet calito! Arithmetic Instructions + MULSre *tsan used miipiton nsrction. + mb rp negate avon rte woito © AXE AL Se = DX:AN@AX” Se ‘= Musinsricin tsanes ea te opmad AL OFA. [a + Risasignal malipliaton inset. Arithmetic Instructions = DIVSr: + Tis an unsigned division instruction. + Itdvdes worl bybyt or double word by wor, The operandi stored in AX divisors Sr andthe result stored a + Aiaremainder AL quotient ADI sre + isa agued unaoa struction, Arithmetic Instructions * CBW (Convert Byte to Word): + This instruction converts byte AL towon! in AK. + Thecomerion is dane byerending thesips bof AL throaghout AH © CWD (Convert Word to Double Word): | Thisinrmeron conser word in AK to double word in Daas. Saher ree Rg etn EA, throughout BR. Manipulation Instructions + These instructions ane weed atthe bilevel. + These intrctionscan be usd for Bit Manipulation Instructions + NOTSre: + Meomplements etch bt af Stee produces complemen ofthe specied oper. + Uheopeandcanbes register or memory lation. Bit Manipulation Instructions + AND Des, Se: « [epesforms AND operation of Des and Sc ha atom poo ayes mane rant herve a ne © CFenl OF become zero afer she operation + PE SFand ZF sreupdated. Manipulation Instructions + ORDes, + i performs OR operation of Dez and Se + Soccan be immediate unber register or memory + Des canbe renter ormemony location + Both epanaus cansot be memory loestans tthe cama «+ CPand OF become zroafter the operation. + PR, Sand ZF areupdsted. Manipulation Instructions = KOR Des, Ste « Tepesforms NOR operation of Dez and Sc + Steen be immediate sumbes gist or memory «= Descan be recite or memeryToesem += Bothopasnde cannot be memesy location adhe come © CFand OF become 20 after the operation. + PF, SFand ZF areupdaced. Bit Manipulation Instructions - sHLDes,Counts ee + epusscol) Int Se ASR iene ara dete indeed ra * Howeves ifthe urmberaflaits tobe died more dhe 1 then the coun puri CL epee Bit Manipulation Instruc = SHRDes, Count: as « Fepoeecerte in MSB=, LSB ie chit inte cee lag Seeder Gare + Howeves if the numberof bis tobe sified is moce haa, 1. then te coune spun CL reer Bit Manipulation Instructions = ROLDes, Count: * Lsoates Bis of byte or word ef by coun += MSBis tuanafemed to SB and sls to CF. [the suber of bits dese tobe shifted es, then the erer ye er + Hpevey i Uc nso Ua ue sie 3, then the count Is put la CLaegste: ae Bit Manipulation Instructions = RORDes, Count: + Ksoetes bits of bc or word it by mun, + LSBs andor to MSB and lato CE. «the mamber of bite deine to ebifed i, then he sears pee tenella here Uncle arb a i ‘len te count putin Letter Program Execution Transfer Instructions “This change canbe tough a condition or sometimes a «The conditions ae presented by fags. Program Execution Transfor Instructions orpiocedce + The sckres of nent intrusion alee CALL eed onto ack * Ieretums the contol om procedure to cling rog=m. + Foery CALL instruction should have a RET Program Execution Transfer Instructions IMP Des: + Thisinstction is use for unconditional jmp fom oneplace toanotier « JexDes (Conditional Jump): + Alle coaltiona jumps follow sme conditional Patents ranean Gat eects he lage Conditional Jump Table hime tabe mpc eptbacrer bea homptcaey pie empty amped nape Ioeptrny er u EERE UTEP EE { H Program Execution Transfer Instructions + Loop Des: etapa! + Themumberoftimes loping is requiedsplaced in the Cheese + Widheech itcton, thecontents of are creme + Diiacedied whch top sine mt. String Instructions » Sting in assemblylanguageisjusta sequentially stored bytes or words. ‘Thee are very sttong set of string instructions in 8086. + Byusing these sring instructions, the size ofthe program is considerably reduced, String Instructions © eMPS Des Se: + compares the string ytesorwonds = SCAS String | Necneasting « Iecomparesthe Song with byes in AL orth ord fa String Instructions = Movs MoVse / Movsw eeauses moving of bye or word om one sing to cote + In this instrvcton, the source sting sin Data Segment sin destination sting iin Exe Segment + Sled Dl store the ofet vos for source and estinaion index String Instructions «= REP (Repeat) « Thisisan instruction prefix. « Ieausestherepeition of theinstuction unt CX becomes era + Dg: REP MOVSDSTR, STR: + Tors iteby riers + RePrpeaste qerion MOVSB wu Cx bream ne, “Processor Control Instructions «These instructions control the proceso tele + 8o86allowsto contol certain contra fags that: * cauestheproesnginacerain direction proceso sycizoizeonfrmoretbanone rachel, Processor Control Instructions «SIC: Tiss he ay ag. ac + Releee the cay fagto. sae: «Thenembementc theca fg Processor Control Instructions «STD: + sets he eto ag to "Wet cn bes ame om ceremony adirestolover mena cD: * dears the direction egt00. + Weisz she sing besa sera femlowee eyes bhi sy en, OO othe DB pecwmat PB re ine eye P&P Define Cadwort PW Dee Ne Dr bets ae ng ees ine Ten Bytes r Location a) Pregrom tanera! een PR, > hecavien Gunter” OR% 29TH ReNeTy op Siti ae” een ee Brena 72> item fon Ae bese, -» 70 aas’'Gn & name fo ce eunnent Value in the Le cacten Gunter 2 tegmnent pechanarer : ee era rey alow be Specijnct yay Fide vetrect Van Oe sci ete ion ass lee COR cn Aeon hySlot dagen xe ae Assum © 25: cope, Dl: DATS FSi sTN ee a Cope 5 * DAT “pincers ts Tn toleration loth Rapes sSrnew ) sons GeEet Guinp the bao Seamer’ PROG GReuP Coxp& -DATA —— @ Proodure and mache Rett Be epee Peep ranean Pegc, 2 oe eEnpp 7 enol of He precedints pueiic 2 7? pole, Deok bie eters emer e and Bath rogram On ctavelepect goponcta modules « Ribbes 2s ptat wea PAOD MARS Se A called to NO en, rare RN é ie the prepare Monet pour ob Pes O@ ether pire cen. 4 ar 7 PTR -— wed fa popwerion? pe ersinn Speethe tyre a votoble Ord ee Le ee loco Tine — oy & as ‘ : wim — bed ee RROD MRS Oe Petal vt whines Bladen, Takemet 2 ae

You might also like