BINSIC was my 2012 project to emulate Sinclair ZX80/81 BASIC on a modern computer.
It is a series of Groovy classes that provide a mixture of interpretation and ‘domain specific language’ (i.e. executing BASIC as native Groovy).
Over the years bitrot seems to have set in and the code in the GitHub repo wouldn’t work and the BINSIC jar that would allow Java users to execute some BASIC without a Groovy install disappeared.
I have fixed all that now. You can see the Groovy at the GitHub BINSIC repo – and use that to explore or edit the code.
If you just want to cut to the chase then have a look here: http://n4decameron.org.uk/~adrian/
There you’ll find a jar and test.bas – an implementation of Conway’s Game of Life.
To run the code download both and execute:
java -jar binsic.jar test.bas
When the code starts specify filled cells with a character like ‘*’ and empty cells with a space. (You don’t have to fill in a whole line, but a blank line needs at least a single space.
When you have filled in the initial grid type ‘DONE’ and hit enter and the code should start – to advance through the generations hit enter.
Feel free to experiment with your own BASIC programs – I have copied a few from the classic BASIC Computer Games and they generally work – but I’ve not tried anything very long. All contributed programs would be gratefully accepted – happy to consider pull requests at the repo.
BASIC is out of fashion these days – but you can read about the motivation behind the project here.