0% found this document useful (0 votes)
17 views6 pages

Micro Processors Project

The document outlines a microprocessor project that involves a program for performing basic arithmetic operations on three user-inputted numbers. It describes the code structure, including a menu system for selecting operations and separate functions for each calculation. The program handles invalid inputs and displays results for addition, subtraction, average, maximum, and minimum values.

Uploaded by

haidarrahmed9
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)
17 views6 pages

Micro Processors Project

The document outlines a microprocessor project that involves a program for performing basic arithmetic operations on three user-inputted numbers. It describes the code structure, including a menu system for selecting operations and separate functions for each calculation. The program handles invalid inputs and displays results for addition, subtraction, average, maximum, and minimum values.

Uploaded by

haidarrahmed9
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/ 6

Micro Processors Project

Haidar Al-lami – 202110618


Laith Al-Sbaihat - 202220611

Submitted to:
Dr. Mohammad Klaib

pg. 1
Explanation of the Code:

1. Creating a List for Input Data:


The program initializes an array (array) in the data section to store three
numbers input by the user. These numbers are used for various
operations.

2. Organizing Operations in a Loop:


The code implements a menu system that repeatedly displays a list of
operations (e.g., addition, subtraction, etc.).
The user selects an operation, and the corresponding action is executed.
If the user enters an invalid choice, an error message is displayed, and the
program prompts the user again within a loop (menu_loop).

3. Using Separate Functions (Classes Concept):


Each operation (e.g., addition, subtraction) is implemented as a separate
function, similar to classes in modern programming languages.
These functions are called using the jal instruction.
After performing the operation, the program displays the result.

4. Running the Code:


The program starts by asking the user to input three numbers.
The user selects an operation from the menu, and the program calculates
and displays the result.

pg. 2
Menu Input Testing:
Entering the three numbers:

Let’s choose an operation:

(1) Addition:

The result of addition is 24 as it’s shown above.

(2) Subtraction:

The result of subtraction is -10 as it’s shown above.

pg. 3
(3) Average:

The average is 8 as it’s shown above.

(4) Maximum:

The maximum number is 10 as it's shown above

(5) Minimum:

The minimum number is 7 as it's shown above

pg. 4
(6) Exit:

Not part of the menu options (1–6):

(8) ,Invalid Choice as it’s shown above.

pg. 5
pg. 6

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy