EasyManua.ls Logo

Commodore Plus 4 - SECTION 4 Error Messages; BASIC Error Messages

Commodore Plus 4
464 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...
Redefining
the
Function
Keys
171
40
GETKEYZl:
REM
PRESS
F2
OR
P3
50
REM
USE
ASC
TO
CHECK
THE
CHR$
CODE
FOR
THE
PRESSED
KEY
60
IPASC(Z$)=134
THEN
COLORO,1:COLOR1,2:GRAPHIC1,1:CIRCLE,160,100,60,50:
PAINT,160,100
80
IPASC(Z$)=
135
THEN
COLORO,7:COLOR1,8:GRAPHIC1,1:CIRCLE,160,100,60,50:
PAINT,160,100
Changing
the
Function
Key
Definitions
in
Machine
Language
The
function
key
definitions
are
stored
in
RAM
and
can
be
altered
in
machine
language.
The
lengths
of
each
function
key
definition
are
stored
in
$055F-$0566.
The
definitions
themselves
(in
CHR$
codes)
are
stored
in
$0567-$05E6.
To
change
a
definition,
not
only
must
the
length
for
the
key
be
changed
and
its
definition
be
altered
but
the
data
for
all
of
the
function
keys
beyond
it
must
be
moved
up
or
down
to
meet
the
new
definition.
The
keys
are
stored
in
the
following
order:
Key
Length
Address
Fl
F2
F3
F4
F5
F6
F7
HELP
S055F
$0560
$0561
$0562
$0563
$0564
$0565
$0566
When
a
function
key
is
pressed,
the
SCNKEY
routine
(called
by
the
system
interrupt
service
routine)
places
this
information
in
memory
separate
from
the
normal
keyboard
queue.
The
information
is
processed
by
keyboard
read
routines
BASIN
($FFCF)
and
GETIN
($FFE4).
This
example
changes
the
definition
of
the
HELP
key
to
whatever
the
user
types
in.
The
HELP
key
is
the
easiest
to
change
because
no
other
definitions
are
affected.
Example:
.
2000
A9
OD
LDA
#$0D
Carriage
return
character.
.
SOOS
SO
D2
PP
JSR
$FPD2
Send
to
screen.
.
2005
A2
00
LDX
#$00
.X
points
to
the
definition
area.
.
2007
20
CP PP
JSR
$PPCP
Get
a
character
from
the
keyboard.

Other manuals for Commodore Plus 4

Related product manuals