Sunday, 30 June 2019

NOW FLIP, FLOP AND FLY [183]


The Sinclair ZX80 launched in 1980 as the first complete home computer available for under £100 – it also sold in kit form for £79.95. It may have been a breakthrough, with both the ZX80 and its successor, the ZX81, introducing home computing to millions in the UK, but that £100 price was achieved through compromise that leaves it little more than that first step. Infamously, it only had one kilobyte (1024 bytes) of RAM, when other computers came with at least four times that amount. Its central processor, a Zilog Z80, also generated the video display, meaning the press of a key caused interference with the picture. The keys themselves were flat, requiring you to press through a membrane to the motherboard itself. When the ZX81 was introduced in 1981, a “slow” mode fixed the flickering screen, and £20 was knocked off the price, but if you wanted more than 1K of RAM, you had to buy an expansion pack, required for most games. (By the way, 1024 bytes is the space needed to hold this paragraph, including spaces.)

The limitations of the ZX80 led to arguments that it cannot really be called a computer, even for 1980. However, comparing it against the “1977 Trinity” - the Commodore PET 2001, the Apple II, and the Tandy TRS-80 Model I all launched in 1977 – the ZX80 holds up reasonably well. The ZX80 could only produce a monochrome display, but only the Apple II was capable of colour. All of the computers have no lowercase text option except for the PET, but you cannot mix them with capitals, with only an either/or option for all text. Only the PET and Apple II had sound, a simple speaker to produce beeps, and only the Apple II had the built-in instructions to load programs from a floppy disc – the others would need to be expanded first.


The main contention over the ZX80 is the implementation of the programming language BASIC, short for Beginner’s All-Purpose Symbolic Instruction Code. This language overlays the assembly code that is being fed to the processor, and is much easier to learn - even people who never used an old computer know what a BASIC program looks like:

10 PRINT “HELLO”

20 GOTO 10

RUN

The Apple II and PET computers, like most at the time, would license their versions of BASIC from Microsoft, but Sinclair would employ a software company, Nine Tiles, to write their BASIC. However, the chip that would hold it in the computer was to be only 4 kilobytes in size, restricting the number of commands it could hold. Shortcuts to the commands it had were laid across the keyboard, reducing the space in RAM needed to hold programs, but one strange result of Sinclair’s BASIC was that the ZX80 could not calculate decimal points.

You would expect a computer to divide 5 by 4 and give you 1.25, or divide 20,000 by 10,001 and give you 1.9998. In both cases, the answer given by the ZX80 is just the integer “1”, making you wonder why you didn’t just buy a scientific calculator from Hewlett-Packard instead. The instruction manual doesn’t help this: it is named “A course in Basic Programming,” cementing that this computer is only your first step into computers, but pages 36-38 provides a program for completing long division on your ZX80 to produce an answer with decimal points, like you were using pen and paper anyway.


What the ZX80 missed was the ability to run floating-point arithmetic, which is a way of calculating very large numbers. Basically (which is the right word to use here), floating-point arithmetic as used by a computer notes that the decimal point can be placed anywhere within a number, and you can use an exponent to determine where the point should lie. One answer we wanted earlier, “1.25”, can be written as 125 x 10-2 – this is because we moved the decimal point two places to the right. We could also express it as 12500000 x 10-8, if that proves more useful to a computer.

Before processor clock speeds and numbers of cores became the standard for how fast a computer is, it was previously how many floating-point operations per second, or FLOPS, it can complete – for 1980, tens of thousands of FLOPS is the standard, whereas an iPhone XS can do a billion FLOPS at least. However, if your computer can do none at all, is it really a computer?

Then again, do you need them? One kilobyte of RAM is not enough to do many things, let alone produce a display full of text, but you can make games – the software company Psion, known later for their personal organisers, fit Chess into 1K, minus a couple of rules. I have also seen the BASIC program for a type of Space Invaders game, made mostly of “PRINT” commands to draw the ships, and “LET” commands to apply values to them. Applying logic to the ZX80 is fine, and the reason most games for the ZX81 required more memory was because the games themselves were more elaborate. A popular early computing project was the “TV Typewriter” of 1973, which existed only to put text on screen, with homebrew projects adding memory chips and BASIC to them, and the ZX80, with its motherboard of mostly logic chips, can be seen as an extension of that.

Of course, the ZX81 added floating-point arithmetic to their BASIC in 1981, with the success of the ZX80 having validated the idea of cheap home computing. However, now that I know the Tandy TRS-80’s original BASIC chip was a public-domain version that had floating-point arithmetic added to it, while still fitting into the same 4K that Sinclair had, it makes me wonder why Sinclair didn’t do that in the first place – the ZX80 was inspired by Clive Sinclair’s daughter playing on her TRS-80, so it would have been worth a further look.

No comments:

Post a Comment