This is a continuation of some work that Vortex did in This Thread for FASM. I in turn took it a bit further and made an import lib with masm. I dont have the C++ help that expains all the other functions in the crtdll.dll that is standard in window\system directorys. However, im giving you the definitions to modify and provide definitions for more of the common runtime functions that C++ provides in this dll.

Personally im only interested in the sprintf for its ability to handle floats as well as any other data type. So this is all im giving you. Besides an example of it working... However, i will happily answer any quesitons if you decided to build on it.

Enjoy..
:alright:
NaN
Posted on 2003-01-13 23:28:53 by NaN
Nice work! :alright:

One previous effort on the same thing is old MinGW32's library. However, based on Microsoft's position about ditching crtdll.dll and keeping it only for the compatibility with early versions of Win32, MinGW32 team moved on the msvcrt.dll for their libc. (I suppose that MinGW32 team contacted privately because I have not seen such comment myself.)

If you are going to develop this library further, old MinGW32 source will be of great help to you. (And, eventually, everyone here.) I remember it was not covered by GPL, so if they still keep the original license (which was close to public domain) everyone can benefit from it.
Posted on 2003-01-14 01:21:29 by Starless
NaN,

You prepared a nice example.:alright: Using the sprintf functions is a nice idea.
An easy way to explore the functions of C run-time dlls:

http://www.asmcommunity.net/board/showthread.php?s=&postid=71204.msg71204

Thanks Nan:alright:

Regards,

Vortex
Posted on 2003-01-14 02:51:05 by Vortex
I should do this myself, but I can't seem to make my own import lib so could I ask a favour NaN?

Would it be possible to also add the sscanf to this lib, its a nice counterpart to sprintf :) . No rush or anything, just whenever you've the time.
Posted on 2003-01-29 12:16:37 by Eóin
Surprised it worked on the first attempt ( the neocitrine makes your head fuzzy ;) )

Here is the repackaged lib/inc with a working test.exe (just as before). I named this v1.1 cause i get the feeling i will need to co-ordinate in the future if more requests come in.

The hard part is getting the parameter line right. (I had to use a google search for "sscanf" cause i dont like/have/program in C ). For any future requests you might have, simply give me the proto parameters for the function as well (thanx ;) )

Anywho here you go.
:alright:
NaN
Posted on 2003-01-29 21:53:29 by NaN
Nan,
Here is a c reference http://www.acm.uiuc.edu/webmonkeys/book/c_guide/ that might be useful.
If there is a big demand for standard c functions would it be advantageous to reimplement it as an assembly library?
Posted on 2003-01-29 22:49:32 by jInuQ
Thank you NaN, very helpful :alright: .
Posted on 2003-01-30 14:30:52 by Eóin
NaN: I don't think you need to write a crtdll.asm file, just a .def is enough. This produces a working lib for me:

lib /MACHINE:ix86 /def:crtdll.def

Thomas
Posted on 2003-01-30 14:40:53 by Thomas
Thank you for the tip Thomas, i didnt realize it could be done this easily (not that writing the asm was alot of work either ;) )

Thanx again!
:alright:
NaN

PS: so no-one like my 'boobless' trick :grin: , that was a real hit in grade3 ;)
Posted on 2003-01-30 21:57:30 by NaN