News + Trends
Basic programming language celebrates its 60th birthday
by David Lee
A throwback to the good old days: programming a game on my 30-year-old pocket computer and saving it on a music cassette. I even manage to transfer the program to a computer.
Here’s a PC. And by PC I don’t mean personal computer, but pocket computer. You could also call it a calculator, because that’s exactly what the Sharp PC 1403H is. But one that can be programmed. It’s not far removed from a personal computer of the time.
The Sharp PC-1403 without the H suffix, i.e. with only 8 instead of 32 KB memory, has been around since 1986. What we’re looking at here is technology typical of the 80s. The one I have is from around 1993. Back then, I used the pocket computer for math lessons at school.
Similar to a Commodore C64, the Sharp PC is programmed in BASIC. Although the screen only consists of one line of text, simple graphics can also be programmed using the PEEK and POKE commands.
I’ve been wanting to revive the device for years because it still works perfectly. However, the computer itself can’t save programs forever. The battery lasts a long time, but when it’s empty, all code lines are lost. The same applies if an internal error occurs and you have to reset it. The Sharp PC then asks the infamous question, «Memory all clear O.K.?», which can only be answered with «yes».
To prevent the loss of painstakingly developed programs, there’s nothing left to do but copy them line by line and retype them as required. For larger programs, this is far too much effort.
But there is a solution. In the 1980s, software was often stored on music cassettes. And this works with a Sharp-1403H. However, you need a cable that links the computer’s proprietary 11-pin connector to an audio input. It’s not witchcraft to manufacture one of these cables, so it’s still possible to find a cable here or make one yourself.
With a we are rewind portable cassette recorder, I save a small mental arithmetic program that’s still on the computer from years past. To do this, I press Record on the cassette player, type CSAVE on the computer and press Enter.
The cable then transmits audio signals to the cassette and simultaneously outputs them to the built-in speaker. It sounds a bit like a modem from the early days of the Internet age.
Loading a programme works in a very similar way. I type CLOAD and press play. As soon as charging begins, an asterisk appears on the display. To my delight, the software loads on the first try. Any code already on the computer is deleted.
I used the cassette player out of curiosity and nostalgia. It’s not particularly practical. If you have several stored programs, you’ll quickly lose track of them on a cassette – especially if your recorder doesn’t have a tape counter. This would allow you to locate the start position of a program when fast-forwarding and rewinding.
It makes more sense to transfer the audio signal to a computer. The audio file can then be shared with others. With Sharp Pocket Tools, you can also convert the audio files into source code and vice versa. Text recognition could even be used to transfer programs on paper to the Sharp PC. Although this is cumbersome, it’s still faster for large programs than entering everything by hand.
Now the time has come, I can programme without fear of losing data. My first program is a thinking and guessing game. I call it Four-Letter-Word because you have to guess a four-letter word. The letters A to F can occur, but only once. After each attempt, the program tells you how many letters are correct and how many appear but are in the wrong place. The process is similar to the game «Mastermind».
Basic doesn’t always mean basic. Every device has its own characteristics. My Sharp PC, for example, doesn’t recognise an ELSE statement, and after an IF query, the otherwise optional LET becomes mandatory. You need to know these things, otherwise you’ll lose a lot of time. A great guide is the Basic Comparison Sheet, which lists the basic options for numerous pocket computers.
If you want to download the game to your Sharp PC and try it out, you can download the audio and source code here.
My interest in IT and writing landed me in tech journalism early on (2000). I want to know how we can use technology without being used. Outside of the office, I’m a keen musician who makes up for lacking talent with excessive enthusiasm.