Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Convert this C++ code below into assembly language: // Global variables short a = 5; short b = 6; short c = 7; short d

Convert this C++ code below into assembly language:

// Global variables short a = 5; short b = 6; short c = 7; short d = 8; short e; short f; short g; short h; // Code int main() { ++d; --c; b = a + 2; a = d + 9; e = a + b - c - d; f = -c; g = f + e; h = -b - c + a; (use these comments below to match it with the assembly language line for the C++ code block above) // 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 // Move e into the eax register // Move f into the ebx register // Move g into the ecx register // Move h into the edx register // Call the DumpRegs function --h; g = g + 6; f = 16; e = -g - f; d = 5 - e; c = -c; b = c + e - h; a = -b + c - d;

(use these comments below to match it with the assembly language line for the C++ code block above) // 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 // Move e into the eax register // Move f into the ebx register // Move g into the ecx register // Move h into the edx register // Call the DumpRegs function // Call the WaitMsg function }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Handbook Of Database Security Applications And Trends

Authors: Michael Gertz, Sushil Jajodia

1st Edition

1441943056, 978-1441943057

More Books

Students also viewed these Databases questions

Question

Create a Fishbone diagram with the problem being coal "mine safety

Answered: 1 week ago