Question: Using the AddTwo program from Section 3 . 2 as a reference, write a program that calculates the following expression, using the general purpose registers
Using the AddTwo program from Section as a reference, write a program that calculates the following expression, using the general purpose registers of the architecture:
EAxEBxEDx
Of course, you want to assign integer values to the EAX, EBX, ECX, and EDX registers before you evaluate the expression. Use the following values: EAxEBxECx and EDX to test your program.
Insert a call DumpRegs statement to display the register values as shown in the program AddTwo.
Note: The routine DumpRegs is available in a library of routines provided by the author of the textbook, K Irvine. Your code should be linked to it through Visual Studio. Review Section
Below is the AddTwo program referenced in the first question given in Section :
; AddTwo.asm adds two bit integers
; Chapter example
model flat,stdcall
stack
ExitProcess PROTO, dwExitCode:DWORD
DumpRegs PROTO
code
main PROC
mov eax, ; move the eax register
add eax, ; add to the eax register
call DumpRegs
INVOKE ExitProcess,
main ENDP
END main
PLEASE USE C
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
