EasyManua.ls Logo

Commodore Plus 4 - Page 393

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
Modem
and
Other
RS232
Devices
381
packaged
with
the
device
or
interface
for
differences.
The
use
of
the
RS232
port
in
machine
language
is
virtually
identical
to
its
use
in
BASIC.
Machine-language
programmers
will
find
both
the
BASIC
and
machine-language
descriptions
helpful.
Using
an
RS232
Device
with
BASIC
The
RS232
port
is
opened
as
an
input/output
file.
When
it
is
opened,
the
communications
protocol
to
be
used
is
established
through
the
control
and
command
registers.
The
values of
these
registers
are
passed
to
the
RS232
port
through
the
file
name
parameter
of
the
OPEN
command.
That
is,
the
first
two
characters
of
the
parameter
are
interpreted
as
the
CHR$
codes
for
the
control
and
command
register
values.
Any
subsequent
characters
are
ignored.
The
secondary
address
parameter
of
the
OPEN
command
is
ignored.
The
OPEN
command
syntax
is
OPEN
fUenumber,&,0,ClIR$(control
register)CHR$(
Gonunand
register^)
where
filenumber
is
the
logical
file
number
to
associate
with
the
RS232
port.
The
logical
file
number
can
be
1-255
(128-255
causes
a
linefeed
to
follow
each
carriage
return).
The
control
and
command
register
values
are
passed
as
a
two-character
string.
The
control
register
values
are
as follows:
Bit(s)
0-3
Meaning
baud
rate
generator
0000
=
0001
=
0010
=
0011
=
0100
=
0101
=
0110
=
0111
=
1000
=
1001
=
1010
=
1011
=
1100
=
1101
=
1110
=
mi
=
16
times
external
clock
50
baud
75
109.92
134.58
150
300
600*
1200*
1800*
2400*
3600*
4800
*
7200*
9600
*
19200
*