Mail Archives: djgpp/1997/10/11/19:55:32
At 12:27 10/10/1997 GMT, Newbie wrote:
>I just found out I can't make reference to any local variable using in-line
>assembler with Rhide 1.4.
>Is this a restriction of Rhide per say, or it's universal for all DJGPP
>compilers.
>Is there any way around this shorting of changing those variables to glabal?
It is universal for all compilers. You can use GCC's inline asm constraints,
see `info gcc "C Extensions" "Extended Asm"'. These will give you the
address of the variable. For instance:
int add_four(int x)
{
asm("addl $4,%0" : "=g" (x) : "g" (x));
return x;
}
Nate Eldredge
eldredge AT ap DOT net
- Raw text -