Professional Documents
Culture Documents
Uni ve r s i t y
Object:
1. Explain the Data Transfer Instructions group.
2. Learn how sorting an assembly program using 8085 Microprocessor
Training Kit M85-01
Theory:
The basic machine instructions are those from the data transfer group these are
generally referred to as the move or load instructions and the main instructions are as
follows:
Move the data between the internal processor reg., is MOV B,A
MOV Rd,Rs expressed (Rd) (Rs)
LXI reg. pair, 16-bit (BC, The reg. pair being loaded with immediate 16-bit data LXI H,2400H
DE or HL) or address.
[A] ← [[BC]]
STAX Rp Store accumulator indirect STAX D
[[DE]] ← [A]
LHLD 16-bit memory LHLD 28A2 H
address Load the reg. pair H&L a 16-bit memory address
(L) (28A2)
using an direct addressing
(H) (28A3)
SHLD 16-bit memory Similar, store the reg. Pair H&L a 16-bit memory SHLD 28A2H
Address address using an direct addressing.
(28A2) (L)
(28A3) (H)
b. LXI H,2850H : Put 28H into register H, & 50H into register L
MVI A,70H : Put 70H immediate in Reg.A
MOV M,A : Move content of A indirect to Memory address
HLT : Stop
c. LXI H, 2100H : Put 21H into register H, & 00H into register L LXI D,
2200H : Put 20H into register H, & 00H into register L
XCHG : Swap DE with HL
HLT : Stop
A-
Address Hex Code
2000 21
2001 50
2002 28
2003 3E
2004 77
2005 77
2006 77
2600 EF
C-
Address Hex Code
2000 21
2001 55
2002 28 Address Output data
2003 11 H 22
2004 33 L 33
2005 22
D 28
2006 EB
2600 EF E 55
Discussion:
1. What is the difference between (ROM) and (RAM) memory types?
RAM is volatile memory that temporarily stores the files you are working on. ROM is
non-volatile memory that permanently stores instructions for your computer
2. What is the purpose of the Program Counter (PC) and Stack Pointer (SP)?
The Stack Pointer register will hold the address of the top location of the stack
1-
MVI A,05H
STA 2850H
HLT
2-
LXI H,2850
MVI A,05H
MOV A,H
HLT
3-
LXI H,2850
MOV A,05H
MOV A,H
HLT
4. Write an 8085 program to store 4EH in memory location 2840H and store 3EH
in memory location 2841H, exchange them and store the result in memory
locations 2842H and 2843H respectively. Solve this problem using three
different methods.
MVI A,4EH
STA 2840H
MVI A,3EH
STA 2841H
LXI H,2840H
LXI D,2841H
XCHG
LXI H,2840H
LDA 2840H
STA 2841H
LXI H,2841H
LDA 2841H
STA 2842H
HLT
5. Write a program to exchange the content of memory locations [2801][2800] with
[2803][2802] .
LXI H,2800H
LXI D,2802H
XCHG
LXI H,2801H
LXI D,2803H
XCHG
HLT