News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Registers

Started by Lonewolff, April 16, 2018, 07:00:09 PM

Previous topic - Next topic

Lonewolff

Hi Guys,

Which registers do not need to be preserved?

Thanks in advance  :biggrin:

jj2007


Lonewolff

Cool! Thanks for that.

Why is it that the other registers require preservation? What happens with them to make them different?

jj2007

The Windows APIs rely on their values, that's all. Take the WndProc, for example: It gets called a Million times by Windows itself, and Windows uses esi edi ebx ebp for various purposes. So the message is "use them if you like, but on return I want my pointers to xyz exactly as they were on entry!".

Lonewolff

Awesome explanation  :t

hutch--

If you look in the help file "asmintro.chm" you will find a section in the file called "Register Preservation Convention" which explains in detail how the Intel Application Binary Interface works.