ZX81


The ZX81 is a home computer developed by Sinclair Research and manufactured in Dundee, Scotland, by Timex Corporation. It was launched in the United Kingdom in March 1981 as the successor to Sinclair's ZX80 and designed to be a low-cost introduction to home computing for the general public. It was hugely successful; more than 1.5 million units were sold. In the United States it was initially sold as the ZX-81 under licence by Timex. Timex later produced its own versions of the ZX81: the Timex Sinclair 1000 and Timex Sinclair 1500. Unauthorized ZX81 clones were produced in several countries.
The ZX81 was designed to be small, simple, and above all, inexpensive. Video output is for a television set rather than a dedicated monitor. It contains only four silicon chips and 1 KB of RAM. It has no power switch or moving parts, excepting a VHF TV channel selector switch in some models. It has a pressure-sensitive membrane keyboard. Programs and data are loaded and saved onto compact audio cassettes. The ZX81's limitations prompted a market in third-party peripherals to improve its capabilities. Its distinctive case and keyboard brought designer Rick Dickinson a Design Council award.
The ZX81 could be bought by mail order preassembled or, for a lower price, in kit form. It was the first inexpensive mass-market home computer to be sold by high street stores, led by W. H. Smith and soon many other retailers. The ZX81 marked the point when computing in Britain became an activity for the general public rather than businessmen and electronics hobbyists. It produced a community of enthusiasts, some of whom founded businesses developing software and hardware for the ZX81. Many went on to have roles in the British computer industry. The ZX81's commercial success made Sinclair Research one of Britain's leading computer manufacturers and earned a fortune and an eventual knighthood for the company's founder, Sir Clive Sinclair. The system was discontinued in 1984.

Features

The ZX81 has a base configuration of 1 KB of on-board RAM that can officially be expanded externally to 16 KB. Its single circuit board is housed inside a wedge-shaped plastic case measuring wide by high. The memory is provided by either a single 4118 or two 2114 RAM chips. There are only three other onboard chips: a 3.5 MHz Z80A 8-bit microprocessor from NEC, an uncommitted logic array chip from Ferranti, and an 8 KB ROM providing a simple Sinclair BASIC interpreter. The entire machine weighs just. Early versions of the external RAM cartridge contain 15 KB of memory using an assortment of memory chips, while later versions contain 16 KB chips with the lowest addressed kilobyte disabled.
The front part of the case is an integrated 40-key membrane keyboard. It is mechanically simple, consisting of 40 pressure-pad switches and 8 diodes under a plastic overlay, connected in a matrix of 8 rows and 5 columns.
The ZX81 uses a QWERTY keyboard layout displaying 20 graphic and 54 inverse video characters. However ZX81 BASIC commands are not typed in letter by letter, instead each key has up to five key functions. This is how the user displays the ZX81's BASIC keywords, functions, mathematical operations, and graphics.
The ZX81 key's function is determined by a combination of context in the command and mode selection e.g. SHIFT and FUNCTION keys to select the under key keyboard functions. For example, the P key combines the letter P, the " character, and the BASIC commands PRINT and TAB.
Context mode feedback is displayed by the cursor displaying an inverted letter;
  • K for Keywords,
  • L for Letters,
  • F for Functions or
  • G for Graphics characters.
The fact that to effect a RUBOUT or backspace/delete operation took 2 key presses encouraged ZX81 programmers to be brief and type carefully when entering text or code.
The ZX81's primary input/output is delivered via four sockets on the left side of the case. The machine uses an ordinary UHF television set to deliver a monochrome picture via a built-in RF modulator. It can display 24 lines of 32 characters each, and by using the selection of 2×2 block character graphics from the machine's character set offers an effective 64 × 44 pixel graphics mode, also directly addressable via BASIC using the PLOT and UNPLOT commands, leaving 2 lines free at the bottom. Two 3.5 mm jacks connect the ZX81 to the EAR and MIC sockets of an audio cassette recorder, enabling data to be saved or loaded. This stores each data bit as a number of pulses followed by an inter-bit silence of 1300 μs. Each pulse is a 150 μs "high" then a 150 μs "low". A "0" bit consists of four pulses while a '1' bit is nine pulses, so the baud rate varies between 400 bit/s for all "0"s and 250 bit/s for all "1"s. A file with equal amounts of '0's and "1"s would be stored at 307 bit/s. This provides a somewhat temperamental storage medium for the machine, which has no built-in storage capabilities. The ZX81 requires 420 mA of current at 7–11 V DC, delivered via a custom 9 V Sinclair DC power supply.
The ULA chip, described by the ZX81 manual as the "dogsbody" of the system, has a number of key functions that competing computers share between multiple chips and integrated circuits. These comprise the following:
  • Synchronising the screen display;
  • Generating a 6.5 MHz clock, from which a 3.25 MHz clock is derived for the processor;
  • Outputting an audio signal to a cassette recorder in SAVE mode;
  • Processing the incoming cassette audio signal in LOAD mode;
  • Sensing keystrokes;
  • Using memory addresses provided by the CPU to decide when ROM and RAM should be active;
  • Controlling general system timing.
The ZX81's built-in RF modulator can output a video picture to a UHF 625-line television. France and Luxembourg required a slightly modified version of the machine to match the positive video modulation of CCIR System L sets, while the United States and Canada required a resistor adding to link a ULA pin to ground and different modulator to cope with their 525-line VHF television systems. Both the ZX81 and its predecessor, the ZX80, have a significant drawback in the way that they handle visual output. Neither machine has enough processing power to run at full speed and simultaneously maintain the screen display. On the ZX80, this means that the screen goes blank every time the machine carries out a computation and causes an irritating flicker whenever a shorter computation – such as processing a keystroke – takes place.
The ZX81's designers adopted an improved approach, involving the use of two modes called SLOW and FAST respectively. In SLOW mode, also called "compute and display" mode, the ZX81 concentrates on driving the display. It runs the current program for only about a quarter of the time – in effect slowing the machine down fourfold, although in practice the speed difference between FAST and SLOW modes depends on what computation is being done. In FAST mode, processing occurs continuously, but the display is abandoned to its own devices – equivalent to the ZX80's standard operating mode.
Another hardware quirk produced one of the most distinctive aspects of the ZX81's screen display – during loading or saving, moving zigzag stripes appear across the screen. The same pin on the ULA is used to handle the video signal and the tape output, producing the stripes as an interference pattern of sorts. The ULA cannot maintain the display during SAVE and LOAD operations, as it has to operate continuously to maintain the correct baud rate for data transfers. The interference produces the zigzag stripes.
The unexpanded ZX81's tiny memory presents a challenge to programmers. Simply displaying a full screen takes up to 793 bytes, the system variables take up another 125 bytes, and the program, input buffer and stacks need more memory on top of that. Nonetheless, ingenious programmers are able to achieve a surprising amount with just 1 KB. One example is 1K ZX Chess by David Horne, which includes most of the rules of chess in 672 bytes. The ZX81 conserves its memory to a certain extent by representing entire BASIC commands as one-byte tokens, stored as individual "characters" in the upper reaches of the machine's unique character set.
The edge connector or external interface at the rear of the ZX81 is an extension of the main printed circuit board. This provides a set of address, control, and data lines that can be used to communicate with external devices. Enthusiasts and a variety of third-party companies make use of this facility to create a wide range of add-ons for the ZX81.

Comparisons with other computing devices

The following table provides a comparison between the capabilities of the ZX81 and various other competing microcomputers that were available in June 1981, about the time that the first ZX81 orders were delivered. The prices given are as of June 1981 from Your Computer UK.
DeviceRAM
stan­dard
Expand­able toCPUKeyboardBASICSale priceNumber of
colours
Maximum
resolution
Sound
Apple II Plus16 KB48 KBMOS Technology 6502 @ 1 MHz TypewriterInteger only£54916280 × 192 pixelsbeeper
Atari 4008 KB48 KBMOS Technology 6502 @ 1.78 MHzMembraneextra£289256320 × 192 pixels4 voice
PET16 KB40 KBMOS Technology 6502 @ 1 MHzTypewriterMS Level I£399Monochrome320 × 200 text onlybeeper
VIC-205 KB32 KBMOS Technology 6502 @ 1.02 MHzTypewriterMS Level I£1898176 × 184 pixels4 voice
Video Genie16 KB48 KBZilog Z80 @ 1.76 MHzTypewriterMS Level II£279Monochrome128 × 48 blockbeeper
Compukit 1011 KB48 KBMOS Technology 6502 @ 1 MHzTypewriterMS Level II£149/£199 assembledMonochrome128 × 48 blockextra
TRS-80 Model I4 KB48 KBZilog Z80 @ 1.78 MHz TypewriterRestricted£399Monochrome128 × 48 blockextra
Acorn Atom2 KB12 KBMOS Technology 6502 @ 1 MHzTypewriterTinyBASIC hybrid£140/£173 assembled8256 × 192 mono, 64 × 64 colourbeeper
MicroTan1 KB48 KBMOS Technology 6502 @ 0.75 MHzextraextra£65/£99 assembledMonochrome128 × 48 blockextra
TI-99/4A16 KB48 KBTI TMS9900 @ 3.0 MHz TypewriterRestricted£39916256 × 192 pixels3 voices and white noise
ZX81 / TS10001 KB / 2 KB32 KBZilog or NEC Z80 @ 3.25 MHz MembraneMS Level II equiv.£49/£69 assembledMonochrome64 × 48 blockNo