Page 1 of 1

QUESTION 2 Convert the following C++ program into an x86 assembly language program. Comment the start of each "code bloc

Posted: Tue Jul 05, 2022 10:25 am
by answerhappygod
Question 2 Convert The Following C Program Into An X86 Assembly Language Program Comment The Start Of Each Code Bloc 1
Question 2 Convert The Following C Program Into An X86 Assembly Language Program Comment The Start Of Each Code Bloc 1 (72.58 KiB) Viewed 9 times
QUESTION 2 Convert the following C++ program into an x86 assembly language program. Comment the start of each "code block" that performs one of the listed mathematical calculations. Comments go to the right of the actual code, all starting on the same column. Post ONLY your ASM file here to Blackboard when complete. // Global variables. char a = 5; short b int c = 11; int d = 13; // Code int main() { āŠĪ = -a; d b = static_cast<short> (a); c=static_cast<int> (b); a = a 3; d = static_cast<int> (a); static_cast<int> (b) + 17; // Move a into the eax register // Move b into the ebx register // Move c into the ecx register // Move d into the edx register // Call the DumpRegs function a = 19; b = 108; C = 77; d = 7; c = (a + b + c + d) + a + b + c; d = a + b c d = a + b + c // Move a into the eax register // Move b into the ebx register // Move c into the ecx register // Move d into the edx register // Call the DumpRegs function // Call the WaitMsg function } Attach File Browse Local Files d - a - a + b + a + d + c;