LAB-1 Microprocessor
LAB-1 Microprocessor
(Affiliated to T.U.)
Talchhikhel, Satdobato, Lalitpur
Microprocessor
Submitted By:
Name:
Checked By:
Roll no.:
Faculty:
Batch: Remarks:
Date:
TITLE: FAMILIARIZATION WITH DATA TRANSFER INSTRUCTIONS
Objectives:
Theory:
1
2. Register to Register data transfer
a) MOV Rd,RS
Move data from source register RS to destination register Rd
1 byte instruction
Rd and Rs may be Accumulator A or registers B,C,D,E,H,L
E.g.
MOV A,B ; A B
MOV D,H ; D H
3. Data transfer to/from Memory
a) MVI M,8-bit data
• load memory immediate
• 2 byte instruction
• Loads the 8-bit data to the memory location whose address is
specified by the contents of HL pair.
• E.g.
• MVI M,55H ;[HL] 55H {suppose HL= 8050H,
[8050H]55H}
b) MOV M,R
• Move to memory from register
• Copy the contents of the specified register to memory. Here
memory is the location specified by contents of the HL register
pair.
• E.g.
• MOV M,B ; [HL] B {suppose HL= 8060H and B=
11H then [8060H]11H}
c) MOV R,M
• Move to register from memory
• Copy the contents of memory location specified by HL pair to
specified register.
• E.g.
• MOV A,M ; A [HL] {suppose HL= 8060H A
[8060H]}
d) LDA 16-bit ADDRESS
• Load Accumulator direct
• 3-byte instruction
2
• Loads the accumulator with the contents of memory
location whose address is specified by 16 bit address.
• E.g. LDA 9000H ; A [9000H]
e) STA 16-bit ADDRESS
• Store accumulator content direct
• 3-byte instruction
• Stores the contents of accumulator to specified address
• E.g. STA 9050H ;[9050H] A
f) LDAX Rp
• Load accumulator indirect
• 1 byte instruction
• Loads the contents of memory location pointed by the
contents of register pair to accumulator
• E.g. LDAX B ; A [BC] {suppose B=80, C=50, A
[8050]=8-bit data
g) STAX Rp
• Store accumulator content indirect
• 1-byte instruction
• Stores the content of accumulator to memory location
pointed by the contents of register pair
• E.g. STAX D ; [DE] A {suppose D=90, E=50, [9050]
A}
3
Assignments
1. Write a program for 8085 microprocessor to load 11H, 22H, 33H, 44H, 55H,
66H, 77H to Accumulator, registers B, C, D, E, H, L respectively.
OUTPUT:
Registers A B C D E H L
DATA 00 00 00 00 00 00 00
(before Execution)
DATA
11 22 33 44 55 66 77
(after execution)
4
2. Write a program to move data from registers B and C to registers D and E
respectively. Register B contains BBH and C contains CCH.
3. Write a program to load data from memory address 8050H to register B and
store that data to memory address 8060H using memory pointer.
DATA 11 00
(before Execution)
DATA
11 11
(after execution)
4. Write a program to load data from memory address 8050H to register B and
store that data to memory address 8060H using direct addressing.
5. Register B contains 90H and C contains 00H. Write an ALP to load data from
memory address pointed by register pair B to accumulator and store that data
to memory address pointed by register pair D. Assume register D contains 90H
and E contains 01H.
DISSCUSSION:
Describe the instruction used, how the process work and analyze the result
5
CONCLUTION:
(One paragraph)