Atari 130XE — 130XE Owners Manual_Page_041

Writing a Simple BASIC Program: NEW, LIST, PRINT, RUN Once you know your way around the computer keyboard, it's easy to write your first program. To begin, clear the screen and make sure the cursor is on the left-hand margin. NEW: CLEARING THE COMPUTER'S MEMORY Type in the word NEW, then press IR eturnl : NEW NEW tells the computer to get ready for a new set of instructions by erasing any old instructions that might be in the computer's memory. LIST: CHECKING THE COMPUTER'S MEMORY To make sure nothing is in the computer's memory, ask the computer to list any instructions that it might be storing . Type LIST on a line by itself and press I Return/ :

LIST If you typed NEW correctly, nothing other than the Ready prompt ap- pears on your screen . Now you can begin a new program . Type in the first line of instruction to the computer. Type in the line exactly as it appears below and press I Return/ after the last quotation mark: 1.0 PRINT "I HEARD OF A POET NAMED SAM" All instruction lines in BASIC programs are numbered. When you type this one-line program , make sure that the 1 and the 0 in the number 10 are numerals, not letters. If you used letters instead of numbers, you will get an Error message. A numbered instruction line in a program can be longer than one line on the screen.

When the cursor runs out of space on one line, it automatically drops down to the ne xt line. You should press I Return/ only at the end of an instruction line to tell the computer that you are done typing the instruction and that it should store the instruction in its memory. Nothing dramatic happens when you press I Return/ ; the cursor merely returns to the left margin so that you can begin another line in the program. 35