In the late 70s/early 80s there was a sudden rash of 8-bit microcomputers on the consumer market. They were all based on either the Zilog Z80 or the MOST 6502 microprocessors. I made a mistake – I bought the Commodore VIC20 which said it had 8k of RAM. I didn’t realise that 3K of that would be loaded with BASIC from ROM at startup leaving only 5k to program with. But I liked the “real” keyboard… Most of my mates went for the Sinclair Spectrum – crappy keyboard but higher-spec (well aside from the limitations of the Z80), more RAM.
The VIC 20, with a real keyboard.
The Spectrum with its dreadful rubber keyboard. Note each key has its own BASIC keyword. Awful!
I messed around with it a lot. I was particularly interested in writing code directly for the 6502 processor but even to get machine-code loaded you had to write a BASIC program and so I became vaguely interested in BASIC.
In the early 80s I entered aircrew training with the Royal Air Force. This was immediately after the Falklands war and there was a huge resurgent interest in Morse Code. This is because with all the Electonic Countermeasures, the only communication that worked effectively during the conflict were the dahs and dits (not dots and dashes – saying that shows you’ve never sent/received morse code) as human operators listened in and could detect tiny differences of tone in amongst all the radio-frequency jamming. They could just about make out a dah from a dit and they could therefore receive messages despite the hostile RF environment.
Searching for submarines on board a Nimrod
I got chopped off the course after just over 12 months because of a security incident and returned to previous duties looking after airborne communications, radar and flight systems. One of the reasons cited for my being chopped was my weakness at receiving Morse code (aside from the security incident that is!).
I immediately re-applied and thought I didn’t want to give them the excuse of Morse code to refuse me. So I wrote a Morse Code program in Commodore BASIC on my VIC20 and I sat there for hours and hours receiving apparently random sets of characters through my headphones.
PJJQ SFHU KIPO ZVCX MVNB RWEQ TYPI HFKD JADL DFRP ……….
Line numbered BASIC with GOSUB and RETURN. I varied the speed at which the characters were sent and slowly built that up until I could receive at about 30 words per minute. But I did notice a problem. I’d think to myself “I recognise this pattern”. Eventually, I discovered the entire series of random characters were part of a very large circular pattern – thousands of characters long, but a pattern nonetheless. So I had to introduce extra random elements to spoil the pattern. All that did was increase the size of the pattern.
This was my first use of BASIC that was of professional value to somebody (me) so I’d say it was my first piece “production” code.
It wasn’t until some years later that I learned about random number generators and how un-random most of them are. It turns out to be very difficult to create random numbers. Imagine if you found a pattern for the pair of primes that are generated for the public key in SSL?
In the end I got fed up with waiting for a decision on whether they’d let somebody with a “security incident” (no I didn’t sell secrets to the enemy!) re-apply for aircrew training, so I left the RAF and joined the computer industry to work on VAX/VMS with DEC. I didn’t touch BASIC again until 1993 when I became massively impressed with how quickly you could knock out a full Microsoft Windows app using Visual Basic v1. It came on 3 floppy disks. After my first experience with it I became convinced Windows would have a great future and I immediately started looking for a job. I eventually got one and that was over 20 years ago…
I haven’t touched Morse in the intervening 30-odd years but I can still remember most of the characters. I’m currently not sure of:
G, J, Q, U, V, W. G, U and W are similar and I get them mixed up.
The theme music for Inspector Morse – those notes at the beginning? They spell “Morse” in Morse code.
Nokia: Some people think the SMS ringtone is “SOS”. It’s not, it’s “SMS”. dih dih dih / da da / dih dih dit.
Nokia: That really long “New SMS” message in morse code says “Connecting”.
dah dih dah dit / dah dah dah / dah dit / dah dit / dit / dah dih dah dit / dah / dih dit / dah dit / dah dah dit. (…and I just realised I remembered G…)…
Planky == @plankytronixx