I'm planning on just buying a 1541-II sometime soon to replace this one. According to a pretty popular repair doc, the GAL chip is probably bad and although I could replace it easily since the previous owner of my drive socketed all of the ICs, I think I'll put more money towards a new drive for now instead of dropping 20 bucks on something that may not solve my problem. Good thing the IIs are relatively cheap 👀
Finally properly implemented REFILL. The second picture shows the buffer in memory at the end of the video (first character at 0x0800). It only lets the user edit the current line, so characters don't overflow into the next line and deleting characters will never move the cursor behind the first position on the current line.
Now onto parsing 👀
Alright, so thankfully I won't be rolling my own keyboard routine. The reason that the kernal GETIN routine kept returning to the BASIC prompt was because I was corrupting the stack and I guess it was triggering some sort of reset or something? I dunno. All I know is that I can write terrible terrible things on the screen using Forth code which, honestly, is so incredibly beautiful.
For comparison, these are the speeds of an assembly and BASIC color cycle respectively. The height of each color stripe demonstrates the speed of each implementation. The shorter each stripe is, the faster it is. As you can see, Forth sits in between both of these benchmarks speed-wise. (perhaps a little closer to assembly, but who's keeping track 👀)
I think I can determine from that color cycle benchmark that pure Forth code will be fast enough to use for most if not all program logic, but anything related to graphics should be written in assembly. Which won't be an issue because I plan on supporting inline assembly in some shape or form anyways.
I can recommend watching https://www.youtube.com/watch?v=WYPNjSoDrqw , a roughly 40 minute documentary on the history of the BASIC language.
Interestingly, BASIC (which was world-changing on its own) was co-developed with another world-changing technology stack: DTSS (Dartmouth Time-Sharing System), one of the first multitasking, multi-user operating systems.
Not only was BASIC originally a compiled language (not interpreted!), but it was designed to run on a multi-user OS that didn't even exist yet!