www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/15/06:06:47

Date: Thu, 15 Oct 1998 13:05:13 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Thomas Harte <T DOT Harte AT btinternet DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: ASM Queries
In-Reply-To: <36252536.148EA3@btinternet.com>
Message-ID: <Pine.SUN.3.91.981015130455.15214T-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

On Wed, 14 Oct 1998, Thomas Harte wrote:

> Is there a standard way to do something like this such that the
> compiler understands I'd quite like the variables to be contiguous
> in memory

You have just reinvented an array.

But before you use that, IMHO you should think pretty hard whether you
indeed need to coerce the compiler to work that way.  Are you sure
this is the best way to get your job done (since you didn't elaborate
on the background of the problem, I cannot do more than ask the
question)?  Maybe a more straightforward code which uses the variables
by their names, even inside inline assembly, and lets the compiler do
the job of the best register allocation, would be fast enough?

I'm not telling you your way is wrong, I just urge you to consider
other solutions before you settle with this very restrictive one.

> 	I'm fairly new to DJGPP inline, and I wasn't able to find anything in
> the FAQ (from faq202b - am I out of date?)

You are VERY out of date.  faq202 is not even for the current version
of DJGPP (202 should be read as 2.0.2, i.e. release 2 of the FAQ for
DJGPP v2.0).  The latest version of the FAQ is in v2/faq211b.zip, and
issues related to inline assembly got a lot of attention recently.

- Raw text -


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