EasyManua.ls Logo

Commodore Plus 4 - Page 307

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
6502
Microprocessor
298
a
1-byte
two's
complement
offset
to
the
address
to
be
branched
to.
When
the
offset
is
used, the
program
counter
points
to
the
byte
immediately
following
the
current
instruction.
Therefore,
an
offset
of
zero
does
not
affect
program
flow.
The
maximum
branch
forward
is
achieved
with
an
offset
of
$7F
(127).
The
maximum
branch
backward
is
achieved
with
an
offset
of
$80
(-128).
In
the
machine-language
monitor,
a
relative
mode
instruction
appears
in
this
form:
mnemonic
Ihhlili
where
mnemonic
is
an
instruction
mnemonic,
h
represents
a
hexadecimal
digit,
and
$hhhh
is
the
address
to
branch
to.
The
monitor
calculates
the
offset
and
stores
it
in
the
appropriate
location.
If
the
specified
address
is
too
far
away
(more
than
129
bytes
forward
or
more
than
126
bytes
backward
from
the
beginning
of
the
branch
instruction),
a
question
mark
will
be
displayed
indicating
an
error
in
the
line.
The
following
instructions
are
available
in
relative
mode:
BCC,
BCS,
BEQ,
BMI,
BNE,
BPL,
BVC,
and
BVS.
Indirect
Mode
Only
the
jump
instruction
is
available
in
indirect
mode.
It
consists
of
3
bytes.
The
first
is
the
opcode
for
the
jump
instruction.
The
second
is
the
low
byte of
the
address
of
the
jump
vector.
The
third
is
the
high
byte
of
the
address
of
the
jump
vector.
In
the
machine-language
monitor,
an
indirect
mode
jump
instruction
appears
in
this
form:
JMP
(Ihlillll)
where h
represents
a
hexadecimal
digit
and
$hhhh
is
the
address
of
the
jump
vector
in
which
the
new
program
counter
is
stored.
The
jump
vector
consists
of
2
bytes:
the
first
is
the
low
byte
and
the
second
is
the
high
byte
of
the
new
program
counter.
The
JMP
instruction
is
available
in
indirect
mode.
Absolute
Indexed
Mode
In
this
mode,
either
the
X
register
or
the
Y
register
is
used
as
an
index.
The
address
of
the
operand
is
calculated
by
adding
the
value
of
the
index
to
the
specified
base
address.
An
instruction
in
absolute
indexed
mode
consists
of
3
bytes.
The
first
is
the
opcode
for the
desired
instruction.
The
second
is
the
low
byte
of
the
base
address.
The
third
is
the
high
byte
of
the
base
address.
In
the
machine-language
monitor,
an
absolute
indexed
mode
instruction
using
the
X
register
appears
in
this
form:
mnemonic
$hlLhli,X
where
mnemonic
is
an
instruction
mnemonic
and
h
represents
a
hexadecimal
digit.