Page 400 - FUNDAMENTALS OF COMPUTER
P. 400

400                          Fundamentals of Computers                          NPP


                  or memory  is  specified which points to the  OmVm h¡& BZS>m`aoŠQ> _moS> _| EH$ a{OñQ>a `m _o_moar {ZYm©[aV
                  next instruction address  (Branch  address).  H$s OmVr h¡ Omo AJco BÝñQ´>ŠeZ ES´>og (~«mÝM ES´>og) H$mo
                                                              B§{JV H$aVr h¡&
                      Intersegment: This refers to a transfer from  BÝQ>agoJ_oÝQ>: `h EH$ goJ_oÝQ> go Xÿgao goJ_oÝQ> _|
                  one segment to another segment. Both CS and  Q´>mÝg\$a H$m gÝX^© XoVm h¡& CS VWm IP XmoZm| _| n[adV©Z
                  IP are modified. Therefore the operand must  hmoVm h¡& Bg{cE Am°naoÝS> H$mo EH$ 32 {~Q> g§»`m H$m
                  refer to a 32-bit number. Low order 16-bits are
                  transferred to  IP  and High order 16-bits  are  gÝX^© H$aZm Amdí`H$ h¡& cmo Am°S>©a 16 {~Q> IP  H$mo VWm
                  transferred to  CS.  This type of instruction is  hmB Am°S>©a 16 {~Q²>g CS H$mo Q´>mÝg\$a H$s OmVr h¢& Bg
                  said to work in FAR mode.                   àH$ma H$m BÝñQ´>ŠeZ FAR _moS> _| H$m`© H$aVm h¡&
                      CALL r : The contents of specified regis-   CALL r : {ZYm©[aV a{OñQ>a Ho$ H$ÝQ>oÝQ²>g IP H$mo
                                                                         16
                             16
                  ter are transferred  to  IP.  The  contents of  CS  Q´>mÝg\$a {H$`o OmVo h¢& CS Ho$ H$ÝQ>oÝQ²>g An[ad{V©V ah|Jo&
                  would remain unchanged. Therefore  this is
                  Intra  segment branching instruction.       Bg{cE `h BÝQ´>m goJ_oÝQ> ~«mpÝM¨J BÝñQ´>ŠeZ h¡&
                       First  the contents  of IP  are pushed  on  · gd©àW_ IP Ho$ H$ÝQ>oÝQ²>g ñQ>¡H$ _| ^oOo OmVo h¢&
                  stack. Next  the  contents of specified register  BgHo$ níMmV² {ZYm©[aV a{OñQ>a Ho$ H$ÝQ>oÝQ²>g IP _| Q´>mÝg\$a
                  are transferred into IP. NPP
                                                              {H$`o OmVo h¢&
                                              e.g.    CALL  BX
                      The  above Instruction is executed as fol-  CnamoŠV BÝñQ´>ŠeZ {ZåZ àH$ma go EŠOrŠ`yQ> hmoVr h¢:
                  lows:
                                                    (IP)           (BX)
                      New  value of  IP points to a  branch ad-   IP H$s Z`r d¡ë`y Cgr goJ_oÝQ> _| EH$ ~«mÝM ES´>og H$mo
                  dress within the same segment (CS unchanged)  g§Ho$V H$aVr h¡ (CS An[ad{V©V ahVm h¡)& `h BZS>m`aoŠQ>
                  This is indirect Intrasegment branch instruc-
                  tion because a register gives value of IP.  BÝQ´>mgoJ_oÝQ> ~«mÝM BÝñQ´>ŠeZ h¡ Š`m|{H$ EH$ a{OñQ>a IP
                                                              H$s d¡ë`y XoVm h¡&
                      CALL m :  m  refers to a memory loca-       CALL m :  m EH$ _o_moar cmoHo$eZ H$m gÝX^©
                              16
                                   16
                                                                          16
                                                                              16
                  tion which points to two bytes (16-bit word).  XoVm h¡ Omo Xmo ~mBQ²>g (16 {~Q> dS>©) H$mo B§{JV H$aVm h¡& `h
                  This word is transferred to IP. CS remain un-
                  changed. Therefore  it  is  an example of   dS>© IP H$mo Q´>mÝg\$a {H$`m OmVm h¡& CS An[ad{V©V ahVm
                  Intrasegment branch.                        h¡& Bg{cE `h BÝQ´>mgoJ_oÝQ> ~«mÝM H$m EH$ CXmhaU h¡&
                       Previous value of IP is first saved into  · IP H$s {nN>cr d¡ë`y nhco ñQ>¡H$ _| god H$s OmVr h¡&
                  stack.
                                              e.g.    CALL  [SI]
                      Two bytes from [SI]  and [SI  + 1]  in data  S>mQ>m goJ_oÝQ> _| [SI] VWm [SI + 1] go Xmo ~mBQ²>g IP
                  segment are transferred to IP. This is a memory  _| Q´>mÝg\$a H$s OmVr h¢& `h EH$ _o_moar BZS>m`aoŠQ> BÝñQ´>m
                  indirect  instra segment branch instruction.
                                                              goJ_oÝQ> ~«mÝM BÝñQ´>ŠeZ h¡&
                      CALL d :  Call at a 16-bit signed displace-  CALL d :  EH$ 16 {~Q> gmBÝS> {S>gßcog_oÝQ> na
                             16
                                                                         16
                  ment. This displacement is added to IP. CS re-  H$m°c H$aVr h¡& `h {S>gßcog_oÝQ> IP _| Omo‹S> OmVm h¡& CS
   395   396   397   398   399   400   401   402   403   404   405