EasyManua.ls Logo

Commodore Plus 4 - Page 286

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...
274
Machine
Language
on
the
Commodore
Plus/4
.
A7DA
8D
F5
07
STA
$07F5
Save
the
returned
status
register.
.
A7DD
60
RTS
Return
from
SYS.
PLA—Pull
Accumulator
from
the
Stack
A
value
is
pulled
from
the
stack
and
placed
in
the
accumulator.
Operation:
A
t
Addressing
Mode
Syntax
Flags
Affected:
N,
Z
Opcode
Bytes
Cycles
Implied
PLA
68
1
The
stack
pointer
is
incremented,
and
the
value
it
points
to
is
placed
in
the
accumulator.
Example:
This
program
continuously
changes
the
border
color
until
a
key
is
pressed.
The
original
color
of
the
border
is
saved
on
the
stack
and
retrieved
using
the
PLA
instruction
after
a
key
is
hit.
.
SOOO
AD
19
PF
LDA
$PF19
.
2003
48
PHA
.
S004
SO
OC
SO
JSR
$SOOC
.
2007
68
PLA
.
S008
8D
19
PP
STA
$FF19
.
SOOB
00
BRK
.
SOOC
EE
19
PP
IISTC
$FF19
.
SOOF
SO
E4
FF
JSR
$FFE4
.
S013
FO
F8
BEQ
ISOOC
.
S014
60
RTS
Get
the
current
border
color.
Save
on
the
stack.
Execute
the
border
color
change
subroutine.
Retrieve
the
original
border
color
from
the
stack.
Restore
the
original
border
color.
Stop
processing.
Increment
the
border
color.
Look
for
a
key
hit.
If
no
key,
then
go
back.
Exit
the
subroutine.
PLP—Pull
Processor
Status
Register
from
the
Stack
A
value
is
pulled
from
the
stack
and
placed
in
the
processor
status
register.
Operation:
SR
\
Addressing
Mode
Syntax
Flags
Affected:
All
Opcode
Bytes
Cycles
Implied
PLP
28
1

Other manuals for Commodore Plus 4

Related product manuals