I automatically look for possible optimisation and errors with uxnlin, the linter ignores what is inside brackets, sometimes it’s valid hacky ways to do something and I want to keep it but mute the warnings, so I put them withing square brackets
Exactly, it frees and allocate memory to windows, it’s still early in its development tho.
I prepare the arguments on the stack before jumping, I recommend that you look for the book Starting Forth, if you’re interested to know more about this way of thinking.
The return stack gives you a bit more options when juggling multiple items on the stack, you can put some stuff in it momentarily before returning from a subroutine, when you have like positions and colors and other things to sort out in the stack, being able to send one to the return stack is simplifying things a lot.
JMP2r is just
JMP2, but on the return stack, think of it like this: if you put an address #1234 on the return stack, like
LIT2 1234, and then JMP2r, it will jump to that address. When you
JSR2, it puts your current location in the program to the return stack automatically.
Of course, that’s how most things work, that’s how loops are made.
Uxntal is a mixture of Forth and 6502, it’s a kind of strange 8-bit hybrid of the languages. But knowing 6502 will only get you as far as understanding how memory works on small systems.
If you’re interested in learning forth, I recommend using UF, it’s an amazing graphical forth system for Varvara, it’s easy to setup, and it will let you mess around forth to your heart’s content. If you’d like to familiarize yourself with RPN notation, you could noodle around with CCCC.
Let me know if you need a hand with anything, I’ll be happy to help you figure these things out!