Question
Continue with the lab exercise, write a program that calculates the following expression:A = (A + B) (C + D). Define five (sum, valueA,valueB, valueC,valueD)
Continue with the lab exercise, write a program that calculates the following expression:A = (A + B) (C + D).
Define five (sum, valueA,valueB, valueC,valueD) 32-bit unsignedand, five (ssum,svalueA, svalueB,svalueC, svalueD) 32-bit signedinteger variables. Variable sum (ssum) will be assigned the result at the end of program.
- Case 1: valueA = 1000, valueB = 500, valueC = 450, valueD = 100
- Case 2: valueA = - 2000, valueB = 100, valueC = 1000, valueD = -500
- Case 3: valueA = 1000, valueB = 300, valueC = 2000, valueD = 500
Catch the screenshots from running in debugger mode to identify the values saved in each variable and register are correct after the end of the program. Also how a register represent a negative number, is it correct?
Generate a listing file for the program. Write a description (100~150 words) of the machine code bytes generated from two instructions. (you may open the listing file with any text editor.)
Lab Exercise Example
; AddTwo.asm - adds two 32-bit integers. ; Chapter 3 example
.386 .model flat,stdcall .stack 4096 ExitProcess proto,dwExitCode:dword
.code main proc mov eax,500 mov ebx,200 mov ecx,300
mov edx,400
add eax,ebx
add ecx,edx
sub eax,ecx
invoke ExitProcess,0 main endp end main
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