0% found this document useful (0 votes)
97 views43 pages

Malp Lab Manual

This document provides information about the Microprocessor & Assembly Language Programming Lab at P. R. Pote (Patil) Education & Welfare Trust's Group of Institutions College of Engineering & Management in Amravati, India. It includes the vision, mission, and goals of the institute, computer science and engineering department, and the lab course. It also outlines the list of experiments to be performed, assessment process, guidelines for teachers, and instructions for students.

Uploaded by

rbardak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
97 views43 pages

Malp Lab Manual

This document provides information about the Microprocessor & Assembly Language Programming Lab at P. R. Pote (Patil) Education & Welfare Trust's Group of Institutions College of Engineering & Management in Amravati, India. It includes the vision, mission, and goals of the institute, computer science and engineering department, and the lab course. It also outlines the list of experiments to be performed, assessment process, guidelines for teachers, and instructions for students.

Uploaded by

rbardak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 43

Microprocessor & Assembly Language

Programming Lab

P. R. POTE (PATIL) EDUCATION&


WELFARE TRUST’S GROUP OF
INSTITUTIONS,

COLLEGE OF ENGINEERING &


MANAGEMENT,

AMRAVATI.

COMPUTER SCIENCE AND


ENGINEERING

Year : 2nd Semester: 4TH

SUBJECT: MALP Lab

NAME OF LABORATORY: Research Lab

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

Institute Vision Mission

Vision:

To flourish as a centre of excellence for producing the skilled technocrats and committed
human beings.

Mission:
To create conducive environment for teaching &learning.
To impart quality education through demanding academic programs.
To enhance career opportunities by exposure to Industries &recent technologies.
To develop professionals with strong ethics and human values for the betterment of
society.

Department Vision Mission

Vision

 To achieve Excellence in Computer Science and Engineering for serving the


growing needs of Software industry and Society

Mission

 To create an ambiance that shall foster the growth for developing innovative
and entrepreneurial skills.
 To identify areas of specialization upon which the department can concentrate,
thus promote academic growth and career opportunities.
 To develop human resource with ethical and moral values for overall
personality development to serve the society.

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

Program Educational Outcomes


 Preparation To prepare graduates to have knowledge of computer science
and competency for careers in industry.

 Core Competence To develop problem solving skills in to the graduates that are
required to analyse, design and implement solution with the computer
knowledge.

 Breadth To nurture the graduates to be an effective team member, build


proficiency in soft skills, inculcate multidisciplinary approach and the ability to
relate engineering with social context.

 Professional and lifelong learning To inculcate ethical practices, professionalism


and environmental awareness for sustainable development among students with an
attitude towards lifelong learning.

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

Department of Computer Science & Engineering

Certificate

This is to certify that Mr./Ms…………………………………………………

of …..………… Semester of Bachelor of Engineering in

………………………………Engineering of P. R. Pote (Patil) College of

Engineering & Management, Amravati, has completed the term work

satisfactory in subject ……………………. for the academic year 20……-

20… as prescribed in the curriculum.

Place………………… PRN No:……………………

Date…………………….. Roll No……………………

Subject Teacher Head of the Department

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

LIST OF PRACTICALS & PROGRESSIVE ASSESSMENT FOR TERM WORK

Academic Year : 2023-2024 Course : MALP Lab

Subject & Code: MALP Lab , 4KS08

Name of Faculty : Prof. R. B. Ardak

Name of Student

PRN No Roll No

Sign of
Title of the Date of Date of Assessment
SN. Page Teacher &
Practical / Experiment No Performance Submission Marks (15)
Remarks

To implement adder for


1
two 8-bit and 16 bit numbers.
To implement subtractor
2
for two 8-bit and 16 bit numbers.
To implement multiplier for
3
two 8-bit and 16 bit numbers
To implement divider for
4 two 8-bit and 16 bit numbers.
Write an ALP to exchange two 8-bit
5 numbers using XCHG instruction,
using third register and without
using
third register.
Develop and execute ALP to
6
increment and decrement two 8-bit
numbers.
Write an ALP to find out the cube of 8
7 bit number using Mul instruction
Write an ALP to shift the
8 8-bit number towards left and towards
right.
Write a program to calculate sum of
9 array.
Write a program to count number of
10 zeroes and ones in a given 8 bit
number.

Signature of Faculty

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

GUIDELINES FOR TEACHERS

Teachers shall discuss the following points with students before start of practical of the
subject.

1 Learning Overview: To develop better understanding of importance of the subject. To


know related skills to be developed such as intellectual and motor skills
2 Know your Laboratory Work: To understand the layout of laboratory, specifications
of equipment / instruments /materials, procedure, working in groups, planning time etc.
also to know total amount of work to be done in the laboratory.
3 Teacher shall ensure that required equipment is in working condition before start of
each experiment, also keep operating instruction manual available.
4 Explain prior concepts to the students before starting of each experiment.
5 Evolve student’s activity at the time of conduct of each experiment.
6 While taking reading / observation each student (from batch of 20 students) shall be
given a chance to perform / observe the experiment.
7 Teacher shall assess the performance of students continuously.
8 Teacher is expected to share the skills to be developed in the students.
9 Teacher should ensure that the respective skills are developed in the students after the
completion of the practical exercise.
10 Teacher may provide additional knowledge and skills to the students even though not
covered in the manual but are expected from students by the industries.
11 Teacher may suggest the students to refer additional related literature of the technical
papers / reference books / Seminar Proceedings, etc.
12 Focus should be given on development of enlisted skills rather than theoretical / codified
knowledge.
13 During assessment teacher is expected to ask questions to the students to tap their
achievements regarding related knowledge and skills.
14 Teacher should give more focus on hands on skills.

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

INSTRUCTIONS FOR STUDENTS

Students shall read the points given below for understanding the theoretical concepts and practical applications.

1 Listen carefully to the lecture given by teacher about importance of subject, curriculum
philosophy, learning structure, skills to be developed, information about equipment,
instruments, procedure, method of continuous assessment, tentative plan of work in
laboratory and total amount of works to be done in a semester.
2 Student shall undergo study visit of the laboratory for types of equipment, and material
to be used, before performing experiments.
3 Read the write up of each experiment to be performed, a day in advance.
4
Organize the work in the group and make a record of all observations.
5
Understand the purpose of experiment and its practical implications.
6
Student should not hesitate to ask any difficulty faced during conduct of practical
/exercise.
7
Write the answers of the questions allotted by the teacher during practical hours if
possible or afterwards, but immediately.
8 The student shall study all the questions given in the laboratory manual and practice to
write the answers to these questions.
9 Student should develop the habit of pear discussion / group discussion related to
experiments / exercise so that exchanges of knowledge / skills could take place.
10 Students shall attempt to develop related hands-on-skills and gain confidence.
11 Student shall focus on development of skills rather than theoretical or codified
knowledge.
12 Student shall insist for the completions of recommended Laboratory Work, answers to
the given question etc.
13 Student shall develop the habit of evolving more ideas, innovations, skills etc. that
included in the scope of the manual.
14 Student shall refer technical magazines, proceedings of the Seminars, refer website
related to the scope of the subjects and update their knowledge and skills.
15 Student should develop the habit of not depend totally on teachers but to develop self
learning techniques.
16 Student should develop the habit to interact with the teacher without hesitation with
respect to academic involved.
17 Student should develop habit to submit the practical’s exercise continuously and
progressively on the schedule dates and should get the assessment done.
18 Student should be well prepared while submitting the write up of the exercise. This will
develop the continuity of the studies and he will not be overloaded at the end of the term.

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

LABORATORY INSTRUCTIONS

 Make entry in the Log Book as soon as you enter the Laboratory.
 All the students should sit according to their Roll Numbers.
 All the students are supposed to enter the terminal number in the Log Book.
 Do not change the terminal on which you are working.
 Strictly observe the instructions given by the Faculty / Lab. Instructor.
 Take permission before entering in the lab and keep your belongings in the racks.
 NO FOOD, DRINK, IN ANY FORM is allowed in the lab.
 TURN OFF CELL PHONES! If you need to use it, please keep it in bags.
 Avoid all horseplay in the laboratory. Do not misbehave in the computer laboratory. Work
quietly.
 Save often and keep your files organized.
 Don’t change settings and surf safely.
 Do not reboot, turn off, or move any workstation or PC.
 Do not load any software on any lab computer (without prior permission of Faculty and
Technical Support Personnel). Only Lab Operators and Technical Support Personnel are
authorized to carry out these tasks.
 Do not reconfigure the cabling/equipment without prior permission.
 Do not play games on systems.
 Turn off the machine once you are done using it.
 Violation of the above rules and etiquette guidelines will result in disciplinary action.

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

P. R. Pote (Patil) College of Engineering & Management,

Amravati Department of Computer Science & Engineering

Name of the Program: B. E. CSE Engineering Academic Year:2023-24


Class: 2nd Semester :4th
Section : C Course Code: 4KS08
Course/Subject: Microprocessor & Assembly Course Owner: Prof. R. B. Ardak
Language Programming Lab

SN List of Practical
1 To implement adder for two 8-bit and 16 bit numbers.
2 To implement subtractor for two 8-bit and 16 bit numbers.
3 To implement multiplier for two 8-bit and 16 bit numbers
4 To implement divider for two 8-bit and 16 bit numbers.
5 Write an ALP to exchange two 8-bit numbers using XCHG instruction, using third
register and without using third register.
6 Develop and execute ALP to increment and decrement two 8-bit numbers.
7 Write an ALP to find out the cube of 8 bit number using mul instruction
8 Write an ALP to shift the 8-bit number towards left and towards right.
9 Write a program to calculate sum of array.
10 Write a program to count number of zeroes and ones in a given 8 bit number.

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

Lab Course Objectives & Course Outcomes

Course Objectives: In this lab, student will learn about “Microprocessor and interfacing” in regards to digital
computer, microprocessor architecture, programming with 8086 microprocessor and different peripherals.

Course Outcomes: After successful completion of lab course, the students will able to

1. Analyze the internal working of the microprocessor.

2. Design and develop programs in Assembly Language Programming.

3. Design and test Assembly Language Programs using 8086 microprocessor instruction set.

4. Demonstrate the implementation of standard programming constructs, including control structures and
functions, in Assembly Language.

5. Illustrate and realize the Interfacing of memory & I/O devices with 8086 microprocessor.

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

Assessment Strategy: Rubrics for continuous evaluation in lab session

Allocated
Parameters High Medium Low
Marks
Student answered Student did not
Student answered
only few prelab answer any prelab
all the prelab
questions and question and not
questions and
Prelab test partial know aware about
2 Objective of the
objective of the objective of the
experiment.
experiment. experiment
2 1 0
Student performed
Student performed
or executed Student performed
or executed
experiment, or executed
experiment,
obtained results, experiment, obtained
obtained results,
In-Lab and drawn results, and drawn
5 and drawn
performance conclusion conclusion below
conclusion fully as
partially as per the expectation.
per expectation.
expectation.
5 4-3 2-1
Student partially
Student answered Student did not
answered the Post
the Post lab Viva answer the Post lab
lab Viva voce
voce questions and Viva voce questions
questions and
Post lab test fully confirms the and not confirms the
3 partially confirms
understanding of understanding of the
the understanding
the experiments. experiments.
of the experiments.
3 2-1 0
Records submitted Records submitted Records submitted
by the Student by the Student by the Student found
found highly found moderately highly
Lab Record
5 satisfactory after satisfactory after dissatisfactory after
evaluation. evaluation. evaluation.
5 4-3 2-1
Total Marks 15 Marks (Continuous Assessment)

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

Assessment Strategy: Rubrics use for Internal Examination.

Allocated
Parameters High Medium Low
Marks
Students able to Student partially able to Student not able to
conduct the given conduct the given conduct given
experiment with experiment with desired experiment with
Performance 5 desired output. output. desired output.
5-4 3-1 0
Student answered the Student answered the
Student did not answer
Questions Questions moderately
Viva Voce 5 satisfactorily. satisfactorily. the Questions.
5-4 3-1 0
Total marks 10 Marks (Internal Examination)

Grand Total Marks Continues Assessment (15)+Internal Examination (10) =25 Marks

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

PRACTICAL NO. 01
AIM : To implement adder for two 8-bit and 16-bit numbers.

SOFTWARE REQUIRED : TASM


Practical no. 1(A) (Addition of two 8-bit numbers)
ALGORITHM:

1. Start
2. Read two 8 bit numbers
3. Add two 8 bit numbers
4. Stop

FLOWCHART:

Start

Read two 8 bit numbers

Add these two 8 bit numbers


Stop
PROGRAM:
.MODEL SMALL
.DATA
NUM1 DB 08H
NUM2 DB 02H
.CODE

MOV AX, @DATA


MOV DS, AX
MOV AL, NUM1
MOV BL, NUM2
ADD AL, BL
MOV AH, 4CH
INT 21H
END
AL=0AH
RESULT:

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

Practical no. 1(B) (Addtion of two 16-bit numbers)

ALGORITHM:

1. Start
2. Read two 16 bit numbers
3. Add two 16 bit numbers
4. Stop

FLOWCHART:

Start

Read two 16 bit numbers

Add these two 16 bit numbers

Stop
PROGRAM:

.MODEL SMALL
.DATA
NUM1 DW 0008H

NUM2 DW 0002H
.CODE

MOV AX, @DATA


MOV DS, AX
MOV AX, NUM1
MOV BX, NUM2
ADD AX, BX
MOV AH, 4CH
INT 21H
END
RESULT: AL=4C0AH

CONCLUSION: Hence, we have successfully implemented adder for two 8-bit and 16 bit numbers.

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

LIST OF PRE-LAB QUESTIONS:

1 What is Microprocessor?

2 What is 8086 Microprocessor?

3 List out segment register of 8086 Microprocessor?

4 What is ALU?

5 What is data size & address size of 8086 Microprocessor?

LIST OF POST-LAB QUESTIONS:

1 What are the two parts of 8086 microprocessor?

2 What is BIU?

3 What is EU?

4 What is Flag register?

5 What is Addressing mode?

ASSESSMENT SCHEME:

Pre-Lab Test In Lab performance Post Lab Test Record Total


(2) (5) (3) (5) (15)

Signature of Faculty

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

PRACTICAL NO. 02
AIM : To implement Subtractor for two 8-bit and16-bit number

SOFTWARE REQUIRED : TASM


Practical no. 2(A) (Subtraction of two 8-bit numbers)
ALGORITHM:

1. Start
2. Read two 8 bit numbers
3. Subtract two 8 bit numbers
4. Stop

FLOWCHART:

Start

Read two 8 bit numbers

Subtract two 8 bit numbers


Stop
PROGRAM:
.MODEL SMALL
.DATA
NUM1 DB 08H
NUM2 DB 02H
.CODE

MOV AX, @DATA


MOV DS, AX
MOV AL, NUM1
MOV BL, NUM2
SUB Al, BL
MOV AH, 4CH
INT 21H
END
RESULT: AL=06H

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

Practical no. 2(B) (Subtraction of 16-bit number)

ALGORITHM:

1. Start
2. Read 16-bit number
3. Subtract two 16 bit numbers
4. Stop

FLOWCHART:

Start

Read two 16-bit number numbers

Subtract two 16 bit numbers

Stop

PROGRAM:
.MODEL SMALL
.DATA
NUM1 DW 0008H
NUM2 DW 0002H
.CODE

MOV AX, @DATA


MOV DS, AX
MOV AX, NUM1
MOV BX, NUM2
SUB AX, BX
MOV AH, 4CH
INT 21H
END
RESULT: AX=0006H

CONCLUSION: Hence, we have successfully implemented Subtractor for two 8-bit and 16 bit numbers.

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

LIST OF PRE-LAB QUESTIONS:

1 Define Pipelining in µp ?

2 A 20-bit address bus allows memory of capacity?

3 What is INTR ?

4 What are General Purpose Register?

5 List out pointer and index register?

LIST OF POST-LAB QUESTIONS:

1 What is NMI?

2 How many modes are there in 8086 µp?

3 What is Queue?

4 What is Stack?

5 What does CLK pin indicates?

ASSESSMENT SCHEME:

Pre-Lab Test In Lab performance Post Lab Test Record Total


(2) (5) (3) (5) (15)

Signature of Faculty

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

PRACTICAL NO. 03
AIM : To implement multiplier for two 8 bit and 16-bit numbers.

SOFTWARE REQUIRED : TASM


Practical no. 3(A) (Multiplition of two 16-bit numbers)
ALGORITHM:

1. Start
2. Read two 8 bit numbers
3. Multiply two 8 bit numbers
4. Stop

FLOWCHART:

Start

Read two 8 bit numbers

Multiply two 8 bit numbers

Stop
PROGRAM:
.MODEL SMALL
.DATA
NUM1 DB 08H
NUM2 DB 02H
.CODE
MOV AX, @DATA
MOV DS, AX
MOV AL, NUM1
MOV BL, NUM2
MUL BL
MOV AH, 4CH
INT 21H
END
RESULT:
AX=0010H

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

Practical no. 3(B) (Multiplition of two 16-bit numbers)

ALGORITHM:

1. Start
2. Read two 16 bit numbers
3. Multiply two 16 bit numbers
4. Stop

FLOWCHART:

Start

Read two 16 bit numbers

Multiply these two 16 bit numbers

Stop

PROGRAM:

.MODEL SMALL
.DATA
NUM1 DW 0008H
NUM2 DW 0002H
.CODE

MOV AX, @DATA


MOV DS, AX
MOV AX, NUM1
MOV BX, NUM2
MUL BX
MOV AH, 4CH
INT 21H
END
RESULT: AX=0010H

CONCLUSION: Hence, we have successfully implemented Multiplier for two 8-bit and 16 bit numbers.

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

LIST OF PRE-LAB QUESTIONS:

1 What is ASCII number?

2 Which is Stack Segment?

3 Explain offset value?

4 What is MALP?

5 Explain Data Segment?

LIST OF POST-LAB QUESTIONS:

1 MOV instruction is used for?

2 What does TASM stands for?

3 What do you mean by unsigned numbers?

4 What is an OPCODE?

5 What is instruction set?

ASSESSMENT SCHEME:

Pre-Lab Test In Lab performance Post Lab Test Record Total


(2) (5) (3) (5) (15)

Signature of Faculty

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab
PRACTICAL NO. 03
(Division of 16-bit by 8-bit number)

AIM : To implement divider for 16 bit by 8-bit numbers.

ALGORITHM:
1. Start
2. Read 16-bit and 8 bit number
3. Divide 16-bit by 8 bit number
4. Stop

FLOWCHART :

Start

Read two 8 bit &16 bit numbers

Divide 16 bit by 8 bit number

Stop

PROGRAM:

.MODEL SMALL
.DATA
NUM1 DW 0008H
NUM2 DB 02H
.CODE
MOV AX,@DATA
MOV DS, AX
MOV AX, NUM1
MOV BL, NUM2
DIV BL
MOV AH, 4CH
INT 21H
END

RESULT: 0004H

CONCLUSION: Hence, we have successfully implemented divider.

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab
LIST OF PRE-LAB QUESTIONS:

1 What is Rotate instruction?

2 Which is ROL?

3 What is ROR?

4 What is Software?

5 What is Hardware?

LIST OF POST-LAB QUESTIONS:

1 What is DB?

2 What is DW?

3 What is DD?

4 What is DQ?

5 What is DT?

ASSESSMENT SCHEME:

Pre-Lab Test In Lab performance Post Lab Test Record Total


(2) (5) (3) (5) (15)

Signature of Faculty

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

PRACTICAL NO. 05
AIM: Write an ALP to exchange two 8-bit numbers using XCHG instruction, third register and without using
third register.

SOFTWARE REQUIRED: TASM

Practical no. 5(A) (exchange of two 8-bit numbers using XCHG instruction)

ALGORITHM:

1. Start
2. Read two 8 bit numbers
3. Exchange two 8 bit numbers
4. Stop

FLOWCHART:

Start

Read two 8 bit numbers

Exchange these two 8 bit numbers

Stop

PROGRAM:
.MODEL SMALL
.DATA
NUM1 DB 06H
NUM2 DB 04H
.CODE
MOV AX,
@DATA MOV DS,
AX MOV AL,
NUM1 MOV BL,
NUM2 XCHG AL,
BL MOV AH, 4CH
INT 21H
END

RESULT: Before swapping: AL=06H BL=04H


After swapping : AL=04H BL=06H
PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

Practical no. 5(B) (exchange of two 8-bit numbers using third register)

ALGORITHM:

1. Start
2. Read two 8 bit numbers
3. Move the contents of 1st register to 3rd register.
4. Move the contents of 2nd register to 1st register.
5. Move the contents of 3rd register to 2nd register.
6. Stop

FLOWCHART:

Start

Read two 8 bit numbers

Exchange two 8 bit numbers, CL=AL, AL=BL, BL=CL

Stop

PROGRAM:
.MODEL SMALL
.DATA
NUM1 DB 08H
NUM2 DB 02H
.CODE
MOV AX, @DATA
MOV DS, AX
MOV AL, NUM1
MOV BL, NUM2
MOV CL, AL
MOV AL, BL
MOV BL, CL
MOV AH, 4CH
INT 21 H
END
RESULT: Before swapping : AL=06H, BL=04H
After swapping : AL=04H, BL=06H

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

Practical no. 5(C) (exchange of two 8-bit numbers without using third register
& XCHG instruction)

ALGORITHM:

1. Start
2. Read two 8 bit numbers
3. Add two 8-bit numbers.
4. Subtract sum from 2nd number.
5. Correct the result.
6. Subtract corrected result from sum.
7. Stop

FLOWCHART:

Start

Read two 8 bit numbers

Exchange two 8 bit numbers, AL=AL+BL,


BL=BL-AL
Convert content of BL to positive AL=AL-BL

Stop

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

PROGRAM:
.MODEL SMALL
.DATA
NUM1 DB 06H
NUM2 DB 04H
.CODE
MOV AX, @DATA
MOV DS, AX
MOV AL, NUM1
MOV BL, NUM2
ADD AL, BL
SUB BL, AL
NEG BL
SUB AL, BL
MOV AH, 4CH
INT 21 H
END

RESULT: Before swapping : AL=06H BL=04H


After swapping : AL=04H BL=06H

CONCLUSION: Hence, we have successfully executed ALP to exchange two 8-bit numbers using XCHG
instruction, third register and without using third register.
.

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

LIST OF PRE-LAB QUESTIONS:

1 What is XCHG instruction?

2 Which is an instruction?

3 Explain Assembler?

4 What is Logical Address?

5 Explain Physical Address?

LIST OF POST-LAB QUESTIONS:

1 What is Effective Address?

2 What are the flags in 8086?

3 What do you mean by HLT instruction?

4 What is program counter?

5 What is Maskable interrupt?

ASSESSMENT SCHEME:

Pre-Lab Test In Lab performance Post Lab Test Record Total


(2) (5) (3) (5) (15)

Signature of Faculty

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

PRACTICAL NO. 06
AIM : Develop and Execute Assembly Language Program to increment & decrement of two 8-bit numbers.

SOFTWARE REQUIRED : TASM

ALGORITHM:

1. Start
2. Read two 8 bit numbers
3. Increment & Decrement of two 8- bit numbers
4. Stop

FLOWCHART:

Start

Read two 8 bit numbers

Increment & Decrement two 8-bit numbers


AL=AL+1, BL=BL-1

PROGRAM: Stop
.MODEL SMALL
.DATA
NUM1 DB 09H
NUM2 DB 05H
.CODE
MOV AX, @DATA
MOV DS, AX
MOV AL, NUM1
INC AL
MOV BL, NUM2
DEC BL
MOV AH, 4CH
INT 21H
END

RESULT: AL=OAH
BL=04H

CONCLUSION: Hence, we have successfully developed and execute Assembly Language Program to increment
& decrement of two 8-bit numbers.

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

LIST OF PRE-LAB QUESTIONS:

1 What are Data COPY/TRANSFER instructions?

2 Which are string instructions?

3 What is INC instruction?

4 What is Operand?

5 What is DEC instruction?

LIST OF POST-LAB QUESTIONS:

1 What is Microcontroller?

2 What is Microcomputer?

3 What do you mean by unsigned numbers?

4 Explain .MODEL SMALL?

5 What is the use of READY pin?

ASSESSMENT SCHEME:

Pre-Lab Test In Lab performance Post Lab Test Record Total


(2) (5) (3) (5) (15)

Signature of Faculty

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

PRACTICAL NO. 07
AIM : Write an ALP for 8086 to find cube of 8 bit number using MUL instruction.

SOFTWARE REQUIRED : TASM


ALGORITHM:
1. Start
2. Read two 8 bit numbers& store it in A.
3. Move value of A to AL
4. Move AL in BL
5. Multiply AL, then Multiply BL
6. Stop
FLOWCHART:
Start

Read 8 bit no. & store it in A

Move A to Al then Move Al to BL


Multiply Al then Multiply BL

Stop

PROGRAM:

.MODEL SMALL
.DATA
NUM1 DB 02H
.CODE
MOV AX, @DATA
MOV DS, AX
MOV AL, NUM1
MOV BL, AL
MUL AL
MUL BL
MOV AH, 4CH
INT 21H
END

RESULT: AL=O8H

CONCLUSION: Hence, we have successfully developed and execute Assembly Language Program to increment
& decrement of two 8-bit numbers.

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

LIST OF PRE-LAB QUESTIONS:

1 What is carry?

2 Which is RCL instruction?

3 Explain RCR instruction?

4 What is Bus?

5 Explain the function of M/IO in 8086?

LIST OF POST-LAB QUESTIONS:

1 Why data bus is bi-directional?

2 What address bus is uni-directional?

3 What is the use of GND pin?

4 What is function of ALE pin?

5 What is LEA?

ASSESSMENT SCHEME:

Pre-Lab Test In Lab performance Post Lab Test Record Total


(2) (5) (3) (5) (15)

Signature of Faculty

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

PRACTICAL NO. 08

AIM : Write an ALP to shift the 8-bit number towards left and towards right.

Practical no. 8(A) (shifting of 8-bit number towards left)

SOFTWARE REQUIRED : TASM

ALGORITHM:

1. Start
2. Read a 8 bit numbers
3. Shift the number towards left by 1 bit position.
4. Stop

FLOWCHART:

Start

Read a 8-bit numbers

Shift the 8 bit number towards


left by 1

Stop

PROGRAM:
.MODEL SMALL
.DATA
NUM1 DB 28H
.CODE
MOV AX, @DATA
MOV DS, AX
MOV AL, NUM1
SHL AL, 01H
MOV AH, 4CH
INT 21H
END

RESULT: AL=50H

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

Practical no. 8(B) (shifting of 8-bit number towards right)

SOFTWARE REQUIRED : TASM

ALGORITHM:

5. Start
6. Read a 8 bit numbers
7. Rotate the number towards right by 1 bit position.
8. Stop

FLOWCHART:

Start

Read a 8-bit numbers

Rotate the 8 bit number towards


right by 1

Stop

PROGRAM:
.MODEL SMALL
.DATA
NUM1 DB 28H
.CODE
MOV AX, @DATA
MOV DS, AX
MOV AL, NUM1
SHR AL, 01H
MOV AH, 4CH
INT 21H
END

RESULT: AL=14H

CONCLUSION: Hence, we have successfully executed ALP to shift the 8-bit number towards left and
towards right

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

LIST OF PRE-LAB QUESTIONS:

1 What is Shift instruction?

2 Which is the difference between shift and rotate instruction?

3 Explain SHL?

4 What is SHR?

5 Explain INTA?

LIST OF POST-LAB QUESTIONS:

1 What is interrupt I/O?

2 What is DMA?

3 What do you mean by port?

4 What is instruction cycle?

5 What is the need of timing diagram?

ASSESSMENT SCHEME:

Pre-Lab Test In Lab performance Post Lab Test Record Total


(2) (5) (3) (5) (15)

Signature of Faculty

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

PRACTICAL NO. 09
AIM : Write an ALP to determine sum of array elements.

SOFTWARE REQUIRED : TASM

ALGORITHM:

1. Start
2. Read the Array elements.
3. Load the array length to CL (counter).
4. Load effective address of array in BX.
5. Move 00 to AH and AL registers.
6. Specify label(loop) to perform addition
7. Add the AL and current value of BX.
8. Increment the BX by 1.
9. Decrement CL by 1
10. Compare the Counter CL with 00.
11. Jump if counter is not zero to label.
12. Iterate the loop until counter is ‘0’.
13. Stop

FLOWCHART:
Start

Read the array elements

Load array length to CL

Load effective address of array in BX

Move 00 to AH register and Move 00 to AL


register
Specify label to perform addition

Add AL and current value of BX

False
Increment BX by 1

Decrement counter CL by 1

Compare Cl=0

True
Stop

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

PROGRAM:
.MODEL SMALL
.DATA
A DB 1H, 2H, 3H, 4H, 5H
.CODE
MOV AX, @DATA
MOV DS, AX
MOV CL, 05H
LEA BX, A
MOV AH, 00H
MOV AL, 00H
L1: ADD AL, BYTE PTR[BX]
INC BX
DEC CL
CMP CL, 00H
JNZ L1
MOV AH, 4CH
INT 21H
END

RESULT: AX = 000FH

CONCLUSION: Hence, we have successfully executed ALP to perform sum of array elements.

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

LIST OF PRE-LAB QUESTIONS:

1 What is Macros?

2 Which is Procedures?

3 Explain Subroutine?

4 What is the use of Carry Flag?

5 Explain Parity Flag?

LIST OF POST-LAB QUESTIONS:

1 What is Vcc pin?

2 What does HLDA stands for?

3 What is the use of RESET pin?

4 What is DEN pin?

5 What is Source & Destination Index?

ASSESSMENT SCHEME:

Pre-Lab Test In Lab performance Post Lab Test Record Total


(2) (5) (3) (5) (15)

Signature of Faculty

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

PRACTICAL NO. 10

Practical no. 10(A) (to count number of ones)

AIM : Write a program to count number of ones in a given 8 bit numbers.

SOFTWARE REQUIRED : TASM

ALGORITHM:

1. Start
2. Read a 8-bit unsigned numbers.
3. Rotate the number towards right by 1 bit position
4. Check the carry flag, if it is set the increment BX by 1
5. If the carry flag is rest then execute the loop.
6. Stop

FLOWCHART:

Start

Read a 8 bit number


Rotate the 8 bit number by 1

Yes No
If CF=1

Increment BL by 1 Stop Execute the loop

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

PROGRAM:
.MODEL SMALL
.DATA
NUM1 DB 32H
.CODE
MOV AX, @DATA
MOV DS, AX
MOV CL, 08H
MOV BL, 00H
MOV AL, NUM1
UP : ROL
AL,01H
JNZ EXIT
INC BL
NEXT: LOOP UP
MOV AH, 4CH
INT 21H
END

RESULT: BX=00O3H

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab
10(B) (to count number of zeros)

AIM : Write a program to count number of zeros in a given 8 bit numbers.


P
r
SOFTWARE REQUIRED : TASM
a
c
ALGORITHM:
t
i
c 1. Start
a 2. Read a 8-bit unsigned numbers.
l
3. Rotate the number towards right by 1 bit position
n
o 4. Check the carry flag, if it is reset then increment BX by 1
. 5. If the carry flag is set then execute the loop.
1 6. Stop
0
(
B
)
FLOWCHART:
(
t Start
o

c
Read a 8 bit number
o
Rotate the 8 bit number by 1
u
n
t

n Yes No
u If CF=0
m
b
e Stop Execute the loop
r
Increment BL by 1
o
f
z
e
r
o
s
)
PROGRAM:

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

.MODEL SMALL
.DATA
NUM1 DB 32H
.CODE
MOV AX, @DATA
MOV DS, AX
MOV CL, 08H
MOV BL, 00H
MOV AL, NUM1
UP : ROL
AL,01H
JNZ EXIT
RESULT: INC BL
NEXT: LOOP UP
MOV AH, 4CH
INT 21H
END

0005H

CONCLUSION: Hence, we have successfully executed a program to find Greatest of two 8-bit
unsigned numbers.

PRPCEM, Amravati
Microprocessor & Assembly Language
Programming Lab

LIST OF PRE-LAB QUESTIONS:

1 What is signed numbers?

2 Which is unsigned numbers?

3 What is CMP instruction?

4 What is JMP instruction?

5 Explain bit, byte & word?

LIST OF POST-LAB QUESTIONS:

1 What is the use of PUSH instruction?

2 What is the use of POP instruction?

3 What is Accumulator?

4 What is linker?

5 What is CALL instruction?

ASSESSMENT SCHEME:

Pre-Lab Test In Lab performance Post Lab Test Record Total


(2) (5) (3) (5) (15)

Signature of Faculty

PRPCEM, Amravati

You might also like