EasyManua.ls Logo

Commodore Plus 4 - Page 257

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
6508
Microprocessor
245
200E
2010
2012
2014
2016
S018
201A
201B
201D
20
IF
2021
2023
A5
29
FO
A5
29
DO
18
AS
69
85
10
00
A5
08
FA
A5
08
FA
FF
10
FF
El
LDA
AND
BEQ
LDA
AND
BNE
CLC
LDA
ADC
STA
BPL
BRK
$A5
#$08
$200E
$A5
#$08
$2014
$FF
#$10
$FF
$2004
Get
low
byte
of
jiffy
clock.
Wait
until
bit
3
is
on.
If
it
is
still
off,
keep
waiting.
Get
low
byte
of
jiffy
clock.
Wait
until
bit
3
is
off.
If
it
is
still
on,
keep
waiting.
Get
ready
to
calculate
new
luminance
Get
current
value.
Add
$10
to
it
to
go
up
one
luminance
level.
Save
it.
If
not
at
$80,
go
on.
Stop
execution.
The
program
is
executed
using
G
2000.
ASL-Shift
Left
One
Bit
Each
bit
in
the
specified
operand
is
shifted
one
bit
to
the
left.
The
high
bit
is
shifted
into
the
carry
flag,
and
a
0
is
shifted
into
the
low
bit.
Operation:
C*-[7
Addressing
Mode
OJ-0
Syntax
Flags
Affected:
N,
Z,
C
Opcode
Bytes
Cycles
Accumulator
Zero
page
Zero
page,
X
Absolute
Absolute,
X
ASL
ASL
$hh
ASL
$hh,X
ASL
$hhhh
ASL
$hhhh,X
OA
06
16
OE
IE
1
2
2
3
3
2
5
6
6
7
Bit
7
of
the
operand
is
shifted
into
the
carry
flag.
Bits
6
through
0
are
shifted
into
bits
7
through
1,
respectively.
A
0
is
shifted
into
the
low
bit.
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
bit
is
set
to
1;
otherwise
it
is
cleared
to
0.
Example:
This
program
uses
the
ASL
instruction
to
move
lunlinances
(0
through
7)
into
the
high
nybble
of
a
byte
so
that
they
can
be
placed
in
the
background
register.
2000
A2
00
EDX
#$00
.X
will
store
the
current
luminance.
.
2002
86
FF
STX
$FF
$FF
is
a
temporary
location
for
the
shifting.
.
2004
06
FF
ASL
$FF
Shift
the
luminance
left
four
times
.
2006
06
FF
ASL
$FF
to
get
it
into
correct
position

Other manuals for Commodore Plus 4

Related product manuals