EasyManua.ls Logo

Commodore Plus 4 - Page 381

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
Datassette
Tape
Recorder
369
2.
Check
for
errors
by
examining
the
carry
bit
and
status
byte.
All
the
files
in
use
can
be
closed
and
the
input
and
output
channels
reset
to
their
default
devices
by
calling
CLALL
($FFE7).
Print
To
send
information
into
a
file,
it
must
have
been
opened
with
a
secondary
address
of
1
or 2
for
write.
The
following
outlines
the
operations
required:
1.
Load
.X
with
the
logical
file
number
of
the
output
file.
Designate
it
as
the
output
channel
by
calling
CHOUT
($FFC9).
2.
Check
for
errors.
3.
Send
data
to
the
channel
with
BSOUT
($FFD2).
4.
When
all
data
has
been
sent,
returh
the
input
and
output
channels
to
default
(keyboard
and
screen)
by
callingCLRCH
(SFFCC)
and
close
the
file.
Or,
call
CLALL
($FFE7)
to
close
all
the
files
and
reset
the
input
and
output
channels.
Get
To
receive
information
from
a
file,
the
file
must
have
been
opened
with
a
secondary
address
of
0
for
read.
The
following
outlines
the
operations
required:
1.
Load
.X
with
the
logical
file
number
of
the
input
file.
Designate
it
as
the
input
channel
by
calling
CHKIN
($FFC6).
2.
Check
for
errors.
3.
Receive data
from
the
channel
with
BASIN
(SFFCF).
4.
When
complete,
return
the
input
and
output
channels
to
default
(keyboard
and
screen)
by
calling
CLRCH
($FFCC)
and
close
the
file.
Or
call
CLALL
($FFE7)
to
close
all
files
and
resest
the
input
and
output
channels.
Example:
This
program
creates
a
data
file
on
tape
and
records
what
the
user
types
in
(until
a
carriage
return
is
received).
2000
2002
2004
2006
2009
200B
200D
A9
A2
A0
20
A9
A2
A0
02
01
01
BA
06
00
21
LDA
LDX
LDY
FF
JSR
LDA
LDX
LDY
#$02
#$01
#$01
$FFBA
#$06
#$00
#$21
Logical
file
number
to
use
for
Datassette
file.
Device
number
of
Datassette.
Secondary
address
signifies
write
(end-of-file).
SETLFS.
Length
of
file
name.
Low
byte
of
address
of
file
name.
High
byte
of
address
of
file
name.