Tiny Basic for the ZX81

Anything Sinclair ZX Basic related; history, development, tips - differences between BASIC on the ZX80 and ZX81
Post Reply
bifteki
Posts: 5
Joined: Wed Jun 07, 2023 8:27 am

Tiny Basic for the ZX81

Post 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.
Attachments
tiny_basic_by_ROGER RAUSKOLB.asm
(68.26 KiB) Downloaded 118 times
User avatar
TMAOne
Posts: 212
Joined: Thu Aug 16, 2012 6:56 pm
Location: Waterloo, Ontario, Canada

Re: Tiny Basic for the ZX81

Post 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.
User avatar
mrtinb
Posts: 1911
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: Tiny Basic for the ZX81

Post 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.
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
User avatar
Paul
Posts: 1517
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: Tiny Basic for the ZX81

Post by Paul »

If I want a tiny basic with integer arithmetic I use the ZX80 ROM :ugeek:
In theory, there is no difference between theory and practice. But, in practice, there is.
Post Reply