Thursday, 28 July 2011

8085 Data Transfer Instructions


       Here we are going to discuss about data transfer instructions which move data between register or memory locations.
INSTRUCTIONS:
       MOV :
           This instruction is used to move the data from accumulator or memory to some registers or vice versa.
      e.g: If [A] = 00 and [B] = 20
             after MOV A,B
             [A] = 20 and [B] = 20
      MVI :
          This instruction is used to move the data from accumulator or memory to some registers or vice versa using the immediate data
e.g: after MVI B , 09
       [B] = 09
      LDA:
          This instruction is used to load the accumulator directly from the memory.
e.g: assume [4200] = FE
       after LDA 4200 
       [A] = FE
      STA :
           This instruction is used to store the content of accumulator directly to a memory address
e.g: If [A] = FF
       after STA 4200
       [4200] = FF

      LHLD :
           This instruction is used to load H&L registers directly from memory
e.g: If [4200] = FE and [4201] = 29
       after LHLD 4200
       [H] = 29 and [L] = FE

      SHLD :
           This instruction is used to store the H & L registers directly to memory.
e.g: If [H] = 29 and [L] = FE
       after SHLD 4200
       [4200] = FE and [4201] = 29

          Now we are going to see some data transfer instruction which deals with the register pair. To indicate the register pair we are using a term called ‘X’.
 LXI :
     This instruction is used to load the register pair with the immediate data.
            e.g:  after LXI H 4200
                    [H] = 42 and [L] = 00

 LDAX
     This instruction is used to load the accumulator with the data from address in register pair( 16 bit address).
            e.g: If [4432] = 3F and [A] = 00
                   [B]= 44 and [C]=32                      
                   after LDAX B
                   [A] = 3F

 STAX :
      This instructions is used to store the accumulator in address in register pair.
             e.g: If [A] = 32 and [D] = 40 and [E] = 00
                    after STAX D 
                    [4000] = 32.

 XCHG
      This instruction is used to exchange the data of H&L register pair with D&E register pair.
             e.g:  If [H] = 00, [L] = 01 and
                        [D] = 15 and [E] = 30
                     after XCHG 
                     [H] = 15 and [L] = 30
                     [D] = 00 and [E] = 01

 XTHL
      This instruction is used to exchange the top of stack with H&L.
             e.g: If [H] = 20 and [L] = 18 
                   assume that contents of stack is  
                  after XTHL                          
                  [H] = [01] and [L] = [09] and the contents of satck will be 


1 comments:

Please put complete and comprehensive post of full instruction set soon.
I'm waiting

Post a Comment

தங்களது கருத்துக்களை இங்கே வெளியிடவும்...

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More