EasyManua.ls Logo

Commodore 128D - C64 Mode

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...
Programming
Function
Keys
In
C64
Mode
The
four
keys
to
the
right
side
of
the
keyboard,
just
above
the
numeric
keypad,
are
called
function
keys.
The
keys
are
marked
F1,
F3,
F5
and
F7
on
the
tops
and
F2,
F4,
F6
and
F8 on
the
fronts.
These
keys
can
be
programmed—that
is,
they
can
be
instructed
to
per
form
a
specific
task
or
function.
For
this
reason,
these keys
are
often
called
programmable
function
keys.
You
must
hold
down
the
SHIFT
key
to
perform
the
functions
associ
ated
with
the
markings
on
the
front
of
the
keys—that
is,
F2, F4,
F6
and
F8.
Therefore,
these keys
are
sometimes
called
the
SHIFTed
programmable
function
keys.
The
function
keys
in
C64
mode
do
not
have
a
printed
character
assigned
to
them.
They
do,
however,
have
CHR$
codes
assigned.
In
fact,
each
of
them
has
two
CHR$
codes—one
for
when
you
press
the
key
by
itself,
and
one
for
wben
you
press
the
key
while
holding
down
the
SHIFT
key
To
get
the
even-numbered
function
keys,
hold
down
the
SHIFT
key
while.pressing
the
function
key.
For
example,
to
get
F2,
hold
down
SHIFT
and
press
F1.
The
CHR$
codes
for
the
F1-F8
keys
range
from
133
to
140.
However,
the
codes
are
not
assigned
to
the
keys
in
numerical
order.
The
keys
and
their
corresponding
CHR$
codes
are
as
follows:
F1
CHR$(133)
F2
CHR$(137)
F3
CHR$(134)
F4
CHR$(138)
F5
CHR$(135)
F6
CHR$(139)
F7
CHR$(136)
F8
CHR$(140)
You
can
use
the
function
keys
in
your
program
in
several
ways.
To
do
this,
you'll
need
to
use
the
GET
statement.
(See
Section
4
for
a
description
of
the
GET
statement.)
As
an
example,
the
program
below
prepares
the
Fi
key
to
print
a
message
on
the
screen.
10 ?
"PRESS
F1
TO
CONTINUE"
20
GETAS
30
(FA$OCHR$(133)THEN20
40
?
"YOU
HAVE
PRESSED
F1"
172
USING
C64
MODE—Using
the
Keyboard
in
C64
Mode

Table of Contents

Other manuals for Commodore 128D

Related product manuals