Clearing The Computer's Memory-The New Command; Using Color In A Program - Commodore 128 System Manual

Hide thumbs Also See for 128:
Table of Contents

Advertisement

DIRECT mode. Once a command is executed in DIRECT mode, it
is no longer in the computer's memory. Notice that even though
you used the ? symbol for the PRINT statement, your computer
has converted it into the full command. This happens when you
LIST any command you have abbreviated in a program.
Clearing the Computer's Memory—The NEW Command
Anytime you want to start all over again or erase a BASIC
program in the computer's memory, just type NEW and press
RETURN. This command clears out the computer's BASIC
memory, the area where programs are stored.

Using Color in a Program

To select color within a program, you must include the color
selection information within a PRINT statement. For example,
clear your computer's memory by typing NEW and pressing
RETURN, then type the following, being sure to leave space
between each letter:
10 PRINT " R A I N B O W " ~nrTllHN~
Now type line 10 again but this time hold down the CTRL key and
press the 1 key directly after entering the first set of quote marks.
Release the CTRL key and type the " R" . Now hold down the
CTRL again and press the 2 key. Release the CTRL key and type
the " A" . Next hold down the CTRL again and press the 3 key.
Continue this process until you have typed all the letters in the
word RAINBOW and selected a color between each letter. Press
the SHIFT and the 2 keys to type a set of closing quotation marks
and press the RETURN key. Now type RUN and press the
RETURN key. The computer displays the word RAINBOW with
each letter in a different color. Now type LIST and press the
RETURN key. Notice the graphic characters that appear in the
PRINT statement in line 10. These characters tell the computer
what color you want for each printed letter. Note that these
graphic characters do not appear when the Commodore 128
PRINTs the word RAINBOW in different colors.
The color selection characters, known as control characters, in
the PRINT statement in line 10 tell the Commodore 128 to
change colors. The computer then prints the characters that
follow in the new color until another color selection character is
encountered. While characters enclosed in quotation marks are
usually PRINTed exactly as they appear, control characters are
only displayed within a program LISTing.
3-18

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

128d

Table of Contents