Saturday, 5 May 2012

8085 data transfer instructions


Algorithm is step by step procedure for solving a problem.
Flow chart is pictorial representation of algorithm.
Program is defined as set of instructions written in sequence.

Data transfer instructions:
These instructions copy the contents from source location to destination location. These instructions does not affect any flags. The following are different types of data transfer instructions.

1. Move immediate
MVI Rd, data
transfers 'data' value into register Rd.
Ex: MVI A,50H
2. Move instruction
MOV Rd,Rs
here Rd is destination register, Rs is source register. Transfers data in Rs into Rd. Rs content will not be changed.
Ex: MOV B,A
3.IN instruction
IN port_address
this instructions reads data from IO device connected at specified port address and loads accumulator with that data.
Ex: IN 10H

4.OUT instruction
OUT port_address
This instruction sends content of accumulator to IO device connected at specified port address.
Ex: OUT 05H

5.LXI instruction
LXI Rp,data
This instruction loads 16-bit immediate data into specified register pair(Rp)
LXI B,16-bit data ; loads BC with 16-bit data
LXI D, 16-bit data; loads DE with 16-bit data
LXI H,16-bit data; loads HL with 16-bit data
LXI SP, 16-bit data; loads stack pointer with immediate data
Ex: LXI H,2050H
LXI SP,1090H

6.LDAX instruction-Load accumulator indirect
LDAX B/D
This instruction loads Accumulator with memory location pointed by content of B or D
LDAX B; loads accumulator with content of memory location pointed by BC pair
LDAX D; loads accumulator with content of memory location pointed by DE pair

7.LDA instruction-Load accumulator direct
LDA 16-bit address
This instruction loads accumulator with the content of memory location specified in the instruction.
Ex: LDA 2005H
this instruction loads accumulator with content of [2005H]

8.STAX instruction-Store accumulator indirect
STAX B/D
This instruction stores the content of accumulator into memory location pointed by B or D register pair.
Ex: STAX B; stores accumulator content in memory location pointed by BC pair
STAX D; stores accumulator content in memory location pointed by DE pair

9.STA instruction-Store accumulator direct
STA 16-bit address
This instruction stores accumulator content in 16-bit address location specified in the instruction
Ex: STA 1020H; stores accumulator content in 1020H address


Back                                             Contents                                     Next

No comments:

Post a Comment