Another week has gone and this one has been quite frustrating. While some assistance from the ROOL forum's sorted out some bugs in the assembler (and I even found one in !DecAOF so it's not all my fault!), work on the BASIC source hasn't really progressed.
The BASIC source code is like a bowl of noodles - it's all tangled up and it's hard to see where something stops and something else starts. It reminds me of a BASIC program full of GOTO statements where you can't follow the flow, but in assembler it's worse as there is stack and flag management plus register preservation to consider. Reading this code is not only draining my enthusiasm it's also making me think seriously about a re-write. When you only have a few hours a day to work on something you don't need to waste most of that time trying to figure out what a bunch of crazy branch and magic numbers operations are trying to do. The memory management isn't suitable for what we need in TAG either, and it's missing key data-types as previously posted.
We've already internally had an informal correspondence about a JIT compiler written in a a higher level language instead of an interpreter written in assembler. I'm mulling over the consequences of all this at the moment while trying not to get any more stressed about the whole thing. Time for a deep breath...