0% found this document useful (0 votes)
78 views

LAB-1 Microprocessor

This document is a lab report that examines data transfer instructions for an 8085 microprocessor. It includes objectives, theory on different types of data transfer instructions, sample assembly code programs, and assignments. The assignments have students write assembly code to load data into registers from immediate values and memory locations, transfer data between registers and memory using different addressing modes, and analyze the results.

Uploaded by

Amrit Sharma
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
78 views

LAB-1 Microprocessor

This document is a lab report that examines data transfer instructions for an 8085 microprocessor. It includes objectives, theory on different types of data transfer instructions, sample assembly code programs, and assignments. The assignments have students write assembly code to load data into registers from immediate values and memory locations, transfer data between registers and memory using different addressing modes, and analyze the results.

Uploaded by

Amrit Sharma
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

NATIONAL COLLEGE OF ENGINEERING

(Affiliated to T.U.)
Talchhikhel, Satdobato, Lalitpur

A Lab Report on:

Microprocessor

Lab Report no.: ….

Submitted To: Department of Electronics and Computer Engineering

Submitted By:

Name:
Checked By:
Roll no.:

Faculty:

Batch: Remarks:

Date:
TITLE: FAMILIARIZATION WITH DATA TRANSFER INSTRUCTIONS

Objectives:

 To familiarize with immediate data transfer instructions and data transfer


from/to registers and memory
 To assemble and execute data transfer instructions for an 8085
microprocessor

Theory:

A. Data Transfer Instructions

 Group of instruction copy data from a source location to destination


location without modifying the contents of the source.
 Transfer of data may be between the registers or between register and
memory or between an I/O device and accumulator
 None of these instructions changes the flag

1. Immediate Data Transfer

a) MVI R, 8-bit DATA

• load 8 bit data to specified register R


• 2 byte instruction
• R may be Accumulator A or registers B,C,D,E,H,L
• E.g.
• MVI A,30H ; A30H
• MVI B,FFH ; BFFH
b) LXI Rp,16-bit data

• Load 16 bit data to specified register pair Rp


• 3 byte instruction
• RP may be B, D, H
• E.g.
• LXI B,1122H ; C 22H B 11H
• LXI H,5678H ; L 78H H 56H

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.

Address Mnemonics Hexcodes Remarks


(Opcode/Operand)
8000 MVI A,11H 3E ;Loads data 11H to
8001 11 accumulator
8002 MVI B,22H 06 ;Loads data 22H to
8003 22 register B
8004 MVI C,33H 0E ;Loads data 33H to
8005 33 register C
8006 LXI D,4455H 11 ;Load register pair HL
8007 55 with immediate data
8008 44 6677H
8009 LXI H,6677H 21 ;Load register pair HL
800A 77 with immediate data
800B 66 6677H
800C HLT 76 ;Terminate program

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.

MEMORY 8050 8060

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

Describe problem/errors encountered and why? How it can be eliminated

(At least two paragraph)

5
CONCLUTION:

Conclude your work in 2-3 sentences.

(One paragraph)

You might also like