Page 390 - FUNDAMENTALS OF COMPUTER
P. 390

NPP













                   390                          Fundamentals of Computers                          NPP


                      Square Bracket points to a memory loca-     dJm©H$ma H$moð>H$ ‘o‘moar Xem©Vm h¡& dh ~mB©Q> {OgH$m
                  tion. The above instruction points to the trans-  B’o$p³Q>d ES´>og BX ‘| h¡, a{OñQ>a AH ‘| H$m°nr hmoVr h¡&
                  fer of a byte whose effective address is in BX
                  into Register AH. The 20-bit physical address  _o_moar Ho$ 20 {~Q> {\${OH$c ES´>og H$mo S>mQ>m goJ_|Q> a{OñQ>a
                  of memory will be calculated by microproces-  coH$a _mBH«$moàmogoga Ûmam {ZåZmZwgma H¡$ëŠ`ycoQ> H$a|&
                  sor taking the data segment register DS as fol-
                  lows:
                                                      (DS) × 16 + (BX)

                      Physical address of Byte                    ~mBQ> H$m {\${OH$c ES´>og
                      The byte will be  transferred from  this    Bg {\${OH$c  ES´>og go  ~mBQ> a{OñQ>a  AH _|
                  physical  address  into register AH automati-  Am°Q>mo_o{Q>H$cr Q´>m§g\$a hmo OmEJr&
                  cally.
                     Register r can also be any general 16 -bit  · a{OñQ>a r H$moB© ^r OZac 16-{~Q> a{OñQ>a ^r hmo
                      register.  In that case memory address m    gH$Vm h¡& Cg Xem _| _o_mar ES´>og m, 16 {~Q> S>oQ>_
                      will point to a 16-bit datum stored in two  H$mo Xmo H§${OŠ`y{Q>d cmoHo$eÝg _| nm°B§Q> H$aoJm AWm©V²
                      consecutive locations. e.g.
                                                     MOV     DX, [BX]
                      a 16-bit number stored at effective address  S>mQ>m goJ_|Q> _| BX Ûmam nm°B§Q>oS> B\o${ŠQ>d ES´>og _|
                      pointed by BX  in Data segment  is  to  be  16- {~Q  Z§~a a{OñQ>a DX Ho$ A§Xa ñQ>moa {H$`m
                      loaded into  register  DX. Microprocessor
                      will construct 16-bit  number  by fetching  OmEJm& _mBH«$moàmogoga S>mQ>m goJ_|Q> _| (BX) VWm
                      two bytes at (BX)  and  (BX  +  1) in data  (BX +1) _| Xmo ~mBQ²>g H$mo boH$a 16-{~Q> Z§~a
                      segment.                                    H§$ñQ´>ŠQ> {H$`m OmEJm&
                     Register r can be segment register. Thus,  · a{OñQ>a  r goJ_|Q> a{OñQ>a hmo gH$Vm h¡& Bg{cE
                      MOV   DS, [BX]  is allowed.                 MOV DS, (BX) AcmCS> h¡&
                     Memory  address  can also be  associated  · _o_moar ES´>og ^r {S>gßcog_|Q> Ho$ gmW ^r Ow‹S> gH$Vm
                      with displacement:
                                                                  h¡:
                                                       MOV   AL, 3[BX]
                      Here displacement specified is 3 which will  `hm§ ñno{g\$mBS> {S>gßcog_|Q> 3, Omo B\o${ŠQ>d ES´>og
                  be added to contents of BX to generate the ef-  OZaoQ> H$aZo hoVw BX Ho$ H§$Q>|Q²>g H$mo Omo‹S>oJm& 20 {~Q>
                  fective  address.  The 20-bit physical address
                  will be calculated as below:                {\${OH$c ES´>og H$m H¡$ë`ycoeZ Bg àH$ma hmoJm:
                                                      (DS) x 16 + (BX) + 3
                      The byte at this physical address will be   Bg {\${OH$c ES´>og na pñWV ~mBQ> a{OñQ>a AL _|
                  transferred in register AL.                 Q´>m§g\$a hmo OmEJm&

                      MOV m, r: The contents of specified regis-  MOV m, r: ñno{g\$mBS> a{OñQ>a Ho$ H§$Q>|Q²>g _o_moar
                  ter will be transferred into the  memory loca-  cmoHo$eZ _| Q´>m§g\$a hmo OmE§Jo, {OZH$m B\o${ŠQ>d ES´>og
                  tion whose effective address is specified in the
                  instruction.                                B§ñQ´>ŠeÝg _| ñno{g\$mBS> h¡&
   385   386   387   388   389   390   391   392   393   394   395