EasyManua.ls Logo

Commodore Plus 4 - Page 269

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
257
.
2018
.
2019
.
201B
EE
15
FF
IM3
$FF15
CA
DO
E7
00
DEX
BITE
12002
BRK
Increment
the
background
color
to
white.
Decrement
the
counter.
If
not
zero,
do
it
again.
Stop
processing.
The
values
in
$2003
and
$200F
may
be
changed
to
allow
experimentation
with
the
raster
line
values.
CPX—Compare
Memory
with.
X
Register
The
value
currently
in
the
X
register
is
compared
with
the
specified
operand
and
the
appropriate
flags
are
set.
Operation:
X
-
M
Flags
Affected:
N,
Z,
C
Addressing
Mode
Syntax
Opcode
Bytes
Cycles
Immediate
CPX#$hh
EO
2
2
Zero
page
CPX
$hh
E4
2
3
Absolute
CPX
$hhhh
EC
3
4
The
value
in
memory
is
subtracted
from
the
value
in
the
X
register,
but
neither
value
is
altered.
The
following
table
shows
the
effect
on
each
of
the
flags.
The
N
flag
should
be
used
when
a
two's
complement
compare
is
required
(e.g.,
$FF
is
minus
1
and
less
than
$01).
The
C
flag
should
be
used
when
an
unsigned
compare
is
required
(e.g.,
$FF
is
255
and
greater
than
$01).
Condition
N
Flag
Z
Flag
C
Flag
X
<
memory
1
0
0
X
=
memory
Oil
X
>
memory
0 0
1
Example:
This
program
copies
the
contents
of
$2100-21
OF
to
$2110-$211F.
The
X
register
is
initialized
to
$10
and
incremented
until
it
reaches
$1F.
The
CPX
instruction
is
used
to
determine
this.
.
2000
A2
10
LDX
#$10
Initialize
X
to
$10.
.
2002
BD
FO 20
LDA
$20F0,X
Get
the
value
in
originating
location.
.
2005
9D
00
21
STA
$2100,X
Store
the
value
in
destination
location.

Other manuals for Commodore Plus 4

Related product manuals