www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/01/20:16:46

From: "John S. Fine" <johnfine AT erols DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: ASM - function: what should be pushed?
Date: Mon, 01 Feb 1999 20:02:50 -0500
Lines: 41
Message-ID: <36B64EBA.6D55@erols.com>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 990201085530 DOT 27193D AT is> <36B64AA2 DOT DDD7B659 AT cartsys DOT com>
Mime-Version: 1.0
X-Trace: OxNzvqs0F+9G4uM61DA6cCLMae238Wb+uoXX5wzTGxk=
X-Complaints-To: abuse AT rcn DOT com
NNTP-Posting-Date: 2 Feb 1999 01:04:05 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

Nate Eldredge wrote:
> 
> Eli Zaretskii wrote:
> >
> > On Sun, 31 Jan 1999, John S. Fine wrote:
> >
> > > > Is anything wrong with section 17.4?
> > >
> > >   DS, ES, FS, GS ??

> > Here's what section 17.4 says:
> >
> >   *A*: You can safely clobber EAX, ECX, and EDX, but must save and restore all
> >   other registers at the end of your assembly function.
> >
> > I think "all other registers" include DS, ES, FS, and everything
> > else.
> 
> In which case you might mention that the floating-point registers can be
> safely clobbered.

  I hate arguing with the experts, but I don't think
"all other registers" carries any useful information.
What's a "register"?  Does it mean the same thing to
me that it meant to whoever wrote the FAQ?

  I think EFLAGS is a register.  Do you think I need
to do pushf/popf around my code so I won't disturb
whatever the caller left in the C-bit (part of eflags)?
I know I don't need to, so I *know* my definition of
"all registers" differs from the FAQ author's definition
of "all registers";  But I still don't know his
definition.

  On FS and GS, I still hate doubting Eli, but can someone
make a stronger case one way or the other, rather than
leave us with "the FAQ seems to say preserve them and the
FAQ is probably correct".
-- 
http://www.erols.com/johnfine/
http://www.geocities.com/SiliconValley/Peaks/8600/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019