EasyManua.ls Logo

Commodore Plus 4 - Page 280

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...
368
Machine
Language
on
the
Commodore
Plus/4
If
the
value
transferred
is
negative,
the
N
flag
is
set
to
1;
otherwise
it
is
cleared
to
0.
If
the
value
transferred
is
zero,
the
Z
flag
is
set
to
1;
otherwise
it
is
cleared
to
0.
The
value
in
the
operand
is
not
altered.
Example:
The
characters
on
the
top
of
the
line
of
the
screen
are
copied
to
the
second
line
of
the
screen.
Each
value
is
transferred
by
loading
it
into
the
accumulator
with
the
LDA
instruction
and
storing
it
to
the
destination.
.
2000
AS
27
LDX
#$27
.X
indexes
the
line.
.
2002
BD
00
OC
LDA
$0C00,X
Load
the
accumulator
with
the
next
character.
.
2005
9D
28
OC
STA
$0C28,X
Store
on
the
second
line.
.
2008
CA
DEX
Decrement
the
index
register.
.
2009
10
F7
BPL
$2002
If
there
is
more
to
do,
go
back.
.
200B
00
BRK
Stop
processing.
If
the
BRK
instruction
causes
the
screen
to
scroll,
the
result
of
the
program
is
not
seen.
To
avoid
this,
clear
the
screen
before
you
execute
the
program.
LDX—Load
X
Register
with
Value
from
Memory
The
value
currently
in
the
location
specified
by
the
operand
is
placed
in
the
X
register.
Operation:
M—
X
Flags
Affected:
N,
Z
Addressing
Mode
Syntax
Opcode
Bytes
Cycles
Immediate
Zero
page
Zero
page,
Y
Absolute
Absolute,
Y
LDX
#$hh
LDX
$hh
LDX
$hh,Y
LDX
$hhhh
LDX
$hhhh,Y
A2
A6
B6
AE
BE
2
2
2
3
3
2
3
4
4
4*
*
Add
1
when
a
page
boundary
is
crossed.
If
the
value
transferred
is
negative,
the
N
flag
is
set
to
1;
otherwise
it
is
cleared
to
0.
If
the
value
transferred
is
zero,
the
Z
flag
is
set
to
1;
otherwise
it
is
cleared
to
0.
The
value
in
the
operand
is
not
altered.
Example:
This
program
copies
each
character
on
the
first
line
of
the
screen
one
location
to
the
right.
The
X
register
is
used
as
the
index
and
initialized
using
the
LDX
instruction.

Other manuals for Commodore Plus 4

Related product manuals