Question: convert this c + + code into x 8 6 masm assembly code using Irvine Library. #include using namespace std; / / Use x 8

convert this c++ code into x86 masm assembly code using Irvine Library.
#include
using namespace std;
// Use x86 processor CPU registers instead of the variables listed here
int eax, ebx, ecx, edx, esi, edi, ebp, esp;
// NOTE: Each x86 assembly language function must return in one place only
// NOTE: Global variables are not function parameters and must not be used as such
int Transformation(int eax, int ebx)
{
if (eax >=100)
return 100;
else if (eax <0)
return 0;
else
return eax + ebx -50;
}
int main()
{
std::cout << "How many iterations to process...? ";
std::cin >> ecx;
std::cout << "Never mind... You're going to have 3 and like it!";
std::cout << std::endl;
ecx =3;
do
{
std::cout << "LOOP ITERATION ";
std::cout <<(4- ecx);
std::cout << std::endl;
std::cout << "Enter ebx: ";
std::cin >> ebx;
std::cout << "Enter eax: ";
std::cin >> eax;
eax = Transformation(eax, ebx);
std::cout << "The result of the transformation is: ";
std::cout << eax;
std::cout << std::endl;
} while (--ecx !=0);
std::cout << "Thank you for using this program!";
std::cout << std::endl;
system("pause");
return 0;
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!