Write a program that implements the following arithmetic expression: EAX = -val2
ID: 3613745 • Letter: W
Question
Write a program that implements the followingarithmetic expression:
EAX = -val2 + 7 - val3 + val1 where val1 = 4, val2 = 8, and val3 = 7
In comments next to each instruction, write the hexadecimalvalue
of EAX. Insert a call DumpRegs statement at the end of theprogram. Write a program that implements the following
arithmetic expression:
EAX = -val2 + 7 - val3 + val1 where val1 = 4, val2 = 8, and val3 = 7
In comments next to each instruction, write the hexadecimalvalue
of EAX. Insert a call DumpRegs statement at the end of theprogram.
Explanation / Answer
mov val1, 4 mov val2, 8 mov val3,7 sub EAX, val2add EAX, 7 sub EAX,val3 add EAX,val1
add EAX, 7 sub EAX,val3 add EAX,val1
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.