Recent

Theme images by Storman. Powered by Blogger.

Blog Archive

Recent in Sports

Home Ads

Comments

Ads

Random Posts

Tuesday, 9 July 2019

Data Transfer Instructions in 8085 Microprocessor


Data Transfer Instructions in 8085 Microprocessor


S.No
Instruction
Example
1.
Move – To copy a data from source to destination  register.
MOV Rd, Rs
MOV M, Rs
MOV Rd, M


MOV D, C
MOV M, B
MOV B, M
This instruction MOV Ax,Bx copies the contents of the source register into the destination register. This instruction doesn’t alter the contents of the source register. This instruction is Mainly used for transferring the same data from one register to the other.
2.
Move immediate 8-bit
MVI Rd, data
MVI M, data

MVI B, 50H
MVI M, 50H
In order to store an 8-bit data in the destination register, the instruction MVI Rd, data      is used. The destination register or memory stores the 8-bit data.
3.
Load accumulator direct
LDA 16-bit address of a memory location,

LDA 5000H
The contents specified by a 16-bit address of a memory location in the operand, are copied to the accumulator.
4.
Load accumulator indirect
LDAX Reg. pair
LDAX B
LDAX D
The contents to a memory location from the designated register pair point. This instruction is usually used to copy the contents of that memory location into the accumulator.
5.
Load register pair immediate
LXI Reg. pair, 16-bit data
LXI B, 5000H
LXI D, 5000H
LXI H, 5000H
LXI SP, 5000H
The instruction’ Load register pair immediate’
loads 16-bit data in the register pair selected in the operand. It is usually represented as LXI D, 5000H
6.
Load H and L registers direct LHLD 16-bit address
LHLD 5000H
The instruction ‘LHLD 16-bit address ‘copies the contents of the memory location pointed by the 16-bit address into register L and copies the contents of the next memory location into register H.
7.
Store accumulator direct
STA 16-bit address
STA 5000H
‘Store accumulator direct’: In this type of instruction,
To the memory location specified by the operand, the contents of the accumulator are copied.
8.
Store accumulator indirect
STAX Rx
STAX B
STAX D
‘Store accumulator indirect’ instruction set is used for copying the contents of the accumulator to the memory location specified by register pair. In other words, we can say that: The contents of the accumulator are copied into the memory location specified by the contents of the operand (register pair).
9.
Store H and L registers direct
SHLD 16-bit address
SHLD 5000H
The data’s of register L are store to the memory location by the 16 bit address in the operand.
Datas of H register are stored into the next location of memory.
10.
Exchange H and L with D and E
XCHG
XCHG                                       
The instruction ‘Exchange H and L with D and E’ represents:

The contents of register H and register D are exchanged with eachother.
The contents of register L and register E are exchanged with each other.
11.
Copy H and L registers to the stack pointer
SPHL
SPHL
‘Copy H and L registers to the stack pointer SPHL’ represents:
The contents of the H and L registers are loaded into the stack pointer register.
12.
Exchange H and L with top of stack pointer
XTHL
XTHL
‘Exchange H and L with top of stack pointer XTHL’ represents:
The contents of the L register are exchanged with the stack location pointed by the contents of the stack pointer register(SP Register).
 The data stored in the H register are exchanged with the next stack location (SP+1).
13.
Push register pair onto stack
PUSH Reg. pair (PSW ‘Processor Status Word’ means Accumulator and Flag register)
PUSH B
PUSH D
PUSH H
PUSH PSW
‘Push register pair onto stack’ usually denotes:
The data of the register pair assigned in the operand are copied to the stack.
14.
Pop off stack to register pair
POP Reg. pair
POP B
POP D
POP H
POP PSW
‘Pop off stack to register pair’ instruction set - The contents of the memory location pointed out by the stack pointer register are copied to registers specified.
15.
Output data from accumulator to a port with 8-bit address
OUT 8-bit port address
OUT 50H
‘OUT 8-bit port address ‘ denotes: - The contents of the accumulator are copied into the I/O port specified by the operand.
16.
Input data to accumulator from a port with 8-bit address
IN 8-bit port address
IN 50H
‘IN 8-bit port address ‘ instruction represents:- The contents of the input port designated in the operand are read and loaded into the accumulator.



0 on: "Data Transfer Instructions in 8085 Microprocessor"