Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #27995

Re: quick review of <BUILDS and CREATE history

From "Rod Pemberton" <dont_use_email@xnohavenotit.cnm>
Newsgroups comp.lang.forth
Subject Re: quick review of <BUILDS and CREATE history
Date 2014-01-21 15:18 -0500
Organization Aioe.org NNTP Server
Message-ID <op.w91z0xq85zc71u@localhost> (permalink)
References (6 earlier) <KbednR9Be4m-VUHPnZ2dnUVZ_rOdnZ2d@supernews.com> <op.w9z7x2uk5zc71u@localhost> <nbOdnWkOO6CKA0DPnZ2dnUVZ_oydnZ2d@supernews.com> <op.w91ps0mn5zc71u@localhost> <c7WdnXP0eoFfIUPPnZ2dnUVZ_t6dnZ2d@supernews.com>

Show all headers | View raw


On Tue, 21 Jan 2014 13:30:26 -0500, Elizabeth D. Rather  
<erather@forth.com> wrote:
> On 1/21/14 6:37 AM, Rod Pemberton wrote:
>> On Mon, 20 Jan 2014 17:07:17 -0500, Elizabeth D Rather
>>> On 1/20/2014 11:14 AM, Rod Pemberton wrote:

>>>> -sets the dictionary pointer (DP) to code field address (CFA)
>>>
>>> Why didn't HEADER leave it set correctly?
>>
>> It appears from the code an ENTER was compiled in by :NONAME,
>> i.e., DP or HERE moved.  So, CREATE creates an empty definition
>> with just ENTER and EXIT.
>
> CREATE should have neither ENTER nor EXIT since it's a data object,
> not a definition.
>

Um, sorry, I might be wrong about that ...

It might be the ENTER from : is stored in the CFA. But, the EXIT
 from ; would still move DP or HERE at least into the 1st PFA.

>>> [snip, moved up]
>>
>> Is it possible to define : in terms of :NONAME, e.g., something like:
>>
>> : CREATE :NONAME DROP ...
>
> Baffled again. Looks like you're defining CREATE, not colon.
>

Sorry, yes, that should've had two colons which was, hopefully, obvious:

: : CREATE :NONAME DROP ...

I have a low-level : and this would be for defining a new high-level : in  
Forth.

Is it possible?  If so, is it recommended to use :NONAME here or not?

>>> The whole purpose of :NONAME is to *not* have a header.
>>> [...]
>>> :NONAME *isn't* linked in the dictionary search; that's why it exists.
>>
>> Does it really matter if :NONAME has a header and is linked?
>> If the header is unfindable by FIND or ' etc...
>
> If it has a header, that defeats the purpose. Why not just have a
> normal colon definition?

Yes, I'll attempt to do that.

I'll probably start by reworking the actions I posted for : ; CREATE and
:NONAME into HEADER : ; CREATE and :NONAME.  Then, I'll probably backtrack
to see where I starting changing the definitions around.  I'll likely also
have to determine if I had an issue with linking definitions if a  
headerless
:NONAME is used.

> It's not the findability that :NONAME is intended to avoid, it's the  
> space occupied by the header.

Ok.  So, no header for :NONAME to conserve space.  Now, I'm baffled.
ISTM, if I do fix the issue with :NONAME by eliminating a header for
it, then I'll break :NONAMEs functionality.

I'm baffled as to how a :NONAME definition is going to be executable
without a header.  IIRC, an XT in my system points to the CFA in the
header.  The CFA field is then fetch'd to determine how to handle
the definition as indicated by DOVAR DODOES ENTER etc.  Without a header,
there won't be a CFA with ENTER for the :NONAME defintion.  The XT
by itself is insufficient to tell the interpreter *how* to EXECUTE
the definition.  That's done by ENTER.  The XT is only sufficient to
tell the interpreter *where* the definition is, more specifically the
CFA field in the header from which the header location and definition
location can be determined.  So, no header, no CFA, no ENTER, no way
to tell if the XT points to a definition or a low-level "primitive" word.

If I modify EXECUTE , I have no way to determine if the XT is for a
regular definition with a header where I need to fetch the CFA, or a
headerless :NONAME definition which won't have a CFA with ENTER.

Sigh, are there some systems where :NONAME is unimplementable?
E.g., ITC interpreted.


Also, AIR, this issue of whether :NONAME is headerless or not was
brought up previously in regards to ANS Forth.  I'm not following
ANS strictly, but IIRC that's where :NONAME was defined.

AFAICT, ANS Forth doesn't say a :NONAME definition is headerless.
It only requires :NONAME to 1) not have a name and 2) not be found.
That can be done with a header in place, as I did.  So, not having
a name is not the same as being headerless.  This goes towards
the question of:

"Does it really matter if :NONAME has a header and is linked?
If the header is unfindable by FIND or ' etc..."


This is what ANS says:

"A.6.1.0460"

"... If the current definition was created by
:NONAME the current definition has no definition name
and thus cannot be found in the dictionary."

"A.6.2.0455"

":NONAME allows a user to create an execution token with
the semantics of a colon definition without an associated
name."


*BOTH* :NONAME and : in ANS say they create a _definition_.
There doesn't seem to be any mention regarding a difference
in the way : and :NONAME create a definition.  I.e., does the
definition of "definition" include a header or not? ...


Rod Pemberton

Back to comp.lang.forth | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

quick review of <BUILDS and CREATE history "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-01-19 13:15 -0500
  Re: quick review of <BUILDS and CREATE history albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-01-19 20:07 +0000
    Re: quick review of <BUILDS and CREATE history anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-01-19 21:45 +0000
  Re: quick review of <BUILDS and CREATE history Coos Haak <chforth@hccnet.nl> - 2014-01-19 22:02 +0100
  Re: quick review of <BUILDS and CREATE history Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-01-19 17:24 -0600
    Re: quick review of <BUILDS and CREATE history "Elizabeth D. Rather" <erather@forth.com> - 2014-01-19 14:54 -1000
      Re: quick review of <BUILDS and CREATE history "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-01-19 22:37 -0500
        Re: quick review of <BUILDS and CREATE history "Elizabeth D. Rather" <erather@forth.com> - 2014-01-19 18:01 -1000
          Re: quick review of <BUILDS and CREATE history "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-01-20 00:27 -0500
            Re: quick review of <BUILDS and CREATE history Elizabeth D Rather <erather@forth.com> - 2014-01-19 20:54 -1000
              Re: quick review of <BUILDS and CREATE history Elizabeth D Rather <erather@forth.com> - 2014-01-19 21:19 -1000
              Re: quick review of <BUILDS and CREATE history "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-01-20 16:14 -0500
                Re: quick review of <BUILDS and CREATE history Elizabeth D Rather <erather@forth.com> - 2014-01-20 12:07 -1000
                Re: quick review of <BUILDS and CREATE history "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-01-21 11:37 -0500
                Re: quick review of <BUILDS and CREATE history albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-01-21 17:41 +0000
                Re: quick review of <BUILDS and CREATE history "Elizabeth D. Rather" <erather@forth.com> - 2014-01-21 08:30 -1000
                Re: quick review of <BUILDS and CREATE history oh2aun@gmail.com - 2014-01-21 11:17 -0800
                Re: quick review of <BUILDS and CREATE history "Elizabeth D. Rather" <erather@forth.com> - 2014-01-21 09:44 -1000
                Re: quick review of <BUILDS and CREATE history "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-01-21 15:18 -0500
                Re: quick review of <BUILDS and CREATE history "Elizabeth D. Rather" <erather@forth.com> - 2014-01-21 12:07 -1000
                Re: quick review of <BUILDS and CREATE history "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-01-21 22:04 -0500
                Re: quick review of <BUILDS and CREATE history "Elizabeth D. Rather" <erather@forth.com> - 2014-01-21 19:21 -1000
                Re: quick review of <BUILDS and CREATE history anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-01-22 13:38 +0000
                Re: quick review of <BUILDS and CREATE history "Elizabeth D. Rather" <erather@forth.com> - 2014-01-22 08:50 -1000
                Re: quick review of <BUILDS and CREATE history "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-01-23 17:17 -0500
                Re: quick review of <BUILDS and CREATE history "Elizabeth D. Rather" <erather@forth.com> - 2014-01-23 13:46 -1000
                Re: quick review of <BUILDS and CREATE history Bernd Paysan <bernd.paysan@gmx.de> - 2014-01-24 15:07 +0100
                Re: quick review of <BUILDS and CREATE history anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-01-25 15:18 +0000
                Re: quick review of <BUILDS and CREATE history Bernd Paysan <bernd.paysan@gmx.de> - 2014-01-25 20:18 +0100
                Re: quick review of <BUILDS and CREATE history Coos Haak <chforth@hccnet.nl> - 2014-01-25 20:44 +0100
                Re: quick review of <BUILDS and CREATE history Bernd Paysan <bernd.paysan@gmx.de> - 2014-01-25 21:41 +0100
                Re: quick review of <BUILDS and CREATE history "Alex McDonald" <blog@rivadpm.com> - 2014-01-25 22:47 +0000
                Re: quick review of <BUILDS and CREATE history Bernd Paysan <bernd.paysan@gmx.de> - 2014-01-26 01:54 +0100
                Re: quick review of <BUILDS and CREATE history anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-01-27 16:49 +0000
                Re: quick review of <BUILDS and CREATE history anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-01-27 15:40 +0000
                Re: quick review of <BUILDS and CREATE history Bernd Paysan <bernd.paysan@gmx.de> - 2014-01-27 23:00 +0100
                Re: quick review of <BUILDS and CREATE history "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-01-27 19:43 -0500
                Re: quick review of <BUILDS and CREATE history anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-01-28 09:25 +0000
                Re: quick review of <BUILDS and CREATE history Bernd Paysan <bernd.paysan@gmx.de> - 2014-01-28 19:45 +0100
                Re: quick review of <BUILDS and CREATE history anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-01-30 15:32 +0000
                Re: quick review of <BUILDS and CREATE history albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-01-28 14:20 +0000
                Re: quick review of <BUILDS and CREATE history anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-01-25 15:28 +0000
                Re: quick review of <BUILDS and CREATE history Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-01-25 13:51 -0600
                Re: quick review of <BUILDS and CREATE history anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-01-27 15:34 +0000
                Re: quick review of <BUILDS and CREATE history Lars Brinkhoff <lars.spam@nocrew.org> - 2014-01-24 08:11 +0100
                Re: quick review of <BUILDS and CREATE history Mark Wills <markrobertwills@yahoo.co.uk> - 2014-01-24 01:28 -0800
                Re: quick review of <BUILDS and CREATE history "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-01-24 05:00 -0500
                Re: quick review of <BUILDS and CREATE history "Elizabeth D. Rather" <erather@forth.com> - 2014-01-24 09:32 -1000
                Re: quick review of <BUILDS and CREATE history "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-01-24 17:48 -0500
                Re: quick review of <BUILDS and CREATE history "Elizabeth D. Rather" <erather@forth.com> - 2014-01-24 13:14 -1000
                Re: quick review of <BUILDS and CREATE history Mark Wills <markrobertwills@yahoo.co.uk> - 2014-01-24 16:16 -0800
                Re: quick review of <BUILDS and CREATE history "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-02-23 12:13 -0500
                Re: quick review of <BUILDS and CREATE history anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-01-22 13:32 +0000
            Re: quick review of <BUILDS and CREATE history Mark Wills <markrobertwills@yahoo.co.uk> - 2014-01-20 04:14 -0800
              Re: quick review of <BUILDS and CREATE history Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-01-20 06:31 -0600
                Re: quick review of <BUILDS and CREATE history Elizabeth D Rather <erather@forth.com> - 2014-01-20 08:04 -1000
                Re: quick review of <BUILDS and CREATE history anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-01-21 14:09 +0000
              Re: quick review of <BUILDS and CREATE history "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-01-20 16:14 -0500
  Re: quick review of <BUILDS and CREATE history trebor.english@gmail.com - 2014-01-22 17:44 -0800
  Re: quick review of <BUILDS and CREATE history trebor.english@gmail.com - 2014-01-22 18:24 -0800
    Re: quick review of <BUILDS and CREATE history albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-01-23 14:00 +0000
      Re: quick review of <BUILDS and CREATE history trebor.english@gmail.com - 2014-01-23 11:06 -0800
        Re: quick review of <BUILDS and CREATE history Paul Rubin <no.email@nospam.invalid> - 2014-01-23 11:33 -0800
          Re: quick review of <BUILDS and CREATE history trebor.english@gmail.com - 2014-01-23 11:42 -0800
        Re: quick review of <BUILDS and CREATE history Mikael Nordman <oh2aun@gmail.com> - 2014-01-23 11:51 -0800

csiph-web