delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/29/18:01:35

Xref: news2.mv.net comp.os.msdos.djgpp:6542
From: cworley AT host1 DOT in-motion DOT net
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Referencing LOCAL variables with inline assembly
Date: 27 Jul 1996 03:09:40 GMT
Organization: In-Motion LLC
Lines: 13
Message-ID: <4tc19k$his@host2.in-motion.net>
NNTP-Posting-Host: alamar.in-motion.net
Originator: root@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Try using nm on the object that you create.  I think the difference
between global and local is this.
Global Variable    -> _SomeInt
Local Variable     -> _SomeInt.n , where n is the local instance
                                   being referred to.

Basically, GCC must create unique variables for every function,
because your code is always global, the compiler just doesn't
allow you to refer to it as such.

The only way to get the exact instance, is trial and error with nm,
to get the one version of the variable you need.

- Raw text -


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