delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/04/09:49:54

Date: Wed, 4 Mar 1998 16:48:31 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "CD (CeDric)" <i2a03e08 AT ensinfo DOT univ-nantes DOT fr>
cc: djgpp AT delorie DOT com
Subject: Re: Problems with inline asm!?
In-Reply-To: <Pine.OSF.3.95.980304135930.9125A-100000@dec1>
Message-ID: <Pine.SUN.3.91.980304164404.7496B-100000@is>
MIME-Version: 1.0

On Wed, 4 Mar 1998, CD (CeDric) wrote:

> 	asm("lea ax,[eax+eax*4]");
> 
> or this one :
> 
> 	asm("move [es:di],al");
> 
> I got some errors because of the "[" which is not recognize by GCC (I
> think) so please help me 'cause I don't know what to do, my hair is
> falling down, I become nervous an my cat doesn't want to talk to me
> anymore...

You are trying to use the Intel assembly syntax with GCC.  This will never
work, as the syntax accepted by Gas, the GNU Assembler which GCC invokes,
is different.  The differences are outlined in section 17.1 of the DJGPP
FAQ list, which also includes pointers to more full documentation of the
Gas syntax.  Please read there, and you will save yourself hours of grief. 

The latest version of the DJGPP FAQ list is available as v2/faq210b.zip 
from the same place you get DJGPP.

- Raw text -


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