Mail Archives: djgpp/1998/03/23/03:50:38
At 07:17 3/22/1998 +0100, F.X.Gruber-Museum-Arnsdorf wrote:
>Hi,
>
>i have a simple question about DJGPP's inline
>assembler:
>if i write
> int a;
>i can write "0" to "a" with the following:
> asm("mov $0,_a");
>if i have
> int a[10];
>how can i write "0" to a specific element
>of "a" ?
> asm("mov $0,_a[%eax]");
>doesn't work.
>how would i do this ?
>i know it must be something like ?_a(%eax,4)?
mov $0, _a(%%eax)
But beware of the `_a' paradigm! You'd be better advised to use the extended
asm features, since the underscore is not there on all systems or future
versions. GCC node "Extended Asm".
Nate Eldredge
eldredge AT ap DOT net
- Raw text -