View Single Post
Old Mar 30th, 2008, 6:25 PM   #2
Klarre
Game engine designer
 
Klarre's Avatar
 
Join Date: May 2005
Location: Sweden
Posts: 314
Rep Power: 4 Klarre is on a distinguished road
Re: Masm32 adding two floats

Try something like this.
fld float1; Loads the first float on the float stack
fadd float2 ; Adds the second float with the first one on the float stack
fidiv numOfFloats ; Divides the added floats with the number of floats you want. In this case 2.
fstp myAnswear ; Stores the result in myAnswear and pops the float stack
__________________
http://www.klarre.se
Klarre is online now   Reply With Quote