I'm thinking of implementing a FORTH environment in Axe. I think FORTH is a great environment for old devices like the TI 8x models, even though they are on the upper end of what I would consider FORTH appropriate for.
I'm wondering if anyone else is interested in a dynamically compiled FORTH environment. The rest of this post is me rambling about specifics and somewhat less interesting stuff.
I have a system set up for dynamic compilation of words into actual machine code. It's not the prettiest, and it could be about 2 machine instructions per word (as in FORTH word) more efficient if I were willing to write it in assembly, but I think the way I have it is good enough efficiency-wise and also lets me write all but 3 lines in Axe.
I basically have an implementation of linked lists, except instead of a list it's a subroutine.
:lbl BCONS
:⋿CD→{r₁}
:r₂→{r₁+1}ʳ
:⋿CD→{r₁+3}
:r₃→{r₁+4}ʳ
:⋿C9→{r₁+6}
:Return
(the above code has unicode characters, if it doesn't display right for you I have a less pretty version below)
funny story about how I came up with that code:
So it can be called like this:
:Buff(8)→GDB0
:BCONS(GDB0,λ(5→A),λ(A*2→A))
:0→A
:(GDB0)()
:Disp A▶DEC
(no unicode version)
That's not all there is so far, but there's not really anything else that's interesting yet.