SOD 64, THE STACK ORIENTED DESIGN.

SOD 64 is an imaginary 64 bit processor that is optimized for the execution
of Forth. This package contains a software simulator in Forth plus a Forth that
can be run on the simulator. The speed of that forth is competitive with
some of the available Forth interpreters in C, but that was not the main
goal when I developed it. After all I wrote it just for the hack value.
It is released under the GNU General Public License version 2.

This Forth is almost as small as it can be. It is closely modeled after ANS
Forth, but it is not a complete implementation. It is just big enough that
it can recompile itself with its own cross compiler. 

Because the Forth system and its cross compiler are small and well commented
they have a certain instructional value as well.

A glossary generator is provided and it produces a glossary of all Forth
words in the file forth.glo.

You can probably still find the draft proposed ANS Forth standard on
   ftp.uu.net:/vendor/minerva/x3j14/dpans6ps.zip

Technical documentation about the SOD 64 processor, its simulator and
its Forth can be found in the file sod64.doc and in the various source
files.

1 GETTING STARTED

After you unpack the shar archives you will have the following files:
 README
 kernel.img (binary file, was uuencoded)
 forth.img (binary)
 sod64.doc
 extend.frt
 cross.frt
 kernel.frt
 sod64.frt
 doglos.frt
 glosgen.ftr

Adjust MEMSIZE to a reasonable value.

If everything goes well, you have an executable sod64, the file forth.img
and the glossary forth.glo.

Start Forth with

 i4 include sod64.frt  sod64 forth.img

or

 ./sod64 forth.img

Now you can type Forth words. 

134 2 * .

will show 

268 OK

WORDS will show all available forth words.
You can load other files with

S" name" INCLUDED

This way you can load the cross compiler cross.frt, which will recompile
kernel.img . You can also load the glossary generator or the sod64 simulator.

S" sod64.frt" INCLUDED
SOD64 forth.img

will bring up Forth in a simulator under Forth. It will be slow and you
cannot do file operations, but nearly everything else.

You leave SOD 64 Forth by typing

BYE

2 PORTABILITY

The SOD 64 simulator is written in ANS Forth. It should run on any platform
that provides:
  - 8 bit bytes.
  - An unsigned 64 bit integer type.
  - Two's complement integer representation.

The simulator uses no operating system specific functions and therefore 
it is more portable than, say gForth.

It mimics a big-endian machine regardless of the endianness of the system
you run it on. 

Binary files kernel.img and forth.img are included in the package. 
