Question: please convert the nested for - loop into the inline assembly version. You should copy the following code and write your code in asm volatile

please convert the nested for-loop into the inline
assembly version. You should copy the following code and write your code in asm volatile(). Note that the
entire nested for-loop should be converted into the inline assembly code in this exercise.
#include
int main()
{
int f, i =0;
int h[9]={0}, x[6]={0}, y[6]={0};
FILE *input = fopen("../input/4.txt","r");
for(i =0; i <9; i++) fscanf(input,"%d", &h[i]);
for(i =0; i <6; i++) fscanf(input,"%d", &x[i]);
for(i =0; i <6; i++) fscanf(input,"%d", &y[i]);
fclose(input);
int *p_x = &x[0];
int *p_h = &h[0];
int *p_y = &y[0];
asm volatile(/*Your Code*/);
p_y = &y[0];
for(i =0; i <6; i++) printf("%d ",*p_y++);
printf("
");
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 Accounting Questions!