flat assembler
Message board for the users of flat assembler.

Index > Windows > registers modified by WinAPI (?)

Author
Thread Post new topic Reply to topic
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji 10 Aug 2010, 22:44

Which are the registers which are modified by the functions windows (API)?
Where can I find this information ? msdn ?
is this information 100% reliable ?

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 10 Aug 2010, 22:44
View user's profile Send private message Send e-mail Reply with quote
bitshifter



Joined: 04 Dec 2007
Posts: 796
Location: Massachusetts, USA
bitshifter 11 Aug 2010, 00:51
You must preserve ESI,EDI,EBX,EBP.
Others EAX,EDX,ECX are free to trash.
http://en.wikipedia.org/wiki/X86_calling_conventions#Intel_ABI
More links at the bottom...
Post 11 Aug 2010, 00:51
View user's profile Send private message Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler 11 Aug 2010, 05:05
IIRC, here's a thread somewhere in Windows that says some WinAPI functions thrash some regs they shouldn't. I'll look to see if I can find it.

Are you using 32 or 64 bit? 64's really hard, IMO.

There's a different convention for 64 bit API calls. It's on the page bitshifter provided.
Post 11 Aug 2010, 05:05
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1403
Location: Piraeus, Greece
Picnic 11 Aug 2010, 05:15
Similar discussion here: Winapi will affect register?
Post 11 Aug 2010, 05:15
View user's profile Send private message Visit poster's website Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji 11 Aug 2010, 06:17

thank you all,
but all this get me the feeling that there is no real certainty about it!

(Tyler : 32bits for me)

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 11 Aug 2010, 06:17
View user's profile Send private message Send e-mail Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler 11 Aug 2010, 06:21
It has to be very certain. Otherwise how do you think your browser's running? Think about how many calls to APIs it makes a second, but it remains uncrashed(I assume, since you posted.).

That thread I mentioned may be non existant. I found one where ManOfSteel challenged Pirata Derick(Sorry if I butchered your name.) to find a WinAPI that corrupts regs. He would've found it if one existed, I bet. Smile
Post 11 Aug 2010, 06:21
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 11 Aug 2010, 06:46
I've said somewhere that EnumThreadWindow (or whatever) clovered EBX or EDI in Win98SE, however when I've tried to reproduce the problem I couldn't so probably I was virused at that time without noticing it.
Post 11 Aug 2010, 06:46
View user's profile Send private message Reply with quote
Pirata Derek



Joined: 31 Oct 2008
Posts: 259
Location: Italy
Pirata Derek 23 May 2012, 14:05
Sorry for the very long delay, but i had more serius thing to do.

I'm sad for the group of people in this forum who think they are like divinity:

They think to have all the knowledge at all, so they act to be superior from all the other users...

They think they are authorized (from their own godness) to answer
in a bad manner, joking with all the others users considered "inferior"
by them....

But with all them knowledge, they can't understand they are only
poor illused men.

Great forums like FASM BOARD are always ruined by these little group of men.
When i understood this i went away from here pacefully.
Post 23 May 2012, 14:05
View user's profile Send private message Send e-mail Reply with quote
Pirata Derek



Joined: 31 Oct 2008
Posts: 259
Location: Italy
Pirata Derek 23 May 2012, 14:06
Casually i saw the upper post joke of Tyler and i wanted to answer for the last time.
Life teached me there're three ways to say concepts to people:

The first way is talking with them... like i did years ago.
The second way is explaining it cleary another time... like i'm doing now.

And i will explain that concept in a little strange polite way to this
group and specifically to 2 illused users in this wonderful board:

Offending people thought terminals is an easy way for cowards...
The Difference is only repeating it face to face.
Why don't you, Tiller (sorry if i butchered your name), and ManOfShit
(sorry if i butchered your idiot alias) both came to me, here in Rome at Quadraro neighbourhood.

I will "touch" your bones so you, Tiller, and the other "cabrĂ²n" ManOfShit
(I repeat i'm very sorry to butcher you idiot alias) will not be able to
use any keyboards to offend others users no more.

THIS IS THE THIRD WAY, when the last two ways didn't work.
Come here to me, or live in your illusions, poor men.
The other things are meaningless... simply i don't care.

Maybe your knowledge could save you from me, there... hahahahah
Post 23 May 2012, 14:06
View user's profile Send private message Send e-mail Reply with quote
Pirata Derek



Joined: 31 Oct 2008
Posts: 259
Location: Italy
Pirata Derek 23 May 2012, 14:06
P.S.

ManOfSteel was too busy to start and looking for the function
in "an" old version of windows (because i'll not say to you where) that corrupt
the outgoing ESI register when exiting in that function documented as STDCALL.

Probably for a bug. It happens when you execute it with one of bool parameter set to FALSE.
But microsoft corrected it on the seguent version and the poor ManOfSteel is unable to
verify that, because he is STEEEEEEL too busy.

Now i can return to my researches on cybernetics.
Post 23 May 2012, 14:06
View user's profile Send private message Send e-mail 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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.