EasyManua.ls Logo

Commodore Plus 4 - Page 287

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
278
The
stack
pointer
is
incremented,
and
the
value
it
points
to
is
placed
in
the
processor
status
register.
Example:
This
example
shows
BASIC
setting
up
for
a
SYS
command.
The
value
to
send
in
the
status
register
is
stored
in
S07F5.
.
A7BE
AD
FS
07
LDA
$07F5
Get
the
status
register
value
from
memory.
.
A7C1
48
PHA
Push
the
value
onto
the
stack.
.
A7C2
AD
F2 07
LDA
$07F2
Set
up
.A.
.
A7C5
AE
F3
07
LDX
$07F3
Set
up
.X.
.
A7C8
AC
F4
07
LDY
$07F4
Set
up
.Y.
.
A7CB
2B
PLP
Pull
the
status
register
from
the
stack.
.
A7CC
6C
14
00
JMP
($0014)
Jump
to
the
user
routine.
R0L—Rotate
Left
One
Bit
Each
bit
in
the
specified
operand
is
rotated
one
bit
to
the
left.
The
high
bit
is
rotated
into
the
carry
flag,
and
the
carry
flag
is
rotated
into
the
low
bit.
Operation:
C*-[7
Addressing
Mode
Accumulator
Zero
page
Zero
page,
X
Absolute
Absolute,
X
Syntax
ROL
ROL
$hh
ROL
$hh,X
ROLShhhh
ROL
$hhhh,X
Flags
Affected:
N,
Z,
C
Opcode
2A
26
36
2E
3E
Bytes
1
2
2
3
3
Cycles
2
5
6
6
7
Bit
7
of
the
operand
is
rotated
into
the
carry
flag.
Bits
6
through
0
are
rotated
into
bits
7
through
1,
respectively.
The
carry
flag
is
rotated
into
bit
0.
If
bit
7
of
the
result
is
set
to
1,
the
N
flag
is
set
to
1;
otherwise
it
is
cleared
to
0.
If
the
result
is
zero,
the
Z
bit
is
set
to
1;
otherwise
it
is
cleared
to
0.
Example:
This
program
is
a
4-byte
shift
left
(or
multiplication
by
2).
If
an
overflow
occurs,
the
border
color
is
incremented.
The
ROL
instruction
is
used
to
shift
left
and
transmit
the
information
between
bytes
by
means
of
the
carry
bit.
2000
OE
03
21
ASL
$2103
Shift
the
low
byte
to
the
left.
.
2003 2E
02
21
ROL
$2102
Rotate
the
next
byte
to
the
left.
.
2006
2E
01
21
ROL
$2101
Rotate
the
next
byte
to
the
left.

Other manuals for Commodore Plus 4

Related product manuals