Mail Archives: djgpp/1998/05/15/05:17:35
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 -