Summation of Values in the Stack Assignment Description Write an assembly program that prompts the user to enter up to nine positive or negative values that are pushed to the memory stack or until a value of zero is entered by the user. Once nine values have been entered or the zero has been entered, the program will pop the values off from the stack and calculate a sum total of the values. The final value will be displayed once the stack is empty. The prompt for user input must include a count of which value you are entering. Note: This assignment must use a loop for the collection of values from the user and the push/pop stack operations for collection and summation of values to receive any credit. Assignment Executable AL3.exe Example Screen Capture For Two Cases DOS DOSBox 0.74-3, Cpu speed: 3000 cycles, Fram... Enter up to 9 values to be added together. Enter a 0 to exit collection at any time. Enter Value 1: 10 Enter Value 2: -20 Enter Value 3: 10 Enter Value 4: 55 Enter Value 5: -15 Enter Value 6: 60 Enter Value 7:0 Sum Total Equals: 130 C:N X DOSBox 0.74-3, Cpu speed: 3000 cycles, Fram... Enter up to 9 values to be added together. Enter a 0 to exit collection at anu time. X
Summation of Values in the Stack
Assignment Description
Write an assembly
Assignment Executable
AL3.exe
Example Screen Capture For Two Cases
DOS
DOSBox 0.74-3, Cpu speed:
3000 cycles, Fram...
Enter up to 9 values to be added together. Enter a 0 to exit collection at any time.
Enter Value 1: 10
Enter Value 2: -20
Enter Value 3: 10
Enter Value 4: 55
Enter Value 5: -15
Enter Value 6: 60
Enter Value 7:0
Sum Total Equals: 130
C:N
X
DOSBox 0.74-3, Cpu speed:
3000 cycles, Fram...
Enter up to 9 values to be added together.
Enter a 0 to exit collection at anu time.
X
Trending now
This is a popular solution!
Step by step
Solved in 3 steps