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

Chapter-03 Addressing Modes

Microprocesssor

Uploaded by

sawrav das
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
19 views

Chapter-03 Addressing Modes

Microprocesssor

Uploaded by

sawrav das
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 16
ADDRESSING MODE Palace Ans fe “The different ways 1 which a proceMon Can acceA dnto ane reformed to 0A addneasing mode - MOV instruction ja wed 40 describe the data addnoming modes Mov AX, BX yl Der ~ Source Atination ~~ operand Opcodes 4+ tela the MP which op’, 40 perform - Data — Addrensing _Nodet — Dat a — Addnening Franstona a copy oF byle/wond —Frrovn AouMCe (iy Regiator: _Asdnouing |) ab register/ memany Wecahon 40 qortination negurter/ memory Tocetion . Exam’ Mov cx, DY copies word aized coments of Dx indo Cx - =a Adarceal es Spatruction: extineh Sopiraction:— Generation : < or HR imedieneAdémemsing’ Tamers Aourece - immediate byte on workt ‘Soumrce oF deta into dertineWorn —tegixten. On memnony location . vamp: i FANE MOV AL tH COpION q byte sized AH IMHO AL - aan, SRE page, PMAtineh'en meus wom TL ag ® (iit) Bie _ Dineet —_“Addneasing: Mover « byt@ on word bet’ «memory location & a megisten - Examp: $n trruction Source Addners Dettination, Generation. SC ee ae ox IW) + R34 = =1R4H (iv) item indinect Addnening ——— eae Tramfer q byte/unna en amegisten 8 @ memony location addnenel by an inden on bare Regirten . The inden & bate negictens ane BE, BL, St, pp- Examp: Mov. Ax Cex) imatnucton copies word-dized dete fram dete ARNOT oT addners,. indeves ty ox inin register AX - dnatuachon., ——— Satin Addrey banat i Seneratim | Moy Text, ch a meal meow 50300) : = 10H 4809 4): = 10300} ® (v) Bare plus index Add meuing: quantferr 0 byl@/wors ben g — Fegixter & memory feertion —qdaneued by 4 bue regen (sp /ox) plud an index — egiater (p27 sz) Example Snctruction Source er Dertinetion_ 5 jiu a= ue Generation aaa Moy [exssz1 a ar ps Kemet wv P, BP x10H er +Bx4SE =10000H 4+ 0300H + 02004 = 105001 I a a register —Moniny Joven» qddnewed M4, an index / be pt plus a displacement - Examp ri a hs MR em putin is Generation Mov CL, [er44) | S DSX 10H A cag lene” | = 100000 Heep +4 = 10304 4 ———O———— —“‘i—__N es 6 (oD) Bae - relative -plas—inden _ addnouing a lee ma Tranfer, byte /Wond beth a Register, & memory {iA placement addressed by a bare tan inden’ “ogirtie plux a ditplacemen Examples Soceuction MOV Aneay [ax 4sz) py Sauce Adder Genonction Destination Reginten Px} 5 DSXIOH + ARRAY +O+sy __) Memony ttso, = 1000014 10001 +0300H 402001 = Nsooy Scaled iden» Addreming: elated —_iniden_c _Addrrouing:. ——— ee Sortruction Moy» [FBx¥2 xesr], Ax Adarem ecg Sounce _Genestation eleirening OSXton 7 atone | 107004, 15 = 100001 +-00000300 hha “D000 40H St NADU << = | OF HHH At 8 2 WO x ow (ontainn the following @-bit registers ced with Register odéneAings AW, AL, BH, BL, CH, cL, DH, DL Ne-bit megistens wed with negisten addr ing» 4 AX) BY Cy OX, Spee. sx @ OF ( Gprtnuchion — Fore egy tet — year Mov ES,ps —— (Not allowed) me Aize-F Aa =) (Caegimert to Aegment’ an) MoV BL,px —s (Nor allowed) cpivee (ot awa) Gey” Seqment to Segment Moy instruction fi Not allowed dertination 4 IRCA Why Changing: theses negisten with a mov instruction th not allowedt fe CS magister iA not orally changed by a Mov inriuction, becawe the addnen of the nett intinucton 54 Found in bth ape cg gt Only (S Wena changed, -+he addrteny instruction would be Unpnedictate - CS With 9 Moy inenuction iA nok allowey See i = Therefore, Changing ll i) ON ta Mov Ax, BY —> lopy contents of Bx into (x - * MOV (SAX > Membler, but will Cause problem . iibwehap precedes immediate data in_Aome amemblerd - Teh x TEx ~ 7 cde ae 2 i AbGueily te} : Tun basic tarrmot _ainect date eon: eae VOM (MOV AL ERMA] [wher DS=t090% . Ea Openation of mov AL, [Roa] . When DS= 1000 - % Effective atinent ja Fonmed dy gdjing enshi addrieny (uo (i). Reguater, —Andinect _Addnexing. oe Mov ay px}, 8x =!000, DS=0100H ian 92002 AL wo Papo : 02000 4 saBf a of “ [01002 g 01001 ee gh * 100d wd 4h 4 0100 x10H ~ = 10004 i ‘ s0naied « H | Se cee ah 2 100-4 > | fora | Bigs Operation ur a ) ———— ogg © wm | invtwon, whan BY = 10004 and ne ARLE OD Gop =o100H1 Fae 9 : 7 ae (ii) Mov py, [ax +r ] X DS iA uded by default with Regitten —indimect Gddneading on any then addmexsing ode We; px, pr On St +0 address Ynemony . % 4 BP regimen addnener = Mnemony eS 1A Wed bg defauly - ¥ Memory +5 — = : DSx10H Memony more si AAT =0100X 10H et = 1000H - allowed sf Heney’ i x = 0100 0} ‘ es Ds 3 2 H Moy Or, [ay 0) pov BX = 10004 Qnd pr =OOtolt - Fig? An example Arowirg pow The bote- plus inde Adéreminy mode — functions fon Mov D1, (ex +pz) - ) (i) Nov AX, Dox +0001), BY = 0100H, Ds=o200}) . Regicten Anmrey Yow ny 3 penation of the MOV AX, Fx -+ 160011) iprtructi on, wher Bx = I00H and DS= 02004 ® (Moy AX [ex+sr +1004 ) UA jndon add ening: ® Exannple SS— a) pusif BX om ; Gi Pusw (exd 7 + = ; ps =3000H = QFFE a SSK IO foxy = 02008 = QPFE “4000 x10 H reed = 3000 CARPE +40000H [ss = 4000H = 4QPre o Register Aruray Here, 30001 = oor! 0900 "000° po00 (30004) 9g00 0000 099° 0010 (aw ) ae a re veo ovoid Wirt 110 (ay HE itp E ® (vii) Por Ox Register Annay mMomony Ax [ 8x or | Bopal 24 px se[se_] $5 10l4 Fig, POP Gy : — * i —— ; , Se i i , z L s — SP alwayi pointe to on aneq of Memany located Within tack aeginent - — Whenever data Popped -from the Macy, low-onder Q-bits ane romped from +ho Teton addnessed by sp. High-onden ¢- Ke a bit ane cemived rtm th location : © : SPH. yf What. iA,.wnong with MOV BL, x inetauchion? aise cig eee a egintonn qne of different Aizer - FF om SHEL «DXyCL * Ane allowed _ What! “ia wrong with a Mov COL Coz] organ ag ipetmucont sae Ga Angi, Memorty- to memony tnamfens ane net allovel Mertens pyc MGpr With Atning : ae Wit spabiigon caimoity} f 19 L %, _ What an i i: (sD ing ) i Waong with g mv A [80 SAG tage alt, re 8 ptructiony A id not WRONG FOR prog. writer fon ie bia Pe eae : ai triel ASM Amemblen A).494 1) eed ; ® cerhern © Dporetio natody; ae fs A : ; = “opi > Ay CX) Dx, BY Y PUSH y) howell on ep Bp, pg? and SF +0 tye} a? vom py a tin) pro the Mack ° oF ii) Rust AX ~"tapi@l the AX region i si Aa. oi angtesomh emonaer of ~. "46 the fac ~ atortwatygy Remover! We Word conten iv) Popa (itD Pops Fatlowing negitent tram A Mg tis RNOMD aj | icfin the : Ai bn A Gy Meo Hh wi, oon Macks SL, pT, Be fadttausttna (CX and AY - NE au ae a Lye a This ac : 91 een ara Sas usa _Notes a — Data may be. pushed onto the «tack -from any 16-bit registen on Aegmen regiaten - Data mag be popped off the xtack into any registen om any Aegment rreginterr except CS -

You might also like