I have a task - calculate 6 results of function (Y = (20 * x) /(5 * x2 – 8,5)) the x - start from 1 and each calculation must increas by 4 (1, 5, 9 ..).
I write some code but i dont understand how to made loop and put data to array. All operation must be on asm - loop and put to array, 1 iteration - 1 element in array
There is my code:
int main()
{
float REZ[6];
int x = 1;
int A =5;
int B=20;
float C = 8.5;
int D =2000;
int increment = 4;
float part;
float val;
_asm{
finit
fild x
fimul x
fimul A
fsub C
fstp part
fild D
fimul x
fdiv part
fstp val
}
}