Original Post
Hey,
I discovered how to do floating point assembly but there are a few things that I still don''t get or understand.
I know that the CPU has the interger processor and the floating processor but only the integer processor has registers that you can use like as if it was a variable. With float, I have to load something into the ST# stack (I think its better known as the floating point register) with the fld instruction.
I know the add, subtract, multiply and divide instructions (and how to return a value from ST0 back to the pointed memory location).
Here is something I don''t know how to do and I''m hoping you guys can help me out :
How can I put a constant into the ST# stack equasion without using a memory location. For instance, if I where to divide by 2 I had to do this :
float result = 4.0;
float two = 2.0;
__asm
{
fld dword ptr [result]
fdiv dword ptr [two]
fst dword ptr [result]
}
Another question :
How can I put values into ST# (# > 0) and still use that with ST0 in calculations (like put that 2 to divide with in ST1 and result = ST0/ST1).
Thanks
----------=Last Attacker=----------
ICQ: 120585863
E-mail: laextr@icqmail.com