EasyManua.ls Logo

Commodore Plus 4 - Page 277

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
268
INY—Increment
the
Y
Register
by
1
The
value
currently
in
the
Y
register
is
incremented
by
1.
Operation:
Y+
1
-
Y
Flags
Affected:
N,
Z
Addressing
Mode
Syntax
Opcode
Bytes
Cycles
Implied
INY
C8
J
2
The
value
stored
in
the
Y
register
is
increased
by
1.
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.
Example:
In
this
example,
the
first
byte
in
$8000-$80FF
containing
a
value
of
$EA
is
located.
The
Y
register
is
used
as
the
index,
and
the
INY
instruction
updates
it.
.
2000
A0
00
LDY
#$00
Initialize
.
Y
to
zero.
.
2002
A9
EA
LDA
#$EA
Load
.A
with
the
value
to
look
for.
.
2004
D9
00
80
CMP
$8000,Y
Compare
with
the
current
location.
.
2007
FO
03
BEQ
$2000
If
equal,
quit.
.
2009
C8
INY
Update
the
index
register.
.
200A
DO
F8
BNE
$2004
If
there are
more
locations
to
search,
go
back.
.
200C
00
BRK
Stop
processing.
When
the
BRK
instruction
is
executed,
the
value
of
the
Y
register
when
an
$EA
was
found
(or
a
zero
if
none
was
found)
is
displayed.
JMP—Jump
to
a
New
Location
The
address
specified
in
the
operand
is
transferred
to
the
program
counter,
and
processing
continues
with
the
instruction
located
at
that
address.
Operation:
Addressing
Absolute
Indirect
(FC
+
Mode
1)
-
PCL
Syntax
JMP
Shhhh
JMP
(Shhhh)
Flags
Affected:
Opcode
Bytes
4C
3
6C
3
None
Cycles
3
5

Other manuals for Commodore Plus 4

Related product manuals