Home > Computers > ZX Spectrum > Articles > SU 7/82

Taking the lid off the Spectrum
Sinclair User, July 1982


Stephen Adams looks inside Sinclair's latest machine and finds it has a lot in common with the ZX-81

THE ZX SPECTRUM is very similar in shape and style to the ZX-81 and there are many similarities. Sinclair has kept the original keyboard to save space but has provided a rubber sheet with moulded keys on it which fits over the top. The sheet is suspended over the flat keys - which on the ZX Spectrum are bigger than the ZX-81 - so that when a key is pressed it bends to give some feel to the keyboard.

That and the fact that the keys repeat if held down for longer than one second, even when using SHIFT, makes the keyboard much easier to use. The single keyword system has been retained and that saves memory, as all the Basic words can be stored as one byte. It also means that two SHIFT keys are required to reach all the functions; one is called CAPS SHIFT and the other SYMBOL SHIFT. They are at opposite ends of the keyboard and as they are often used one after another, it tends to slow the input speed as you are constantly swapping hands.

For instance, RUBOUT and the cursor movements use CAPS SHIFT and +-* are SYMBOL SHIFT. It would have been a better idea to put both on the left-hand side, as they often need to be used together and could be pressed with one hand while the other searches for the appropriate key.

The keyboard is an input-output mapped device, as on the ZX-81, and along with the ZX printer, which is the same for the ZX-81 and the Spectrum network/RS232 interface, discs, loudspeaker, tape interface and border colours require only one address line to work. That means that you must make all of the lower five address lines a binary 1 to use your own devices.

The input-output map access has been improved greatly, however, with the addition to the Basic commands of IN and OUT. They give an instruction IN A(c) or OUT A(c) where registers BC give an address from 0 to 65535.

The memory-mapped addressing of the RAM/ROM occupies 0-16K and the RAM 16K-32K on the basic 16K model. There is provision for an extra 32K board to be plugged in to IC sockets at the back of the printed circuit board. The 48K version will have the board fitted but to add it later it will cost £60, which I think is expensive.

There would be no difficulty in adding extra ports to the memory map, as on the ZX-81, above 32K on the basic version - but for two things. There is no RAM CS line, so that the extra RAM can be turned-off if required on the edge connector and the edge connector address lines have been moved to the outer edges so that it is incompatible with the ZX-81. The Spectrum has a 28-way double-sided edge connector of the same style as the ZX-81, with the keyway on pin 5. That makes any input-output device compatible with the ZX-81 but any memory-mapped devices would have to be rearranged. The edge connector also has a number of new signals on it which are not explained in the manual, plus a video output and colour outputs for VDUs.

All the voltages used on the Spectrum are also brought out, namely +5V, -5V, +12V and -12V. They are obtained from the same buzzing transformer as is used in the 16K RAM pack and most of that RAM pack seems to have been transplanted on to the Spectrum.

The obvious additions to the circuitry are the PAL colour mixer under the metal can which contains the video modulator and the fact that two crystal-controlled oscillators are used, one for the ULA, which controls the screen among other things, and the other for the colour mixer. The 14mHz clock for the ULA is also used to drive the Z-80A microprocessor after it has been reduced to 3.5mHz. That is 0.25mHz faster than the ZX-81. The Z-80A has also been freed of the job of putting-out the screen - by the ULA - and so no longer requires the commands FAST or SLOW, as it works at top speed all the time except when BEEP or PAUSE is used.

PAUSE and BEEP both cause the Z-80A to stop for a time determined by the programmer and so it will do nothing else while those commands are being done. BEEP commands should be kept short in a program for that reason; 0.01 seconds is a good speed to PRINT AT and BEEP at the same time.

As for programming the Spectrum, it can be considered as an extension of the ZX-81 Basic. The PAPER, INK, BRIGHT and FLASH commands for each character square are stored in a memory map above the dots for each character. They are all stored in one byte per character and can be read by the Basic word ATTR and altered either by Basic commands or POKEs.

The dot screen is a different matter, however, and cannot be altered so easily, as the dots are stored in peculiar order, so you have to use the graphics commands which can define all the dots on the 22 line by 32 character screen available to the user - or the SCREEN command.

There can be only two colours for each character square, one for the foreground (INK) and one for the background (PAPER), but they can be any one of eight colours. They can also be inverted at a rate of one per second continuously, square by square (FLASH) or have two intensities of colour (BRIGHT).

The screen takes up 6,912 bytes of the 16K memory and the system variables take up another 738 bytes. The rest of the memory is not free for the user to use as 11 other areas float above location 23733 and can expand and contract as required by the Spectrum.

The program and variables are sandwiched in the middle of those, so REM statements cannot be used for machine code. There is an area, however, which can be used for machine code programming above RAMTOP which is ignored by the Basic and its length can be defined by the user.

The user-definable characters area is stored above that so they can be kept from program to program.

There are many tape arrangements which can be made with the Spectrum. The program, strings or machine code can all be SAVEd, LOADed and VERIFYd separately. The variables and screen can also be stored on tape but cannot be VERIFYd. As each is SAVEd, a message to start the tape recorder will appear and wait for you to press a key. That is a very good example of the user-friendliness of the machine and most of the errors appear with similar messages.

SAVEing or LOADing causes the border to flash red and green or red and blue, depending at which part of the tape you are looking. All of my tape programs LOADed correctly and I was surprised with the difference in speed between it and the ZX-81.

I have been able to deal with only a few subjects. There is so much more to learn about the Spectrum from the manual that it would become a series if I did not stop now. The Spectrum is real value for money and easy to use. It has some peculiarities but they do not seem important when you look at what it can offer. With disc, networking facilities and RS232 interface it is a great improvement on the ZX-81 but it cannot replace it, as the price of £129.95 will still be a little daunting to those who want to try a computer for the first time.