Forth TX16 - new Forth interpreter for Commander X16

All aspects of programming on the Commander X16.
Ed Minchau
Posts: 509
Joined: Sat Jul 11, 2020 3:30 pm

Re: Forth TX16 - new Forth interpreter for Commander X16

Post by Ed Minchau »

TheGeekOnSkates wrote: Thu Oct 17, 2024 12:36 am Thanks for the very complete reply. Sorry for the slow respons.

> Ah, VIC-20, that's a good one! Unfortunately, really starved on RAM...
Yeah, I'm targeting the 16K expansion config. A Forth - or really any language - just wouldn't fit in 3K. Not unless it's like a crazy simple Assembly monitor or something :-D
The crazy simple Assembly monitor I wrote 30 years ago for the VIC-20 with 16k superexpander was 4kb. It was the basis for the original META/L editor for the X16 four years ago.
vasyl
Posts: 16
Joined: Sat Sep 02, 2023 11:43 pm

Re: Forth TX16 - new Forth interpreter for Commander X16

Post by vasyl »

Finally found some time to work on this project. Immediately discovered a major bug introduced in the last update, fixed now.
Other than that fix, there are no functional changes for now, but I've figured a way to save quite a bit of space. About 170 bytes, which is quite something for Forth fitting in 8K. This is all thanks to a simple trick. I wrote a simple scanner that flagged identical byte sequences in the binary, and went back from that. The results far exceeded my expectations - I was looking for maybe a couple dozen bytes, not a 2% of the total size. And I am not done with the scan results yet. This will allow me to do some rather neat things, not to say that it adds a lot of freedom if I need to fix something. I don't know why I did not think about this trick before, seems very obvious now.
Post Reply