Close

Future directions

A project log for One kilobyte Tiny BASIC for the 8080 and Z80

BASIC for the 8080 and Z80, fits in 1K of memory, runs BASIC games on a 2K system. Features similar to Palo Alto Tiny BASIC.

willstevenswill.stevens 03/23/2024 at 16:050 Comments

Since version 1.0 of the 8080 version is likely to be ready for release soon, I have been thinking about future avenues of work. The following things seem interesting to me at the present time:

  1. A Z80 version. This will be smaller and faster than the 8080 version, primarily because the Z80 has 2-byte relative jump instructions. I think that this will save a few dozen bytes, which could be used to implement extra functionality and remain under 1K.
  2. A minimalistic Z80 version. By removing FOR/NEXT and some other features, and changing how lines are stored in memory, the code size could be reduced by several hundred bytes. I’m interested in seeing whether I can get down below 512 bytes, since the current smallest minimalist BASIC (Oscar Toledo’s bootBASIC) is 512 bytes long.
  3. A 6502 version. It is not likely that 1K Tiny BASIC will fit in 1K when ported to the 6502, but it will probably fit in less than 2K, and there is currently no other 6502 Tiny BASIC that fits in less than 2K.
  4. Tiny BASIC with constant strings. By ‘constant strings’, I mean strings that are defined in the BASIC program code. They can be assigned to variables, be part of expressions involving comparison and substring operations, and printed, but new strings can’t be created at run time and there is no concatenation operator. No string memory management is needed, but lots of useful things can be done with constant strings. (Compared with most Tiny BASICs which usually only allow constant strings in PRINT statements).

Discussions