Date: Sun, 22 Mar 1998 21:54:26 -0800 (PST) Message-Id: <199803230554.VAA24604@adit.ap.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: "F.X.Gruber-Museum-Arnsdorf" , djgpp AT delorie DOT com From: Nate Eldredge Subject: Re: inline asm Precedence: bulk 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