Uploaded by Kiran Pandey

Computer Architecture and Microprocessor 8085

advertisement
Computer Architecture and Microprocessor 8085
Lab Report File
For
Microprocessor
CMP 263
BCIS 3rd Sem
Page 1 of 12
Computer Architecture and Microprocessor 8085
Contents




Introduction………………………………………….3
Lab 1……………………………………………………..4
Lab 2……………………………………………………..5
Lab 3……………………………………………………..9
Page 2 of 12
Introduction
The Intel 8085 is an 8-bit microprocessor that was introduced in
1977.It is a member of the MCS-80 family of microprocessors
and was designed for use in embedded systems and other
small-scale applications. The 8085 has a total of 40 pins and is
capable of addressing 64 KB of memory. It also includes support
for interrupts and a wide range of I/O operations. The 8085 is
considered a classic microprocessor and is still used in some
applications today, primarily due to its low power consumption
and simple architecture. In this lab report, we will explore the
basic functionality of the 8085 microprocessor and its
instruction set, as well as demonstrate its capabilities through a
series of experiments.
Page 3 of 12
LAB 1: Building simple program (Addition)
Aim:
To be able to understand the working principle of
microprocessor 8085 kit, build and execute simple
language programs using the 8085microprocessor kit.
Program (Addition):
Address Opcode Mnemonics
2000
3E
MVI A, 08H
2001
08
2002
06
2003
06
2004
80
ADD B
2005
32
STA 2050H
2006
50
2007
20
2008
76
MVI B, 06H
HLT
Output:
08H + 06H = 0EH
Page 4 of 12
Lab 2: Addition of two 8 Bit Numbers (with carry)
Aim: To write an assembly language for adding two 8bit
numbers by using 8085 microprocessor kit.
Algorithm:
Step 1: Start the microprocessor
Step 2: Initialize the carry as “Zero”
Step 3: Load the first 8 bit data into the accumulator
Step 4: Copy the contents of accumulator into the register
‘B’
Step 5: Load the second 8 bit data into the accumulator
Step 6: Add the two 8 bit data and check for the carry
Step 7: Jump on if no carry
Step 8: Increment carry if there is
Step 9: Store the added request in accumulator
Step 10: Move the carry value to accumulator
Step 11: Store the carry value in accumulator
Step 12: Stop the program execution
Page 5 of 12
Flowchart:
Page 6 of 12
Program:
Page 7 of 12
Page 8 of 12
Lab 3: Left shift, right shift and masking of lower/higher
nibble
Aim:




Write a program to shift left 8bit number by 1 bit.
Write a program to shift right 8bit number by 1 bit.
Write a program to mask the lower nibble of an 8-bit number.
Write a program to mask the higher nibble of an 8-bit number.
Apparatus Required: 8085 microprocessor kit with AC power supply.
Page 9 of 12
Explanation (1 bit shift to left):
 This program performs the left shift operation on an 8-bit number
by one bit stored in memory location 3000H.
 Let us assume that the operand stored at memory location 3000H
is 05H.
 The operand is moved to accumulator from memory location
3000H.
 Then, sift left operation is done by using RAL instruction.
 The result is stored at memory location 3001H.
Explanation (1 bit shift to Right):
 This program performs the right shift operation on an 8-bit
number by one bit stored in memory location 3000H.
 Let us assume that the operand stored at memory location 3000H
is 05H.
 The operand is moved to accumulator from memory location
3000H.
 Then, sift left operation is done by using RAL instruction.
 The result is stored at memory location 3001H.
Page 10 of 12
Explanation (lower nibble):
 This program performs the nibble operation on an 8-bit number
by one bit stored in memory location 3000H.
 Let us assume that the operand stored at memory location 3000H
is 05H.
 The operand ANI F0H will change the 05H into 00H.
 The result is stored at memory location 3001H.
Page 11 of 12
Program:
Address Mnemonics Operand Opcode Remarks
2000
2001
2002
2003
2004
2005
2006
2007
2008
LDA
3000H
ANI
0FH
STA
3001H
HLT
3A
00
30
E6
0F
32
Load data from 3000H
Lower-order of 3000H
Higher-order of 3000H
AND Immediate 0F with reg. A
Immediate value 0FH
01
30
76
Lower-order of 3001H
Higher-order of 3001H
Halt
Store the result at memory location
3001H.
Explanation (upper nibble):
 This program performs the nibble operation on an 8-bit number
by one bit stored in memory location 3000H.
 Let us assume that the operand stored at memory location 3000H
is 05H.
 The operand ANI 0FH will change the 05H into 00H.
 The result is stored at memory location 3001H.
Page 12 of 12
Download