cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/23/03:50:38

Date: Sun, 22 Mar 1998 21:54:26 -0800 (PST)
Message-Id: <199803230554.VAA24604@adit.ap.net>
Mime-Version: 1.0
To: "F.X.Gruber-Museum-Arnsdorf" <f DOT x DOT gruber-museum-arnsdorf AT magnet DOT at>,
djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: inline asm

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 -


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