You are on page 1of 3

CSE 331L / EEE 332L

Microprocessor Interfacing & Embedded System

Assignment 01
Section: 6, 7 & 8
Spring 2021
Total marks: 40 (20+10+10)

Instructions

1. You all have to solve all the tasks


2. Plagiarism will lead to negative grading
3. Late submission will cause a penalty. For every 5 minutes, 2 marks will be
deducted
4. Name the .asm files according to the task numbers (like: Task1.asm, Task2.asm)
5. Make a folder and copy the .asm files into this folder. Use your section number
and ID number as the name of the folder. For example: if your section number is 6
and ID is 2010466043, then name of the folder should be- "s6- 2010466043"
6. Zip the folder and submit the zipped folder in Google Classroom
7. Follow the input-output formats provided with the questions.
8. Failure to follow the above mentioned instructions will cause a penalty of 5
marks
Task 1:

1. Write a program that will prompt the user to enter a line of text (take input until
the user enters the character, “full stop” (.) ). You have to count the number of
uppercase and lowercase letters in that text.

Sample input-output:
Enter a text: Enter a text:
“One Hundred Years of Solitude” is Course name- Microprocessor Interfacing
a great book. & Embedded System Lab.

Uppercase: 4 Uppercase: 6
Lowercase: 33 Lowercase: 46

2. Write a program that will read a decimal number and the program will print the
following triangle pattern as below according to the inputs.

Sample input-outputs:
Number: 10 Number: 12
* *
** **
*** ***
**** ****
***** *****
****** ******
******* *******
******** ********
********* *********
********** **********
***********
************
3. Write a program in assembly language that will ask the user to input the lengths
of the three sides of a triangle and verify if the input sides can form a triangle.
Hint: The sum of any two sides of a triangle must be greater than the third side.
Follow the output format given below.

Example 1 Example 2

Enter the sides: Enter the sides:


45 12
10 45
12 37
Cannot form a triangle. Can form a triangle.

You might also like