From: Fabrice ILPONSE Newsgroups: comp.os.msdos.djgpp Subject: Re: Inline asm Date: Wed, 03 Dec 1997 11:05:38 +0100 Organization: Universites Paris VI/Paris VII - France Lines: 37 Message-ID: <34852EF2.D4F@trash.lip6.fr> References: <199712030539 DOT PAA16554 AT solwarra DOT gbrmpa DOT gov DOT au> NNTP-Posting-Host: asim.lip6.fr 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 Leath Muller wrote: > > Correct me if I am wrong, but if you have a piece of assembly in its own > subroutine: > > void whatever() > { > asm { > } > } > > then you don't have to push/pop any registers other than the stack/stack > frame ones (like ebp if you use it) as the subroutine has its own stack > frame anyway... > > Leathal. Hi! I'm not totally agree with that! You don't know, if you use gcc -O option how the registers would be assigned and used! Q: i usually writes long piece of assembly. So why is there such a limitation to the "%x" variables? "x" only goes from 0 to 9. So i have to cut my code into smaller peaces to be able to use more then 10 variables. In this case too, you must explicitly indicate the registers to push at the beginning of the first asm() and the pop at the end of the last one. -- ^ ^ ^ | | | +-+-+ Fabrice ILPONSE | | | -