Question: PLEASE DO IT IN MASM AND SHOT ME THE SCREENSHOT OF OUTPUT Implement the following C + + code fragment in assembly language. Use the

PLEASE DO IT IN MASM AND SHOT ME THE SCREENSHOT OF OUTPUT
Implement the following C++ code fragment in assembly language. Use the block structured .IF and .WHILE directives. Assume that all variables are 32-bit integers.
int array[]={3,1,4,1,5,9,2,6,5,3,5,8,9,7,9,3,2,3,8,4,6,2,6,4};
int lower =4;
int upper =8;
int ArraySize = sizeof array / sizeof lower;
int index =0;
int sum =0;
while( index ArraySize )
{
if( array[index]>= lower && array[index]= upper )
{
sum += array[index];
}
index++;
}
Your assembly language program must also display as output the number of
times a member of 'array' qualified for inclusion into the 'sum'(>= lower &&
= upper) and what the final value of the variable 'sum' was. (Hint: you
may have to add another variable.) You may use the author's procedures in the
book's link library. Use only the procedures that have been covered in the
textbook so far.
Sample output:
Qualified members: XX
Sum = XXYour assembly language program must also display as output the number of
times a member of 'array' qualified for inclusion into the 'sum' (>= lower &&
= upper) and what the final value of the variable ' sum' was. (Hint: you
may have to add another variable.) You may use the author's procedures in the
book's link library. Use only the procedures that have been covered in the
textbook so far.
Sample output:
Qualified members: xx
Sum =xx
PLEASE DO IT IN MASM AND SHOT ME THE SCREENSHOT

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!