This directory contains the fig FORTH model source code for the 6800.
The license for the fig FORTH model source code is specified in the
source code files. It appears to be similar to the MIT, BSD, or ISC
licenses, and the FORTH Interest Group and community have traditionally
treated it as such. Although there is assignment to the public domain,
copyright is claimed, and attribution is specified as a condition of
distribution, use, etc. Aside from the reference to the public domain,
the intent does seem clear, and I am following my understanding of the
intent in making it available here.
I do not intend my interpretation and the example I set by it to be
legal advice. If you redistribute the assembler, you may prefer to
keep the fig FORTH model source code separate.
Using the model is fairly straightforward.
Get Joe Allen's exorsim project from the sourceforge repository:
http://sourceforge.net/projects/exorsim
Make it in some appropriate place on your workstation computer.
Make a blank disk image with something like
dd if=/dev/zero of=zero.dsk bs=128 count=2002
If you haven't yet downloaded asm68c, do so. I recommend either
using git directly (clone read-only is easy) or getting the
snapshot tarball via the git repository web pages. The
downloadable files will always be several steps behind, because
I always forget something.
Where you get the snapshot tarballs -- when you are looking at
the developer web pages at
http://sourceforge.net/projects/asm68c/
you'll see the link to the Git repository up there with Summary,
Wiki, Files, Guestbook, and Discussion. Click the link to the
Git repositories. Click the link to Code if that page opens up.
(a68c-Code is a dead branch for now, I should remove it.)
You'll get something of a birds-eye view of the repository.
Above the line showing the git command for getting a read-only
clone, over to the right, will be three links, including the
History and the Feed. Click the "Download Snapshot" link and
your browser should offer to save the tarball.
(Incidentally, the source files can be browsed on-line at the
git repository web pages I mention above. If you only want,
for example, fig-forth_crlf.68c, just browse to that page.)
Make the asm68c project in some appropriate place, and then do
make fig
Open the exor simulator object output, "fig-forth_exorsim.x" in
a text editor, select all, and copy. (Yes, S1-S9 object is ascii
hexadecimal, and very readable with a text editor.)
Run exorsim with
./exor -x --mon zero.dsk
(The modified model doesn't actually access the disk image "zero.dsk" yet,
but having the image reduces the complaints.)
Use the debug monitor's (single-"l") "load" command:
l
and paste (right-click) the object code into the shell window.
When the code finishes loading, hit control-C to end the load
function.
(If on MSWindows under Cygwin, you may need to click the icon
in the top-left corner of the title bar to get at the copy/paste
functions. I'm not sure, I haven't used Cygwin enough yet, but
MinGW is that way, just like the current MSWindows shell.)
(No, MinGW does not have enough of the Linux API to run exorsim.
I hear that Cygwin does, but I haven't tried it yet. Besides, you
really, really, really want to try out dual-booting a Linux
distribution anyway. MSWindows is just so last-century. ;->)
Use the
c
("continue") command to start.
If it says something about an unknown record, be sure you've
hit ctrl-C to break out of load mode, and try the "c" command
again.
It should respond with a Forth-68 prompt, after which it will
accept FORTH commands.
There is some debugging stuff still in there, but it will execute expressions and compile colon definitions.
For more information on fig FORTH, see http://www.forth.org .
Look, in particular, for the installation manual, the model source
pdf files, and the glossary.txt file, which is something of a
technical manual for fig FORTH.
Enjoy!
(For MSWindows users:
About trying out Linux, maybe I'm not completely serious, but
I'm more than half-serious. It's still not a smooth ride, but
you'll save yourself serious grief down the road by doing it now.
David L. Jaffe at forth.org brought the end-of-line character
issues to my attention.
For this project, the source code is in unix format. I apologize,
but I have other things I want to do with my time.
Line-ending characters are such a minor nuisance, but they are
an example of one of the little gotchas that the folks at
Microsoft are all too happy to avoid doing anything about,
especially if it keeps you locked into their world, paying them
for your next updates, following their rules.
Having said that, MinGW and Cygwin (and *nix) have a unix2dos
tool that can be used to fix the line-ending characters in the
source for you. I don't remember whether you have to explicitly
install it or not, but it's available. Use the command like
this:
unix2dos fig-forth_exorsim.68c
and it converts the file in place, and then you can open it with
Notepad.
You used to be able open a file with unix line-endings in Wordpad
and save it as a text file, but I think Microsoft has decided to
make the speed-bump on that work-around a bit higher lately.
One thing I've done now, I've added fig-forth_crlf.68c to the
repository. It will be a copy of fig-forth.68c with the crlf
line endings, so that, at least, can be read with Notepad as is.
End-of-note-to-MSWindows users.)