[colorforth] Hello, World! and other simple programs
- Subject: [colorforth] Hello, World! and other simple programs
- From: Jeff Fox <fox@xxxxxxxxxxxxxxxxxxx>
- Date: Thu, 26 Jul 2001 14:23:23 -0700
- Organization: UltraTechnology
Kristopher Johnson wrote:
> I agree. I based my code upon how Chuck defined
> his 'logo' word, so maybe you should ask him. :-)
I haven't been into the code much as the machines
I have access to can't run it. But I have heard
Chuck say that bootstrapping the first version
meant lots of building binary objects by hand and
that at some time he would add the Forth code
to metacompile it all from scratch in ColorForth.
So Chuck has published lots of assembler code to
bootstrap a version of ColorForth but he uses
it to write Forth and would not recommend writing
an application, even hello world, in bootstrap
mode. But quite frankly I don't know what
pack/unpack words exist. I know how ."
normally compiles a (.") or something and
then compiles the string. If such a thing
is not in Chuck's colorforth yet it is
certainly something useful to add. If I
could look into the colorforth source blocks
easily or edit them I would know more.
> There is another word, 'string', that is used in
> some of the other blocks. It appears to be the Right
> Way to do this, along with a TYPE-like word, but it
> isn't working out for me yet.
Well it sounds like you are on track.
I think you "hello world" even with hand packed
strings stored as characters on the stack was
easier to grasp than the hello world wrappers
needed in some other environments. But hand
packing is ugly. It is ok for bootstrapping
but higher level words make life easier.
> The current colorForth doesn't provide any easy
> way to write "parsing words", as far as I can tell.
That seems to be the main issue. If the right
internals can be exposed it is probably straighforward
especially since the block source is just a big memory
array.
> Maybe if someone could create a simple example
> of how to unpack characters, it would be helpful.
Well there are a few people so far who have it
working and might have tried the pack or unpack.
I think I saw them in the asm sources.
------------------------
To Unsubscribe from this list, send mail to Mdaemon@xxxxxxxxxxxxxxxxxx with:
unsubscribe ColorForth
as the first and only line within the message body
Problems - List-Admin@xxxxxxxxxxxxxxxxxx
Main ColorForth site - http://www.ultratechnology.com