This a complete and enhanced port of my older weekend project, Forth for a certain ancient virtual machine. Unlike that one, this is written in proper 6502 assembly and should run on the hardware just fine - though I've only tested in on the emulator.
It is completely compliant with Forth 2012 and implements the core subset and some extensions. Runs the entire relevant subset of the popular test suite without errors. Note that this is a large stack version of Forth - unlike many other 8-bit implementation, it has both data and return stack set to 1K each. This may make it slightly slower, but will allow much more complex programs.
I will continue working on it - my goal is to make it a bit smaller (and maybe even a bit faster) to the point when it could be placed in 8K ROM. Haven't tested in on C64 yet, but getting it working there is also among the goals. Of course, some features and such. I will likely upload some older code samples and benchmarks from different sources - the interpreter seems to be very compatible with everything I throw at it.
So, if you are into the Forth, take it for a spin, and provide any suggestions and feedback here.
There were two issues I've ran into while working on this port.
- It is expected that some standard file system features cannot be implemented (like positioning in files). This is fine, the file support is somewhat limited as a result. But I could not get OPEN call to return an error on a missing file. This causes a number of small issues that I still need to investigate.
- I could not implement asynchronous KEY word with KERNAL functions - my first though was to use SCNKEY and then kill the keyboard buffer, but there is no function to clear the keyboard buffer in X16, and the buffer itself is not where it was on C64.