EasyManuals Logo

Atari 800 User Manual

Atari 800
326 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #125 background imageLoading...
Page #125 background image
Atari BASIC Reference
Guide
123
The
GET
statement
only
accepts
one
character,
followed
by
RETURN.
If
only
one
character
is
entered
, the
GET
statement
assigns
the
ASCII
code
of
that character
to
the
variable
X.
Line
30
displays
the
value
of
X
which
is
83, since the ASCII
code
of
Sis 83.
Line 40 closes the 1/ 0 channel.
COSUB (COS.)
GOSUB branches
program
control
to
the
subroutine
beginning
at the
line
number
specified by its
argument.
CONFIGURA
TlON
GOSUB
LN
Subroutines can be called
from
any part
of
a
program.
A RETURN
statement, at the end
of
a
subroutine
, causes
the
program
to
resume
execution
with
the statement
directly
after
the
GOSUB
statement.
Subroutines are
convenient
to
use
when
the same set
of
operations
need to be repeated
at
different
parts
of
a program.
EXAMPLE
10
FOR
J
=OTO
2
20
GOSUB 100
30
NEXT
J
40 J = 5
50 GOSUB 100
60 END
100 PRINT
j;
110 RETURN
RUN
0125
The previous example illustrates a
subroutine
that
is
called 4
times,
from
2
different
parts
of
the
program.
In this example,
only
one
statement
is
includ
ed in the
subroutine.
However,
many statements can be
included
in a
subroutine.

Other manuals for Atari 800

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Atari 800 and is the answer not in the manual?

Atari 800 Specifications

General IconGeneral
ProcessorMOS Technology 6502
Processor Speed1.79 MHz
ROM10 KB
GraphicsANTIC and GTIA chips
Release Year1979
Display Resolutionup to 320 x 192
Colors128 colors
Sound4 channels
StorageCartridge, cassette, floppy disk
PortsCartridge, serial, monitor
Operating SystemAtari OS

Related product manuals