Open In App

Data transfer instructions in 8086 microprocessor

Introduction :

Data transfer instructions in the 8086 microprocessor are used to move data between memory locations, registers, and input/output (I/O) devices. These instructions are essential for manipulating data within a program, as well as for communicating with external devices.



Data transfer instructions are a fundamental part of programming in the 8086 microprocessor, and are used extensively in applications ranging from simple data manipulation to complex I/O device communication and string processing.

Data transfer instructions are the instructions which transfers data in the microprocessor. They are also called copy instructions. 



Types of Data transfer instructions :

    1. Move instructions: 

These instructions are used to move data from one memory location to another or between a memory location and a register. They include the following instructions:

    2. Load instructions: 

These instructions are used to load data from a memory location or I/O device into a register. They include the following instructions:

     3. Store instructions: 

These instructions are used to store data from a register into a memory location or I/O device. They include the following instructions:

    4. Input/Output instructions: 

These instructions are used to communicate with external input/output (I/O) devices. They include the following instructions:

     5. String instructions:

 These instructions are used for manipulating strings of data, such as moving, copying, or comparing strings. They operate on consecutive bytes or words in memory, and can be used for fast and efficient string processing. Some examples of string instructions include:
 

Following is the table showing the list of data transfer instructions: 

 

OPCODE OPERAND EXPLANATION EXAMPLE
MOV D, S D = S MOV AX, [SI]
PUSH D pushes D to the stack PUSH DX
POP D pops the stack to D POP AS
PUSHA none put all the registers into the stack PUSHA
POPA none gets words from the stack to all registers POPA
XCHG D, S exchanges contents of D and S XCHG [2050], AX
IN D, S copies a byte or word from S to D IN AX, DX
OUT D, S copies a byte or word from D to S OUT 05, AL
XLAT none translates a byte in AL using a table in the memory XLAT
LAHF none loads AH with the lower byte of the flag register LAHF
SAHF none stores AH register to lower byte of the flag register SAHF
PUSHF none copies the flag register at the top of the stack PUSHF
POPF none copies a word at the top of the stack to the flag register POPF

Here D stands for destination and S stands for source. 
D and S can either be register, data or memory address.
 

Article Tags :