Re: char and au size
- From: anton@xxxxxxxxxxxxxxxxxxxxxxxxxx (Anton Ertl)
- Date: Tue, 23 Dec 2008 10:35:03 GMT
Elizabeth D Rather <erather@xxxxxxxxx> writes:
Anton Ertl wrote:
Elizabeth D Rather <erather@xxxxxxxxx> writes:
Anton Ertl wrote:
However, many programs have an environmental dependency on 1 chars =...
1, and all supported Forth-94 systems implement this, so it might be a
good idea to standardize this common practice.
I think that would be a terrible idea. The provision that Forth94 makes
for different-sized chars and AUs enables a considerable degree of
portability for high-level code on "exotic" platforms. FORTH, Inc.
supports several platforms for which chars and AU are different, and we
can run quite a lot of code on them without change.
Interesting. These would be counterexamples for my claim about
systems above, no?
Could you please tell me a few platforms where they are different, and
the respective sizes of chars and aus? Thanks in advance.
Hmm. The UT69R000 is a 16-bit cell-addressed system, but checking the
manual I see that we use a 16-bit CHAR, so it's still the same as an AU
(albeit not 8 bits). I'm pretty sure there have been some others, but
not in the current product lineup.
Ok, so my claim may be true after all.
Here's why I believe that it is true in general: For 1 chars > 1, an
au would have to be less than 8 bits (there's JaxForth, the
experimental attempt to use 16-bit chars with 8-bit aus, but that
seems to be a historical dead end), i.e. a 4-bit processor. My
impression is that people feel that Forth-94 is too heavy-weight for
such small machines, and they prefer to use something that is
extremely stripped-down (i.e., beyond reducing Forth-94 to the CORE
wordset).
So we won't see standard systems on such small machines, and all
standard systems will have 1 chars = 1.
As for 1 chars < 1 (what you might wish for on word-addressed 16-bit
or 32-bit machines), Forth-94 does not have provisions for that, and I
also don't see any common practice; my guess is that word-addressed
machines are not designed to do much string handling, so the need is
not that urgent even on these machines.
- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: http://www.forth200x.org/forth200x.html
.
- Follow-Ups:
- Re: char and au size
- From: m_l_g3
- Re: char and au size
- References:
- Re: Bit width in CPU cores
- From: Anton Ertl
- Re: Bit width in CPU cores
- From: Elizabeth D Rather
- char and au size (was: Bit width in CPU cores)
- From: Anton Ertl
- Re: char and au size
- From: Elizabeth D Rather
- Re: Bit width in CPU cores
- Prev by Date: Re: STC vs. DTC speed?
- Next by Date: Re: STC vs. DTC speed?
- Previous by thread: Re: char and au size
- Next by thread: Re: char and au size
- Index(es):
Relevant Pages
|