EasyManua.ls Logo

Commodore PET - Wait

Commodore PET
447 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...
Example:
WAIT
655
STOP
will
cause the message
BREAK
IN
655 to
be
printed.
The
WAIT
statement halts program execution until a memory location
becomes non-zero.
Format:
WAIT
{address.
mask
address. mask. xor
where:
address
mask
xor
is
a memory address.
is
a one-byte mask value.
is
a one-byte mask value.
The
WAIT
statement does the following:
1.
Fetches the contents of the addressed memory location.
2.
Exclusive-ORs the value obtained in step 1
with
xor. if present. If xor
is
not
specified. it defauIts to
O.
When
xor
is
O.
this step
has
no effect.
3.
ANOs the value obtained in step 2
with
the specified mask value.
4.
If the result
is
O.
WAIT
returns ta step
1.
remaining in a loop that halts
program execution at the WAIT.
5.
If the result
is
not
O.
WAIT
processing
is
completed and program execu-
tion continues
with
the next statement following the
WAIT
statement.
The keyboard
STOP
key cannat interrupt execution of a
WAIT
statement.
149

Table of Contents

Related product manuals