EasyManua.ls Logo

Commodore Plus 4 - Page 255

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
243
Operation:
Addressing
Mode
Syntax
Flags
Affected:
N,
Z,
C,
V
Opcode
Bytes
Cycles
Example:
Immediate
Zero page
Zero
page,
X
Absolute
Absolute,
X
Absolute,
Y
(Indirect,
X)
(Indirect),
Y
ADC
#$hh
ADC
$hh
ADC
$hh,X
ADC
Shhhh
ADC
$hhhh,X
ADC
$hhhh,Y
ADC
($hh,X)
ADC
($hh),Y
69
65
75
6D
7D
79
61
71
2
2
2
3
3
3
2
2
2
3
4
4
4*
4*
6
5*
*
Add
1
when
a
page
boundary
is
crossed.
The
status
of
the
carry
following
an
addition
reflects
the
result.
If
a
carry
was
generated,
the
carry
is
set
to
1.
If
no
carry
was
generated,
the
carry
is
cleared
to
0.
This
fact
allows multiple
precision
additions,
as
shown
in
the
example.
If
the
result
is
negative,
the
N
flag
is
set
to
1;
otherwise,
it
is
cleared
to
0.
If
the
result
is
zero,
the
Z
flag
is
set
to
1;
otherwise
it
is
cleared
to
0.
If
the
result
exceeds+127
or
-128,
the
overflow
flag
is
set
to
1;
otherwise
it
is
cleared
to
0.
Frequently
it
is
necessary
to
have
a
greater
precision
in
calculations
than
the
256
possible
values
for
a
single
byte.
This
is
possible
by
treating
a
group
of
two
or
more
bytes
as
a
single
number.
In
this
example,
the
two
32-bit
numbers
stored
at
$2100-$2103
and
$2104-$2107
(high
byte
to
low
byte)
are
added,
and
the
result
is
stored
in
$2108-$210B.
.
2000
18
.
2001
A2
03
.
2003
BD00
21
.
2006
7D
04
21
.
2009
9D
08
21
.
200C
CA
.
200D
10
P4
.
200F
00
CLC
LDX
#$03
LDA
$2100,X
ADC
$2104,X
STA
$2108,X
DEX
BPL
$2003
BRK
Clear
the
carry
prior
to
the
first
addition.
.X
will
index
through
the
4
bytes.
Get
a
byte
of
the
first
number.
Add
corresponding
byte
from
the
second
number.
Store
the
result
in
destination.
Decrement
.X
to
point
at
the
next
byte.
Continue
processing
until
all
4
bytes
are
done.
Stop
processing.
*
Use
the
M
(Memory)
command
to
examine
and
modify
the
contents
of
$2100-$2107
before
executing
the
program
(using
G
2000).
Then
check
the

Other manuals for Commodore Plus 4

Related product manuals