EasyManua.ls Logo

Commodore 128D - Using PEEK; Using POKE

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...
0
Using
PEEK
PEEK
can be
used
to
make
the
computer
tell
you
what
value
is
being
stored
in
a
memory
(-
,
location
(a
memory
location
can
store
any
value
^
I
between
0
and
255).
You
can
PEEK
the
value
of
any
memory
location
(RAM
or
ROM)
in
DIRECT
,
or
PROGRAM
mode.
Type:
LJ
P
=
PEEK(2594)
REtyRiT
I I
The
computer
assigns
the
value
in
memory
location
2594
to
the
variable
P
when
you
press
RETURN
after
the
first
line.
Then
it
prints
the
LJ
value
when
you
press
RETURN
after
entering
the
?
P
command.
Memory
location
2594
deter
mines
whether
or
not
keys
like
the
spacebar
and
j
\
CRSR
repeat
when
you
hold
them
down.
A128
in
location
2594
tells
the
computer
to
repeat
these keys
when
you
hold
them
down.
Hold
i
|
down
the
spacebar
and watch
the
cursor
move
across
the
screen.
u
Using
POKE
To
change
the
value
stored
in
a
RAM
location,
use
the
POKE
command.
Type:
;~~~\-
POKE
2594,96
IlLIUIlll
The
computer
stores
the
value
after
the
comma
j~"
j
(96)
in
the
memory
location
before
the
comma
*—'
(2594).
A
96
in
memory
location
2594
tells
the
computer
not
to
repeat
keys
like
the
spacebar
r
"f
and
CRSR
keys
when
you
hold
them
down.
Now
'—'
hold
down
the
spacebar and
watch
the
cursor.
The
cursor
moves
one
position
to
the
right,
but
it
does
not
repeat.
To
return
your
computer
to
its
normal
state,
type:
POKE
2594,128
Mf'TVIM
You
cannot
alter
the
value
of
all
the
memory
locations
in
the
computer—the
values
in
ROM
can be
read,
but
not
changed.
NOTE:
These
examples
assume
you
are
in
bank0.
See
the
description
of
the
BANK
command
in
Chapter
V,
BASIC
7.0
Encyclo
pedia
for
details
on
banks.
Refer
to
the
Commodore
128
Programmer's
Reference
66
USING
C128
MODE—Advanced
BASIC
Programming

Table of Contents

Other manuals for Commodore 128D

Related product manuals