Sender: nate AT cartsys DOT com Message-ID: <36B3C8B1.8665F181@cartsys.com> Date: Sat, 30 Jan 1999 19:06:25 -0800 From: Nate Eldredge X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.0.36 i586) MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: ASM - function: what should be pushed? References: <36b31ff4 DOT 0 AT news DOT zeitung-online DOT net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Florian Janoschek wrote: > > Hello everyone! > > Could someone please tell me, which registers an assembly language function, > that is called by djgpp, should push and which needn't to be pushed. (Of > course, I know that I have to push only the registers, which I'm going to > use...) Does this differ, if the function takes any arguments or has a > return value? (Should this be an FAQ?) You have to save ebx, esi, edi, ebp, ds and es. Args are passed on the stack and so this has no effect on the registers used. The return value goes in eax, if there is one; otherwise you can clobber it. -- Nate Eldredge nate AT cartsys DOT com