Question: Homework 3 Integer and Floating Point Arithmetic Using the Stack Objectives: This exercise aims to give you practice with the floating-point unit and the stack.

 Homework 3 Integer and Floating Point Arithmetic Using the Stack Objectives:

Homework 3 Integer and Floating Point Arithmetic Using the Stack 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 user's 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 user's 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!