Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Code in C++ 86x Assembly Starting with the following C++ program: #include using namespace std; void main () { long Var1 = 6;l ong Var2

Code in C++ 86x Assembly

Starting with the following C++ program:

#include

using namespace std;

void main ()

{

long Var1 = 6;l

ong Var2 = 10;

long Var3 = 15;

long Var4 = 21;

long Var5 = 22

;long Sum;

long Result;

long Remainder;

const unsigned short c1 = 6;

const unsigned short c2 = 10;

const unsigned short c3 = 21;

const unsigned short c4 = 15

;const unsigned short c5 = 22;_

asm_

{

}

cout << "Sum is " << Sum << endl;

cout << "Result is " << Result << endl;

cout << "Remainder is " << Remainder << endl;

}

Inside the block denoted by the _asm keyword, perform the following math operations:

1) Add the values in variables Var1, Var2, Var3, Var4, and Var5. Place the sum into the variable Sum.

2) Calculate the result of the expression: (c1+c2)*(c3c4)/(c5+c1). Place the result into the variable Result and the remainder of the division into the variable Remainder.

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

The Structure Of The Relational Database Model

Authors: Jan Paredaens ,Paul De Bra ,Marc Gyssens ,Dirk Van Gucht

1st Edition

3642699588, 978-3642699580

Students also viewed these Databases questions