EasyManua.ls Logo

Commodore 128 - Viewing Your Program-The LIST Command

Commodore 128
448 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Notice the computer did not display COMMODORE 128 when
you pressed RETURN, as it would do if you were using the PRINT
command in DIRECT mode. This is because the number, 10, that
comes before the PRINT symbol (?) tells the computer that you
are entering a BASIC program. The computer just stores the
numbered statement and waits for the next input from you.
Now type RUN and press RETURN. The computer prints the
words COMMODORE 128. This is not the same as using the
PRINT command in DIRECT mode. What has happened here is
that YOU HAVE JUST WRITTEN AND RUN YOUR FIRST BASIC
PROGRAM as small as it may seem. The program is still in the
computers memory, so you can run it as many times as you
want.
Viewing Your ProgramThe LIST Command
Your one-line program is still in the C128 memory. Now clear the
screen by pressing the SHIFT and CLR/HOME keys together.
The screen is empty. At this point you may want to see the
program listing to be sure it is still in memory. The BASIC
language is equipped with a command that lets you do just this
the LIST command.
Type LIST and press RETURN. The C128 responds with:
10 PRINT COMMODORE 128
READY.
Anytime you want to see all the lines in your program, type LIST.
This is especially helpful if you make changes, because you can
check to be sure the new lines have been registered in the
computer’s memory, ln response to the command, the computer
displays the changed version of the line, lines, or program. Here
are the rules for using the LIST command.
To see line N only, type LIST N and press RETURN.
Substitute the line number you wish to see for N.
To see from line N to the end of the program, type LIST N-
and press RETURN.
To see the lines from the beginning of the program to line
N, type LIST-N and press RETURN.
3-16

Table of Contents

Other manuals for Commodore 128

Related product manuals