From: "John S. Fine" Newsgroups: comp.os.msdos.djgpp Subject: Re: ASM - function: what should be pushed? Date: Tue, 02 Feb 1999 15:45:47 -0500 Lines: 25 Message-ID: <36B763FB.66C8@erols.com> References: <36B64AA2 DOT DDD7B659 AT cartsys DOT com> <36B64EBA DOT 6D55 AT erols DOT com> <199902020148 DOT UAA06492 AT envy DOT delorie DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: gys1ZFKlAKkl7D9V+91aXwD3WWMY6i2JoczchEOtZ+U= X-Complaints-To: abuse AT rcn DOT com NNTP-Posting-Date: 2 Feb 1999 20:46:59 GMT X-Mailer: Mozilla 3.01 (Win95; U) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com DJ Delorie wrote: > OK, here it is from the horse's mouth (the gcc/libc sources). Let me > know if I missed any. > > ax,cx,dx,sp,st0-7,sw,cw - can be used without saving sp? Well we all know esp is its own special case and its behavior in standard "C" calling conventions is clear. I find it strange that you would class it with ax,cx,dx. > bx,si,di,bp - must be preserved > cs,ds,es,ss - must be preserved > ip - you don't much choice about this one > fs - reserved for application use; neither gcc nor libc use this > gs - used by libc, but need not be preserved if you change it "used by libc": Used and preserved? or Used and not preserved? (either way I understand you are saying an ASM called by C code doesn't need to preserve it; But it makes a difference). -- http://www.erols.com/johnfine/ http://www.geocities.com/SiliconValley/Peaks/8600/