QuestionQuestion

Convert this C++ program exactly as you see it into x86 assembly language:

#include <iostream>int value = 3;

void main()
{
int ecx = 10;
do
{
std::cout << value;
std::cout << ' ';
value += 3;
} while (--ecx != 0); std::cout << std::endl;
system("PAUSE");
}

Convert this C++ program exactly as you see it into x86 assembly language:

#include <iostream>

short array[] = { 8, 3, 1, 4, 9, 5, 7, 2, 6, 10 };
short * value = array;
short sum = 0;

void main()
{
int ecx = 5;
do
{
std::cout << '+';
std::cout << *value;
sum += *value;
++value;
std::cout << '-';
std::cout << *value;
sum -= *value;
++value;
} while (--ecx != 0);

std::cout << '=';
std::cout << sum;
std::cout << std::endl;

system("PAUSE");
}

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

INCLUDE Irvine32.inc

.data
value DD 3 ; int value = 3
.code
main PROC
mov ecx, 10 ; int ecx = 10
DO:
mov eax, [value]
call WriteDec ; std::cout << value

mov al, ' '
call WriteChar ; std...

By purchasing this solution you'll be able to access the following files:
Solution.pdf, prog1.asm and prog2.asm.

50% discount

Hours
Minutes
Seconds
$25.00 $12.50
for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Assembly Language Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats