Hi Guys,
Is there a list of what registers are available and what their general usage is?
I have worked out that EAX generally holds the return value of an 'invoke' call and EBX and EDX seem to work for general purpose use.
But I have found that if I attempt to use ECX for general use I get crashy behaviour going on.
Any advice is greatly appreciated :)
Download: http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html
Preserve ecx,
Push ecx
use ecx and do your stuff here.
pop ecx
Thanks again dude :)
My tips page (http://www.webalice.it/jj2006/Masm32_Tips_Tricks_and_Traps.htm) has a section on register usage. See in particular also the .if eax<0 part ;-)
Good read JJ. I'm learning a massive amount today.
(so much so, that I even started a little gamepad API and got my XBox 360 controller detected in MASM - I'll finish that one off tomorrow 8))