Mail Archives: djgpp/1997/12/04/18:16:16
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 -