Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sourceware.cygnus.com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin@sourceware.cygnus.com>
List-Help: <mailto:cygwin-help@sourceware.cygnus.com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner@sourceware.cygnus.com
Delivered-To: mailing list cygwin@sourceware.cygnus.com
From: Chris Faylor <cgf@cygnus.com>
Date: Mon, 20 Mar 2000 11:15:08 -0500
To: cygwin@sourceware.cygnus.com
Subject: Re: integrated asm and vars
Message-ID: <20000320111508.B21708@cygnus.com>
Reply-To: cygwin@sourceware.cygnus.com
Mail-Followup-To: cgf@cygnus.com, cygwin@sourceware.cygnus.com
References: <20000320122537.2645.qmail@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
User-Agent: Mutt/1.1.8i
In-Reply-To: <20000320122537.2645.qmail@hotmail.com>; from gruenschloss@hotmail.com on Mon, Mar 20, 2000 at 01:25:37PM +0100

On Mon, Mar 20, 2000 at 01:25:37PM +0100, Leonhard Grünschloß wrote:
>My problem: I want to use the integrated assembler for some time critical 
>procedures. But I need to get the content of some local vars - I couldn't 
>find a solution for about 4 hours. I tried to use VC++ style e.g. mov eax, 
>[asm_var] - didn't work. I wrote an extra procedure and used "%0", "%1" to 
>get the parameters - didn't work. I tried to use TASM and link the object - 
>cygwin couldn't read it. Finally used FreePascal (based on gcc) - produced 
>compilable asm code but it couldn't find the reference. Then I tried to get 
>the address by calculating it with the help of %ebp - always got access 
>violation errors. I'm new to asm so I don't know what this "=&a" (var) 
>means, to - well to assign a var to a register it also didn't work. Is it 
>only for results?
>
>Is there any good documentation for cygwin to download in which something 
>like this is explained? For gnu-c there was always such an info tool. Is 
>there anything similar for cygwin?

This is a gcc issue, not a cygwin issue.  You should be looking for gcc
documentation.

In this case, you need to look at the gcc info files under the "extended
asm" section.  This illustrates how to do what you want.

The cygwin source code also does this in several places, if you want to
look at examples.  linux also relies on it quite heavily.

You can download the latest cygwin source code snapshot from:

http://sourceware.cygnus.com/cygwin/snapshots/

cgf

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

