There are several routines in the C++ library to convert floating point values decimal.
I have been unable to access these from an assembly language program. Do these
routines exist in the assembly libraries?. In so what are they, if not does anybody know
how I can access the C++ library. I copied LIBC.C to my MASM32 directory. I tried to
raccess the routine _ecvt. I wrote a prototype & used an INCLUDELIB statement. The
assembler seemed to like my prototype, however the linker gave me an unresolved
external for _ecvt@16, I replaced my prototype/call to that & then received an unresolved
for _ecvt@16@16. Any help would be appreciated
Posted on 2003-11-25 14:40:00 by bobr_bak
Do you mean converting floating point values to and from strings? The masm32 libaray has functions to do that.
Posted on 2003-11-25 14:49:34 by Odyssey
Just in case you meant converting int->float and float->int...

int2float macro MyInteger:req,MyFloat:req
fild MyInteger
fstp MyFloat

float2int macro MyFloat:req,MyInteger:req
fld MyFloat
fistp MyInteger

You probably already knew that, in that case it's still useful for any newbies that happen to be reading this thread. :grin:
Posted on 2003-11-25 18:27:47 by QvasiModo
Have a look at the Fpulib functions available in the MASM32v8 package. If you don't have that package, you can get the latest revision of the Fpulib part (including the extensive help file) at the end of the following thread:

Posted on 2003-11-26 11:48:24 by Raymond