EasyManua.ls Logo

Commodore Plus 4 - Page 251

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...
The
6803
Microprocessor
239
The
6502
Microprocessor
The
actual
microprocessor
chip
used
in
the
Plus/4
is
a
7501.
However,
for
programming
purposes,
this
chip
is
the
same
as
a
6502.
In
this
section,
the
operation
of
the
microprocessor
is
reviewed.
Programmers
familiar
with
any
machine
language
should
be
able
to
adapt
to
the
6502
after
studying
this
section.
The
examples
in
this
section
are
designed
to
show
the
usage
of
the
6502
instruction
set
and
can
be
entered
(and
saved
on
cassette
or
disk)
using
the
built-in
machine-language
monitor
(see
previous
section).
Registers
The
6502
is
equipped
with
six
internal
registers.
These
registers
are
accessed
with
special
instructions,
which
are
not
the
same
as
instructions
that
access
memory
locations.
Three
of
these
registers
are
user
registers.
It
is
usually
faster
to
access
the
registers
than
to
access
memory,
so
using
them
efficiently
can
speed
up
a
machine-language
program.
The
Program
Counter
The
program
counter
(PC)
is
a
16-bit
register
that
stores
the
address
of
the
next
instruction
to
be
executed.
When
an
instruction
is
executed,
the
PC
is
incremented
so
as
to
point
to
the
following
instruction.
When
a
branch
or
jump
instruction
is
executed,
the
PC
is
changed
accordingly.
The
Status
Register
The
status
register
(SR)
is
an
8-bit
register
containing
the
status
flags
for
the
microprocessor.
Only
7
bits
are
actually
used,
and
they
are
assigned
as
follows:
Bit
Label
Name
Usage
7
N
Negative
This
bit
is
set
to
1
when
the
last
result
had
the
high
(sign)
bit
set
to
1
and
cleared
to
0
when
the
last
result
had
the
high
bit
cleared
to
0.
6
V
Overflow
This
bit
is
set
to
1
when
the
last
operation
resulted
in
a
two's
complement
arithmetic
overflow.
That
is,
two
numbers
with
the
same
sign
were
added,
resulting
in
a
number
of
the
opposite
sign;
a
positive
number
was
subtracted
from
a
negative
number
yielding
a
positive
number;
or
a
negative
number
was
subtracted
from
a
positive
number
yielding
a
negative
number.
If
no
overflow
occurred,
it
is
cleared
to
0.

Other manuals for Commodore Plus 4

Related product manuals