EasyManua.ls Logo

Apple IIe - Memory Access and Program Control

Apple IIe
320 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...
78
Apple
lie
Users
Handbook
The
ASC
function
returns
the
ASCII code equivalent
for
its string
argument.
If
this string
is
longer
than
one
character,
the
ASC
function
returns
the
ASCII
code
for
just the first character
in
the
string.
The
following
program illustrates
the
use
of
the
ASC
function:
100
A$=
"JOHN
JOHNSON"
200
PRINT
ASC(A$)
300
END
RUN
74
PEEK
AND
POKE
The
PEEK
and
POKE
statements allow
direct
access
to
the
lle's
memory. The
argument
of
PEEK
and
POKE
indicates the address
in
memory
to
be accessed. Every
memory
location can store a
number
in
the
range
0
through
255.
The
PEEK
function
allows
the
user
to
examine
the
value stored
in
the
memory
location named
as
its
argument
. For example, in
the
following
statement.
100
N =
PEEK
(1000)
the
value stored at
memory
location
1000
will
be assigned
to
the
variable
N.
The
POKE
statement
is
used
to
place a value
in
a specified
memory
location.
POKE
uses
the
following
configuration,
POKE
address, value
where
the
value
specified
is
placed
in
the
location given
in
address. value
and
address
can
either
be constants
or
variables.
For example,
in
the
following
statement,
100
POKE
2000,
X
\
the
value stored
in
variable X
will
be POKE'd
into
memory
location
2000
.

Other manuals for Apple IIe

Related product manuals