Here Is a Silly Test Program for the ZX81
This is a little test program I wrote to test out an online emulator.
September proved to be a rather busy month, at work and home. It isn’t unusual for me, and I usually find time to throw a render or program together. As this month closed, I found myself in need of a program to share and not a lot of time. While cleaning up a few things on my laptop, I found this little test program I wrote last month that fit the need.
A testing we will go.
Funny enough, I wrote the program back in August while testing out a new JavaScript emulator. It was short and sweet and did the job intended. Sadly, the export routine is a JSON file. I didn’t spent the time to figure out how to convert it to a something other emulators can use. yet, the program was short enough that I could grab a screenshot.
Test, ZX81 Listing by Steven Reid, 2020
The program, as is, is a fun little demo. It prints ZX81 randomly on the screen—forever! It is basically a big loop that scrolls the text upwards. Nothing super exciting, but it worked great. Specifically, it allowed me to test a few things.
First, it tests how PRINT
works. Surprisingly, this is a pretty complex routine on the ZX81 and a good test of how the overall emulator works and interprets the ZX81’s ROM. In addition, I used boolean logic, functions and other stuff. Everything worked great.
The other thing it tests is the SCROLL
routine, which causes the display to bounce a bit when used on a real ZX81. I suspect it because of the way the ZX81 is designed to shrink the display when not using a 16K RAM pack. Most JavaScript emulators don’t emulate the TV display, so I wasn’t expecting that to work. It didn’t, but still made for a good test.
The last part is that I added a SAVE
routine to test any tape emulation. Again, most JavaScript editors don’t emulate the tape interface. As before, a good test to see what does and doesn’t work.
Recreating for publishing.
Since I just had the screenshot, I needed to get the program into a .P file I could run on most emulators. Given the program is short, I just loaded up my emulator and typed it in. Easy as every. I wish programs on my site were this easy. I spent an hour digging through my CMS code to change few lines. Of course, nostalgia only goes so far.
Test, ZX81 Screenshot by Steven Reid, 2020
I won’t get into what could be different. As a test program, it does its job and is fun to watch. Designed to be easy to enter, I actually tried it on an emulator for iOS as well. Sadly, I can’t save there either, but it was fun to play.
And there you have it. A busy month and a simple test program for your ZX81. Give me a shout if you decide to use it anywhere. Although I’m sure you can write something even better.