From: Vik Heyndrickx 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: <6jeij9$2dm$1 AT grissom DOT powerup DOT com DOT au> NNTP-Posting-Host: eduserv1.rug.ac.be Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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