Data transfer instructions are the instructions that transfer data in the microprocessor. They are also called copy instructions. Here is the following is the table showing the list of logical instructions:
OPCODE |
OPERAND |
EXPLANATION |
No. of bytes |
Machine cycles |
No. of T-states |
EXAMPLE |
MOV |
Rd, Rs |
Rd = Rs |
1 |
1 opcode fetch |
4 |
MOV A, B |
MOV |
Rd, M |
Rd = Mc |
1 |
1 opcode fetch
1 memory read
|
7 |
MOV A, 2050 |
MOV |
M, Rs |
M = Rs |
1 |
1 opcode fetch
1 memory write
|
7 |
MOV 2050, A |
MVI |
Rd, 8-bit data |
Rd = 8-bit data |
2 |
1 opcode fetch
1 memory read
|
7 |
MVI A, 50 |
MVI |
M, 8-bit data |
M = 8-bit data |
2 |
1 opcode fetch
1 memory read
1 memory write
|
10 |
MVI 2050, 50 |
LDA |
16-bit address |
A = contents at address |
3 |
1 opcode fetch
2 memory reads for 16-bit data
1 memory read for reading content at 16-bit address
|
13 |
LDA 2050 |
STA |
16-bit address |
contents at address = A |
3 |
1 opcode fetch
2 memory reads
1 memory write
|
13 |
STA 2050 |
LHLD |
16-bit address |
directly loads at H & L registers |
3 |
1 opcode fetch
2 memory reads for reading 16-bit data
2 memory reads for loading H and L registers
|
16 |
LHLD 2050 |
SHLD |
16-bit address |
directly stores from H & L registers |
3 |
1 opcode fetch
2 memory reads for reading 16-bit data
2 memory write
|
16 |
SHLD 2050 |
LXI |
r.p., 16-bit data |
loads the specified register pair with data |
3 |
1 opcode fetch
2 memory reads
|
10 |
LXI H, 3050 |
LDAX |
r.p. |
indirectly loads at the accumulator A |
1 |
1 opcode fetch
1 memory read
|
7 |
LDAX H |
STAX |
16-bit address |
indirectly stores from the accumulator A |
1 |
1 opcode fetch
1 memory write
|
7 |
STAX 2050 |
XCHG |
none |
exchanges H with D, and L with E |
1 |
1 opcode fetch |
4 |
XCHG |
XTHL |
none |
exchanges the content of the top of the stack with the content of HL pair |
1 |
1 opcode fetch
2 memory reads
2 memory writes
|
16 |
XTHL |
PUSH |
r.p. |
pushes r.p. to the stack |
1 |
1 opcode fetch
2 memory writes
|
12 |
PUSH H |
POP |
r.p. |
pops the stack to r.p. |
1 |
1 opcode fetch
2 memory reads
|
10 |
POP H |
IN |
8-bit port address |
inputs contents of the specified port to A |
2 |
1 opcode fetch
1 memory read
1 I/O read
|
10 |
IN 15 |
OUT |
8-bit port address |
outputs contents of A to the specified port |
2 |
1 opcode fetch
1 memory read
1 I/O write
|
10 |
OUT 15 |
|
|
|
|
|
|
|
In the table,
R stands for register
M stands for memory
r.p. stands for register pair
Advantages:
Efficient data transfer: The data transfer instructions in the 8085 microprocessor can move data quickly and efficiently between different registers, memory locations, and input/output ports.
Simplifies programming: The data transfer instructions in the 8085 microprocessor simplify programming by providing a set of dedicated instructions for transferring data.
Supports a wide range of operations: The data transfer instructions in the 8085 microprocessor support a wide range of operations, including loading data into registers, storing data in memory locations, and input/output operations.
Can be used for memory operations: The data transfer instructions can be used to transfer data between registers and memory locations, making it possible to store and retrieve data from memory.
Disadvantages:
Limited memory access: Although the use of registers can reduce the number of memory accesses required, the limited number of registers in the 8085 microprocessor can restrict the amount of data that can be manipulated at any given time.
Complex addressing modes: The addressing modes used in the data transfer instructions can be complex, which can make programming more difficult.
Limited I/O port access: The 8085 microprocessor has a limited number of input/output ports, which can restrict the amount of data that can be transferred to external devices.
Limited data size: The 8085 microprocessor uses 8-bit data transfer instructions, which can limit the amount of data that can be transferred in a single instruction. This can be a disadvantage for applications that require large amounts of data to be transferred.
Applications :
Data processing: The data transfer instructions in the 8085 microprocessor are used to transfer data between registers and memory locations. This allows the microprocessor to manipulate and process data in various ways, such as moving data, copying data, and swapping data.
Input/output operations: The data transfer instructions are used to transfer data between the microprocessor and input/output devices such as sensors, displays, and other peripherals. This enables the microprocessor to receive input data and send output data to external devices.
Memory management: The data transfer instructions are used to manage memory in the microprocessor. This includes loading programs and data into memory, moving data between different memory locations, and allocating memory for different tasks.
Interrupt handling: The data transfer instructions are used in interrupt handling to save the current state of the microprocessor and transfer control to an interrupt service routine. This involves transferring the contents of various registers and memory locations to a stack or other memory location.
Communication systems: The data transfer instructions are used in communication systems to transfer data between the microprocessor and external devices such as modems, network interfaces, and other communication devices.
Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape,
GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out -
check it out now!
Last Updated :
06 May, 2023
Like Article
Save Article