Micro Processor LAB Manual
-
Upload
puneetshah15 -
Category
Documents
-
view
619 -
download
8
Transcript of Micro Processor LAB Manual
DEPARTMENT OFCOMPUTER SCIENCE AND ENGG.
LAB MANUAL
Name of Student: ………………………………………..
Name of Lab: MICROPROCESSOR AND INTERFACING
Subject Code: CS-601
Branch: C.S. & ENGG.
Year/Sem: III/VI
Affiliated to Rajiv Gandhi Prodyogiki VishwavidyalayaBhopal (MP)
MAHAKAL INSTITUTE OF TECHNOLOGYBEHIND AIR STRIP UJJAIN (MP)
Approved By All India Council of Technical Education (New Delhi)
INDEXS.No Name of Algorithm Date of
SubmissionSIGN REMARK
1. Write an assembly language program to
subtract two 16-bit numbers.
2. Write an assembly language program to add
two 8-bit numbers.
3. Write an assembly language program to
multiply two 16-bit numbers.
4. Write an assembly language program to
swap two variables without using third
variable.
5. Write an assembly language program for
addition of two 64-bit numbers
6 Write an assembly language program for
division of two 16-bit numbers using
successive subtraction
7. Write an assembly language program for
division of two 16-bit numbers using
successive addition.
8. Write an assembly language program for
finding division of two 16-bit numbers
9. Write an assembly language program for
finding average of 5 numbers in the array..
10. Write an assembly language program for
finding sum of first n natural numbers.
11. Write an assembly language program for
printing n even numbers
12. Write an assembly language program for
printing n odd numbers.
S.No Name of Algorithm Date of Submission
SIGN REMARK
13 Write an assembly language program to find
largest between 2 numbers
14 Write an assembly language program to
calculate factorial of a given number.
List of the Experiments
Microprocessor & Interfacing
1. Write an assembly language program to subtract two 16-bit numbers
2. Write an assembly language program to add two 16-bit numbers
3. Write an assembly language program to multiply two 16-bit numbers
4. Write an assembly language program to swap two variables without using
third variable.
5. Write an assembly language program for addition of two 64-bit numbers
6. Write an assembly language program for division of two 16-bit numbers
using successive subtraction.
7. Write an assembly language program for division of two 16-bit numbers
using successive addition.
8. Write an assembly language program for finding division of two 16-bit
numbers.
9. Write an assembly language program for finding average of 5 numbers in the
array.
10. Write an assembly language program for finding sum of first n natural
numbers
11. Write an assembly language program for printing n even numbers
12. Write an assembly language program for printing n odd numbers.
13. Write an assembly language program to find largest between 2 numbers.
14. Write an assembly language program to calculate factorial of a given
number.
PROGRAM NO: - 1Unit/Topic: 1/8086Programming
Problem Definition:
Write an assembly language program to subtract two 16-bit numbers.
Objective:
To understand the concept of Arithmetic Operation by processor 8086.
Algorithm:
Declare data in DATA SEGMENT. Write code in CODE SEGMENT. Move number in appropriate segment. Subtract the value of 2 registers by SUB instruction.
Input Set:
Output Set:
Notes:
PROGRAM NO: - 2Unit/Topic: 1/8086Programming
Problem Definition:
Write an assembly language program to Add two 8-bit numbers.
Objective:
To understand the concept of Arithmetic Operation by processor 8086.
Algorithm:
Declare data in DATA SEGMENT. Write code in CODE SEGMENT. Move number in appropriate segment. Add the value of 2 registers by ADD instruction.
Input Set:
Output Set:
Notes:
PROGRAM NO: - 3Unit/Topic: 1/8086Programming
Problem Definition:
Write an assembly language program to Multiply two 16-bit numbers.
Objective:
To understand the concept of Arithmetic Operation by processor 8086.
Algorithm:
Specify the default register Move the value of the word 1 to AX. Move the value of the word 2 to BX. Multiply the value of the AX and BX. Move the memory location to the Destination Index. Move the value of AX into DI..
Input Set:
Output Set:
Notes:
PROGRAM NO: - 4Unit/Topic: 1/8086Programming
Problem Definition:
Write an assembly language program to swap two variables without using third
variable.
Objective:
To understand the concept of Arithmetic Operation by processor 8086.
Algorithm:
Add the value of reg1 to reg2. Sub the value of reg2 from reg1. Negate the value of reg2. Sub the value of reg1 from reg2.
Input Set:
Output Set:
Notes:
PROGRAM NO: - 5Unit/Topic: 1/8086 Programming
Problem Definition:
Write an assembly language program for addition of two 64-bit numbers.
Objective:
To understand the concept of Arithmetic Operation by processor 8086.
Algorithm:
Declare the Data in DATA SEGMENT. Write Code in CODE SEGMENT. Move number in appropriate segment. Declare a label START. Move D1 to AX and D2 to BX Increment the values of S1 and DI two times. Subtract the values of 2 registers by SUB Instruction.
Input Set:
Output Set:
Notes:
PROGRAM NO: - 6Unit/Topic: 1/8086 Programming
Problem Definition:
Write an assembly language program for division of two 16-bit numbers using
successive subtraction.
Objective:
To understand the concept of Arithmetic Operation by processor 8086.
Algorithm:
Declare the Data in DATA SEGMENT. Write Code in CODE SEGMENT. Declare a label START. Move number in appropriate segment.
Input Set:
Output Set:
Notes:
PROGRAM NO: - 7Unit/Topic: 1/8086 Programming
Problem Definition:
Write an assembly language program for division of two 16-bit numbers using
successive addition.
Objective:
To understand the concept of Arithmetic Operation by processor 8086.
Algorithm:
Declare the Data in DATA SEGMENT. Write Code in CODE SEGMENT. Declare a label START. Move number in appropriate segment.
Input Set:
Output Set:
Notes:
PROGRAM NO: - 8Unit/Topic: 1/8086 Programming
Problem Definition:
Write an assembly language program for finding division of two 16-bit numbers.
Objective:
To understand the concept of Arithmetic Operation by processor 8086.
Algorithm:
Declare the Data in DATA SEGMENT. Write Code in CODE SEGMENT. Move number in appropriate segment. Divide the value of AX by value of BX.
Input Set:
Output Set:
Notes:
PROGRAM NO: - 9Unit/Topic: 1/8086 Programming
Problem Definition:
Write an assembly language program for finding average of 5 numbers in the array.
Objective:
To understand the concept of Arithmetic Operation by processor 8086.
Algorithm:
Declare the Data in DATA SEGMENT. Write Code in CODE SEGMENT. Declare a label NEXT. Increment values of SI 2 times. Divide the value of AX by value of BX.
Input Set:
Output Set:
Notes:
PROGRAM NO: - 10Unit/Topic: 1/8086 Programming
Problem Definition:
Write an assembly language program for finding sum of first n natural numbers.
Objective:
To understand the concept of Arithmetic Operation by processor 8086.
Algorithm:
Declare the Data in DATA SEGMENT. Write Code in CODE SEGMENT. Declare a label NEXT. Add the value of AX and BX. Decrement the value BX. Move the number in appropriate segment.
Input Set:
Output Set:
Notes:
PROGRAM NO: - 11Unit/Topic: 1/8086 Programming
Problem Definition:
Write an assembly language program for printing n even numbers.
Objective:
To understand the concept of Arithmetic Operation by processor 8086.
Algorithm:
Declare the Data in DATA SEGMENT. Write Code in CODE SEGMENT. Declare a label NEXT. Add the value of AX with 2 Move the number in appropriate segment.
Input Set:
Output Set:
Notes:
PROGRAM NO: - 12Unit/Topic: 1/8086 Programming
Problem Definition:
Write an assembly language program for printing n odd numbers.
Objective:
To understand the concept of Arithmetic Operation by processor 8086.
Algorithm:
Declare the Data in DATA SEGMENT. Write Code in CODE SEGMENT. Declare a label NEXT. Add the value of AX with 2 Move the number in appropriate segment.
Input Set:
Output Set:
Notes:
PROGRAM NO: - 13Unit/Topic: 1/8086 Programming
Problem Definition:
Write an assembly language program to find largest between 2 numbers.
Objective:
To understand the concept of Arithmetic Operation by processor 8086.
Algorithm:
Declare the Data in DATA SEGMENT. Write Code in CODE SEGMENT. Declare a label GREATER, LESS, EQUAL. Compare the value of AX and BX. Move the number in appropriate segment.
Input Set:
Output Set:
Notes:
PROGRAM NO: - 14Unit/Topic: 1/8086 Programming
Problem Definition:
Write an assembly language program to calculate factorial of a given number.
Objective:
To understand the concept of Arithmetic Operation by processor 8086.
Algorithm:
Declare the Data in DATA SEGMENT. Write Code in CODE SEGMENT. Declare a label NEXT. Move the number in appropriate segment.
Input Set:
Output Set:
Notes: