Thinking about scrapping this latest attempt at a BASIC interpreter, and sitting down and having a think about what a nice BASIC would require for my purposes.
Array variables. Some nice string operations, such as INSTR() and LEFT$ etc.
I am getting stuck on following crabbed code from the 1970s. I have 8K of SRAM, a large complement of registers, and enormous amount of flash memory--256KB. The Arduino mega is quite beefy.
The code I have been following is a mixture of 8080 assembly, and 8080 assembly transposed onto Arduino assembly with macros.
And for the largest part of the code, it works. Given the ATmega chips allow so many addressing modes for the 32 general purpose registers a chip has, you can just define r24 to be an 8080 accumulator and have it work.
Macros are really useful in assembly language. Don't every forget to leverage the C preprocessor for Arduino assembly. Highly suggest at least looking.