Close

Recent work

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/16/2024 at 08:090 Comments

I fixed the operator precedence issue, so that * and / have equal precedence. I also changed to using an LCG pseudo-random number generator because it was shorter. A consequence is that the RND function only uses the high order byte of the RNG state, because the low order bits have a small period. So RND should not be given a parameter larger than 256.


I fixed an issue with the expression evaluator where an incomplete expression would cause it to try to RET without a return address on the  stack. 


I’ve listed the meaning of all error codes in errorcodes.txt


The current version passes all tests and runs all example programs. If no other errors are found it will become version 1.0


I’ve also found a way of simulating keyboard input in Stefan Tramm’s emulator using a short JavaScript program that sends key events to the emulator - I’ll make this available when it’s finished. This will be a good way of scripting tests cases that test error handling and error codes.

Discussions