delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/03/18/21:35:05

Sender: nate AT cartsys DOT com
Message-ID: <36F1A74B.2B7CEEB@cartsys.com>
Date: Thu, 18 Mar 1999 17:24:27 -0800
From: Nate Eldredge <nate AT cartsys DOT com>
X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.2.3 i586)
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: Some assembly questions
References: <199903170746 DOT IAA06061 AT login-2 DOT eunet DOT no>
Reply-To: djgpp AT delorie DOT com

Gisle Vanem wrote:
> 
> ams AT ludd DOT luth DOT se (Martin Str|mberg) said:
> 
> > How do I set or clear the carry flag? I _think_ "andl %%eax, %%eax"
> > clears it (and "orl %%eax, %%eax" too).
> 
> How about "setc" and "clc" ?
> 
> > How do I inhibit the gcc generated pre- and postlude to c functions?
> 
> Use the gcc flag '-fomit-frame-pointer'.

Alternatively, if you want to leave GCC out of the function entirely,
you can use `asm' at the top level.  For instance:

static int bar(void);

asm("_bar: movl $42, %eax; ret");


-- 

Nate Eldredge
nate AT cartsys DOT com

- Raw text -


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