From: "John S. Fine" Newsgroups: comp.os.msdos.djgpp Subject: Re: ASM - function: what should be pushed? Date: Sun, 31 Jan 1999 13:27:49 -0500 Lines: 20 Message-ID: <36B4A0A5.585D@erols.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: cuEfDITY+aJWKKsjO/8xRG2syQelhd9JisDLFMTonzI= X-Complaints-To: abuse AT rcn DOT com NNTP-Posting-Date: 31 Jan 1999 18:29:03 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 Eli Zaretskii wrote: > Is anything wrong with section 17.4? DS, ES, FS, GS ?? I would also mention EBP. Never underestimate a programmer's tendancy to jump in without the expected background knowledge. I am nearly certain that a routine called from C must preserve DS, and ES. I *think* it may clobber FS and GS. It is probably to obvious to deserve mention, but it must preserve CS and SS as well and must follow normal subroutine return conventions regarding ESP and EIP. You might even mention the direction bit in EFLAGS (It can be clobbered, right?). -- http://www.erols.com/johnfine/ http://www.geocities.com/SiliconValley/Peaks/8600/