Page 1 of 1

Tiny Basic for the ZX81

Posted: Thu Nov 09, 2023 6:54 am
by bifteki
Has anyone ever attempted to port Tiny Basic to the ZX81 ?

Theoretically, all there is to be done, according to ROGER RAUSKOLB is to set a few parameters at the end of the attached file and compile it.

I personally use the 16K rampack, so I don't know what those numbers would look like.

Re: Tiny Basic for the ZX81

Posted: Thu Nov 09, 2023 8:16 am
by TMAOne
I'm not qualified to answer your question, having shamefully never opened Z80 assembly. But I will follow this thread with interest for another reason.

Tiny BASIC intrigues me because I have a Sanyo PHC-20, which is a rare bird natively housing only an "extended" version of Tiny BASIC. I find it quite limiting. I would even say crippling.

There are no floating point numbers, only integer. And variables are named with a single character, limiting the total number to 26.

I'm not sure if the assembly listing you posted embraces or surpasses these limits, but the Sanyo PHC-20, which is barely more than a prototype, is next to useless because of its firmware limitations. My cursory research on the Net turned up only one program of any substance that I could port to the machine, a "Mastermind"-like guessing game. I would of course be interested in more.

The chief feature of Tiny BASIC would seem to be size. It might be interesting indeed to run this language in an un-expanded ZX81 to see what could be done with it. Would it free up more of the precious RAM for application code? My gut says no, but I leave it to others to ponder what would be involved.

I'd like to know about Tiny BASIC--for what platform and purpose it was created, and what useful application code can be created within its limits.

Re: Tiny Basic for the ZX81

Posted: Thu Nov 09, 2023 9:32 am
by mrtinb
It's a huge task to use this with ZX81. First off it assumes to replace the ROM, as it want's to use the RST rutines in start of ROM. That means opening up the ZX81 to replace the ROM, or make an external cartridge for it.

On top of that, it means reimplementing all routines for creating a picture on the screen, keyboard input etc. If programs are to be loaded and saved, it needs to be done as well.

On top of that, the code assumes the computer is using ASCII, which is not the case for the ZX81. And assumes input and output is over a serial line.

So maybe it could be done, by making an expansion with a serial interface, and hardware that disables the internal ROM, and uses the ROM on the expansion. Then you need to connect a terminal to this interface, and in reality only use the CPU of the ZX81. The ZX81 will have nothing on the screen, and no keypresses will work. The communication will be through the serial line.

Re: Tiny Basic for the ZX81

Posted: Thu Nov 09, 2023 12:37 pm
by Paul
If I want a tiny basic with integer arithmetic I use the ZX80 ROM :ugeek: