delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/04/18:16:16

From: Fabrice ILPONSE <fabrice AT trash DOT lip6 DOT fr>
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
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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
	  |	<fabrice AT asim DOT lip6 DOT fr>
	  |
	  |
	  -

- Raw text -


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