A library I’ve made in masm (something like masm32.lib, fpu.lib)

Started by GODlike, January 05, 2006, 03:03:40 PM

Previous topic - Next topic

GODlike

I have build a library in masm with general use funcs. I've tried to make them as optimized as possible. If you like give 'em a look and post your feedback.

More info: www.ancientritual.com
download: http://www.freewebs.com/ancientritual/files/glib.zip

From readme:
Info: The glib is a library with general-use functions written entirely in assembly. Some of them
(if not all) are extremely optimized (fast). The speed isn't noticeable; they're fast only for some milliseconds.
So why the buzz for some millisecs then??? Just for the joy of creation. Enjoy!!

The version 2.0: After gaining some skills in assembly and after reading the Intel's optimization guide I've decided
to REWRITE ALL THE FUNCS. The result is even faster!! gPrintf for example is 26% faster than the old one and
29% faster than the VC++6 printf (release)


The funcs:
//string funcs
int    _stdcall gStrlen      (char* pc);
int    _stdcall gStrcpy      (char* dest, char* src);
int    _stdcall gStrcat      (char* dest, char* src);

//misc funcs
void   _stdcall gMemcopy     (void* dest, void* src, int size);
void   _cdecl   gPrintf      (char* pcFormat, ...);
int    _stdcall gStdOut      (char* pc);
int    _stdcall gfGetLine    (HANDLE hFile, char* pcDest, char cDelim);

//convertions funcs
int    _stdcall gIntToStr    (char* pcDest, int num);
int    _stdcall gUIntToStr   (char* pcDest, int num);
int    _stdcall gIntToStrHex (char* pcDest, int num);
int    _stdcall gDoubleToStr (char* pcDest, double dbl);

int    _stdcall gStrToInt    (char* str);
int    _stdcall gStrToIntHex (char* str);
double _stdcall gStrToDouble (char* str);


ecube

Anyone have this? download isn't working, would much appreciate it, thanks.

sinsi

I used right-click, save target as... on http://www.freewebs.com/ancientritual/files/glib.zip

The routines don't seem to be too optimised - some routines use DIV and SCASB, which I thought were slow (but I am NOT good with
optimisation, so feel free to ignore my assumptions).
Light travels faster than sound, that's why some people seem bright until you hear them.

ecube

Thanks a lot I tried right clicking and saving with firefox 1.5 but when I do neither winar nor winzip will unzip it, say damaged archive, but saving with IE they do. Also gonna speed test these and upload code and results, in the morning, 5:30 am here now heh.

Ehtyar

Indeed, somehow the link seems to take a Firefox user right back to this thread...not sure how. Anyway, by copying a pasting the link i have the archive (un-corrupted), it is attached for those who have trouble following the freewebs link. Nice work from the looks of it, thanks GODlike!

Ehtyar.

[edit]
Wow, just realized how oooold this post is. seems http://www.ancientritual.com/ has expired since this post was made, I'm astounded that freewebs link still works...
[/edit]

[attachment deleted by admin]