Path: csiph.com!aioe.org!.POSTED!not-for-mail From: Rod Pemberton Newsgroups: comp.lang.forth Subject: Re: Why does the location of PAD move around? Date: Sun, 2 Apr 2017 02:00:02 -0400 Organization: Aioe.org NNTP Server Lines: 43 Message-ID: <20170402020002.3808db50@_> References: <20170401210719.376d37f4@_> NNTP-Posting-Host: ZTD62cW/Uw8bymX5ok+0NA.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.forth:56572 On Sat, 1 Apr 2017 19:32:17 -0700 (PDT) hughaguilar96@gmail.com wrote: > On Saturday, April 1, 2017 at 6:06:23 PM UTC-7, Rod Pemberton wrote: > > Why does the location of PAD move around? > > > > TIB is allocated at a fixed location, but > > PAD's location is relative to HERE. > > Asking such a question is like asking somebody to hold the bucket > while you milk a male goat. Smart ass, ... Well, I'm not familiar with the historical uses of PAD, yet, but it would seem that you could store data in memory relative to PAD in either direction (up, down), unlike TIB where characters will be stored in only one direction relative to TIB's address. For PAD, one of the two directions is likely to run into the end of the dictionary. So, if you wanted to prevent access to the dictionary from the use of PAD's address, what would you do? E.g., perhaps someone wants to prevent intentional corruption of or accidental overwriting of the dictionary. Where would you relocated PAD to? Would you set PAD to a fixed-sized buffer like TIB ? For a fixed-sized buffer, would you need to preallocate space on both sides of PAD's address for either upward or downward storage? I'm looking to correctly preserve the historic uses of PAD while also changing PAD's location to limit aberrant access to the dictionary. Since PAD's location moves, I can't use fixed addresses or pointer values for comparison for buffer under- or over-flow of PAD. I would need to use a variable, which in my case, would also need to be accessible via C code. I can do that, but it complicates the issue and slows down the code too. The ideal solution would be to have a fixed address for PAD , i.e., single integer value, hence non-moving. Are you interested in the question now Hugh, or are you still going to insist that Andrew answer because the original question was so simple? Rod Pemberton -- All it takes for humanity to conquer the world's toughest problems is to hope, to believe, to share, and to do, in cooperation.