delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/03/20/07:26:44

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <20000320122537.2645.qmail@hotmail.com>
X-Originating-IP: [141.59.206.98]
From: "Leonhard Grünschloß" <gruenschloss AT hotmail DOT com>
To: cygwin AT sourceware DOT cygnus DOT com
Subject: integrated asm and vars
Date: Mon, 20 Mar 2000 13:25:37 CET
Mime-Version: 1.0

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?
An example prog for my problem:

int main() {
int a = 1;
a = 1;
__asm (
" mov eax, [a] ; " // or
" mov ebx, a ; " // or
" mov %eax, %a ; " // or
" mov %eax, %0 ; " // if in an extra procedure
" mov %eax, %h0 ; " // or
" mov %eax, (8)%ebp ; " JUST ISN'T WORKING
...
)
return 0;
}

Thank you.
-- Leonhard
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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