© Gerald Friedland 2019
Gerald FriedlandBeginning Programming Using Retro Computinghttps://doi.org/10.1007/978-1-4842-4146-2_10

10. A Program

Gerald Friedland1 
(1)
Berkeley, CA, USA
 

In this chapter, you will understand what a program is and even write your first one. As usual, start with this screen:

../images/470770_1_En_10_Chapter/470770_1_En_10_Figa_HTML.jpg

Remember, the black blinking rectangle is called the cursor.

Let’s type a program. It begins with line numbers. Type this:

10 PRINT “HELLO MONA”

Press RETURN.

Then type this:

20 GOTO 10

Press RETURN.

The screen looks like this:

../images/470770_1_En_10_Chapter/470770_1_En_10_Figb_HTML.jpg

Then type this:

RUN

Press RETURN.

What happens?

../images/470770_1_En_10_Chapter/470770_1_En_10_Figc_HTML.jpg

Congratulations! You just ran your first program.

Now press RUN/STOP ESC to stop it.

It looks like this:

Type LIST and press RETURN to see your program again.

It looks like this:

../images/470770_1_En_10_Chapter/470770_1_En_10_Figd_HTML.jpg

You can now use the arrow keys ../images/470770_1_En_10_Chapter/470770_1_En_10_Fige_HTML.jpg to move the cursor and change the program.

Press UP four times to go to line 10. Then press RIGHT 16 times to put the cursor in front of MONA. The M is now blinking.

It looks like this:

../images/470770_1_En_10_Chapter/470770_1_En_10_Figf_HTML.jpg

Now type this:

PAPA

Press RETURN.

The 2 is now blinking.

It looks like this:

../images/470770_1_En_10_Chapter/470770_1_En_10_Figg_HTML.jpg

Now press the DOWN arrow three times. The cursor is blinking under READY.

It looks like this:

../images/470770_1_En_10_Chapter/470770_1_En_10_Figh_HTML.jpg

Now type RUN again.

Press RETURN.

What happens?

This!

../images/470770_1_En_10_Chapter/470770_1_En_10_Figi_HTML.jpg

Congratulations! You ran your second program.

You can stop it the same way by pressing RUN STOP/ESC.

Try more things by repeating the steps from the earlier pages.

Type LIST to see your program.

Use the arrow keys, and type new letters to change the program.

Press RETURN to enter it into the computer.

Go below READY, and type RUN and press RETURN to start it again.

If you want to write a new program, type NEW and then press RETURN.

Chapter 14 contains many examples of programs to play with.

Summary

So, what is a program? A program is like a cooking recipe. It is a list of commands. You can run a program over and over again after typing it in only once.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.114.142