I am having trouble converting a floating point array into a logical 2-d array. I know its a number times the width plus the height but i am having trouble with the fpu register instructions for the stack. Can someone show me how to properly add and multiply floating point values i am new to floating point instructions and dont understand the fpu ST(0), ST(1) stack and how numbers are added or multiplied on the stack. Here is what i have, all three are real8 variables i created.
Then after these instructions, where is the float stored ST(0)?
you load 'randomFloat' into st0 then you conceptually load 'arrayWidth' into st1. st1 is then multiplied by st0 and the result is stored in st0. you then conceptually load 'arrayHeight' into st1 and add it with st0 then store the result in st0. so what did looks right to me
this said, why are you trying to use floating point to index elements of an array? you should be using integers for that, something more like...
mov eax, randomIndex
mul eax, arrayWidth
add eax, arrayHeight