Integration of TinyBASIC

It’s been a productive weekend!   I’ve been able to integrate TinyBASIC into the monitor program.  Btw, if case you were wondering why the monitor states that it is G-DOS, it is motivation (and my intent) to integrate a FAT file system into the computer.  Likely using a SD card.  I’m currently working on the design.

But wait!  Integrating TinyBASIC into my monitor program is not all that I’ve done!  I’ve also been working on expanding TinyBASIC with the following items: IN, OUT, PEEK, POKE, and CALL.  That’s right, TinyBASIC will actually have some use other than just printing to the screen.  This will be a great tool for testing hardware designs.

As it is right now, I’ve added the IN and OUT routines.  OUT performs exactly how you’d expect:  ‘OUT NN NN’ where NN is a two digit hexadecimal number.  IN on the other hand I’m still working on.  The routine itself works, but I’m unsure how to finish it off.  What I mean by that is that I need a way to be able to assign a variable, and I haven’t looked deep enough into the code to be able to determine how to do so at this time.  For now, it simply writes the value to a specific address in memory: 0x8015. Which required me toying with memory locations built into the original TinyBASIC source.

Once I can figure out how to assign a variable to the command, it will become much more useful.  And that same scheme can be applied to the PEEK command as well.  POKE on the other hand should be as straight forward as OUT.  And this gives TinyBASIC a new level of functionality, and no more limitations on variables, as you’d be able to access memory directly.

And the best thing about this is that I believe that after expanding TinyBASIC I can keep the entire ROM (including filesystem routines) under 8K. Currently with the Monitor and BASIC the ROM is just under 5K (5013 bytes). I do not see why I wouldn’t be able to keep the I/O routines for an SD card and the Filesystem routines under 3k.  And I should only need a few hundred more bytes for the additional commands.  Of course one must also take into consideration the ability to save files from BASIC and load them again.  Who knows, but 8k is my goal.  We’ll see how well we can accomplish this.

Leave a Reply

Your email address will not be published. Required fields are marked *