Macro loads a 10 byte float number to a given variable. For beginners. For use in NASM:

%macro LoadFloatInt 2
jmp %%Continue1
%%Tmp1: DT %2
fld tword [%%Tmp1]
fstp tword [%1]

See how easy to load a floating point number to a variable at run-time!:cool:
Posted on 2002-06-04 08:14:05 by Wonder Mage
What is the purpose of using FINIT each time you load a TBYTE?
Posted on 2002-06-04 08:45:52 by bitRAKE
finit is used to initialize the fpu so that it could be ready for more operations. and other answers included. I am only a beginner to fpu and i need fpu and mmx tuts. please
Posted on 2002-06-04 08:56:24 by Wonder Mage
Wonder Mage, it should only be used when needed, certainly not in a macro, imo.
Posted on 2002-06-04 09:05:24 by bitRAKE
Agreed, its a VERY slow instruction.. I usually finit only once in an application or perhaps critical subroutines..

As well, bitRAKE suggested this link to be a while back.. its quite good:

Posted on 2002-06-04 12:49:04 by NaN
Thanks very much for the good information you game to me. I am now seeing and reading the webpages chain. If you know of any good directx tutorials for masm, than please inform me if possible.
Posted on 2002-06-05 08:03:06 by Wonder Mage
I agree with you nan. If we put this code in the right before the loop start. We could reserve more performance for us.:rolleyes:
Posted on 2002-06-13 07:33:51 by Wonder Mage