Data copy/ Transfer Instruction | Instruction set of 8086 Microprocessor

In this article, I have discussed about different instruction sets of 8086 microprocessor and will discuss the instruction Data copy/ transfer instruction briefly.
Submitted by Uma Dasgupta, on March 22, 2019

8086 instructions are divided into following types:

  1. Data copy/ Transfer Instruction
  2. Arithmetic and logical instruction
  3. Branch instruction
  4. Loop instruction
  5. Machine control instruction
  6. Flag manipulation instruction
  7. Shift and rotate instruction
  8. String instruction

Data copy/ Transfer Instruction

1) MOV- Move

Transfers data from 1 register/memory to another register/memory. Direct loading of segment register with immediate data is not permitted.


    Mov     Ax,Bx
    Mov     Ax,1000x
    Mov     Ds,1000H
    Load    5000H
    Load    Ds with 5000H
    Mov     Ds,As

2) PUSH: Push to stack

This instruction pushes the content of specified register or memory location onto the stack. Stack pointer decremented by 2.

First- Higher byte

Second-Lower byte

Instruction set push

3) POP: Pop from stack

This instruction when executed loads a specified register memory location with the contents of the memory location of which the address is formed using the current stack segment and stack pointer.

4) XCHG: Exchange

Exchanges the content of specified source and destination operand.

Note: Exchange of two memory location is not allowed.

5) IN: input code

This is used for reading an input code address of input code, may be specified either directly or indirectly.

AL (8 bit) & AX (16bit) are destination register.

Dx is the default register which is allowed to have implicit post register.

IN AL, O3H – reads data from 8bit port whose address is 03H.

6) OUT: Output to the port

It is used for writing output to the port. The address may be specified directly or indirectly data odd address is transfer from D18 – D15 even address code is transfer from D0-D7.


    OUT 03H, AL

7) XLAT: Translate

The translate instruction is used for finding out the Codes in case of code conversion problem using lookup table technique.

8) LEA instruction (load effective balance)

It loads the effective address formed by destination operant into the specified source register.

LEA BX, ADR( offset of label ADR is transferred to reg- BX)

9) LDS/LES instruction: load pointer to DS/ES

It loads the Ds and Es register with the content of memory location specified as source in the instruction.


    LDS DS, 5000H

10) LAHF: Load AH from lower byte of flag

Store AH to lower byte of the flag Register.

Instruction sex LAHF

11) SAHF: Store AH to lower byte of flag register

Instruction sex SAHF

Related Tutorials


Comments and Discussions!

Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© some rights reserved.