flat assembler
Message board for the users of flat assembler.

Index > Windows > stdcall functions

Author
Thread Post new topic Reply to topic
asmrox



Joined: 19 Jan 2008
Posts: 160
asmrox
i just fount thers strstr in ntdll.
as well as sprintf, strcpy and rest *crt functions.

But there are also equivalents: memset -> RtlFillMemory, and rest of Rtl's

but string functions are still cdecl =(
Can i find then somewere in stdcall version?
Post 01 May 2008, 15:36
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17270
Location: In your JS exploiting you and your system
revolution
kernel32.dll has the string functions, all but wsprintf are stdcall. And the best part is they are documented, so no need to go messing with unknown interfaces.
Post 01 May 2008, 15:49
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
or you can try fasmlib.x86asm.net for more ASMy interface (stdcall even for vararg functions, for example)
Post 01 May 2008, 16:53
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
asmrox



Joined: 19 Jan 2008
Posts: 160
asmrox
vid, i can write all functions myself, point of calling memset, strstr, etc is to make my code smaller. Adding external lib will make it huge!
Post 01 May 2008, 17:02
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
okay then... what for do you want so small code? just as excercise?
Post 01 May 2008, 17:06
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
asmrox



Joined: 19 Jan 2008
Posts: 160
asmrox
small, faster = better.
also better knowleadge, im gona write my own os, in future...

and better cash if i write something for $

many ppl write programs just hoping it will work, i dont want be like everyone. work - fine, no bugs, small and fast = excellent.
Post 01 May 2008, 17:38
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
Quote:
small, faster = better.

20KB doesn't make difference.
Post 01 May 2008, 17:56
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
asmrox



Joined: 19 Jan 2008
Posts: 160
asmrox
20kb isnt much?!
im counting every single byte to avoid off-by-one, it may be irritating to remember that [ebp+322] is pointer to structure, [ebp+24]...[ebp+56] are socket descriptors and [ebp] is buffer wich has only 24 bytes, esi = buffer [ebp+60] and ebx is open process handle. But only at begginning, day by day its easier, and after few months you count it automaticly, its fun!
Post 01 May 2008, 18:45
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
extra 20KB doesn't make your code noticeably slower, so your argumentation doesn't apply.
Post 02 May 2008, 08:07
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.