Question: Write a small program that implements the following C++ code in assembly language. int array[] = { 1, 6, 2, 3, 7, 8, 4, 9,
Write a small program that implements the following C++ code in assembly language.
int array[] = { 1, 6, 2, 3, 7, 8, 4, 9, 5, 10 };
int sample = 6;
int arraySize = sizeof(array) / sizeof(sample);
int index = 0;
int sum = 0;
while( index < arraySize)
{
if(array[index] <= sample )
{
sum += array[index];
}
++index;
}
Please use Irvine32.inc in microprocessor assembly language for Intel x86 processor.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
