EasyManua.ls Logo

Commodore Plus 4 - Page 262

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...
280
Machine
Language
on
the
Commodore
Plus/4
BNE—Branch
If
Zero
Flag
Is
Clear
This
instruction
examines
the
current
status
of
the
zero
flag
bit.
If
it
is
cleared
to
0,
the
branch
occurs.
If
it
is
1,
the
branch
does
not
occur,
and
execution
continues
with
the
following
instruction.
Operation:
Branch
onZ-0
Flags
Affected:
None
Addressing
Mode
Syntax
Opcode
Bytes
Cycles
Relative
BNE
$hhhh
DO
2
2*
*
Add
1
cycle
when
the
branch
is
taken.
Add
2
cycles
when
it
is
taken
across
a
page
boundary.
Example:
In
this
program,
the
contents
of
$2100-$21FF
are
copied
into
$2200-$22FF.
The
BNE
instruction
is
used
to
continue
looping
until
the
X
register
reaches
zero.
.
2000
A2
00
LDX
#$00
Start
counter
at
zero.
.
2002
BD
00
21
LDA
$2100,X
Get
value
from
original
area.
.
2005
9D
00
22
STA
$2200,X
Put
value
in
destination
area.
.
2008
CA
DEX
Decrement
counter.
.
2009
DO
P7
BWE
$2002
If
not
done,
go
back.
200B
00
BRK
Stop
processing.
Use
the
M
(Memory)
command
to
examine
or
change
the
contents
of
the
memory
areas.
BPL—Branch
If
Negative
Mag
Is
Clear
This
instruction
examines
the
current
status
of
the
negative
flag
bit.
If
it
is
cleared
to
0,
the
branch
occurs.
If
it
is 1,
the
branch
does
not
occur,
and
execution
continues
with
the
following
instruction.
Operation:
Branch
onN-0
Flags
Affected:
None
Addressing
Mode
Syntax
Opcode
Bytes
Cycles
Relative
BPL
$hhhh
10
2
2*
*
Add
1
cycle
when
the
branch
is
taken.
Add
2
cycles
when
it
is
taken
across
a
page
boundary.
Example:
This
program
copies
the
contents
of
the
color
registers
($FF15-$FF19)
into
memory
at
$2100-$2104.
The
BPL
instruction
is
used
to
determine
when
the
process
is
complete.

Other manuals for Commodore Plus 4

Related product manuals