EasyManua.ls Logo

Commodore Plus 4 - Page 273

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
DEY—Decrement
the
Y
Register
by
1
The
value
currently
in
the
Y
register
is
decremented
by
1.
861
Operation:
Y-
1
Y
Addressing
Mode
Syntax
Flags
Affected:
N,
Z
Opcode
Bytes
Cycles
Implied
DEY
88
1
Example:
The
value
stored
in
the
Y
register
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.
In
this
program
the
contents
of
$2100-$21FF
are
copied
onto
the
screen
at
$0C00-$0CFF.
The
Y
register
is
used
for
indirect
indexed
addressing,
and
the
DEY
instruction
updates
the
index
value.
S000
A9
00
2002
85
D8
LDA
#$00
STA
ID8
.
2004
85
DA
STA
$DA
.
2006
A8
2007
A9
21
.
2009
85
D9
.
200B
A9
OC
.
200D
85
DB
.
200F
Bl
D8
.
2011
91
DA
.
2013
88
.
2014
DO
P9
.
2016
00
TAY
LDA
#$21
STA
$D9
LDA
#$0C
STA
$DB
LDA
($D8),Y
STA
($DA),Y
DEY
BITE
$200F
BRK
Load
.A
with
zero.
Store
zero
in
the
low
byte
of
origination
address.
Store
zero
in
the
low
byte
of
destination
address.
Initialize
.Y
at
zero.
Load
.A
with
$21.
Store
$21
in
the
high
byte
of
origination
address.
Load
.A
with
$0C.
Store
$0C
in
the
high
byte
of
destination
address.
Get
the
value
of
the
originating
byte.
Store
in
the destination
byte.
Decrement
.Y
by
1.
If
not
zero,
continue.
Stop
processing.
Use
the
M
(Memory)
command
to
put
the
desired
screen
code
values
in
$2100-$21FF
(see
Appendix
E
for
screen
codes).
E0R—Exclusive-OR
Memory
with.
Accumulator
The
value
currently
in
the
accumulator
is
logically
exclusive-ORed
to
the
speci
fied
operand,
and
the
result
is
placed
in
the
accumulator.

Other manuals for Commodore Plus 4

Related product manuals