Commodore 16 User Manual page 62

Hide thumbs Also See for Commodore 16:
Table of Contents

Advertisement

Used with a previously OPENed device or tile to input one character at
a time. Otherwise. it works like the GET statement
This command can only be executed within a program.
EXAMPLE
GET#1,A$
In direct mode. GOTO line # allows you to stars execution of the
program at the given line number witnout clearing the variables.
EXAMPLE
10 PRINT "REPETITION IS THE MOTHER OF LEARNING"
20 GOTO 10
The GOTO in line 20 causes line 10 to be run continuously, until the
111/N/STOP.
key is pressed
GOSUB
GOSUB tine #
This statement is like the GOTO statement, except that your
Commodore 16 remembers where it came from. When a line with a
RETURN statement is encountered, the program jumps back to the
statement immediately following the GOSUB The target of a GOSUB
statement is called a subroutine. A subroutine is useful it there is a
routine in your program that can be used by several different portions of
the program. Instead of duplicating the section of program over and
over, you can set it up as a subroutine, and GOSUB to it from the
different parts of the program See also the RETURN statement.
EXAMPLE
20 GOSUB 800
means go to the subroutine
beginning at line 800 and execute
1.
800 PRINT "HI THERE":RETURN
GRAPHIC
GRAPHIC mode (clear option]
This statement puts your Commodore 16 in one of its 5 graphic modes
mode description
0
normal text
1
high-resolution graphics
2
high-resolution graphics. split screen
3
multicolour graphics
4
multicolour graphics. split screen
When executed, GRAPHIC 1 - 4 allocates a 10K bit-mapped area. and
the BASIC text area is moved down below the hi-res area. This area
remains allocated even if the user returns to TEXT mode (GRAPHIC 0).
If 1 is given in the GRAPHIC statement as the second argument, the
screen is also cleared.
GOTO or GO TO
GOTO line #
After a GOTO statement is executed. the next tine to be executed will
be the one with the line number following the word GOTO. When used
EXAMPLES:
GRAPHIC 1,1
GRAPHIC 4,0
Selects hi-res graphic mode and clears the screen
Selects multicolour graphics with an area for text,
without clearing the screen
120
121

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Commodore 16 and is the answer not in the manual?

Questions and answers

Table of Contents