micro processor lab manual.doc
TRANSCRIPT
-
8/6/2019 Micro Processor LAB manual.doc
1/19
MAHAKAL INSTITUTE OF TECHNOLOGYBEHIND AIR STRIP UJJAIN (MP)
Approved By All India Council of Technical Education (New Delhi)
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
-
8/6/2019 Micro Processor LAB manual.doc
2/19
Affiliated to Rajiv Gandhi Prodyogiki Vishwavidyalaya Bhopal (MP)
INDEX
S.No Name of Algorithm Date of Submission
SIGN 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 numbers6 Write an assembly language program for
division of two 16-bit numbers using
successive subtraction7. 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 numbers9. 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 SIGN REMARK
-
8/6/2019 Micro Processor LAB manual.doc
3/19
Submission
13 Write an assembly language program to find
largest between 2 numbers14 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 usingthird 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.
-
8/6/2019 Micro Processor LAB manual.doc
4/19
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 .
-
8/6/2019 Micro Processor LAB manual.doc
5/19
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:
-
8/6/2019 Micro Processor LAB manual.doc
6/19
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 .
-
8/6/2019 Micro Processor LAB manual.doc
7/19
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.
-
8/6/2019 Micro Processor LAB manual.doc
8/19
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
-
8/6/2019 Micro Processor LAB manual.doc
9/19
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:
-
8/6/2019 Micro Processor LAB manual.doc
10/19
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:
-
8/6/2019 Micro Processor LAB manual.doc
11/19
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:
-
8/6/2019 Micro Processor LAB manual.doc
12/19
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:
-
8/6/2019 Micro Processor LAB manual.doc
13/19
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:
-
8/6/2019 Micro Processor LAB manual.doc
14/19
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.
-
8/6/2019 Micro Processor LAB manual.doc
15/19
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:
-
8/6/2019 Micro Processor LAB manual.doc
16/19
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 .
-
8/6/2019 Micro Processor LAB manual.doc
17/19
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 :
-
8/6/2019 Micro Processor LAB manual.doc
18/19
-
8/6/2019 Micro Processor LAB manual.doc
19/19
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: