EasyManua.ls Logo

Commodore 1541 - Page 40

Commodore 1541
80 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...
SAMPLE
PROGRAM
READING
BACK
10
RANDOM-ACCESS
BLOCKS
WITH
4
RECORDS
EACH:
10
OPEN15,8,I5
20
OPEN5,8,5,"#"
30
OPEN4,8,4,"KEYS,S,R"
40
FOR
R=lTO10
50
INPUT#4,T,B
60
PR1NT#I5,"B-R:"5;O;T;B
70
FORL=1TO4
80
PRINT#15,"B-
P:"5;(L-
1)'64+
1
85
INPUT#5,AJ,X
90 IF
A$o"RECORD
CONTENTS*"
OR
X<>
L
THEN
STOP
95
PRINT
R;AS;L
100
NEXT
L
110
PR1NT/M5,"B-F:"O;T;B
120
NEXT
R
130
CLOSE4:CLOSE5
140
PRINT#15,"S0:KEYS"
150
CLOSE15
USER1
and
USER2
The
USER
commands
are
generally
designed
to
work
wiih
machine
language
(see
chapter
8
for
more
on
this).
The
USER1
and
USER2
commands
are
special
versions
of
the
BLOCK-READ
and
BLOCK-WRITE
commands,
but...
with
an
important
dif
ference:
the
way
USER!
and
USER2
work
with
the
buffer-pointer.
The
BLOCK-READ
command
reads
up
to
256
characters,
but
stops
reading
when
the
buffer-pointer
stored
with
the
block
says
that
block
is
finished.
The
USER1
com
mand
performs
the
BLOCK-READ
operation,
but
first
forces
the
pointer
to
255
in
order
to
read
the
entire
block
of
data
from
the
disk.
FORMAT
FOR
USER1
COMMAND
PRINT#file#,
"Ul:"
channel;
drive;
track;
block
or
PRINT#file#,
"UA:"
channel;
drive; (rack;
block
There
is
no
difference
between
the
Ul
and
UA
designations
for
this
command.
34

Other manuals for Commodore 1541

Related product manuals