Question

In: Computer Science

code for the Intel x86 architecture (IA-32). Code solution using (AL_Template_Irvine32.asm) located at the bottom. Debug...

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

Solutions

Expert Solution


Related Solutions

Please code in Assembly Language Code solution using the provided template AL_Template_Irvine32.asm located towards the bottom...
Please code in Assembly Language Code solution using the provided template AL_Template_Irvine32.asm located towards the bottom of the question.. Debug programs with Visual Studio2017/19. Please add single line or block comments explaining the purpose or functionality of your code statements. 10.) Fibonacci Generator Write a procedure that produces N values in the Fibonacci number series and stores them in an array of doubleword. Input parameters should be a pointer to an array of doubleword, a counter of the number of...
Using x86 assembly language, create a flowchart and write an example of code that will sort...
Using x86 assembly language, create a flowchart and write an example of code that will sort 2 arrays of unsigned doubleword integers in ascending order and output the largest element in each array. Any sorting procedure can be used, but this procedure must be called twice for each array. The first time it is called, the first array should be sorted and the second time it is called, the second array must be sorted. As well as outputting which is...
Design a 32 bit after using a single 4 bit using verilog code
Design a 32 bit after using a single 4 bit using verilog code
Design a 32 bit adder using a single 4 bit adder using verilog code
Design a 32 bit adder using a single 4 bit adder using verilog code
Using the four step (viz., analyze the problem, develop a solution, code the solution, test the...
Using the four step (viz., analyze the problem, develop a solution, code the solution, test the program) program development method, write a C++ program that permits users to enter the following information about your small company’s 5 employees and then writes the information to a file “employee.txt”: ID No. Sex (M/F) Hourly Wage Years with the Company Make sure that you open the file for write using the two-step process of “trial read followed by write” so that an existing...
Assume that we are executing the following code on a 32-bit machine using two’s complement arithmetic...
Assume that we are executing the following code on a 32-bit machine using two’s complement arithmetic for signed integers. Which of the following will be printed when the following code is executed (circle those printed, and show work; e.g., how the values are stored): #include <stdio.h> int main() { char x = 0xF;                // x = ________ char y = -1;                 // y = ________ unsigned char z = 0xFF;      // z = 11111111        if (x<z)     printf("performed unsigned compare,...
verilog code to implement 32 bit Floating Point Adder in Verilog using IEEE 754 floating point...
verilog code to implement 32 bit Floating Point Adder in Verilog using IEEE 754 floating point representation.
I need matlab code for solution to the optimal power flow using artificial Ant Colony algorithm
I need matlab code for solution to the optimal power flow using artificial Ant Colony algorithm
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT