0% found this document useful (0 votes)
50 views17 pages

MIC Report

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

MIC Report

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

Academic Year: 2023 -2024

REPORT ON MICROPROJECT
Write an ALP to Program to sort the 16-bit array
elements in ascending order

----------------------------------------------------------------------------------------------------------------------------

Program: Computer Engineering Program Code: CO4I-(A)

Course: MICROPROCESSORS Course code: 22415

Submitted By: Group 6

Name of the Student: Rutu Bauva , Muskan Kateja , Aniket Nikam

Roll No : 16 , 17 , 18

Name of Project Guide: Mrs. Alka Prayagkar


MAHARASHTRA STATE BOARD OF
TECHNICAL EDUCATION

Certificate
This is to certify that Ms./Mr Rutu Bauva , Muskan Kateja , Aniket Nikam Roll No. 16,

17, 18 Of FOURTH Semester of diploma in COMPUTER Engineering of Institute,

VES POLYTECHNIC (Code:0004) has completed the Micro Project

satisfactorily in Subject –MICROPROCESSORS (22415) for the academic year

2023-2024 as prescribed in the curriculum.

Place: CHEMBUR, MUMBAI Enrollment No : 2200040334-336

Date: ………………………… Exam Seat No : 103387-89

Subject Teacher Head of the Department Principal


Annexure – I

Title of Project : Write an ALP to Program to sort the 16-bit array elements in ascending order

1.0 Aim /Benefits of the Micro-Project:


This Micro-Project aims at:
1. Develop an ALP on the given problem.
2. Learn instructions for assembly language program development.
3. Prepare Flowcharts.
4. Prepare Algorithm
5. Use instruction in ALP.
6.
2.0 Course Outcomes Addressed(Tick appropriate COs)

1. Analyze the functional block of the 8086 microprocessor. [✓ ]


2. Write an assembly language program for the given problem. . [✓]
3. Use instructions for different addressing modes. [✓ ]
4. Develop an assembly language program using assembler. [✓ ]
5. Develop assembly language programs using procedures, macros and modular
programming approaches. [ ]

3.0 Proposed Methodology

● Discussion about topic with guide and among group members


● Literature Survey
● Submission of project proposal
● Information collection
● Analysis of Data
● Compilation of the content
● Representation
● Editing and revising the content
● Report Preparation
4.0 Action Plan

Planned Start Planned Name of Responsible Team


S. No. Details of activity
date Finish date Members

Finalization of project
1 1/02/2024 15/02/2024 All
Title and Scope

Design procedure
2 15/02/2024 22/02/2024 All
(algorithm)

3 Draw Flowchart All


22/02/2024 29/02/2024

4 Initialization Checklist All


29/02/2024 07/03/2024

5 Choosing instructions All


07/03/2024 14/03/2024

Converting algorithms to
6 14/03/2024 21/03/2024 All
ALP (coding)
Testing and error
7 21/03/2024 28/03/2024 All
correction

Demonstration of project
8 and final submission 28/03/2024 04/04/2024 All
Making of report
5.0 Resources Required

S. No. Name of Specifications Qty Remarks


Resource/material
1 Hardware computer Computer (i3-i5 1 I3 Processor
system preferable),RAM
minimum 2 GB and onwards.
2 Operating system Windows XP/windows 7 or 1 Windows 7
later
3 Software TASM 1.4 1 TASM

Names of team members with Roll Nos.

Sr No Roll No. Name of Team Members Enrollment No Seat No.


1. 16 Rutu Bauva 2200040334 103387
2. 17 Muskan Kateja 2200040335 103388
3. 18 Aniket Nikam 2200040336 103389

Teachers Signature
Mrs.Alka Prayagkar
Annexure – II A

Title of Project : Write an ALP to Program to sort the 16-bit array elements in ascending order

1.0 Rationale
Importance :
This project shows how the problem is solved using step wise procedures from defining the
problem to writing the ALP. It also tells about the processor 8086 and its functions. It also
teaches to work with unity and building good leadership qualities.

2.0 Aim of the Micro-Project:


This Micro-Project aims at:
1. Creating an algorithm on the given problem.
2. Making of Flowcharts.
3. Writing code.

3.0 Course Outcomes Addressed (Tick appropriate COs)


1. Analyze the functional block of the 8086 microprocessor. [✓ ]
2. Write an assembly language program for the given problem. [✓ ]
3. Use instructions for different addressing modes. [✓ ]
4. Develop an assembly language program using assembler. [✓ ]
5. Develop assembly language programs using procedures, macros and modular
programming approaches. [ ]

4.0 Literature Review

The provided assembly code segment offers a comprehensive glimpse into the intricate world of
low-level programming, delving into the realms of data manipulation, algorithm implementation, and
program control flow. Through the judicious use of assembly language constructs and directives, the
code exemplifies a practical approach to sorting data elements within an array, shedding light on
fundamental programming paradigms prevalent in the realm of computer science and software
engineering.

Array Declaration and Initialization:

The initiation of the code segment within the DATA segment marks the inception of the data
manipulation process. Here, the declaration and initialization of the "ARRAY" array with
hexadecimal values epitomize the foundational step towards data organization and manipulation. The
accompanying single-byte variable "NUM" provides crucial metadata regarding the size of the array,
enabling dynamic and efficient handling of data structures.
Segment Definition and Assumption:

Incorporating the CODE segment within the program framework is a strategic move that underscores
the significance of structured programming practices. The ASSUME directive plays a pivotal role in
establishing logical associations between the code segment (CS) and the data segment (DS),
facilitating seamless data access and manipulation within the program's execution context. This
adherence to segment-based organization underscores the code's clarity and modularity, essential
attributes for scalable and maintainable software systems.

Data Movement and Index Setup:

Central to the code's functionality is the adept utilization of data movement instructions and index
setup mechanisms. The MOV instruction, coupled with the LEA directive, orchestrates the seamless
transfer of data segment addresses and array indices, laying the groundwork for subsequent data
manipulation operations. The initialization of the source index register (SI) with the effective address
of the "ARRAY" array sets the stage for efficient array traversal and manipulation, underscoring the
code's optimization and efficiency.

Sorting Algorithm Implementation:

At the heart of the code lies the meticulous implementation of the bubble sort algorithm, a
fundamental sorting technique revered for its simplicity and efficacy. The algorithm's iterative nature,
characterized by repeated comparisons and element swaps, is elegantly captured through a series of
conditional branching instructions such as CMP, JC, and JNZ. These instructions, coupled with data
exchange operations facilitated by XCHG, orchestrate the intricate dance of data manipulation
necessary for sorting array elements in ascending order.

Data Exchange and Iteration:

The iterative nature of the sorting algorithm necessitates seamless data exchange and loop iteration
mechanisms. Here, instructions such as INC and DEC play a pivotal role in incrementing and
decrementing loop counters, enabling precise control over the iteration process. The XCHG
instruction, with its ability to exchange data between memory locations, emerges as a linchpin for
facilitating element swaps within the array, thereby advancing the sorting process with efficiency and
precision.

Program Termination and Conclusion:

As the sorting process culminates, the program gracefully concludes with the invocation of the INT
21H instruction, symbolizing the culmination of execution. This poignant finale underscores the
code's adherence to structured programming principles and encapsulates the essence of assembly
language programming—a disciplined pursuit of computational efficiency and elegance.
Directives used:

DATA SEGMENT:

● Marks the beginning of the data segment.


● Defines a logical segment where data variables are declared and stored.
● Used to allocate memory for data variables.
● Example: DATA SEGMENT

ENDS:

● Marks the end of a segment.


● Used to terminate the definition of a segment.
● Example: ENDS

CODE SEGMENT:

● Indicates the start of the code segment.


● Defines a logical segment where executable instructions are placed.
● Used to allocate memory for executable instructions.
● Example: CODE SEGMENT

END:

● Marks the end of the program.


● Used to signify the conclusion of the assembly program.
● Example: END

ASSUME:

● Specifies the logical segment associations for code and data segments.
● Used to inform the assembler about the segment register assumptions.
● Example: ASSUME CS:CODE, DS:DATA

Instructions Used:

MOV (Move):

● Copies data from a source operand to a destination operand.


● Used to initialize registers and transfer data between memory and registers.
● Example: MOV AX, DATA (moves the data segment address to AX register)
LEA (Load Effective Address):

● Computes the effective address of the specified memory operand and loads it into a register.
● Used to obtain the address of a memory location for indirect addressing.
● Example: LEA SI, ARRAY (loads the effective address of the ARRAY into SI register)

DEC (Decrement):

● Decrements the value of the specified operand by one.


● Used for loop control and arithmetic operations.
● Example: DEC CL (decrements the value of CL register)

INC (Increment):

● Increments the value of the specified operand by one.


● Used for loop control and arithmetic operations.
● Example: INC SI (increments the value of SI register)

CMP (Compare):

● Compares two operands and sets the status flags accordingly.


● Used for conditional branching and decision-making.
● Example: CMP AX, BX (compares the values in AX and BX registers)

JC (Jump if Carry):

● Jumps to the specified destination if the carry flag (CF) is set.


● Used for conditional branching based on arithmetic operations.
● Example: JC SKIP (jumps to the label SKIP if the carry flag is set)

XCHG (Exchange):

● Swaps the contents of two operands.


● Used for swapping values in registers or memory locations.
● Example: XCHG AX, BX (exchanges the values in AX and BX registers)

INT (Interrupt):

● Generates a software interrupt.


● Used to invoke system services or interrupt service routines.
● Example: INT 21H
Registers Used:

AX (Accumulator):

● Used for general-purpose data manipulation.


● Stores temporary values and operands for arithmetic and logical operations.
● Holds the base address of the data segment (MOV AX, DATA).

DS (Data Segment Register):

● Points to the base address of the data segment.


● Initialized with the value stored in AX (MOV DS, AX).

SI (Source Index Register):

● Used as an offset pointer for accessing elements in the array.


● Loaded with the effective address of the array (LEA SI, ARRAY).
● Incremented to traverse through array elements (INC SI).

CL (Counter Register - Low 8 bits):

● Acts as a loop counter for controlling the outer loop.


● Initialized with the value stored in NUM (MOV CL, NUM).
● Decremented to iterate through the array elements (DEC CL).

CH (Counter Register - High 8 bits):

● Used as a loop counter for controlling the inner loop.


● Decremented within the outer loop to set the outer loop limit (DEC CH).
● Decremented within the inner loop to iterate through the array elements (DEC CH).

BX (Base Register):

● Used to hold a copy of the array element during comparison and swapping.
● Stores the value of the array element pointed to by SI (MOV BX, [SI]).
● Used for data manipulation and temporary storage.

These registers are essential for data manipulation, address calculation, and loop control in the
program. They facilitate efficient memory access and enable the implementation of the bubble sort
algorithm to sort the array elements in ascending order.
5.0 Actual Methodology Followed

● Discussed the topic in the group.


● Collected the information about the given topic.
● Made a circuit using the collected information.
● Made a final report on the project

Algorithm:

Step 1: Start
Step 2: Initialize the data segment with the array
Step 3: Load BL with 05H
Step 4: Initialize SI with the starting address of the array and CX register with 04H
Step 5: Load AX with the content of [SI]
Step 6: Compare AX with the content of [SI + 2]
Step 7: If AX is less than the content of [SI + 2], jump to DOWN, else continue to the next step
Step 8: Exchange the content of [SI] and [SI + 2] (swap values)
Step 9: DOWN: Add 2 to SI to point to the next element in the array
Step 10: Loop back to Step 5 until all elements are compared and possibly swapped
Step 11: Decrement BL
Step 12: If BL is not equal to 0, jump to STEP1, else continue to the next step
Step 13: Set AH to 4CH
Step 14: Call interrupt 21H to terminate the program
Step 15: Stop
FLOWCHART:
CODING:
DATA SEGMENT
ARRAY DW 5000H,1240H,1130H,2020H,4510H
NUM DB 05H
ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START:
MOV DX,DATA
MOV DS,DX
MOV BL,05H
STEP1: LEA SI, ARRAY
MOV CX, 04H
STEP: MOV AX, [SI]
CMP AX, [SI+2]
JC DOWN
XCHG AX, [SI+2]
XCHG AX,[SI]
DOWN : ADD SI , 02H
LOOP STEP
DEC BL
JNZ STEP1
MOV AH, 4CH
INT 21H
CODE ENDS
END START

6.0 Actual Resources Used

S. No. Name of Specifications Qty Remarks


Resource/material
1 Hardware computer Computer (i3-i5 1 I3 Processor
system preferable),RAM
minimum 2 GB and
onwards
2 Operating system Windows XP/windows 1 Windows 7
7/linux version 5 or later

3 Software TASM 1.4 1 TASM 1.4


7.0 OUTPUT

8.0 Skills developed out of this project.


1. We learnt various instruction sets and to develop ALP and to solve problems based on it
2. We learnt new functions about 8086 and procedure and macros.
3. We understood the importance of working in team and listening to each other's ideas and views to
further improve our project and our knowledge.
4. We have also learnt to coordinate with the team members and support each other for successful
completion of the project.
5. We learnt to follow the deadlines and complete our work within specified time frame.

9.0 Applications of this Micro-Project


1. Solve problems using ALP
2. Develop more programs for different applications
3. Learn instruction set and architecture of 8086

TeacherSignature
Mrs Alka Prayagkar

Annexure - III

Suggested Rubric for Assessment of Micro-Project

(The marks may be allowed to the characteristics of the Micro Project by considering the suggested rubrics)
Poor Average Good Excellent
S. Characteristic to
No. be assessed ( Marks 1 - 3 ) ( Marks 4 - 5 ) ( Marks 6 - 8 ) ( Marks 9- 10 )
Relevance to the Relate to very Related to Take care of at-least Take care of more than
1
course few LOs some LOs one CO one CO
Not more than At-least 5 relevant
About 10 relevant
information two sources sources, at least 2 At –least 7 relevant
2 sources, most latest
collection very old latest sources, most latest
reference
Completion of
Completed Completed 50 Completed 60 to Completed more than
3 the Target as per
less than 50% to 60% 80% 80 %
project proposal
Sufficient and
Data neither appropriate Sufficient and
organized nor Enough data
Analysis of Data enough data appropriate enough
presented well collected and
4 and generated but not data generated
sufficient and
representation organized and not which is organized
presenting data.
presented well. and but not used.

Well assembled with


Quality of Just assembled and Well assembled and
proper functioning
Prototype/Model Incomplete some code is not functioning parts.
parts..
5 Programming functioning But no creativity in
Creativity in design
code well. design and use of
and use of graphics
graphics function
function
Nearly Detailed, correct
Report Very short, sufficient and and clear
Preparation Details about correct details Very detailed,
description of
methods, and about methods, and correct, clear
methods and
6 conclusions conclusion. but description of
Conclusions.
omitted, some clarity is not there methods, and
Sufficient Graphic
details are in presentation. conclusions.
Description.
wrong
Major Includes major
information is information but not Includes major Well organized,
not included, well organized and information and includes major
7 Presentation
information is not presented well well organized but information ,well
not well not presented well presented
organized .
Replied to
Could not reply
considerable
to Replied properly to Replied most of the
number of
8 Defense considerable considerable questions properly
questions but
number of number of question.
not very
question.
properly
Annexure – IV

Micro Project Evaluation Sheet

Name of Student:Rutu Bauva , Muskan Kateja , Aniket Nikam Enrollment No:2200040334-36

Name of Program: Computer Engineering Semester: Fourth

Course Title:MICROPROCESSOR Course Code: 22415

Title of the Micro-Project:Write an ALP to Program to sort the 16-bit array elements in ascending order
Roll No.16,17,18

Course Outcomes Addressed (Tick appropriate COs)


Course Outcomes Addressed
1. Analyze the functional block of the 8086 microprocessor. [✓]
2. Write an assembly language program for the given problem. [✓]
3. Use instructions for different addressing modes. [✓]
4. Develop an assembly language program using assembler. [✓]
5. Develop assembly language programs using procedures, macros [ ]
and modular programming approaches.

Sr. Characteristic to be Poor Average Good Excellent


No. assessed ( Marks 1-3) (Marks 4-5) (Marks 6-8) ( Mark 9-10)

(A)Process & product Assessment ( Convert above total marks out of 6 marks)
1 Relevance to the course
2 Information Collection
Completion of the Target as
3
per project proposal
Analysis of Data and
4
representation
5 Quality of Prototype/Model
6 Report Preparation
(B)Individual Presentation/ Viva
7 Presentation
8 Viva
GROUP MARKS SHEET

(A)Process
and Product (B)Individual Total
Roll Name of the students Marks
assessment Presentation/
No (6 marks) Viva(4 marks) (10 marks)

16 Rutu Bauva

17 Muskan Kateja

18 Aniket Nikam

Practical outcomes:

Prepare reports of the given type of events/episodes/incidents.

Outcomes in Affective Domain:

Function as team member.

Name and designation of the Faculty Member: Mrs. Alka Prayagkar

Signature: ___________________

You might also like