Teaching Kids to Program on an Atari Today: A Learning Path

Atari GRAPHICS 7 screen with thin purple and teal lines forming three sides of a rectangle, drawn with the joystick, above an empty blue text window

An Atari 8-bit is a surprisingly good first computer for a child today. It starts in seconds, does one thing at a time, and puts a programming language one keypress away. A single line makes a colour or a sound, and nothing gets between the child and the machine. In the 1980s Atari and the publishers aimed at exactly this audience: there were cartridges such as PILOT and Logo built for classrooms, and shelves of books with titles like Kids and the Atari.

This guide is a learning path, not a language course. It suggests an order, gives tested starter programs for the early steps, and points to the detailed guides on this site and to period books for each stage.

Before you start: the set-up

  • Real machine or emulator? A real Atari with a joystick is more fun and has no distractions. Pair it with an SD-card drive or a FujiNet so programs load quickly and nothing is lost (see Buying a Used Atari 8-bit Today and Connecting an Atari 8-bit to Modern TVs and Monitors). An emulator such as Altirra or atari800 costs nothing and makes saving and screenshots easy. The Atari keyboard layout takes some getting used to on a PC.
  • Which BASIC? If an emulator has no Atari BASIC ROM configured, it uses Altirra BASIC. That's fine for learning, but a few variable names that work in Atari BASIC (DIR, MOVE, ERR and others) are reserved there, which can confuse a beginner typing in a listing. See Altirra BASIC in Practice.
  • Saving. Teach SAVE "D:NAME.BAS" and LOAD on the first day. Losing work is the quickest way to lose interest.
  • Short sessions, real goals. "Make the screen flash in your favourite colour" beats "learn about variables".

Step 1: Turtles (ages about 6–9)

Start with something that draws. Both of Atari's educational languages have turtle graphics: you steer a turtle around the screen and it leaves a line behind it.

  • Atari Logo (LCSI) is the richer choice. Children type FORWARD 50 and RIGHT 90, then teach the turtle new words with procedures (TO SQUARE ... END), then discover recursion by accident. It also has four turtles with custom shapes, collision "demons" and a TOOT command for sound. See Atari Logo Basics.
  • Atari PILOT was designed for teachers. Its two-letter commands (T: to type, A: to accept an answer, M: to match it) make quiz programs easy, and its GR: turtle graphics come with it. See Atari PILOT for Beginners.

Period books for this stage include David Thornburg's Computer Art and Animation: A User's Guide to Atari Logo (Addison-Wesley, 1984), Atari PILOT for Beginners by Jim Conlan and Tracy Deliman (Prentice-Hall, 1983), Atari PILOT Activities and Games by Herb Kohl, Ted Kahn and Dale Disharoon (Prentice-Hall, 1983), and, for the youngest, Computer Playground on the Atari by M. J. Winter (Datamost, 1984), subtitled "computer activities for the young child".

Step 2: BASIC as a toy (ages about 8 and up)

Switch to Atari BASIC by playing in direct mode: commands with no line number run at once.

SETCOLOR 2,4,4
SOUND 0,121,10,8
SOUND 0,0,0,0
GRAPHICS 3
COLOR 1
PLOT 0,0:DRAWTO 39,19

The first line turns the background purple, the second plays middle C until the third stops it, and the last three draw a diagonal line in big blocks. (GRAPHICS resets the colours, which is a discovery in itself.) Let the child change the numbers and predict what happens: hue 0–15, brightness 0–14, pitch 0–255. This teaches more about parameters than any explanation.

Then the first stored program, with a loop, a variable and input:

10 DIM N$(20)
20 PRINT "WHAT IS YOUR NAME";
30 INPUT N$
40 FOR C=0 TO 15
50 SETCOLOR 2,C,4
60 PRINT "HELLO, ";N$;"!"
70 SOUND 0,C*10+50,10,8
80 FOR D=1 TO 50:NEXT D
90 NEXT C
100 SOUND 0,0,0,0

It greets you sixteen times, changing the background through all sixteen hues with a rising tone. Things to try: more colours (a STEP in line 40), a longer pause, the name spelled backwards. Note the DIM in line 10. Atari BASIC needs every string to be dimensioned first, and forgetting it (ERROR 9) is a rite of passage.

Step 3: Make the joystick do something

Nothing motivates like controlling the screen. This sketchpad draws wherever the joystick goes, and the fire button picks a new colour:

10 REM JOYSTICK SKETCHPAD
20 GRAPHICS 7:SETCOLOR 0,4,8:COLOR 1
30 X=80:Y=40
40 PLOT X,Y
50 S=STICK(0)
60 IF S=7 AND X<159 THEN X=X+1
70 IF S=11 AND X>0 THEN X=X-1
80 IF S=14 AND Y>0 THEN Y=Y-1
90 IF S=13 AND Y<79 THEN Y=Y+1
100 IF STRIG(0)=0 THEN COLOR INT(RND(0)*3)+1
110 GOTO 40

It introduces the ideas every game needs: a position in variables, a loop, input with STICK and STRIG, and limits so the cursor can't leave the screen. Remove the limits and see what error you get (ERROR 141, cursor out of range): a lesson in why the checks are there. Extensions: a key that clears the screen, diagonal movement, two players with STICK(1).

Books aimed at this stage: Kids and the Atari by Edward H. Carlson (Prentice-Hall, 1983), An Atari for Kids by Sharon Boren, Larry Hovey and Kathleen Hovey (Dilithium Press, 1984), written by teachers for grades 4 to 8 with a classroom activity workbook and teacher's guide, Atari for Kids from 8 to 80 by Michael P. Zabinski and E. Michael Schenk (Howard W. Sams, 1984), and Computers for Kids, Atari Edition by Sally Greenwood Larsen (Creative Computing, 1981).

Step 4: Type-ins and changing other people's code

1980s children learned by typing in magazine listings, and it still works. Copying a program teaches reading code, attention to detail and debugging. Changing it ("make the aliens faster", "give yourself ten lives") teaches how programs are built.

  • Pick short listings at first: 20 to 50 lines that run on a stock machine. This site's type-in section gives each program's requirements and typing tips.
  • Explain the error message routine early: ERROR 9 AT LINE 120 means "look at line 120". See Atari BASIC Error Codes Explained.
  • For longer listings, use the magazines' checksum programs (see Typing In Magazine Listings).

Step 5: A first real game

Build a whole game together, step by step: title screen, game loop, score, game over. Writing a Complete Game in Atari BASIC, Step by Step does exactly this with Star Catcher, a 44-line catching game, and explains every part. After that, the BASIC 10-Liner Contest, where a whole game fits in ten lines, makes a good challenge for an older child (see Writing BASIC 10-Liners on the Atari). It has categories for different line lengths and runs every year.

Step 6: Structure and speed (ages about 12 and up)

When the GOTOs become a tangle, it's time for structured BASIC:

  • Turbo-BASIC XL runs almost all Atari BASIC programs unchanged, adds procedures, REPEAT/UNTIL, WHILE, IF/ELSE/ENDIF, and is much faster. It's a natural next step on an XL/XE (see Turbo-BASIC XL: A Practical Guide).
  • FastBasic has no line numbers, real procedures and integer speed, and it can run on the Atari or cross-compile on a PC. Writing a Game in FastBasic, Step by Step builds a sprite game that would be too slow in Atari BASIC.

From there, the path divides by interest: sprites and graphics (Player/Missile Graphics in Atari BASIC), sound (POKEY Sound Basics), or machine code and C (Getting Started with 6502 Assembly on the Atari 8-bit, Programming the Atari 8-bit in C with cc65).

Tips that worked in the 1980s classroom and still do

  • Predict, then run. Ask what a change will do before pressing RETURN.
  • One idea per session. Colours today, loops tomorrow.
  • Keep a notebook. Write down the SOUND numbers for nice notes and the SETCOLOR numbers for favourite colours. It becomes a personal reference.
  • Celebrate errors. Every error message is the computer saying exactly what it didn't understand.
  • Show, don't save for later. Let them demonstrate their program to someone the same day.

Troubleshooting

  • ERROR 9 on a string: a missing DIM. Every string needs DIM N$(size) before use.
  • The listing won't type in an emulator but works on a real Atari: check whether the emulator is using Altirra BASIC, and whether a variable clashes with one of its keywords.
  • Nothing happens when the joystick moves: check that it's in port 1. In an emulator, check which keys or controller are mapped to joystick 0.
  • ERROR 141: the program tried to PLOT off the screen. Add limits as in step 3.
  • A program "vanished": it wasn't saved, or NEW was typed. Save early, save often, and keep a second copy.

Further reading

  • The books named in steps 1 and 3, plus Robert A. Peck's Atari BASIC Tutorial (Howard W. Sams, 1983) and William B. Sanders' The Elementary Atari (Datamost, 1983) for teenagers and adults learning alongside.
  • On this site: Atari BASIC Essentials, Graphics in Atari BASIC, POKEY Sound Basics, Atari Logo Basics, Atari PILOT for Beginners, Writing a Complete Game in Atari BASIC, Step by Step.

Credits