Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding new commands to ZX BASIC
#8
cheveron Wrote:I was assuming it would need to be done in Python. I had a look over the code and it seems that you are pre-tokenizing the .BAS files. Assuming you don't want to use tokens for commands currently implemented as libraries that still gives you codes 0 to 5 to use for new commands.

First of all, happy new year to you all. Sorry for the delay: I've been giving a big *boost* to ZX Basic 1.4.x (new generation compiler), so was not very present in the forum

Regarding to your question, I think you're referring to the .BAS tokenizer for the loader. That is, a Sinclair Basic Loader packed within the .tap/.tzx files to load and execute the machine code. It's very (*VERY*) simple and just tokenize little listings, such as LOAD "" CODE, RANDOMIZE USR or the like.
Of course this could be easily extensible, but it's not related to the compiler.

I'm currently working on other part, so users can add more compiler target systems (e.g. MSX).
If you can code SCROLL to be used with parenthesis, then you can implement a .bas listing with a SUB and that's all.
Other thing could be to add something like ".obj" or ".dll" libraries (and releasing only the header function, a la C). But at the moment no one has been able to found a good documentation on .obj files used for example in Z88DK. Doing so will allow ZX Basic and ZX88DK libraries to be interchangeable!
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)