EasyManua.ls Logo

Commodore Plus 4 - Page 334

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...
322
Machine
Language
on
the
Commodore
Plus/4
POKE
55,
low
byte
of
new
top
of
RAM
plus
one
POKE
56,high
byte
of
new
top
of
RAM
plus
one
CLR
To
execute
machine
code
that
is
located
underneath
the
BASIC
or
operating
system
ROM,
the
routine
must
begin
somewhere
NOT
underneath
the
ROMs
and
bank
in
RAM
(see
the
section
on
banking)
before
transferring
control.
The
transfer
code
could
be
located
in
the
cassette
buffer
($0333-$03F2)
or
some
other
safe
location.
The
machine
code
routine
must
bank
ROM
in
before
returning
to
BASIC.
The
pointer
to
the
top
of
memory
at
1331-1332
($0533-$0534)
must
also
be
changed
in
some
applications.
Moving
the
bottom
of
BASIC
up
can
be
accomplished
with
the
following:
POKE
43,
low
byte
of
new
bottom
of
RAM
POKE
44,i2igZ2
byte
of
new
bottom
of
RAM
POKE
pew
bottom
of
RAM
minus
one,0
NEW
Note:
The
pointer
to
the
bottom
of
memory
at
1329-1330
($0531
-$0532)
does
not
appear
to
be
used
by
BASIC.
After
executing
these
commands,
machine
code
could
be
placed
in
the
vacated
RAM
at
$1000.
The
GRAPHIC
command
moves
the
bottom
of
BASIC
up
$3000
from
its
location
before
the
command
is
given,
and
GRAPHICCLR
moves
it
down
$3000
back
to
its
original
location.
But
the
graphic
screen
itself
is
always
in
the
same
position
at
$1800-$3FFF.
Care
must
be
taken
to
avoid
conflicts.