[PicForth] Re: Data table usage and general error tracing ?

Samuel Tardieu sam at rfc1149.net
Sat Jan 24 15:50:13 CET 2004


>>>>> "Chris" == easlab  <easlab at absamail.co.za> writes:

> Since RAM table is just part of the global-variables space, there is
> no reason why it should be restricted to read-only ?

There is a perfectly valid reason: I coded it that way because it
fullfilled a need I had.

> I got nothing but irritation from failing to 'decode' your
> "substitute" example, except to note that: "substitutions new-key +
> !" seems to contradict your read-only description.

It looks like you didn't get it: "substitutions new-key + !" as the
following signature:

: change ( c n -- ) substitutions new-key + ! ;

It looks up the "n"-th entry in the "substitutions" table, adds that
to a buffer address (new-key) and stores "c" in it. There is no
modification of the "substitutions" table.

> I suggest editing the manual to show the compulsory ID eg: | The
> following words allow you to create tables: | table <identifier> (
> "name" -- ) Start a RAM table

I prefer to use the same notation as in the ANS Forth manual.

> Once I recover from the un-needed frustration of having to
> 'research' linux facilities, which you could have save me from
> doing, I would give a beginner's experience of graduated test
> sequences on a mininal 16c84 with just 4 ( LSB ) LEDs on portB, and
> portA input.

Most people say "thanks for sharing PicForth". *You* keep saying "you
should have done more".

I wrote PicForth because I needed a Forth compiler for the PIC 16F87x,
I shared PicForth because I believe in software sharing. This does not
create any other obligation on me. I do not owe you anything. I am not
responsible of your "frustration of having to research linux
facilities". Help the community and the community will help you.

> Then what is the syntax for: Vector1[0] -> vector2[3] or if you
> insist in pretending RAM is read-only Vector1[0] -> Reg(6)

I do not insist in anything. And I don't understand your
question. While I can figure what Vector1[0] means, what is Reg(6)? If
you mean address 6 in memory, what you want to do can be done with:

  0 Vector1 6 !

> Because EEPROM is read-only, the syntax of eetable would differ.
> Sacrifice the symmetry between RAMtable and EEtable to get the nice
> facility of writable arrarys ?

I need read-only RAM tables for my projects. If you need writable RAM
tables, write some code and share it.

> It's difficult to imagine but perhaps you found, as gforth claims,
> that there are few use for RAMarrays ?

I haven't seen this "gforth claim", but I haven't had any need for
writable preinitialized RAM tables.

  Sam
-- 
Samuel Tardieu -- sam at rfc1149.net -- http://www.rfc1149.net/sam



More information about the PicForth mailing list