Thread View: net.lang.forth
1 messages
1 total messages
Started by smith
Thu, 19 Jan 1984 02:02
Re: Portable Forth for Unix - (nf)
Author: smith
Date: Thu, 19 Jan 1984 02:02
Date: Thu, 19 Jan 1984 02:02
47 lines
2698 bytes
2698 bytes
#R:bunker:-32100:umn-cs:14200006:000:1982
umn-cs!smith Jan 18 18:49:00 1984
A Portable Forth Kernel? Hmmm.
My first impression is to say "Nonsense!" but then, maybe not. Discussing
such a thing might drag this newsgroup out of the doldrums...
Building a 'portable' kernel may be a real pain. I see several problems,
none impossible, but still problems:
1. Forth dictionary storage is completely unstructured, so you'll need
to do typeless references to it. I wouldn't want to use Pascal, even
with variant records.
2. The inner interpreter ("address interpreter") would be a sight to behold
in any high level language. It wouldn't run very fast, either.
Forget Pascal, since you'll be manipulating addresses of procedures.
(Ooooh noooo, Mr. Wirth!)
3. The code might compile a kernel that works over a broad range of
machines, but I'd expect there to be problems porting applications,
especially between 16 and 32 bit machines.
4. How many of the 'classical' elements of Forth would be lost? I've talked
to people who have tried to build Forth kernels in Fortran, etc, and
they generally discard the traditional structure of Forth for something
that better fits the language they're writing it in. Also, I've never
spoken to anyone who's actually used one of these Forths, only people
who are trying to build one.
I'm not saying that Forth text always (or even often) depends on
such things as the location of the dictionary header, but in Forth
you usually rely on such facts during debugging.
5. My definition of a 'real' Forth system is one that can support
some sort of assembler. This knocks out those high level languages
that make it impossible to branch into a data area. Does anyone think
it can be done in C? Maybe with the inner interpreter written in
assembly language? Or a special function branch(addr) written in
assembler? (be sure to clean your stack when you're done...)
Enough for now. Comments?
Rick.
[smith.umn-cs@CSNet-Relay]
[...ihnp4!umn-cs!smith]
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads