flat assembler
Message board for the users of flat assembler.

Index > Windows > Register clobbering

Author
Thread Post new topic Reply to topic
Yeast



Joined: 26 May 2007
Posts: 2
Yeast
Hello, I'm using CRT, kernel32, and user32 functions, and I'm trying to figure out which registers get clobbered by these functions.

I searched around and couldn't find any information on the topic, so I did some tests and it looks like eax, ecx, and edx get clobbered, and ebx, esi, edi, and ebp keep their values after a function call. Is this correct?
Post 20 Dec 2008, 04:22
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17341
Location: In your JS exploiting you and your system
revolution
Correct.
Post 20 Dec 2008, 04:39
View user's profile Send private message Visit poster's website Reply with quote
Yeast



Joined: 26 May 2007
Posts: 2
Yeast
Cool, thanks for verifying.
Post 20 Dec 2008, 04:53
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17341
Location: In your JS exploiting you and your system
revolution
Just remember that CRT functions are CCALL and Windows API functions (with one exception) are STDCALL.
Post 20 Dec 2008, 04:57
View user's profile Send private message Visit poster's website 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. Also on YouTube, Twitter.

Website powered by rwasa.