Open In App
Related Articles

Data transfer instructions in 8085 microprocessor

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

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:

OPCODEOPERANDEXPLANATIONNo. of bytesMachine cyclesNo. of  T-statesEXAMPLE
MOVRd, RsRd = Rs11 opcode fetch4MOV A, B
MOVRd, MRd = Mc1

1 opcode fetch

1 memory read

7MOV A, 2050
MOVM, RsM = Rs1

1 opcode fetch

1 memory write

7MOV 2050, A
MVIRd, 8-bit dataRd = 8-bit data2

1 opcode fetch

1 memory read

7MVI A, 50
MVIM, 8-bit dataM = 8-bit data2

1 opcode fetch

1 memory read

1 memory write

10MVI 2050, 50
LDA16-bit addressA = contents at address3

1 opcode fetch

2 memory reads for 16-bit data

1 memory read for reading content at 16-bit address

13LDA 2050
STA16-bit addresscontents at address = A3

1 opcode fetch

2 memory reads

1 memory write

13STA 2050
LHLD16-bit addressdirectly loads at H & L registers3

1 opcode fetch

2 memory reads for reading 16-bit data

2 memory reads for loading H and L registers

16LHLD 2050
SHLD16-bit addressdirectly stores from H & L registers3

1 opcode fetch

2 memory reads for reading 16-bit data

2 memory write 

16SHLD 2050
LXIr.p., 16-bit dataloads the specified register pair with data3

1 opcode fetch

2 memory reads

10LXI H, 3050
LDAXr.p.indirectly loads at the accumulator A1

1 opcode fetch

1 memory read

7LDAX H
STAX16-bit addressindirectly stores from the accumulator A1

1 opcode fetch

1 memory write

7STAX 2050
XCHGnoneexchanges H with D, and L with E11 opcode fetch4XCHG
XTHLnoneexchanges the content of the top of the stack with the content of HL pair1

1 opcode fetch

2 memory reads

2 memory writes

16XTHL
PUSHr.p.pushes r.p. to the stack1

1 opcode fetch

2 memory writes

12PUSH H
POPr.p.pops the stack to r.p.1

1 opcode fetch

2 memory reads

10POP H
IN8-bit port addressinputs contents of the specified port to A2

1 opcode fetch

1 memory read

1 I/O read

10IN 15
OUT8-bit port addressoutputs contents of A to the specified port2

1 opcode fetch

1 memory read

1 I/O write

10OUT 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.


Last Updated : 06 May, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads