EasyManua.ls Logo

Commodore Plus 4 - Page 295

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
6802
Microprocessor
283
STX—Store
Value
in
X
Register
into
Memory
The
value
currently
in
the
X
register
is
placed
in
the
location
specified
by
the
operand.
Operation:
X
-
M
Flags
Affected:
None
Addressing
Mode
Syntax
Opcode
Bytes
Cycles
Zero
page
STX
$hh
86
2
3
Zero
page,
Y STX
$hh,Y
96
2
4
Absolute
STX
$hhhh
8E
3
4
The
value
of
the
X
register
is
not
altered,
and
the
flags
are
not
altered.
Example:
This
program
counts
the
number
of
locations
containing
the
value
SEA
(the
opcode
for
a
NOP)
in
$D
A00-$DAFF.
The
X
register
is
used
as
the
counter,
and
the
final
count
is
stored
in
$2100
using
the
STX
instruction.
.
S000
AS
00
LDX
#$00
Start
.X
count
at
zero.
.
2002
AO
00
LDY
#$00
.Y
is
the
index
register.
.
2004
A9
EA
LDA
#$EA
Load
.A
with
the
value
to
look
for.
.
2006
D9
00
DA
CMP
$DA00,Y
Check
the
next
byte.
2009
200B
200C
200D
200F
2012
DO
E8
88
DO
8E
00
01
F7
00
21
BITE
IWX
DEY
BNE
STX
BRK
$2000
$2006
#2100
If
not
equal,
then
skip
the
next
instruction.
Increment
the
count.
Decrement
the
index
register.
If
not
done,
go
back.
Store
the
final
count
at
$2100.
Stop
processing.
STY—Store
Value
in
Y
Register
into
Memory
The
value
currently
in
the
Y
register
is
placed
in
the
location
specified
by
the
operand.
Operation:
Y'-+
M
Flags
Affected:
None
Addressing
Mode
Syntax
Opcode
Bytes
Cycles
Zero
page
STY
$hh
84
2
3
Zero
page,
X
STY
$hh,X
94
2
4
Absolute
STY
$hhhh
8C
3
4
The
value
of
the
Y
register
is
not
altered,
and
the
flags
are
not
altered.

Other manuals for Commodore Plus 4

Related product manuals