delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/15/05:17:35

From: Vik Heyndrickx <Vik DOT Heyndrickx AT rug DOT ac DOT be>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Inline assembly in djgpp
Date: Fri, 15 May 1998 11:09:30 +0200
Organization: University of Ghent, Belgium
Lines: 32
Message-ID: <355C064A.3BCB@rug.ac.be>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 980514112155 DOT 287L-100000 AT is> <6jeij9$2dm$1 AT grissom DOT powerup DOT com DOT au>
NNTP-Posting-Host: eduserv1.rug.ac.be
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Herman Schoenfeld wrote:
> 
> >> Is there any possible way to use variable names in inline assembly?
> >
> >But of course!  That's one of the main features of GCC's inline
> assembly.
> 
> Yeah, that's what they all say. So far it's nothing but an obsolete
> implementation of a semi-functional assembler. I'd much prefer watcoms
> #pragma aux, or borlands simple inline asm. It would be nice if djgpp
> brought public register variables that could be easily changed (like in
> borland).

If you would read the docs first before making statements like ``an
obsolete implementation of a semi-functional assembler'' then you would
discover that there is much more to it than it may at first seem. It is
a very advanced (and easy once you know it) interface between a HLL and
machine code which allows for compiler optimizations within the assembly
source. And yes you can use external (global) symbols but please read
the documentation since it's usage is far too extended to explain that
here.
And there is abcolutely nothing that prevents you from writting an
assembler routine in pure asm if you don't want to give in to the
feeling not to use the inline asm. However, I assure you, when you know
it, you will be pleased that you know it.

Have a nice day.

-- 
 \ Vik /-_-_-_-_-_-_/
  \___/ Heyndrickx /
   \ /-_-_-_-_-_-_/  Knight in the Order of the Unsigned Types

- Raw text -


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