Try writing this simple programme:
10 CLS
20 PRINT "HELLO WORLD"
RUN
Press Enter and watch the programme run. Click the Reset menu , then Soft Reset to clear the memory.
Write the programme again but add an extra line
10 CLS
20 PRINT "HELLO WORLD"
30 GOTO 20
RUN
Press Enter to run the programme but you will need to press Esc on the keyboard to stop the programme looping
You can also ask for inputs from the user. Write this programme:
10 CLS
20 PRINT "How old are you";
30 INPUT age
40 PRINT "Your age is " ;age
RUN
A little addition to the code makes it a bit more interesting.
10 CLS
20 PRINT "Hello"
30 PRINT "How old are you";
40 INPUT age
50 CLS
60 PRINT "In 10 years you will be "; 10+age " years old."
RUN
As your programmes become more complicated you may want to write them in Goolge Docs or Notepad and then copy and paste them into the BBC Micro emulator.
CLS
Clears the screen of text
CLS
Clears the screen of text
Prints whatever words are placed inside speech marks (" ").
GOTO
Tells the computer to go to a particular line of code
INPUT
Asks the user to set a value for an variable. The name of the variable follows the command.
LET
Sets a value for an input
LIST
Shows what the code for the programme that is currently being run. There is no need to add this to add this to a programme, just type LIST and it will display the code ( works for CLS and RUN too).
Click on the button to access a full online version of the original BBC BASIC manual.