Question
(8 points) Write an assembly program that clears the screen, locates the cursor near the middle of the screen, prompts the user to enter three
(8 points) Write an assembly program that clears the screen, locates the cursor near the middle of the screen, prompts the user to enter three signed integers:
Enter Signed Integer:
- Assign those values to val2, val3, and val4. - val1, val2, val3 and val4 are 32-bit memory signed integers
- Pass those values to a subroutine that implements the following expression: val1 = (val2 - val3) * (val4 / val2) - (val3 * 3) - To access the values in the caller frame, use EBP (remember EBP is created at the callee side). - The calculated expression result needs to be assigned to val1 at the caller side. - The calculated expression result needs to be displayed on console screen from main subroutine. - Name the subroutine IntegerArithmeticProc. - When calling or creating the IntegerArithmeticProc subroutine, you are not allowed to use any of the following directives: invoke, addr, proc with lists, and proto or proto with lists - Use the appropriate multiplication and division instructions. - Use the CBW, CWD, or CDQ instructions when needed. - For (val4 * 3), you must use the mul two operands format. - Run your program using the debugger to verify your answers.
? Use Step Into instead of Step Over to keep track of the stack, ESP, EBP, EIP during debugging. ? To access the stack memory, copy the value of ESP from the register window and past it in the search text box in the memory window.
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