Your first experiment / BASIC
Send a message
from Moon Base.
A computer follows instructions. Let’s give it a message, then ask it to run the instructions again.
You can try the browser illustration below right now. To make your own changes on the CoCo, open VCC Plus on your Mac and use a Disk BASIC setup. Save any work you want to keep before changing setups.
Give the message a line number.
At the BASIC OK prompt, type these two lines. Press Return after each one.
10 PRINT "HELLO FROM MOON BASE!"
20 ENDThe number tells BASIC where the instruction belongs. It keeps the line for later, rather than immediately printing your message.
Now run your program.
Type RUN and press Return. You should see:
HELLO FROM MOON BASE!
OKEvery letter of the greeting came from your program. Can you change the message without adding a second line 10?
- Type line 10 again with a different message inside the quotation marks.
- Type
LISTto see the lines BASIC kept. - Predict the next reply. Then type
RUN.
Try it together.
Let someone else choose the message. You supply the instruction; they supply the words. What does the computer do with a question mark inside the quotation marks?
Try three small ideas here.
THE INSTRUCTIONS
10 PRINT "HELLO, COCO!" 20 END
THE REPLY
The CoCo is waiting for your instruction.
This small browser example illustrates BASIC. The full Color Computer runs in the Mac app.
What you just discovered
A numbered instruction can stay in memory until you ask BASIC to run it. Change an instruction and you change the program. In Meet Your Color Computer, the next experiments make choices, save a message on disk, and build a quiz for a friend.
Find Book 1 in the Manual Library →
Adapted from the VCC Plus first-book lessons. This page is a short website sample; the full book and its practice files are available offline in the app.