EasyManua.ls Logo

Commodore 128D - Page 319

Commodore 128D
427 pages
Print Icon
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...
VOL
WAIT
311
NOTE:
If
a
graphic
area
is
allocated
or
deallocated
for
use
after
a
SAVE,
VERIFY
and
DVERIFY
will
report
an
error.
BASIC
text
in
this
case
has
been
moved
from
its
original
(saved)
location
to
another
address
range.
Hence,
VERIFY,
which
performs
byte-to-byte
comparisons,
will
fail,
even
though
the
program
may
be
valid.
See
also
DVERIFY
—Define
output
level
of
sound
VOL
volume
level
This
statement
sets
the
default
volume
for
SOUND
and
PLAY
state
ments.
VOLUME
level
can
be
set
from
0
to
15,
where
15
is
the
maxi
mum
volume,
and
0
is
off.
VOL
affects
all
voices.
EXAMPLES:
VOL
0
Sets
volume
to
its
lowest
level.
VOL
15
Sets
volume
for
SOUND
and
PLAY
statements
to
its
highest
output.
—Pause
program
execution
until
a data
condition
is
satisfied
WAIT
(Location),
<mask-1
>
[,mask-2]
The
WAIT
statement
causes
program
execution
to
be
suspended
until
a
given
memory
address
contains
a
specified
bit
pattern
or
value.
In
other
words,
WAIT
can be used
to
halt
the
program
until
some
external
event
has
occurred.
The
data
items
used
with
the
WAIT
can
be
any
values.
For
most
programmers,
this
statement
should
never
be
used.
It
causes
the
program
to
halt
until
a
specific
memory
location's
bits
change
in
a
specific
way.
This
is
used
for
certain
I/O
operations
and
almost
nothing
else.
The
WAIT
statement
takes
the
value
in
the
memory
location
and
performs
a
logical
AND
operation
with
the
value
in
mask-1.
If
mask-2
is
specified,
the
result
of
the
first
operation
is
XORed
with
mask-2.
In
other
words,
mask-1
"filters
out"
any
bits
not
to
be
tested.
Where
the
bit
is
0
in
mask-1,
the
corresponding
bit
in
the
result
will
always
be
0.
The
mask-2
value
flips
any
bits,
so
that
an
off
condition
can
be
tested
for
as
well
as
an
on
condition.
Any
bits
being
tested
for
a
0
should
have
a
1
in
the
cor
responding
position
in
mask-2.
If
corresponding
bits
of
the
<
mask-1
>
and
<
mask-2>
operands
differ,
the
exclusive-OR
operation
gives
a
bit
result
of
1.
If
the
corresponding
bits
get
the
same
result
the
bit
is
0.
It
is
possible
to
enter
an
infinite
pause
with
the
WAIT
statement,
in
which
case
the
RUN/STOP
and
RESTORE
keys
can
be
used
to
recover.
WAIT
may
require
a
BANK
command
if
the
memory
you
wish
to
access
is
not
in
the
currently
selected
BANK.
BASIC
7.0
ENCYCLOPEDIA—Basic
Commands
and
Statements

Table of Contents

Other manuals for Commodore 128D

Related product manuals