EasyManua.ls Logo

Commodore Plus 4 - Page 240

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...
228
Machine
Language
on
the
Commodore
Plus/4
The
Commodore
Plus/4
is
equipped
with
a
built-in
machine-language
moni
tor.
The
monitor
is
accessed
from
BASIC
with
the
MONITOR
command.
Using
this
monitor,
machine-language
programs
may
be
entered
and
executed.
Several
other
functions
are
also
provided
(see
the
next
section),
making
it
possible
to
experiment
in
machine
language
without
purchasing
any
additional
software.
The
monitor
is
also
very
useful
for
debugging
machine-language
programs
created
using
an
assembler.
Machine-language
programming
generally
requires
a
more
detailed
knowl
edge
of
the
hardware
devices
used
in
the
computer
than
BASIC
programming
does.
Information
on
using
the
various
chips
in
the
Plus/4
is
provided
in
the
appropriate
chapter
in
this
book.
Some
of
the
subroutines
in
the
ROM
of
the
Plus/4
are
available
to
the
machine-language
programmer.
Information
on
these
subroutines
is
included
in
this
chapter.
These
subroutines
are
particularly
useful
in
performing
I/O
operations
for
which
many
programmers
do
not
want
to
write
their
own
code.
Machine-Language
Monitor
Commands
The
monitor
is
entered
by
issuing
the
MONITOR
command
from
BASIC.
When
the
monitor
is
entered,
the
current
contents
of
the
program
counter
(PC),
status
register
(SR),
accumulator
(AC),
X
register
(XR),
Y
register
(YR),
and
stack
pointer
(SP)
are
displayed
in
hexadecimal.
MONITOR
PC
SR
AC
XR
YR
SP
;
0000
00
00 00
00 P9
The
screen
editor
is
fully
functional
while
you
are
in
the
monitor.
That
is,
whenever
a
RETURN
is
entered,
the
line
on
which
the
cursor
resides
is
processed,
and
the
screen
scrolls
normally.
Whenever
the
monitor
encounters
an
error
in
a
line
it
is
attempting
to
process,
a
question
mark
is
displayed
and
no
action
is
taken.
For
a
list
of
monitor
input/
output
errors,
see
Appendix
A.
Note:
The
monitor
normally
accesses
RAM
up
to
$8000
and
ROM
thereafter.
If
you
want
to
access
all
RAM,
change
location
$07F8
to
$80
(see
M
command).
To
switch
back
to
ROM,
change
it
back
to
$00.
Entering
a
Program—The
A
or.
Command
,
The
A
(Assemble)
command
is
used
to
enter
a
line
of
machine
code.
The
syntax
is
as
follows:

Other manuals for Commodore Plus 4

Related product manuals