EasyManua.ls Logo

Atari XL

Atari XL
262 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
Loading...
CHAPTER 17
ADVANCED
TECHNIQUES
The
previous
chapters
cover
all
you
need
to
write
many
programs
for
your
XL.
This
chapter
decribes
some
further
BASIC
commands
which
you
will
find
useful
as
you
wri
te
more
ambi
tious
programs,
and
rounds
off wi
th
some
general
advice
on
how
to
wri
te
good
programs.
THE
POP
COMMAND
This
strange
looking
command
IS
used
In
connection
with
BASIC
subroutines.
Suppose
you
have
a
program
with
subroutines
nested
one
within
the
other,
one
of
which
checks
which
keys
are
being
pressed.
Y
ou
may
wish
to
respond
to
one
of
these
keys
-
ESC
perhaps
-
by
abandoning
the
current
routine
and
returning
to
the
start
of
the
program.
This
could
mean
RETURNing
through
several
levels
of
subroutine,
which
would
be
tedious
to
program,
requiring
IF
...
THEN
RETURN
instructions
at
each
level.
The
XL
allows
a
simpler
way
of
doing
this,
using
the
POP
command
Each
time
a
GOSUB
command
is
executed,
the
XL
stores
the
location
of
the
instruction
after
the
GOSUB
on a
stack
in
the
reserved
area
of
memory.
At
any
time
the
stack
contains
RETURN
addresses
for
all
GOSUBs
for
which
RETURN
commands
have
not
yet
been
performed.
The
POP
command
removes
the
most
recently
added
RETURN
address
from
the
stack,
so
that
the
next
RETURN
sends
the
computer
back
to
the
GOSUB
196

Related product manuals