EasyManua.ls Logo

Commodore Plus 4 - Page 271

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...
2009
SOOB
SOOE
SOOF
SOU
S013
Bl
99
08
CO
90
00
D8
10
SI
10
P6
LDA
STA
INY
CFY
BCC
BRK
($D8),Y
$2110,Y
#♦10
#2009
The
6502
Microprocessor
259
Get
the
contents
of
the
originating
location.
Store
in
the
destination
location.
Increment
.Y
by
1.
Compare
.Y
with
$10.
If
.Y
is
less
than
$10,
go
back.
Stop
processing.
Use
the
M
(Memory)
command
to
examine
and
change
the
values
in
$2100-$211F.
DEC—Decrement
Memory
"by
1
The
value
currently
in
the
operand
is
decremented
by
1.
Operation:
M
-
1
—*
M
Flags
Affected:
N,
Z
Addressing
Mode
Syntax
Opcode
Bytes
Cycles
Zero
page
DEC
$hh
C6
2
5
Zero
page,
X
DEC
$hh,X
D6
2
6
Absolute
DEC$hhhh
CE
3
6
Absolute,
X
DEC
$hhhh,X
DE
3
7
The
value
stored
in
the
operand
is
decreased
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.
It
should
be
noted
that
the
carry
flag
is
NOT
affected.
That
is,
a
decrement
from
$00
to
$FF
does
NOT
result in
the
carry
flag
being
cleared.
Example:
This
program
searches
the
operating
system
ROM
for the
last
occurrence
of
an
$EA
(the
opcode
for
a
NOP).
Indirect
indexed
addressing
is
used,
and
the
DEC
instruction
updates
the
indirect
address.
.
2000
A9
00
LDA
#$00
Load
.A
with
a
zero.
.
2002
85
D8
STA
$D8
Store
zero
in
the
low
byte
of
indirect
address.
.
2004
A8
TAY
Store
zero
in
.Y.
.
2005
A9
FF
LDA
#$FF
Load
.A
with
$FF.
.
2007
85
D9
STA
$D9
Store
$FF
in
the
high
byte
of
indirect
address.
.
2009
A9
EA
LDA
#$EA
.A
is
the
value
to
look
for.
.
200B
Dl
D8
CMP
($D8),Y
Examine
the
current
location.

Other manuals for Commodore Plus 4

Related product manuals