Tuesday, 14 June 2011

BASIC frustration

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...

5 comments:

  1. Very sorry to learn of these problems. Perhaps Sophie Wilson might be able to recollect some additional stuff, after all these years. At the very least, she may be willing to advise whether a complete rewrite really is the best way forward. If so, just how much effort would that be and how many people would need to be working on it?

    ReplyDelete
  2. Thanks for the supportive comment. There are some major structural difficulties with the code more than detail about any particular method. It's no surprise that previous attempts at extending the syntax have failed.

    For now I'm looking at "hacking" in the code for the assembler, and will get assistance from the ROOL community if I have any difficulties implementing expressions / functions / variables.

    We'll then take a view about our requirements for TAG. I've already drafted some ideas for TAG BASIC / TAG Script if we go completely mad and decide to go that way!

    ReplyDelete
  3. I am not sure if changing BBC BASIC is the best idea if you really want to implement all the changes you envisaged. I know that other people investigated the source code and saw little opportunity to do meaningful extensions while keeping backward compatibility.

    If you really want to keep it close to BBC BASIC, have a look at extending Brandy. On the other hand, if you want a compiled language, how about porting FreePascal along with some Delphi-like class library for the WIMP...

    ReplyDelete
  4. Superbly written article, if only all bloggers offered the same content as you, the internet would be a far better place. This brand is known for the service it gives but in case it bumps you in some issue what will you do? You should get in touch with experts of Norton Phone Number UK . Call at Norton Support Number UK and the experts here are ready to solve all your issue in Norton.

    ReplyDelete
  5. Hi,
    yes, That is great idea for longtime. i am agreed with you.
    We are offering a new and latest Epson Printer Customer Support. Call @0800-090-3224 for Epson Printer Support, Epson Printer Helpline UK, Epson printer Support Number, Epson Printer Customer Support, Epson Printer Customer Service, Epson Printer Technical Support, Epson Printer Help Number.
    Epson Printer Help Number

    ReplyDelete