-masm=intel examples

Marek Peteraj marpet@naex.sk
Sat May 15 10:00:00 GMT 2004


On Sat, 2004-05-15 at 11:46, Robert Dewar wrote:
> Marek Peteraj wrote:
> 
> > Hi,
> > 
> > i'm trying to find out which syntax exactly gcc accepts with the
> > -masm=intel switch. I've googled for examples, grepped through
> > sourcecode files, but i haven't found any good example. Could anyone
> > provide a very simple -masm=intel .c example, which would move a hex
> > value into a register, using the intel/masm style assembler instead of
> > at&t/gas one?
> 
> Is there any reason to think that the syntax accepted is other
> than the standard Intel syntax, as documented in the relevant
> Intel manuals? 

There isn't but the following for example won't work:

_asm {
   	  pushad
          mov eax, 0 
	  popad         
     }; 

Marek




More information about the Gcc mailing list