Lab Manual
Lab Manual
S.No. Experiments
1. a) Write a program using 8085 Microprocessor to add two Hexadecimal
numbers.
b) Write a program using 8085 Microprocessor to subtract two Hexadecimal
numbers.
2. a) Write a program using 8085 Microprocessor to add two decimal numbers.
b) Write a program using 8085 Microprocessor to subtract two decimal
numbers.
3. a) Write a program using 8085 Microprocessor to add two BCD numbers.
b) Write a program using 8085 Microprocessor to subtract two BCD
numbers.
4. Write a program to perform multiplication of two 8 bit numbers using 8085.
5. Write a program to perform division of two 8 bit numbers using 8085.
6. Write a program to find the smallest number in an array of data using 8085
instruction set.
7. Write a program to find the largest number in an array of data using 8085
instruction set.
8. Write a program to arrange an array of data in ascending order using 8085
instruction set.
9. Write a program to arrange an array of data in descending order using 8085
instruction set.
10. a) Write a program to convert given Hexadecimal number into its equivalent
ASCII number using 8085 instruction set.
b) Write a program to convert given ASCII number into its equivalent
Hexadecimal number using 8085 instruction set.
Course outcome:-
After the completion of the course, the students will be able to:
Cognitive
Course
Levels
outcome Course outcome Description
(Bloom’s
No.
Level)
Use techniques, skills, modern engineering tools, instrumentation
and software/hardware appropriately to learn and demonstrate
CO:1 K-3
arithmetic and logical operations on 8 bit data using 8085
microprocessor.
Analyse 8085 microprocessor and its interfacing with peripheral
CO:2 K-4
devices
Learn about various conversion techniques using 8085 and
CO:3 K-1
generate waveforms using 8085 microprocessor
CO:4 Learn programming concept of 8051 microcontroller K-1
1. Enter Program
2. Enter Data
3. Execute Program
4. Check Result
1. Enter Program
a. Press RESET
b. Press 1A
c. Enter starting address of the program
d. Press NEXT
e. Start entering the Program.
f. Press NEXT
2. Enter Data
a. Press RESET
b. Press EXAMINE MEMORY (EXMEM)
c. Enter the address of operand
d. Press NEXT
e. Enter data
f. Press FILL
3. Execute Program
a. Press RESET
b. Press GO
c. Enter starting address of the program
d. Press FILL
4. Check Result
a. Press RESET
b. Press EXAMINE MEMORY (EXMEM)
c. Enter address of result
d. Press NEXT
Result:-
Addition
2501 (Ist number) Result
2502 (2nd Number) 2503
Subtraction
2501 (Ist number) Result
2502 (2nd Number) 2503
Conclusion: - Thus the Addition and subtraction process of two hexadecimal numbers is taken
out using assembly language for 8085 microprocessor.
Experiment no.2
a) Write a program using 8085 Microprocessor to add two decimal Numbers.
b) Write a program using 8085 Microprocessor to subtract two decimal Numbers.
1. Enter Program
2. Enter Data
3. Execute Program
4. Check Result
1. Enter Program
a. Press RESET
b. Press 1A
c. Enter starting address of the program
d. Press NEXT
e. Start entering the Program.
f. Press NEXT
2. Enter Data
a. Press RESET
b. Press EXAMINE MEMORY (EXMEM)
c. Enter the address of operand
d. Press NEXT
e. Enter data
f. Press FILL
3. Execute Program
a. Press RESET
b. Press GO
c. Enter starting address of the program
d. Press FILL
4. Check Result
a. Press RESET
b. Press EXAMINE MEMORY (EXMEM)
c. Enter address of result
d. Press NEXT
Result:-
Addition
2501 (Ist number) Result
2502 (2nd Number) 2503
Subtraction
2501 (Ist number) Result
2502 (2nd Number) 2503
Conclusion:-Thus the Addition and subtraction process of two decimal numbers is taken out
using assembly language for 8085 microprocessor.
Experiment no.3
a) Write a program using 8085 Microprocessor to add two BCD Numbers.
b) Write a program using 8085 Microprocessor to subtract two BCD Numbers.
1. Enter Program
2. Enter Data
3. Execute Program
4. Check Result
1. Enter Program
a. Press RESET
b. Press 1A
c. Enter starting address of the program
d. Press NEXT
e. Start entering the Program.
f. Press NEXT
2. Enter Data
a. Press RESET
b. Press EXAMINE MEMORY (EXMEM)
c. Enter the address of operand
d. Press NEXT
e. Enter data
f. Press FILL
3. Execute Program
a. Press RESET
b. Press GO
c. Enter starting address of the program
d. Press FILL
4. Check Result
a. Press RESET
b. Press EXAMINE MEMORY (EXMEM)
c. Enter address of result
d. Press NEXT
Result:-
Addition
2501 (Ist number) Result
2502 (2nd Number) 2503
Subtraction
2501 (Ist number) Result
2502 (2nd Number) 2503
Conclusion:-Thus the Addition and subtraction process of two BCD numbers is taken out using
assembly language for 8085 microprocessor.
Experiment no.4
Write a program to perform multiplication of two 8 bit numbers using 8085.
1. This program multiplies two operands stored in memory location 3000H and 3001H,
using successive addition method.
2. In successive addition method, the second operand is considered as counter, and the
first number is added with itself until counter decrements to zero.
3. Let us assume that the operands stored at memory location 3000H is 02H and 3001H is
05H.
4. Then, by using successive addition method, we get 02H + 02H + 02H + 02H + 02H =
0AH.
5. Initially, H-L pair is loaded with the address of first memory location.
6. The first operand is moved to register B from memory location 3000H and H-L pair is
incremented to point to next memory location.
7. The second operand is moved to register C from memory location 3001H to act as
counter.
8. Accumulator is initialized to 00H.
9. Register B is added with accumulator and the result is stored in accumulator.
10. Register C (counter) is decremented by 1.
11. Then, counter is checked for zero. If it hasn’t become zero yet, then register B is again
added with accumulator, and counter is again checked for zero.
12. If counter becomes zero, then H-L pair is incremented and the result is moved from
accumulator to memory location 3002H.
Program:
Follow the steps given below in order to execute the program on 8085 Microprocessor Kit:
1. Enter Program
2. Enter Data
3. Execute Program
4. Check Result
1. Enter Program
a. Press RESET
b. Press 1A
c. Enter starting address of the program
d. Press NEXT
e. Start entering the program
f. Press NEXT
2. Enter Data
a. Press RESET
b. Press EXAMINE MEMORY (EXMEM)
c. Enter the address of operand
d. Press NEXT
e. Enter data
f. Press FILL
3. Execute Program
a. Press RESET
b. Press GO
c. Enter starting address of the program
d. Press FILL
4. Check Result
a. Press RESET
b. Press EXAMINE MEMORY (EXMEM)
c. Enter address of result
d. Press NEXT
Result:-
Multiplication
(Before Execution) (After Execution)
3000H (Ist Number) 3002 Result
3001H (2nd Number)
Conclusion:-Thus the multiplication process is taken out using assembly language for 8085
microprocessor
Experiment no.5
Write a program to perform Division of two 8 bit numbers using 8085.
Flowchart/Algorithm: - The 8085 has no division instruction so to get the result of the division,
we should use the repetitive subtraction method
1. Start the program by loading HL register pair with address of memory location
2. Move the data to a register (B Register).
3. Get the second data and load into accumulator.
4. Compare the two numbers to check for carry.
5. Subtract the two numbers.
6. Increment the value of carry.
7. Check whether repeated subtraction is over and store the value of subtraction and carry
in memory location.
8. Terminate the program.
Program:-
Follow the steps given below in order to execute the program on 8085 Microprocessor Kit:
1. Enter Program
2. Enter Data
3. Execute Program
4. Check Result
1. Enter Program
a. Press RESET
b. Press 1A
c. Enter starting address of the program
d. Press NEXT
e. Start entering the program
f. Press NEXT
2. Enter Data
a. Press RESET
b. Press EXAMINE MEMORY (EXMEM)
c. Enter the address of operand
d. Press NEXT
e. Enter data
f. Press FILL
3. Execute Program
a. Press RESET
b. Press GO
c. Enter starting address of the program
d. Press FILL
4. Check Result
a. Press RESET
b. Press EXAMINE MEMORY (EXMEM)
c. Enter address of result
d. Press NEXT
Result:-
Division
(Before Execution) (After Execution)
3000H (Ist Number) 3002 Result (Quotient)
3001H (2nd Number) 3003 (Remainder)
Conclusion:- Thus the Division process is taken out using assembly language for 8085
microprocessor.
Experiment no.6
Write a program to find the smallest number in an array of data using 8085.The length of the
block is in memory location 3000H and the block itself starts from memory location 3001H
and store the smallest number in memory location 3100.
Flowchart/Algorithm: -
Program:-
Follow the steps given below in order to execute the program on 8085 Microprocessor Kit:
1. Enter Program
2. Enter Data
3. Execute Program
4. Check Result
1. Enter Program
a. Press RESET
b. Press 1A
c. Enter starting address of the program
d. Press NEXT
e. Start entering the program
f. Press NEXT
2. Enter Data
a. Press RESET
b. Press EXAMINE MEMORY (EXMEM)
c. Enter the address of operand
d. Press NEXT
e. Enter data
f. Press FILL
3. Execute Program
a. Press RESET
b. Press GO
c. Enter starting address of the program
d. Press FILL
4. Check Result
a. Press RESET
b. Press EXAMINE MEMORY (EXMEM)
c. Enter address of result
d. Press NEXT
Result:-
Smallest number
(Before Execution) (After Execution)
3000H (Length) 3100 (Smallest number)
3001H
3002H
:
:
Conclusion:- Thus the smallest number is find out in an array of data using 8085 instruction set.
Experiment no.7
Write a program to find the largest number in an array of data using 8085.The length of the
block is in memory location 3000H and the block itself starts from memory location 3001H
and store the largest number in memory location 3100.
Apparatus Required: Following apparatus is required to perform the practical of 8085
microprocessor:
1. 8085 Microprocessor Kit
2. Power Supply
3. Instruction Manual
4. Op code Table
Flowchart/Algorithm:-
Program:-
Address Label Mnemonics Operand Op code Remarks
2000 LDA 3000 3A Load the contents of 3000 to A
register.
2001 00
2002 30
2003 MOV C,A 4F Move the contents of A to C
register.
2004 LXI H,3001 21 Load immediately 3001 in H-L
register pair.
2005 01
2006 30
2007 MOV A,M 7E Move the contents of Memory to
A register
2008 INX H 23 Increment the contents of H-l
register pair by 1
2009 BACK: CMP M BE Compare the contents of
Memory location with the
contents of A
200A JNC SKIP D2 Jump if not carry to Label SKIP
200B 0E
200C 20
200D MOV A,M 7E Move the contents of Memory to
A register
200E SKIP: INX H 23 Increment the contents of H-l
register pair by 1
200F DCR C 0D Decrement the contents of C
register.
2010 JNZ BACK C2 Jump if not zero to label BACK
2011 09
2012 20
2013 STA 3100 32 Store the contents of A in
memory location 3100.
2014 00
2015 31
2016 HLT 76 Terminate the program
execution
Follow the steps given below in order to execute the program on 8085 Microprocessor Kit:
1. Enter Program
2. Enter Data
3. Execute Program
4. Check Result
1. Enter Program
a. Press RESET
b. Press 1A
c. Enter starting address of the program
d. Press NEXT
e. Start entering the program
f. Press NEXT
2. Enter Data
a. Press RESET
b. Press EXAMINE MEMORY (EXMEM)
c. Enter the address of operand
d. Press NEXT
e. Enter data
f. Press FILL
3. Execute Program
a. Press RESET
b. Press GO
c. Enter starting address of the program
d. Press FILL
4. Check Result
a. Press RESET
b. Press EXAMINE MEMORY (EXMEM)
c. Enter address of result
d. Press NEXT
Result:-
Largest number
(Before Execution) (After Execution)
3000H (Length) 3100 (Largest number)
3001H
3002H
:
:
Conclusion:- Thus the Largest number is find out in an array of data using 8085 instruction set.
Experiment no.8
Write a program to arrange an array of data in ascending order using 8085 instruction set.
Apparatus Required:-Following apparatus is required to perform the practical of 8085
microprocessor:
1. 8085 Microprocessor Kit
2. Power Supply
3. Instruction Manual
4. Op code Table
Flowchart/Algorithm:-
Program:-
Address Label Mnemonics Operand Op code Remarks
2000 LXI H,3000H 21 Set pointer for array
2001 00
2002 30
2003 MOV C,M 4E Load the count value.
2004 DCR C 0D Decrement counter.
2005 Repeat: MOV D,C 51
2006 LXI H, 3001H 21 Set the memory pointer for data
2007 01
2008 30
2009 Loop: MOV A,M 7E Move the number into accumulator
200A INX H 23 Increment the H-L register
200B CMP M BE Compare the contents of accumulator
with the contents of memory location
specified by H-L register pair.
200C JC SKIP DA Jump if carry to SKIP
200D 14
200E 20
200F MOV B,M 46 Move the contents of memory
location specified by H-L register
pair to register B.
2010 MOV M,A 77 Move the contents of Accumulator to
memory location specified by H-L
register pair.
2011 DCX H 2B Decrement the contents of H-L
register pair
2012 MOV M,B 70 Move the contents of register B to
memory location specified by H-L
register pair.
2013 INX H 23 Increment the contents of H-L
register pair
2014 SKIP: DCR D 15 Decrement the contents of D register.
2015 JNZ LOOP C2 Jump if not zero to LOOP
2016 09
2017 20
2018 DCR C 0D Decrement the contents of Register
C.
2019 JNZ REPEAT C2 Jump if not zero to REPEAT.
201A 05
201B 20
201C HLT 76 Terminate the program
Follow the steps given below in order to execute the program on 8085 Microprocessor Kit:
1. Enter Program
2. Enter Data
3. Execute Program
4. Check Result
1. Enter Program
a. Press RESET
b. Press 1A
c. Enter starting address of the program
d. Press NEXT
e. Start entering the program
f. Press NEXT
2. Enter Data
a. Press RESET
b. Press EXAMINE MEMORY (EXMEM)
c. Enter the address of operand
d. Press NEXT
e. Enter data
f. Press FILL
3. Execute Program
a. Press RESET
b. Press GO
c. Enter starting address of the program
d. Press FILL
4. Check Result
a. Press RESET
b. Press EXAMINE MEMORY (EXMEM)
c. Enter address of result
d. Press NEXT
Result:-
Conclusion: - Thus the given array of data was arranged in ascending order.
Experiment no.9
Write a program to arrange an array of data in Descending order using 8085 instruction set.
Apparatus Required:-Following apparatus is required to perform the practical of 8085
microprocessor:
1. 8085 Microprocessor Kit
2. Power Supply
3. Instruction Manual
4. Op code Table
Flowchart/Algorithm:-
Program:-
Follow the steps given below in order to execute the program on 8085 Microprocessor Kit:
1. Enter Program
2. Enter Data
3. Execute Program
4. Check Result
1. Enter Program
a. Press RESET
b. Press 1A
c. Enter starting address of the program
d. Press NEXT
e. Start entering the program
f. Press NEXT
2. Enter Data
a. Press RESET
b. Press EXAMINE MEMORY (EXMEM)
c. Enter the address of operand
d. Press NEXT
e. Enter data
f. Press FILL
3. Execute Program
a. Press RESET
b. Press GO
c. Enter starting address of the program
d. Press FILL
4. Check Result
a. Press RESET
b. Press EXAMINE MEMORY (EXMEM)
c. Enter address of result
d. Press NEXT
Result:-
Conclusion: - Thus the given array of data was arranged in Descending order.
Experiment no.10
a) Write a program to convert given hexadecimal number into its equivalent ASCII number
using 8085 instruction set.
b) Write a program to convert given ASCII number into its equivalent hexadecimal number
using 8085 instruction set.
Apparatus Required: Following apparatus is required to perform the practical of 8085
microprocessor:
1. 8085 Microprocessor Kit
2. Power Supply
3. Instruction Manual
4. Op code Table
Program:-
Address Label Mnemonics Operand Op code Remarks
2000 LDA 3000 3A Load contents of A register from
3000 memory location
2001 00
2002 30
2003 SUI 30 D6 Subtract immediately 30h from A
register contents.
2004 30
2005 CPI 0A FE Compare immediately 0A with A
register contents
2006 0A
2007 JC SKIP DA Jump if carry
2008 0C
2009 20
200A SUI 07 D6 Subtract immediately 07h from
register A contents.
200B 07
200C SKIP STA 3000 32 Store the contents of A register in
memory location 3000.
200D 00
200E 30
200F HLT 76 Terminate the program.
Follow the steps given below in order to execute the program on 8085 Microprocessor Kit:
1. Enter Program
2. Enter Data
3. Execute Program
4. Check Result
1. Enter Program
a. Press RESET
b. Press 1A
c. Enter starting address of the program
d. Press NEXT
e. Start entering the program
f. Press NEXT
2. Enter Data
a. Press RESET
b. Press EXAMINE MEMORY (EXMEM)
c. Enter the address of operand
d. Press NEXT
e. Enter data
f. Press FILL
3. Execute Program
a. Press RESET
b. Press GO
c. Enter starting address of the program
d. Press FILL
4. Check Result
a. Press RESET
b. Press EXAMINE MEMORY (EXMEM)
c. Enter address of result
d. Press NEXT
Result:-
Conclusion:- Given hexadecimal number is converted into its equivalent ASCII number and
vice versa using 8085 instruction set.