delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/07/20:21:07

Message-Id: <199710080016.KAA12039@rabble.uow.edu.au>
Subject: Re: Why not build in inline 80x86 assembly, like in borland C
To: eldredge AT ap DOT net (Nate Eldredge)
Date: Wed, 8 Oct 1997 10:16:52 +1000 (EST)
Cc: djgpp AT delorie DOT com (DJGPP)
In-Reply-To: <199710070151.SAA24341@adit.ap.net> from Nate Eldredge at "Oct 6, 97 06:51:19 pm"
From: Brett Porter <bporter AT rabble DOT uow DOT edu DOT au>
MIME-Version: 1.0

> >	I think that it would be nice to incorporate the Intel Sintax without
> >removing the support for At&T sintax. For example using asm_intel() keyword
> >for that matter and the normal asm() for At&T.
> >	This would help people porting diverse programs with inline intel assembly
> >sintax. I think that the Intel sintax is very important like the At&T
> >sintax, so it must be also supported.

> Unfortunately not possible. Inline asm is passed directly through to the
> assembler (after some simple substitutions by the compiler to deal with %
> operands). No assembler exists that can assemble both syntaxes (syntaces?),
> and only one assembler can be used on any one file, so it cannot be done.
> You have to use one or the other, and currently intel is not supported (and
> may never be).
> 

But surely the compiler can "compile" the Intel asm to AT&T format, the same
way it compiles the C++ source to AT&T code? The only thing would be that
the compilerw ould have to "guess" (or rather estimate) the size of operands
to change your mov's to movb, movw, movd, etc.

Of course, this means a DJGPP extension to GCC which has been classified a
"Bad Thing". Don't get me wrong, I'm quite happy to either learn AT&T
properly or use NASM (when I get down to the nitty-gritty, I'm still writing
the high level stuff for now), but I agree with the original poster that
this may not be such a bad idea if at all possible.

Just by 2 cents (of course I'll have to give you about 3.5 Australian cents
due to the exchange rate :)

Brett

-- 
"Give me ambiguity or give me something else"
--
Brett Porter
bporter AT rabble DOT uow DOT edu DOT au

http://www.geocities.com/CollegePark/Union/3596
	Humour, Programming, and more.

- Raw text -


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