In: Computer Science
code for the Intel x86 architecture (IA-32). Code solution using (AL_Template_Irvine32.asm) located at the bottom. Debug your programs with VS2017/19. Must have all commands for the program to execute and have single line or block comments explaining the purpose or functionality of your code statements. Make sure It assembles without errors or warnings.
Program – College Party Calculator:
Write a program that calculates the profit amount after students pay expenses for a college party. Prompt the user for each student contribution amount and store them in one array. Use a message to display the profit/loss to the console. The program shall be flexible enough for entering different quantities of students, contributions, and expenses. The program shall use one procedure other than main, that does all the calculations, receives expense, quantity of contributions, and contribution amounts in registers, and returns the profit in a register as well. Therefore, the program shall be capable of calculating profits for different qty. of students, contributions and expenses. Apply test case values to check if the program works correctly.
Test case 1:
Contributions: Student 1 = $99, student 2 = $55, student 3 = $77, student 4 = $105
Total party expense: $136
Profit: $+200
Test case 2:
Contributions: Student 1 = $25, student 2 = $75, student 3 = $33
Total party expense: $178
Profit: $ - 45
AL_Template_Irvine32.asm
; Program Description: Describe with a short paragraph what your
; program does and its purpose. Explain in general
; terms the expected inputs and output result.
INCLUDE Irvine32.inc ;Use Irvine32 library.
.const
;Declare constants here.
.data
;Declare variables here.
.code
main PROC
;Write your code here.
exit ;Exit program
main ENDP
;Procedures go here.
END main