Page 382 - FUNDAMENTALS OF COMPUTER
P. 382

NPP













                   382                          Fundamentals of Computers                          NPP


                   5.2.5  Autoincrement or Autodecre-          5.2.5 Am°Q>moBÝH«$s_oÝQ> `m Am°Q>mo{S>H«$s_oÝQ> _moS>
                   ment mode
                      This mode uses memory words by speci-       Bg _moS> _| a{OñQ>g© H$m Cn`moJ hmoVm h¡ Omo _o_moar
                  fying registers holding  indirect address. But  ES´>og AnZo A§Xa aIVm h¡Ÿ& `o ES´>og ñdV… KQ> `m ~‹T>
                  the registers are automatically incremented or
                  decremented. Consider following 8086 instruc-  OmVm h¡Ÿ& 8086 Ho$ {ZåZ {ZX}e H$mo XoImo:
                  tions.
                                                         MOVSB
                      It stands for "MOVE STRING BYTE". It is     BgH$m VmËn`© h¡ "MOVE STRING BYTE'' & Bg_|
                  used to transfer contents of a memory location
                  pointed by register SI in Data segment to the  SI a{OñQ>a Ûmam ~VmE _o_moar ES´>og H$s g§»`m DI Ûmam
                  memory location pointed by DI in Extra seg-  ~VmE ES´>og na Mcr OmVr h¡& DF (S>m`aoŠeZ âcoJ) Ho$
                  ment. The contents of SI and DI registers are  _mZ Ho$ AZwgma SI d DI ñdV… KQ>Vo `m ~‹T>Vo h¢Ÿ& 8086
                  automatically incremented or decremented de-
                  pending upon value of direction flag DF. Some  _mBH«$moàmogoga Ho$ Hw$N> Am¡a {ZX}e {ZåZmZwgma h¢:
                  more examples for 8086 are:
                                                        MOVSB
                                                        CMPSB,
                                                        SCASB,
                                                        SCASW,
                                                        LODSB,
                                                        LODSW
                   5.2.6 Direct Addressing  mode               5.2.6 S>m`aoŠQ> ES´>oqgJ _moS>
                      The datum to be operated is referenced by   Am°naoQ> {H$¶o OmZo dmbm S>oQ>_ H$m _o_moar ES´>og {ZX}e
                  specifying its memory address directly in the  _| grYo-grYo ~Vm {X`m OmVm h¡Ÿ& 8085 Ho$ {ZåZ {ZX}e
                  operand. Consider following 8085 instruction:
                                                              H$mo XoImo:
                                                       LDA 80F2H
                      Contents of memory  address  80F2H are      _o_moar ES´>og 80F2H H$s g§»`m EŠ`y_wcoQ>a Zm_H$
                  loaded into  the  Accumulator.  Similarly, con-  a{OñQ>a _| cmoS> hmo OmVr h¡& Bgr àH$ma 8086 H$m {ZåZ
                  sider  following 8086 instruction:
                                                              {ZX}e XoI§o:
                                                    ADD AL, [4219 H]
                      The effective address is directly specified  _o_moar H$m B\o$[ŠQ>d ES´>og (4219H) {ZX}e _| grYo-
                  in the  operand which  is  (4219H).  Few more  grYo ~Vm`m J`m h¡Ÿ& 8085 d 8086 _mBH«$moàmogogg© Ho$
                  examples  from 8085 and 8086  microproces-
                  sors:                                       Hw$N> Am¡a CXmhaU ZrMo {XE JE h¢:
                                         8085                     8086
                                         STA 41FFH                MOV CH, [6000]
                                         IN 42H                   ADD  AX, [6F 20]
                                         OUT F2H                  OUT 40H, AL
                                         LHLD 70F2H               IN AL, 3FH
   377   378   379   380   381   382   383   384   385   386   387