Review: Sinclair ZX81

Authors

Publication

Pub Details

Date

Pages

A refurbished Sinclair ZX81 version— the Timex Sinclair 1000— is now being distributed throughout North America. Timex Corp. (Waterbury, CT) has licensed exclusive rights from Sinclair Research (Boston, MA) to market the revised unit.

We are offering the following article for the thousands of owners or prospective owners of the original Sinclair unit. In an upcoming issue, we plan a review article on the enhanced Timex Sinclair 1000. —ed.

The Sinclair ZX81 is reported to be the world’s most popular computer. It has been produced at a rate of 50,000 units per month since mid-1981. Any machine so prolific clearly deserves a closer look. This affordable microcomputer has been available in preassembled or kit form. There are several versions of the machine. It may be supplied with two different sets of memory chips— either two 2114s or one 4118— and may output to a TV on various channels using several line/screen conventions depending on national requirements.

We ordered our machine in kit form and used the actual construction phase as a learning experience.

The keyboard is of the membrane variety. It is connected by means of two edge-type connectors into which the plastic (mylar) tails of the keyboard are pushed. These tails have conductive traces. We connected a TV and powered up uneventfully (with a sigh of relief) and found everything to apparently be working correctly. Unfortunately, after putting the board in the casing and sticking the keyboard to the casing, several of the “keys” refused to work. We then opened the casing, disconnected the keyboard and very carefully re-seated the tails in their socket. This corrected the fault— and we have had no further problems with hardware.

Mention should be made of the power supply for the ZX81. Instructions say a 9V DC power supply is best, but the amperage rating is important. We bought the 16K-byte RAM pack as an add-on. This extra memory will increase the power requirement. The manual specifies 700 mA at 9V. The assembly instructions require 8-12V at 600 mA (1.2A if the printer is attached). A colleague who bought the ZX81 by mail order in the U.S. received a 9.75V power supply rated at 650 mA. In the U.S., a power supply is included in the purchdse price of both the ZX81 kit and assembled version. In Canada, one must pay $19.95 extra for the power supply.

We found the ZX81 to work quite well with a 5-in. solid state black and white portable TV/radio. This version seems to produce channel 39 in the UHF band. We had to adjust the vertical and horizontal hold, contrast and brightness slightly from the settings used for watching TV broadcasts. The Game-TV switch box supplied with the ZX81 is only marginally useful. We also tried an older tube-type black and white 12-in. portable TV and a solid state color 12-in. portable TV without success. The black and white TV had been used for some time with a Pixie-verter as the output screen from a Jade VB-1B in a North Star Horizon computer. With the ZX81, both unsuccessful TV’s showed so much flicker, image-shaking and lack of horizontal hold that we had to abandon them before getting motion sickness.

The cassette port on the ZX81 worked well— the most reliable we have encountered. After minimal adjustment, we found an appropriate set of volume/ tone settings for two different cassette recorders. The ZX81 cassette port does not seem to need excessively high volume levels. We tested it with large programs (about 150 lines) and found it satisfactory. When the cassette is recording or playing, the signal is also sent to the screen, yielding a striped pattern. The only data we have lost appears to be due to an imperfectly-seated “record” jack. We are now very careful to make sure these are “home” before saving or loading programs.

RAM supplement is offered

The 16K RAM pack has an edge connector that attaches to one corner of the main circuit board. It is actually a 15K-byte supplement to the on-board 1K and allows the ZX81 to tackle programs other than trivial ones. The RAM pack does not seem too securely connected, particularly as the casing on our ZX81 is not perfectly flat and wobbles unless we lay it on a pad.

How could the hardware of the ZX81 be improved? Here are a few suggestions. A power-on LED would be useful. It is difficult to know it there is power present, particularly when trying to tune in the TV. Some screws should be provided to hold the RAM pack firmly in place. A key click would allow the user to know a keystroke has been registered as the membrane contacts respond to a very light touch. A direct video output for those with monitors or instructions for such a modification would also be valuable. Regulated 5V power input or modifications for this should be available. The voltage regulator and heat sink get quite hot in use. We tried using a 6V battery as a power source, but its voltage was too low to drive the system. A more rigid “tail” for the keyboard to facilitate the connection should be employed.

The ZX81 runs its own dialect of Basic, but is relatively easy to program. Perhaps the most difficult part of the job is figuring out how to enter program lines. The keyboard is very busy— keys have up to five functions. For example, the W key has OR, UNPLOT, COS and a specidl symbol for graphics. These functions are context-dependent, If one is at the start of a line, the cursor is an inverse video K (white character on a black background instead of the usual black-on-white). The K in this case means “keyword” and touching any key then gives its keyword equivalent.

Some examples are: P=PRINT, I = INPUT, L= LET, F = F0R. Numbers retain their literal identity in this mode. Other inverse video keys are L for input, F for function and G for graphics. After a keyword has been entered, the machine automatically changes to input mode. In this mode, the keys have their normal function. At this point, suppose we have entered

10 FOR

where the FOR has been created by a single touch of the “F” key. We could now enter the following keystrokes.

I
=
1
space
T
O
space
9

This will, unfortunately, result in a syntax error after the “1”, indicating that the “T” and the “O” should be replaced by a single shifted keystroke, which puts “TO” on the screen. Newcomers as well as experienced users may find that this explicit tokenizing of the Basic keywords takes some getting used to. Also, somewhat disconcerting is the fact that the edit mode (inverse video “>” cursor) always inserts keystrokes wherever the cursor is located. To erase, one must move the cursor to the right hand side of the offending material and use “rubout” (shifted 0). There are four items in the keyboard, arcsin, arccos, arctan and pi, which are displayed differently. On the screen, these items appear as ASN, ACS, ATN and PI.

The command “EDIT”, shifted 1 (one), is very useful in clearing the screen of garbage resulting from unintended keystrokes. When a program is present in memory, it can be used to alter lines. The keyboard is too small for touch typing. Since the Z80 microprocessor is handling all the Input/Output, the screen and computations, one can easily exceed the rate at which keystrokes can be entered. In this regard, tokenizing saves time once the user is accustomed to it.

From a naive-user point of view, the ZX81 is a superb learning tool. The manual is, by and large, well-written. In its 179 pages and 28 chapters are a step-by-step guide to both the ZX81 and Basic. There is an index to all topics, keys and how to obtain them and three appendices covering the ZX80 character set, report codes and the idiosyncrasies of the particular version of Basic used. Nevertheless, we have discovered some oversights and small errors in the manual that may cause beginners annoyance. One source of confusion was the syntax error mechanism at the end of Chapter 2. This needed some practice before it was fully understood. It would have been useful at this point in the manual to have had some indication of how to get rid of the garbage that resulted during this exercise.

The author of the manual spends considerable time describing how to turn on the machine, but nowhere is it described how to turn it off or the best sequence for doing so. Some errors were noted in the exercises at the end of the chapters. Exercise 1 in Chapter 5 refers to antilogs in another chapter— the reference is wrong and the correct reference is probably Chapter 4, Exercise 4. The expression to be entered in Chapter 7, exercise 2, results in a syntax error halfway through. The correct expression to be entered is:

PRINT "X";"";"X", , or 
PRINT “X";“";"X",

In this case and others, it would be helpful to have some idea of what the results should look like or what the answer should be. This is done in some cases but should be done for all exercises. Predictably, some users will find the British references (pounds, shillings and pence) quite odd.

The ZX81 is somewhat unusual in its set of capabilities when compared to many other machines currently available. It can, with the 16K RAM, hold quite large programs with reasonable space to spare for data. However, it is not equipped with a mechanism for determining just how much of that space is left at any moment— there is no SIZE, FREE or MEMory function. Since it is possible to create user machine code programs and run them via the USR command, it is probable that such a capability, could be programmed by experienced users. When the ZX81 runs out of space to store program lines, it starts to delete things from the screen memory, so some strange things happen on the display as the program becomes “too big.” For example, attempts to use too much space when a program is executing by trying to dimension an array too large will cause an error code to be displayed and execution to halt. The error or report codes are quite cryptic (there are only 16 possibilities). This is a potential source of frustration to newcomers.

The ZX81 Basic is rich in features. It offers a solid floating-point arithmetic implementation: the mantissa (significant digit part) of each floating-point number is a full 4 bytes or 32 bits. Binary arithmetic is used, so the maximum exponent range is 255. In fact, one can easily determine that the largest exponent is 126 (that is, the number multiplying a particular mantissa can be at most 2^126 or approximately 8E + 37). The smallest exponent is – 128, so numbers with this exponent have their mantissa multiplied by 2^-128 or approximately 3E-39. The ZX81 appears to round up.

The ZX81 is highly interpretive. Responses to INPUT statements can be any valid expression and can involve functions such as SIN, LN or ** (raising to a power). Because of this, perhaps, the interpreter allows INPUT to accept only a single number. Furthermore, one is not allowed to have a prompt.

Similarly, extensions and restrictions are found elsewhere in ZX81 Basic for example:

  • only one DIM per statement
  • LET must always be used in assignments
  • multi-letter variable names but single letter names for arrays, strings or for the control variable of a FOR loop
  • string arrays and unconventional string handling
  • GOTO as a command rather than a program statement
  • no DATA, READ or RESTORE; but arrays and strings, once created, can be SAVEd on tape— even if the program lines that created them have been deleted
  • no mechanism appears to exist for saving data on tape except as part of a program
  • use of a unique character set with tokens. This will inhibit interconnection with ASCII devices.
  • graphics characters and plotting
  • recursive subroutine calls
  • no ON statement but GOTO expression is allowed, as is GOSUB expression
  • no multi-line delete

The computational speed of the ZX81 is pleasing. In FAST mode, it ran the following program in 14.6 seconds (i.e. each transcendental function took less than 50 mS on average).

10 FOR 1= 1 to 100 
20 LET X= EXP(SIN(C0S(1 ))
30 NEXT I
40 STOP

In SLOW mode, calculations take about four times as long, and the ZX81 seems to reformat the screen for each new number, which further extends the elapsed time.

The Sinclair ZX81 is a small, inexpensive, comparatively powerful calculating engine. Its speed, numerical precision and function set make it a good tool for trying out numerical algorithms. Flexible string handling also allows it to be used to test certain non-numeric programs, but lack of tape storage facilities for data is a hindrance. Despite very small size, its power demand and need for a television and a cassette recorder mean it is not a truly portable computer. The confining keyboard will annoy some users— especially those who touch-type.

In the realm of teaching elementary computer programming, the ZX81 is clearly a winner. This appears to have been a main design criterion for its makers— and they earn high marks for catering to this market. The price of the ZX81 makes it cheaper than most computer programming courses— and you get to keep the computer.

Products

 

Downloadable Media

 

Image Gallery

Scroll to Top