BASIC: How Kids Coded 40 Years Ago
About 40 years ago, kids wrote programs not with blocks but with words and numbers. Today you will write a program just like they did — and run it.
GOTO does.For parents: a one-page guide — dinner questions and a game without a screen.
01Remember
With blocks you have already put commands in order. Think first, then open the answer.
What is an algorithm?
Steps put one after another to get a job done — like a recipe or instructions for a robot.
What does the “repeat” block do?
It runs the same commands several times, so you do not have to put them together again and again.
In which direction do the blocks of your program run?
From top to bottom, one after another. Today the lines will have numbers, and you will see what happens to their order.
02Story
In the early 1980s many home computers had no mouse and no windows. You switched one on and a small cursor blinked on the screen. The computer waited for you to type. And the language was most often BASIC.
In the early 1980s the BBC started a project to teach the whole of Britain computer literacy. In 1981 the project's machine came out — the BBC Micro — and its language was BBC BASIC. Many children and adults in Britain learned to program on it. On the ZX Spectrum you did not even type keywords letter by letter: you pressed one key, for example P, and the whole word PRINT appeared.
In Bulgaria, the “Pravetz” computers worked in schools. The Pravetz 8C can do the same as the American Apple IIc and it has BASIC too: you switch it on and can start typing at once. And on the Commodore PET from 1977, a short two-line program writes the machine's name again and again, without end:
10 PRINT "HELLO, PET!" 20 GOTO 10
Want to see these machines? With an adult, read the articles “BBC Micro”, “ZX Spectrum”, “XT and Pravetz 8C” and “Commodore PET 2001” in the “Retro” section (they are in Bulgarian): BBC Micro, ZX Spectrum, XT and Pravetz 8C, Commodore PET 2001.
03Worked example
Here is a program with five lines. Read it line by line:
10 PRINT "HELLO!" 20 PRINT "I AM A COMPUTER." 30 GOTO 50 40 PRINT "YOU WILL NOT SEE THIS" 50 PRINT "THE END"
The line number
Every line starts with a number. The computer goes from the smallest number to the bigger ones. That is why lines are numbered 10, 20, 30 and not 1, 2, 3: later you can squeeze in a line 15 between 10 and 20 and nothing breaks.
PRINT
It shows on the screen whatever is inside the quotes. Line 10 and line 20 show “HELLO!” and “I AM A COMPUTER.”
GOTO
Line 30 says: “Go to line 50.” The computer jumps over line 40 and never runs it.
The end
Line 50 shows “THE END”. There are no more lines, so the program stops.
04Try it
1 · Predict
Here is another program:
10 PRINT "FIRST" 20 PRINT "SECOND" 30 GOTO 10
What will it do when you run it? Choose before you check.
2 · Run
This is a mini interpreter — a small program that reads your lines and carries them out. It knows only PRINT, GOTO, END and REM (a note). Press “Run”. If the program never ends, press “Stop”.
Nothing is saved or sent — programs stay only on this page. Text needs quotes: PRINT "hello". You do not need to open a real computer — everything here is on the screen.
3 · Change
Try these one at a time and see what happens:
Change line 30 to
30 GOTO 20. What changes? Which line no longer repeats?Put line 30 back and add
15 PRINT "IN BETWEEN". Type it at the end, below all the others. Where will it appear?Delete line 30 — or type just
30below, with nothing after it (in old BASIC that is how you deleted a line). What does the program do now?Make a mistake on purpose: type
20 PRNT "SECOND". The computer will tell you which line it does not understand. A mistake breaks nothing.
05No screen: “Program on Paper”
You need: a sheet of paper, a pen and one more person.
Write a program with line numbers on the sheet:
10 PRINT "YES"·20 PRINT "NO"·30 GOTO 50·40 PRINT "SKIPPED"·50 PRINT "THE END"The other person is the computer. They put a finger on the smallest number and carry out that line. At PRINT they say the text aloud.
At GOTO they move the finger to the line with that number. What did you hear? What was not heard?
Swap roles. Write a new program whose last line is a
GOTOto the first line. When will the “computer” say “STOP”? You decide — like the “Stop” button.
06Make your own
Write your own program. Two ideas:
- A card: a program of 5–8 lines that prints a greeting or a small picture made of characters — for example a staircase of stars.
- A kind message without end: a program with
GOTOthat keeps writing a kind word forever. Then stop it with “Stop”.
The page does not keep your program. Copy it on paper and show it to someone at home — and explain what each line does.
07What I learned
- A BASIC program is made of lines with numbers. The computer runs them from the smallest to the biggest.
PRINTshows,GOTOjumps to another line. AGOTOthat points back makes a loop that may never end.- The numbers 10, 20, 30 leave room to put a new line between them.
The computer follows its lines one after another, always in the same order. And you — which things do you do every morning in the same order?
Check yourself
1. What does GOTO 10 do?
2. Why are lines numbered 10, 20, 30 and not 1, 2, 3?
3. How do you stop a program that never ends, on this page?
It is yours when you can write a program with PRINT and GOTO and explain to someone what each line does. No points and no rankings — just a skill.
08I have a question
Do you still have a question? Write it here. It goes to your parent, not to strangers. Your parent confirms their e-mail first.
The form is loading… If it does not appear, write your question on paper and show it to a parent or teacher.
·Sources
- Title: BASIC: How Kids Coded 40 Years Ago (DB-BL-06) · Author: Children's Library, East Accelerator Foundation · Source: original content and original interpreter code, 2026 · Rights: CC BY-SA 4.0.
- The story (checked 01.10.2026): kagami.bg articles in the “Retro” section, in Bulgarian — BBC Micro · ZX Spectrum · XT and Pravetz 8C · Commodore PET 2001.
- School link: none — the lesson is enrichment after the block lessons.
- Licence: CC BY-SA 4.0 · Children's Library, East Accelerator Foundation, 2026. You may share and adapt this lesson if you credit the author and keep the same licence. Learning is free forever.