www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/17/15:55:48

From: foggy AT flashnet DOT it (Fogbank)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Accessing local variables from an asm block
Date: Sat, 17 Oct 1998 18:38:55 GMT
Organization: Customer of Flashnet S.p.A. - http://www.flashnet.it
Lines: 17
Message-ID: <3628e3c3.1057255@news.flashnet.it>
References: <Pine DOT OSF DOT 4 DOT 05 DOT 9810170408060 DOT 3870-100000 AT sable DOT ox DOT ac DOT uk>
NNTP-Posting-Host: ppp-10.bo.flashnet.it
X-Trace: news.flashnet.it 908649209 11750 194.247.164.90 (17 Oct 1998 18:33:29 GMT)
X-Complaints-To: abuse AT flashnet DOT it
NNTP-Posting-Date: 17 Oct 1998 18:33:29 GMT
X-Newsreader: Forte Free Agent 1.11/32.235
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Sat, 17 Oct 1998 04:10:07 +0100 (BST), George Foot
<george DOT foot AT merton DOT oxford DOT ac DOT uk> wrote:

>> As the subject says, what's the syntax for accessing local variables
>> (and function parameters) from within an asm block?

>Use `extended' inline assembler:
>
>    asm ("movl %0, %1"
>       : "=r" (variable_to_copy_to)
>       : "r" (variable_to_copy_from)
>    );

I know I could use the extended asm, but I'd like to be able to access
a variable at any point of the asm block, not just at the beginning.
Can I?

- Raw text -


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