home .. forth .. misc mail list archive ..

Re: Color Forth 2000 from a FIG FORTH FAN.


Jeff Fox wrote:
> 
> Dear MISC readers:
> 
> Chuck Moore gave an interesting presentation yesterday
> to the Silicon Valley Chapter of the Forth Interest Group
> on his Color Forth 2000.

As a person who has been following Forth since FIG FORTH
on the 8080 off and on I wonder if Forth and Forth style 
languages have really been improving. All the improvements
since then seem to be a step backwards.

Meta-compiling is
great if you have a working copy of Forth,but I still like
a good old assembly listing because with good comments as one
can port the code to many different machines.(Some versions
of FIG FORTH could be got for a low $ cost.
something handy for people on a low income like myself)

Can you get Color Forth 2000 for hardware
that is not a dedicated machine. What if I wanted to
run a dedicated controller using the rabbit CPU,tiny keyboard
and and a 320x200 LCD B&W screen. Can I still port Color Forth?
or is it tied to just one configuration.


> 
> Although I have had many years of working with Machine Forth
> and understand the stuff that came from Machine Forth
> Chuck has dropped many of the odd things in Machine Forth
> and returned to more traditional ways of doing these
> things.  He has also introduced other new wierd stuff.
> He is still using the A register concept and he still
> uses "-" to specify one-complement as he did in
> Machine Forth.

The A register wow! - Forth has discovered auto incrementing pointers.
Hmm have you heard of INDEX Registers yet?

This still indicates a weak problem with Forth. The primitives
to place information off and onto the the stack is still limited
as use of Forth's language style is limits you to simple 
absolute primitives. 
foo->bar in a language like C has to still broken down I believe
into var foo : bar 5 ; ... foo @ bar +  
  

>  But IF does a DROP like traditional
> Forth and there is no -IF (IF CARRY) as there is
> in Machine Forth.
>

I think IF not dropping and ! with the arguments reversed is a better standard
since this makes direct coding a bit cleaner.Why not DIF for drop IF and IF not
dropping. The carry status is real handy thing to have.

> Color Forth still uses colors instead of a lot of
> the words in traditional Forth.  Chuck has changed
> some of the colors he is using.
> 
> Color Forth now has a more complicated method of
> packing (preprocessing) source code.  This makes
> for a much more complicated editor and a somewhat
> more complicated compiler, and it was done to
> get about a 2x speedup in the compiler.  The
> source code is packed into 32 bit words using
> a Huffman encoded scheme.

YUCK ...  What ever happened to ASCII?
Can't you have Forth regenerate itself into a loadable
format and load that.
I think that the absolute jumps
and calls in Forth Hardware is a Bad design even if it saves
a few nanoseconds.
 
> 
> The compiler still benefits from the Color Forth
> approach by the preprocessed source and color
> tokens identifying what type of quantity is
> about to be compiled.  It appeared to me that
> there are interpreter and compiler wordlists
> like in cmForth for increased speed and
> simplicity.  Numbers are already in binary
> form from what I could tell.  This means that
> the compiler does not search through the whole
> list of Forth words and then upon failing
> try to convert a string into a number in the
> current number base.  Instead there is no
> dictionary lookup (let alone one that must
> go through the whole dictionary each time)
> or conversion for numbers so the compilation
> is very fast.

Sounds like tokenized BASIC.
> 
> The name dictionary is just a simple linear
> list.  It does not use hash tables to speed up
> searches.  But since Chuck's applications
> are very small and have few words it doesn't
> cry out for optimization like it does on
> larger systems.

> 
> Chuck has said that it is interesting that
> traditionally Forth has been used on resource
> starved systems and that Color Forth is
> designed for a resource rich system.  So
> instead of trying to optimize for small size
> he actually tried to use as much as he could
> force himself to use.  The compiler is still
> about 1K and remains resident in memory.
> Since compiles are instantaneous Chuck
> intends to keep things in source and compile
> them when needed.  Source and object code
> are about the same size.

I think you need to have resource limits.While we don't
have the 64k machines like the 8080 or the IBM1130
lets set comfortable limits since I refuse to buy the 
latest product from BLOAT-WARE-IS-US. I still think
a 640x480 16 color display is good for many things
as a base system. Other than a split screen for cut and paste
I never use overlapping windows.
 

> The name dictionary is also about 1K.  This
> sounds very much like ancient Forth systems.
> But unlike those old systems that used a
> small kernal that was the minimal needed to
> compile anything and then extended this
> by compiling the full Forth compiler and
> interpreter to extend the system to a full
> Forth before you can do something useful
> his complete compiler/interpreter is about
> as big as the old kernels.  Also with
> compile times many thousands of times faster
> compiling modules is faster than loading
> precompiled object code in other systems.

Is this due to a better design or just faster
hardware.?  

> He is using his ATI graphics card to do the
> work of displaying.  He says it was more work
> than it would have been to write code and just
> do it in software, but it does take advantage
> of the hardware that is there.  He is working
> in 1024x768 mode with a display routine as
> a background task with 5 to 30 screen redraws
> per second.  He is still using large characters
> and has 40x25 on the screen in a block.  Blocks
> are 1K bytes, 256 32 bit words.  It is a word
> addressing system which is a close match to
> his Forth chips and bytes are not important
> for his OKAD work.
> 

That just proves to me HI-RES is not what is cracked
up to be. 40x25 sounds like TV resolution. I say
forgo the hi-res stuff and just have the video
display ani-alias the text in low res.

> He is booting from the boot sector on the floppy
> in protected mode with access to the full memory.
> The boot sector also contains the floopy driver.
> He is just reading and writing complete tracks on
> the diskette.  Later he will provide a hard disk
> driver that he will need for the OKAD port.
> 
> He has technical docs for the sound card and
> network card and will add drivers in the future
> to use these in his Color Forth.

I still think Forth needs a regular file
system.The screen idea I never did like other
than it made for simple line editor.

As a side note I think most programs are
extra big because the don't have standard
interface for text and graphics. I would
like to see a 16 bit text display.
[color-3 bits][GUI text style-5 bits][8 bit char]
If done right the hardware will ani-alias text
and scale up for larger displays.
A graphics display will be UNDER the text display
making menus easy and fast.

<mouse/cursor>
<menu layer>
<text layer>
<graphics layer>


> 
> I am sure I left out lots of stuff. He talked
> for an hour and a half and then took questions.
> In short Chuck is doing a lot of wierd stuff
> in his Color Forth and says he is having a
> lot of fun doing it.  He said, Forth is a game,
> life is a game, and it should be fun.

That is a good idea there, that computers make life easy
and fun for people.

> Jeff Fox
> http://www.UltraTechnology.com

Ben.
-- 
"We do not inherit our time on this planet from our parents...
 We borrow it from our children."
"Octal Computers:Where a step backward is two steps forward!"
 http://www.jetnet.ab.ca/users/bfranchuk/index.html