The Teddy program runs in mode 130, which allows eight different colours, In

other modes, such as mode 129, only four colours can be displayed at the same

time. The range of colours is increased by four extra patterns made up of

various colour combinations. For example, in mode 129:

GCOL 16,0 red-orange

GCOL 32,0 orange

GCOL 48,0 yellow-orange

GCOL 64,0 cream

These colours are produced regardless of the second number used. The effect of

the commands varies from mode to mode, as the patterns are built up from the

colours available in that mode. Change the GCOL commands in the Teddy

program to see some of the patterns available in mode 130.

You can create your own colour patterns in place of those provided -- this is

described on page Bl3.

Printing text

Text can be displayed in any of the eight modes, but the number of characters

per line varies from mode to mode, and can be 20, 40 or 80 characters. Try:

10MODE 128

20 PRINT "Here is a sentence"

30 PRINT "to demonstrate printing."

Edit the program and run it a few times with line 10 altered to produce mode

129, 130 or 135. Mode 135 gives the clearest display. If you are using a TV

rather than a monitor you may find mode 128 text rather hard to read.

After obeying any PRINT statement the computer moves to the start of a new

line unless instructed to do otherwise. Run the program again after changing

line 20 to:

20 PRINT "Here is a sentence";

The semicolon at the end of the line tells the computer to stay on the same line

after printing the string. The result is:

Here is a sentence to demonstrate printing

The semicolon is useful if you are printing a variable within a sentence, and

want all the text to be on the same line. Add these lines:

40 my_age=105

50 PRINT "I am ";my_age;" years old."

The spaces within line 50 are very important, as they stop the text running

together untidily, as in the first example.

C 20