The first piece of code I’ve ever written

I am pretty sure that the first computer I have ever touched was a Ice-Felix HC 91, a ZX Spectrum clone made in Romania. It was 1993 and my school was equipped with some computers, most of them being HC 91. The first couple of classes were about learning the keyboard which seemed rather complicated, each key having multiple functions depending on the selected mode. The Basic programming language keywords were printed on the keyboard keys. That was the K mode. After choosing a command, the L (letter) mode was automatically selected allowing you to type the command parameters. There was one particular keyword that drew my attention: DRAW. After playing around with DRAW and PLOT commands, I can clearly remember that this was my first useful┬ápiece of software I’ve ever written:

10 PLOT 0,0
20 DRAW 100,0
30 DRAW 0,100
40 DRAW -100,0
50 DRAW 0,-100
60 PLOT 0,100
70 DRAW 50,50
80 DRAW 50,-50
90 PLOT 10,70
100 DRAW 0,20
110 DRAW 20,0
120 DRAW 0,-20
130 DRAW -20,0
140 PLOT 90,70
150 DRAW -20, 0
160 DRAW 0,20
170 DRAW 20,0
180 DRAW 0,-20
190 PLOT 35,0
200 DRAW 0,50
210 DRAW 30,0
220 DRAW 0,-50

Here is how this program and its output would have looked on the screen (I used here the excellent ZX Spectrum emulator):

About the author

Leave a Reply

Your email address will not be published. Required fields are marked *