Question: Convert the following C++ program into an x86 assembly language program Comment the start of each code block that performs one of the listed
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= 7; int c = 11; int d = 13; // Code int main() { } a = -a; d = static_cast (b) + 17; b = static cast (a); c=static_cast (b); a = a - 3; d = static_cast (a); // 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; = 7; c = -(a + b +c + d) +a + b + c; d = a + b - c F da +b+c-da - a + b + a + d + 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
Step by Step Solution
3.49 Rating (152 Votes )
There are 3 Steps involved in it
section data a byte 5 char a 5 b short 7 short b 7 c int 11 int c 11 d int 13 int d 13 section text ... View full answer
Get step-by-step solutions from verified subject matter experts
