Hi,
I've been playing with the idea of Forth environment running on top of
C-BIOS for a while. Previously there haven't been many home computers
with Forth as their default operating system and programming
language. This is most likely because those machines weren't intended
for programmers: BASIC is more conventional and thus easier to grasp
for beginners.
I would, however, love to have an MSX machine with Forth environment
lying on my desk. It would make a wonderful machine to hack on when
you feel like doing something different. It would be nice to have
alternatives like this for the usual BASIC. And, in my opinion,
C-BIOS could potentially provide a good foundation for them.
To pep up these ideas and to wake up everyone from daydreaming I
started working on C-Forth last weekend. It grew into something
marginally usable so I thought it was the time to inform the mailing
list about it.
I haven't really written any Forth applications before. This is
actually quite funny as I partly learned how Forth operates by
implementing one myself. It also reveals one thing about Forth: while
being highly flexible to use it's also relatively simple to
implement. C-Forth already has the most used things you usually find
in Forth. On the other hand, it has quite some hacky and poorly
factored code. Even so, I'm quite happy what I've got at the moment;
it's a good base to evolve.
I made a patch against the current CVS tree. It has a new source file
src/forth.asm and a documentation file doc/cforth.txt. The only
diff to the existing files is Makefile where I just added it to be
built as a separate ROM. I would be ready to commit the patch to
CVS, but what do you think?
Please also read doc/cforth.txt. It has got a few Forth code examples
to try on C-Forth and some text about internals. It also has a
preliminary proposal for a block editor.
The patch and the ROM are currently available here:
http://bree.homeunix.net/~ccfg/temp/forth.diff
http://bree.homeunix.net/~ccfg/temp/cbios_forth.rom
Some pointers to Forth information:
http://en.wikipedia.org/wiki/Forth_programming_language
http://www.zetetics.com/bj/papers/
Any thoughts on these matters are appreciated.
--=20
Jussi Pitk=E4nen
|