Experiment 3 Student75
Experiment 3 Student75
Subject: Fundamental of
Aim: To perform Data Transfer Operations
Processors (01CE0509)
Experiment No: 03 Date: Enrolment No: 92310103075
Theory:
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.
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:
• LDS: Loads a 16-bit pointer value from a memory location into a register pair and loads the 8-
bit value from the next memory location into another register.
• LSS: Loads a 16-bit pointer value from a memory location into a register pair and loads the
16-bit value from the next memory location into another register.
• LXI: Loads a 16-bit value into a register pair.
• MOV with memory operand: Loads data from a memory location into a register.
Marwadi University
Department of Computer Engineering
Subject: Fundamental of
Aim: To perform Data Transfer Operations
Processors (01CE0509)
Experiment No: 03 Date: Enrolment No: 92310103075
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:
• MOV with memory operand: Stores data from a register into a memory location.
• STA: Stores the contents of the accumulator register (AL or AX) in memory.
• STAX: Stores the contents of a register pair (BC, DE, or HL) in memory using either the indirect
addressing
• mode or the direct addressing mode.
• SHLD: Stores a 16-bit data word from registers H and L in memory using the direct addressing
mode.
• PUSH: Stores the contents of a register onto the stack.
4. Input/Output instructions:
These instructions are used to communicate with external input/output (I/O) devices. They
include the following instructions:
• IN: Reads a byte or word of data from an I/O port into a register.
• OUT: Writes a byte or word of data from a register to an I/O port.
• INS: Reads a block of data from an I/O port into a memory location.
• OUTS: Writes a block of data from a memory location to an I/O port.
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:
• MOVS: Moves a byte or word from a source location to a destination location, and updates the
index registers to point to the next byte or word.
• CMPS: Compares a byte or word in memory to a byte or word in a register, and updates the
index registers accordingly.
• LODS: Loads a byte or word from a memory location into a register, and updates the index
registers to point to the next byte or word.
• STOS: Stores a byte or word from a register into a memory location, and updates the index
registers to point to the next byte or word.
Marwadi University
Department of Computer Engineering
Subject: Fundamental of
Aim: To perform Data Transfer Operations
Processors (01CE0509)
Experiment No: 03 Date: Enrolment No: 92310103075
Subject: Fundamental of
Aim: To perform Data Transfer Operations
Processors (01CE0509)
Experiment No: 03 Date: Enrolment No: 92310103075
Code of program.
Subject: Fundamental of
Aim: To perform Data Transfer Operations
Processors (01CE0509)
Experiment No: 03 Date: Enrolment No: 92310103075
Subject: Fundamental of
Aim: To perform Data Transfer Operations
Processors (01CE0509)
Experiment No: 03 Date: Enrolment No: 92310103075
Step:5 –Check the source array of data and update memory as per location.
Marwadi University
Department of Computer Engineering
Subject: Fundamental of
Aim: To perform Data Transfer Operations
Processors (01CE0509)
Experiment No: 03 Date: Enrolment No: 92310103075
Step:6 – Single step Debug (F8), Check the register CX and Flag DF.
Conclusion: