EasyManua.ls Logo

Commodore Plus 4 - Page 264

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...
252
Machine
Language
on
the
Commodore
Plus/4
.
SOOA
00
BRK
Execute
a
BRK
instruction
(and
stop
processing).
.
200B
EE
19
FF
INC
$FF19
Increment
the
border
color.
.
SOOE
4C 4C
F4
JMP
$F44C
Then
jump
to
normal
BRK
processor.
After
you
execute
this
program
(by
typing
G
2000),
the
execution
of
a
BRK
instruction
will
increment
the
border
color
before
proceeding
normally.
When
you
are
finished
with
this
example,
reset
the
computer
by
typing
G
FFF6
so
as
to
restore
the
BRK
instruction
vector
to
its
default
value.
BVC—Branch.
If
Overflow
Flag
Is
Clear
This
instruction
examines
the
current
status
of
the
overflow
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
onV-0
Flags
Affected:
None
Addressing
Mode
Syntax
Opcode
Bytes
_Cycles
Relative
BVC
$hhhh
50
2 2*
*
Add
1
cycle
when
the
branch
is
taken.
Add
2
cycles
when
it
is
taken
across
a
page
boundary.
Example:
This
program
adds
the
contents
of
$2100
to
the
contents
of
$2101
and
stores
the
result
in
$2102.
If
a
two's
complement
overflow
occurs,
the
border
color
is
incremented.
2000
S001
2004
2007
200A
200C
200F
18
AD
6D
8D
50
EE
00
00
01
02
03
19
21
21
21
FF
CLC
LDA
ADC
STA
BVC
IWC
BRK
$2100
$2101
$2102
I200F
$FF19
Prepare
for
addition.
Get
the
first
value.
Add
the
second
value.
Store
the
result.
Branch
if
no
overflow
occurred.
Increment
the
border
color.
Stop
processing.
Examine
and
change
the
contents
of
$2100-$2102
to
experiment
with
two's
complement
overflows.
BVS—Branch
If
Overflow
Flag
Is
Set
This
instruction
examines
the
current
status
of
the
overflow
flag
bit.
If
it
is
set
to
1,
the
branch
occurs.
If
it
is
0,
the
branch
does
not
occur,
and
execution
continues
with
the
following
instruction.

Other manuals for Commodore Plus 4

Related product manuals