My first computer was a Sinclair ZX-81, a masterpiece of low-cost design. The entire computer was smaller than a medium pizza box, but it did have some drawbacks. To keep down costs, it did not include a monitor, but to encourage wider adoption, it produced NTSC video, so it could be used with most television sets. I purchased a big, clunky stereo boombox with built in black and white television to go with it. I used the television as my display. The ZX-81 also supported standard cassette tape for digital storage. It wasn’t perfect, but it usually worked. The first thing I did when I got my boombox was void the warranty by opening it up and adding a switch that would allow me to run the television and cassette player at the same time. I could use it more conveniently with my ZX-81.
The computer itself wasn’t much to look at. It was smaller than a pizza box and had a cramped membrane keyboard. One of the first upgrades I made was a real keyboard. I also expanded the memory to 64 kb.
The ZX-81 sported a custom version of BASIC known to aficianados as “Clive Code,” after Clive Sinclair, the man behind the computer. Clive Code had some interesting and unique features. My favorite was VAL() function, which would evaluate a string as if it were code. It was possible to build very complex expressions using string variables and then have them execute as a single line of BASIC. In the early 1980s when I returned to college after a six-year stint in the Air Force, my ZX-81 went with me. The college had a DEC PDP-11 for students. (This was before PCs had become common everywhere). Since the native language on the PDP-11 was also a version of BASIC, students in numerical analysis were supposed to write all their programs in BASIC instead of in FORTRAN like the examples in the text. I would write my numerical analysis programs on my ZX-81. When they were debugged and working properly, I would print out a copy of the code, walk across campus to the Computer Center, and enter my code at one of the terminals on the PDP-11. Usually I could do what little translation was needed in my head. Occasionally, I found I could even write my program in more compact form on my ZX-81.
The printer driver actually shared code with the video driver, so it was always possible to print what was on the screen. Unlike the video driver, which ran from ROM, the print driver was copied into RAM before running. By tweaking it and adding your own code, you could print things that were higher resolution than could be displayed on the screen. Keep in mind that the printer used a print head that mimicked the scan lines on a television. It used electrostatic sparks to burn the surface of metallic coated paper. It was a marvel of cheap technology but not at all practical for business applications.
I learned what little I know about assembly language programming from my feeble attempts to write assembly language for the Z-80 chip in my ZX-81. I think it was the most educational toy I’ve ever owned. I wrote dozens of short, single-use programs with no utility beyond the momentary problem they were designed to solve. It was fun.
The Sinclair ZX-81’s success was short lived. Within a few years it had been entirely supplanted by other, more-capable systems. By the time the IBM PC was introduced, it was already an obsolete product. When my printer finally went out, it was impossible to find a repacement, and I had already moved on, too. Still, I sometimes feel a little wistful, thinking about how easy it was to write my own programs on the ZX-81. I can’t even begin to make headway with Java or C++.