Question
Objectives: This exercise aims to give you practice with the floating-point unit and the stack. Description: Write a MASM program to perform the following tasks:
Objectives: This exercise aims to give you practice with the floating-point unit and the stack.
Description: Write a MASM program to perform the following tasks:
1. Display the program title and your name.
2. Then get the users name and greet the user.
3. Prompt the user to choose between integer or floating-point arithmetic.
4. Using a counted loop, prompt the user to give 5 integer or floating-point numbers based on the choice they did. Push the numbers into the integer or floating-point stack based on the choice they did.
5. Calculate and display the sum and the average of the numbers entered.
6. Ask the user if they want to perform another calculation or exit.
7. When the user chooses to exit the program, display a goodbye message that includes the users name and terminate the program.
Requirements:
1. The main procedure must be divided into the following sections: a. Introduction b. User instructions c. Get the data d. Calculate sum e. Calculate average f. Display numbers g. Choose between continue or exit h. Say goodbye
2. The loop that gets the numbers from the user should be implemented as counted loop.
3. The program should not use any variables to store the numbers. Everything should be done using the stack and registers should be used only for the operations.
4. All the requirements regarding documentation, readability, user-friendliness apply.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started