Page 389 - FUNDAMENTALS OF COMPUTER
P. 389

NPP













                  NPP         CPU Architecture, Addressing Modes and Data Transfer Schemes         389


                     r  and r can be any 16-bit data registers.  ·  r  Ed§ r  H$moB© ^r 16-{~Q> a{OñQ>g© hmo gH$Vo h¢,
                       1
                             2
                                                                        2
                                                                   1
                      e.g.                                        AWm©V²
                                                      MOV     AX, BX
                     Any one can be segment register. e.g.   · H$moB© ^r EH$ goJ_|Q> a{OñQ>a hmo gH$Vm h¡ AWm©V²
                                                        MOV    DS, AX
                     Register can also be any general register-  · a{OñQ>a H$moB© ^r OZac a{OñQ>a- AWm©V² SI, DI,
                      e.g. SI, DI, SP, BP, etc. e.g.              SP, BP Am{X hmo gH$Vm h¢ AWm©V²

                                                        MOV    BP, SP
                                                        MOV   SI, AX
                     Both registers  cannot be segment  regis-  · XmoZm| a{OñQ>g© goJ_|Q> a{OñQ>g© Zht hmo gH$Vo&
                      ters.

                     r  is called source Register and r  is called  ·  r H$mo gmog© a{OñQ>a H$h|Jo VWm r H$mo S>opñQ>ZoeZ
                                                   1
                       2
                                                                                           1
                                                                   2
                      destination register. The content of source  a{OñQ>a H$h|Jo& gmog© a{OñQ>a r Ho$ H§$Q>|Q> `WmdV²
                      register r  remain unchanged.  The  data                            2
                              2
                      transfer  instruction may be represented    An[adV©Zr` ah|Jo& S>mQ>m Q´>m§g\$a B§ñQ´>ŠeZ H$mo Bg
                      as:                                         àH$ma {XIm`m OmEJm:
                                                    (r )           (r )
                                                                   2
                                                      1
                      MOV r, data: Transfer the datum into the    MOV r, data: ñno{g\$mBS> a{OñQ>a ‘| S>oQ>_ Q´>m§g\$a
                  specified  register  source has Immediate  ad-  H$a|& gmog© H$m ‘moS> B‘r{S>EQ> h¡&
                  dressing mode.
                     Register r can be any 8 bit or 16 bit general  · a{OñQ>a r 8-{~Q> `m 16-{~Q> OZac a{OñQ>a hmo
                      register. e.g.                              gH$Vm h¡ O¡go…
                                                        MOV  AL, 42H
                                                       MOV  AX, 4050H
                     Register  r  cannot be a  segment register.  · a{OñQ>a r goJ_|Q> a{OñQ>a Zht hmo gH$Vm h¡& goJ_|Q>
                      The segment register can not be used with   a{OñQ>a H$m B_r{S>EQ> Am°na|S> Ho$ gmW Cn`moJ Zht
                      immediate operand. Thus MOV DS,  41F2H      hmo gH$Vm h¡& Bg{cE MOV DS, 41F2H H$s AZw_{V
                      is not allowed.
                                                                  Zht h¡&
                      MOV r, m: Transfer contents of memory       MOV r, m: a{OñQ>a r _| _o_moar cmoHo$eZ m Ho$
                  location m into register r. Here memory loca-  H§$Q>|Q²>g Q´>m§g\$a H$a|& S>mQ>m goJ_|Q> _| _o_moar cmoHo$eZ m
                  tion  m specify offset in the data segment.
                                                              Am°\$goQ> h¡&
                     Register can be any 8-bit register. In that  · a{OñQ>a H$moB© ^r 8-{~Q> a{OñQ>a hmo gH$Vm h¡& Cg
                      case memory m automatically points to a     Xem _| m _o_moar S>mQ>m goJ_|Q> Ho$ A§Xa ~mBQ> na
                      byte in the data segment:
                                                                  Am°Q>mo_o{Q>H$cr nm°B§Q> AmCQ> hmoJm&
                                                       MOV   AH, [BX]
   384   385   386   387   388   389   390   391   392   393   394