EasyManua.ls Logo

Commodore RF512C - Page 37

Commodore RF512C
52 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...
31
This
demo
progr
am
will sh
ow
you some routines
in
sequential
file
programming.
10 CLOSE1 :0PEN
1,8,15:
PRINT"TVPE
END
WHEN
FINISH"
20
OPEN
2,8,
2,
"
@:
SEQ
,S
,w"
30
INPUT
"
NAME-
";
NAME
S:
INPUT#
2,
NAME
S
40
INPUT
"
TEL-:
";
TEL
:
INPUT#
2,
TEL
50 IF
NAME
S
:::::
"
END
"
THEN
30
60 CLOSE
2:
CLO
SE 1
110
CLOSE
1:
0PEN 1
,8,15
120
OPEN
2,8.2; '
SEQ
,S,R"
130
INPUT
lI'2,
NAME
$
,TEL
140
PRINT
NAME
$
,TEL
150
IF
ST
<>
64 T
HEN
120
150 C
LO
SE 2:
CLOSE
1 :
PRIN
T"READ
FINISH
"
LINE
10
and
110
:
LINE
20
and
120:
LINE
30.40:
LINE
130
:
LINE
140:
LINE
50:
LINE
150:
LINE
60
and
150:
OPEN
Command
channe
l
OPEN
S
EQ
file
data
channe
l
Where
@
in
line
20
for
aviod
overwritten error
Input
data
by user then
put
in
to file
Get
data
ba
c k from file
Printout
data
Check
i
nput
finish or
no
t
Check
End of file st
ci
t
us
C
LO
SE all files
From the
program,
stat
us
variable
5T
is
used to
get
message
of
file
operati
on,
The
following
tab
le li
sts
the
meaning
s
of
5
T.
5T-bit MEANING
0
Ti
me
out
on ta lker.
1 Time out on
lis
tener.
2 Cassette
data
error.
3
Cassette
data
error.
4 Verify error.
5
Ca
ss
ette checksum err
or.
6
EOF
detected
.
7
Device not present.
For
de
tail
in
file format,
please
refer to
APPENDI
X.