When I was 11, and in the first year at Secondary school, I found a book in the school library on teach your self BASIC, an early programming language (remember this was 1980).  I taught myself to program and thus started a love/hate relationship with silicon filled plastic boxes.  This has all been brought flooding back by the discovery of a ZX81 emulator to download.  In a fit of nostalgia I downloaded it. Mistake. (click below the break for more self indulgent memoirs)

For Christmas 1981 my parents bought me a ZX81.  I now realise, at £79.95, what a major investment it was.  I was welded to that machine for the next three or four years, when I received a Acorn Electron (a cut down BBC B).  I realise that to those under 30 this all means nothing.

Simply put, early home computers were not PC’s as the kids today know, but an all in one where the keyboard contained the motherboard.  You connected it to a home TV via a aerial lead, and storage was a cassette tape, which you connected via the earphone and mic jacks (Mark this point of the paragraph, dear reader, for later reference).  A programme could take 5 or more minutes to load, and were incredibly sensitive you could spend half an hour trying to get the volume setting just right to load your favourite game over the course of multiple failures.

The ZX81 had 1Kb (yes – 1000 bytes) of RAM, but could be expanded to a massive 16k!  Part of the way Sinclair forced more memory usage was by 1 stroke keyword entry – you pressed P to get the Print command (In BASIC, ‘Print’ displays the text on the next line of the screen).  The RAM there for only had to store one or two characters, instead of 5.  This did mean that you couldn’t type naturally – you had to type the key combo.  So a simple statement such as

IF A = 5 THEN LET K = 10

was typed U A =5  Shift+3 L K=10

and you had to hunt round the keyboard to ensure you did just that: typing naturally would leave you with INPUT F, as I was the key for “Input”.  Some commands, Functions, were displayed under the key, meaning pressing Shift+’Newline’ (ie Enter) then the key.

All this was structured by line numbers, so the computer knew which order to do stuff – no line number was an immediate command.  You learnt to number in 10s, to ensure you had space to type forgotten lines.

All this was done with the infamous ‘touch’ keyboard, where you had to find the contact under each ‘key’ (in reality a white box on a black background) to get your stroke accepted.  Then there would be a definite pause while the Z80 chip went “Yep, I’ll take that one”.

Yet still teen boys all over the country copied programs out of magazines.  I wrote my own, off the top of my head, with no planning (I don’t need no steenking global declaration of variables just declare as you go).  I wrote one of those programmes that was popular in the 80s, where you had to manage a country’s agriculture. (“You have 172 sacks of grain – how many do you wish to plant?”) – all text, because the smallest graphic element was a square a quarter character in size.  However, there were some amazing games out there – 3d Monster maze.  Not only did 16k of RAM get you a large 3 dimensional maze, but you were hunted by a Tyrannosaurus Rex, which lumbered towards you, getting bigger all the time.

So I have just tried to program on the emulator. The emulator which keeps the 1 stroke key-word entry, with a keyboard that keeps the nonstandard layout – ( and ) are on the I and O, while ”  is on the P.

It was a simple program. Loop 600 times – each loop pick a ‘random’ number, and add it to the count for that number (use of an array with 6 cells).  Print (to screen) the count for 1 through to 6.  It took ages just to type – it keeps the ZX81 editing of using the up and down keys to move between lines, then selecting the line to edit.

Remember earlier I said ‘Mark this point’ . Well I set it running, switched back to this window and started typing.  That point was the point the ZX81 finished counting to 600, and recording 600 random numbers. And yet I still I wrote long programs.

Worse still, when I use Visual Basic to write the odd thing at home (more of an intellectual exercise rather form any need, like doing a puzzle) I still find myself going “Well I knew how to write this in the 80’s, what’s the equivalent to …”