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

MC3()

The document outlines a Microcontroller Lab exercise focused on arithmetic and logic operations using the 8085 microprocessor. It includes detailed assembly language programs for various tasks such as addition, looping, and multiplication of numbers stored in memory. Each exercise is accompanied by instruction tables, program explanations, and evaluation criteria.

Uploaded by

am.en.u4eac22015
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

MC3()

The document outlines a Microcontroller Lab exercise focused on arithmetic and logic operations using the 8085 microprocessor. It includes detailed assembly language programs for various tasks such as addition, looping, and multiplication of numbers stored in memory. Each exercise is accompanied by instruction tables, program explanations, and evaluation criteria.

Uploaded by

am.en.u4eac22015
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

19EAC 285: Microcontroller Lab

Lab sheet 3: Arithmetic and Logic Operations in 8085

Subject: Microcontroller Lab Register Number:


Sub Code: 19EAC285
Name:
Experiment No. : 3
Course Outcome: CO2 Date:

1. Prelab Exercise:
Assembly Instruction Instruction Description
Size
START: LXI H,2050H 3

LXID, 2070H 3

MVIB, 0AH 2

NEXT: MOV A,M 1

1
STAX D

INX H 1

INX D 1

1
DCR B

JNZ NEXT 3

HLT 1
19EAC 285: Microcontroller Lab

Lab Exercise1: Fill the table for the following assembly program by selecting suitable
instructions from the 8085 Instruction Set. Explain each instruction and finally say what the
program does.
Assembly Instruction Memory Object Code Flags or Register
Size Address in Hex Change details

MVI A, 12H 2 4200 3E 12 A = 12

1 4202 47 B = 12
MOV B,A

MVI C, 03H 2 4203 0E 03 C = 03

MVI A, 00H 2 4205 3E 00 A = 00

Label1: ADD B 1 4207 80 A = 15;P = 1

1 4208 0D C = 02;P = 0
DCR C

JNZ Label1 3 4209 C2 07 042 A = 24;P = 1

STA 2001H 3 420C 32 01 020 C = 01;P = 0

HLT 1 420F 76 A = 36;P = 1


C = 00;P = 1;Z = 1

Program Explanation:
19EAC 285: Microcontroller Lab

Lab Exercise 2: Add five numbers stored in the consecutive locations in the memory and store
the result in 8200h using a loop for the conditional jump. Follow the template of the table shown
in Lab Exercise 1.

Assembly Instruction Memory Object Code Flags or Register


Size Address in Hex Change details

LXI H, 8200H 3 4200 21 00 082 H = 82

MVI C,05H
2 4203 0E 05 BC = 05

MVI B,00H 2 4205 06 00

LOOP1: MOV A,M 1 4207 7E

ADD B 1 4208 80 Z = 1;P = 1

MOV B,A 1 4209 47

1 420A 23 HL=8201
INX H

DCR C 1 420B 0D C = 04

JNZ LOOP1 3 420C C2 07 042

STA 8200H 3 420F 32 00 082

HLT 1 4212 76

Program Explanation:
19EAC 285: Microcontroller Lab

Lab Exercise 3: Write an assembly language program for the following using the 8085 simulator,
to multiply two 8-bit numbers stored at consecutive memory locations starting from 4500H and to
store the result in 4600H using conditional branching(Hint: Perform multiplication using repeated
addition). Follow the template of the table shown in Lab
Exercise 1.

Assembly Instruction Memory Object Code Flags or Register


Size Address in Hex Change details

LDA 4500H 3 4200 3A 00 045 A = 02

1 4203 47 B = 02
MOV B,A
3 4204 3A 01 045 A = 04
LDA 4501H

MOV C,A 1 4207 4F C = 04;P = 1

MVI A,00H 2 4208 3E 00 A = 00


LOOP1: ADD B 1 420A 80 A = 02;P = 0
DCR C 1 420B 0D C = 03
JNZ LOOP1 3 420C C2 0A 042
STA 8200H 3 420F 32 00 082

3 4212 3A 02 045
LDA 4502H
1 4215 47 A = 02;Z = 1;P = 1
MOV B,A

LDA 8200H 3 4216 3A 00 082 A = 08

MOV C,A 1 4219 4F C = 08

MVI A,00H 2 421A 3E 00 A = 00


LOOP2: ADD B 1 421C 80 A = 02
1 421D 0D C = 07; Z = 1; P = 1
DCR C
3 421E C2 1C 42
JNZ LOOP2

STA 4600H 3 4221 32 00 046 A = 10

HLT

Program Explanation:
19EAC 285: Microcontroller Lab

Evaluation:

Criteria Marks Comments


Preparedness
Performance
Viva
Output/Completion

Name and signature of the faculty in charge


19EAC 285: Microcontroller Lab
19EAC 285: Microcontroller Lab

Evaluation:

Criteria Marks Comments


Preparedness
Performance
Viva
Output/Completion

Name and signature of the fculty in charge

You might also like