Excelerator Plus FSD-1 User manual

FSD-
1
FLOPPY
DISK
USER'S
MANUAL
v-i


TABLE
OF
CONTENTS
Page
1.
Introduction
2
2.
Specifications
3
3.
Installation
5
Box
Contents
5
Cable
Connections
5
Turning
On
Power
5
Disk
Insertion
5
4.
Us
ing
Programs
6
Using
Prepackaged
Software
6
The
Disk
Directory
7
Pattern
Matching
and
Wild
Cards
8
5.
Disk
Commands
10
Reading
the
Error
Channel
13
6.
Sequential
Files
14
7.
Random
Files
16
Using
Random
Files
20
8.
Relative
Files
25
Using
Relative
Files
26
9.
Programming
the
Disk
Controller
30
10.
Changing
the
Device
Number
33
Software
Method
33
Hardware
Method
34
Appendices
A.
List
of
Commands
35
B.
Description
of
Error
Messages
36

1.
Introduction
The
FSD-1
Disk
Drive
is
a
versatile
and
efficient
disk
drive
built
for
the
Commodore
series
of
personal
computers.
This
drive
is
fully
compatible
with
the
Commodore
64
computer
and
directly
replaces
the
Commodore
1541
Disk
Drive,
giving
much
better
performance
in
terms
of
data
loading
and
writing
speed
and
memory
buffer
size.
If
you
are
a
beginner,
the
first
few
chapters will
help
you
install
and
operate
the
disk drive.
As
your
skill
and
experience
improves,
you
will
find
more
uses
for
your
disk
drive
and
the
more
advanced
chapters
will
be
very
helpful.
If
you're
an
experienced
professional,
this
manual
can
give
you
the
information
you
need
to
take
advantage
of
all
tne
FSD-1
s
power
and
features.
Regardless
of
the
level
of
your
programming
expertise,
the
FSD-1
will
greatly
increase
the
efficiency
and
capability
of
your
computer
system.
Please
be
aware
that this
manual
is
a
reference
guide
to
the
operation
of
the
FSD-1
While
it
contains
step
by
step
instructions
and
a
section
to
let
you
easily
use
prepackaged
software,
you
should
become familiar
with
BASIC
and
the
computer
commands
that
help
you
operate
your
computer
and
its
peripherals.
Remember,
you
don't
need
to
learn
everything
in
this
manual
at
once.
The
first
three
or
four
chapters
will
let
you
use
the
disk
drive
for
most
applications,
and
the
following
chapters
tell
you
how
to
set up
files,
access
any
data,
and
program
the
disk
drive
itself
at
the
machine
language
level.
NOTES:
In
FORMAT
examples, lower
case
words
need
to
be
replaced
by an
appropriate
word
or
number
that
you
choose.
In
this
manual,
zeroes
look
like
this:
0;
and
the
letter
"oh"
looks
like
this:
o
or
0.

2.
SPECIFICATIONS
FSD-1
FLOPPY
DISK
DRIVE
*Slim
line
construction
(low
profile)
and
fully
Commodore
compatible.
*Disk
size:
5-1/4
inch
diameter.
*Capacity
Per
Disk
174.8
kbytes
Directory
Entries
144/disk
Sector/Track
21
Bytes/Sector
...
256
Tracks
35
♦Average
MTBF
rate
of
8000
hours.
*Power
Requirements
Voltage
117
VAC,
220/240
VAC
optional
Frequency
50/60 Hertz
Power
Dissipation
24
Watts
♦Mechanical
Dimensions
Height,
width,
depth
70
X
Ib3
X
330
mm.
Weight
2.8
Kgs.
*A11
metal
vented
chassis.
*Solid
state
power
supply.
*Dual
serial
port
with
chaining
option.
*5-l/4
inch
industry
standard
format.

r
FIG.
1
FSD-1
FLOPPY
DISK
DRIVE
POWER
INDICATER
POWER
SWITCH
AC
INPUT
-SERIAL
BUS
4-A

FIG.
FSD-1
FLOPPY
DISK DRIVE
POWER
INDICATER
POWER
SWITCH
Note:
Above
diagram
is
of
alternate
version
of
the
FSD-1
with
identical
performance
to
the
model
pictured
in
original
diagram
but
slightly
different
appearance.
4-B

3.
INSTALLATION
CONTENTS
OF
BOX
The
FSD-1
Disk
Drive
consists
of
the
disk
drive,
power
cable,
serial
bus
cable,
and
this
manual.
The
power
cable
has
a
connection
for
the
back
of
the
disk
drive
on
one
end,
and
a
connection
for
a
three-prong
electrical
outlet
on
the
other
end.
The
serial
bus
cable
has
a
six-pin
DIN
plug
on
both
ends.
CABLE
CONNECTIONS
First,
plug
the
power
cable
into
the
back
of
the
disk
drive.
It
won't
go
in
if
you
try
to
put
it
in
upside
down.
Next,
plug
the
other
end
into
the
electrical
outlet.
If
the
drive
makes
any
sound
at
this
time,
turn
it
off
using
the
switch
on
the
back!
Do
not
plug
.any
other
cables
into
the
drive
with
the
power
on.
Second,
plug
the
serial
bus
cable
into
either
one
of
the
serial
bus
sockets
on
the
back
of
the
drive.
Turn
off
the
computer
and
plug
the
other
end
of
the
cable
into
the
back
of'
the
computer.
You're
ready
to
go!
If
you
have
a
printer
or
another
disk
drive,
attach
its
cable
to
the
remaining
serial
bus
socket
to
"daisy
chain"
the
devices.
If
it's
a
disk
drive,
you
will
need
to
change
one
of
the
drives
device
numbers.
TURNING
ON THE
POWER
When
all the
devices
are
hooked
together,
the
power
may
be
turned
on.
It
is
important
to
turn
them
on
in
the
correct
order:
the
computer
is
always
last.
Also:
make
sure
there
are
no
disks
in
the
disk
drive
when
you
turn
on
the
power.
DISK
INSERTION
To
insert
a
disk,
simply
turn
the
lever
to
a
horizontal
position,
slide
the
disk
in
gently
till
it
stops,
and
turn
the
lever
down.
The
disk
goes
in
face
up,
with
the
large
opening
going
in
first
and
the
write-protect
notch
(a
small
square
cutout
in
the
disk)
on
the
left.
Never
remove
a
disk
when
the
drive light
is
on!
And
remember,
always
remove
the
disk
before
the
drive
is
turned
on or
off!
Data
can
be
destroyed
by
the
drive
at
this
time!

4.
USING
PROGRAMS
USING
PREPACKAGED
PROGRAMS
If
you
want
to
use
a
program
already
written
on
a
disk,
such
as
a
video
game,
here's
all
you
have
to
do.
Turn
the
lever
up
and
insert
the
preprogrammed
disk
so
the
label
on
the
disk
is
facing
up
and
closest
to
you.
There
should
be
a
little
notch
on
the
disk
(maybe
covered
with
tape)
that
should
be
on
the
left.
Turn
the
lever
down.
Now,
type
in
LOAD
"program
name"
and
hit
the
RETURN
key.
The
disk
will
make
noise
and
your
screen
will
say:
SEARCHING
FOR
PROGRAM
NAME
LOADING
READY
When
the
screen
says
READY,
just type
in
RUN and
hit
the
RETURN
key-
your
program
is
ready
to
use!
LOAD
COMMAND
PURPOSE: To
transfer
a
program
from
the
disk
to
the
computer's
current
memory.
FORMAT:
LOAD"program
,ame",
device
#,
command
#
The
program
name
is
a
character
string,
that
is,
either
a
name
in
quotes
or
the
contents
of
a
given
string
variable.
The
device
number
is
preset
on
the
disk
drive's
circuit
board
to
be
8.
If
you
have
more
than
one
drive,
read
the
chapter
on
changing
the
device
number. This
manual
assumes
you're
using
8
as
the
device
number
for
the
disk
drive.
The
command
number
is
optional.
If
not
given,
or
zero,
the
program
is
loaded
normally,
into
the
start
of
your
computer's
available
memory
for
BASIC
programs.
If
the
number
is
1,
the
program
will
be
loaded
into
exactly
the
same
memory
locations
from
which
it
came.
The
command
number
1
is
used
mainly
for
machine
language,
character
sets,
and
other
memory
dependant
functions.
EXAMPLES:
LOAD
"TEST",8
LOAD
"Program
#1",8
LOAD
"Mach
Lang",8,1
LOAD
A$,J,K

CAUTION:
Besides
putting
your
program
into
the
computer's
current
memory,
LOAD
wipes
out
any
previous
program
there!
NOTE:
As
in
the
last
example,
you
can
use
variables
to
represent
strings,
device
numbers,
and
command
numbers;
just
be
sure they
are
all
previously
defined
in
your
program.
Also,
see
the
note
on
file
names
on
page
9.
THE
DISK
DIRECTORY
Your
disk
drive
is
a
random
access
device.
This
means
the
read/write
head
of the
drive
can
go
to
any
spot
on
the
disk
and
access
a
single
block
of
data,
which
hold
up
to
256
bytes
of
information.
There
are
683
blocks
on
a
disk.
Fortunately,
you
don't
have
to
worry
about
individual
blocks
of
data
(check
chapter
5
if
you
do).
There
is
a
program
in
the
disk
drive
'called
the
Disk
Operating
System,
or
DOS,
that
keeps
track
of
the
blocks
for
you.
It
organizes
them
into
a
Block
Availibility
Map, or
BAM,
and
a
directory.
The
BAM
is
simply
a
checklist
of
the
blocks,
and
is
updated
every
time
a
program
is
SAVEd
or
a
data
file
OPENed.
The
directory
is
a
list
of
all
programs
and
other
files
stored
on
the
disk.
There
are
144
entries
available,
consisting
of
information
like
file
name
and
type,
a
list
of
blocks
used,
and
the
starting
block.
Like
the
BAM,
the
directory
is
updated
each
time
a
program
is
SAVEd
or
a
file
OPENed.
However,
the
BAM
isn't
updated
until
the
file
is
CLOSEd.
If
not
CLOSEd
properly,
all
data
in
that
file
will
be
lost.
More
on
this
later.
The
directory
can
be
LOADed
into
your
computer
memory
just
like
a
BASIC
program.
Put the
disk
in
the
drive
and
type:
LOAD"$",8
The
computer
will
say:
SEARCHING
FOR
$
FOUND
$
LOADING
READY
Now
the
directory
is
in
current
memory,
and
if
you
type
LIST
it
will
be
displayed
on
the
screen. To
examine
the
directory
from
inside
a
BASIC
program,
see
chapter
6
concerning
the
GET#
statement.

PATTERN
MATCHING AND
WILD
CARDS
To
make
LOADing
easier,
pattern
matching
lets
you
specify
certain
letters
in
the
program
name
so
the
first
program
in
the
disk
that
matches
your
pattern
is
the
one
loaded.
EXAMPLES:
LOAD
"*",8
(LOADs
first
file
on
disk)
LOAD
HTE*",8
(LOADs
first
file
that
starts
with
TE)
LOAD
"TE??",8
(LOADs
first
file
that
has
four
letters
and
begins
with
TE)
LOAD
"T?NT",8
(LOADs
first
file
that
has
four
letters
but
could
be
TINT,
TENT,
et
cetera)
The
asterisk
(*)
tells
the
computer
not
to
worry
about
the
rest
of
the
name
while
the
question
mark
(?)
acts
as
a
wild
card.
The
above
can
also
be
used
when
LOADing
the
directory
into
current
memory.
This
allows
checking
for
a
list
of
specific
programs.
The
procedure
is
the
same
as
above
except
for the
addition
of
a
"$:"
:
EXAMPLE:
LOAD
"$:T?ST*",8
(LOADs
all
file
names
in
the
directory
that have
the
correct
first,
third,
and
fourth
letters)
SAVE
PURPOSE:
Transfer
a
program
in
current
memory
onto
the
disk
for
later
use.
FORMAT:
SAVE"program
name",
device
#,
command
#
As
before,
the
command
number
is
optional.
If
there
is
already
a
program
or
file
by the
same
name
on
the
disk
or
there
isn't
enough
room
on
the
disk,
an
error
signal
will
be
generated.
If
there
isn't
enough
room,
other
programs
will
have
to
be
erased
or
use
a
different
disk.
EXAMPLE:
SAVE"HOMEWORK",8
SAVE
AND
REPLACE
PURPOSE:
Replace
an
already
existing
file
with
a
revised
version.
FORMAT:
SAVE
"
(§0
:
program
name",
8

If
you
edit
an
existing
program
and
want
to
save,
it
under
the
same
name,
SAVE
AND
REPLACE
does so
automatically.
If
you
want
to
keep
the
old
version,
save
the
new
version
under
a
different
name
•
EXAMPLE:
SAVE"@0:HOMEWORK",8
VERIFY
PURPOSE:
Checks
current
program
with
one
on
the
disk.
FORMAT:
VERIFY"program
name",
device
#,
command
#
VERIFY
does
a
byte
by
byte
comparison
of
the
program
in
current
memory
with
one
on
the
disk,
as
specified
in
the
VERIFY
command•
EXAMPLE:
VERIFY"OLD
VERSION",8
NOTE
ABOUT
FILE
NAMES:
File
names
must
begin
with
a
letter
not
a
number.
Spaces
are
permitted.
While
there
is
no
restriction
on
the
length
of
a
file
name,
all
commands
must
be
58
or
fewer
characters
in
length.
For
example,
in
the
above
VERIFY
command,
there
are
10
characters
besides
the
actual
program
name,
so
the
maximum
name
length,
in
this
case,
is
48
characters.

5.
DISK
COMMANDS
So
far,
you
have learned
the
simple
ways
of
using
the
disk
drive.
In
order
to
communicate
more
fully
with
the
diskf
disk
commands
need
to
be
used.
Two
of
these,
OPEN
and
PRINT#,
allow
the
creation
and
filling
of
a
data
file
on
the
disk.
Just
as
important
is
their
ability
to
open
a
command
channel,
allowing
the
exchange
of
information
between
computer
and
disk
drive.
OPEN
PURPOSE:
Creates
a
file
by
OPENing
a
communication
channel
between
computer
and
disk
drive.
FORMAT:
OPEN
file
#,
device
#,
(command)
channel
#,
text
string
The
file
number
should
be
any
number
from
1
to
127.
Numbers
from
128
to
255
can
be
used
but
should
be
avoided
as
they
cause
the
PRINT#
statement
to
generate
a
linefeed
after
carriage
returns.
The
device
number
is
usually
8.
The
channel
number
can
be
any
number
from
2
to
15.
These
refer
to
channels
used
to
communicate
with
the
disk,
and
channels
0
and
1
are
used
by
the
operating
system
for
LOADing
and
SAVEing.
Channels
2
through
14
can
be
used
to
send
data
to
files
while
15
is
reserved
as
the
command
channel.
The
text
string
is
a
character
string
that
is
used
as
the
name
for the
file
created.
A
file
cannot
be
created
unless
the
file
name
is
specified
in
the
text
string.
If
you
attempt
to
open
a
file
already
opened,
the
error
signal
"FILE
OPEN
ERROR"
will
be
generated.
10

EXAMPLES:
OPEN
5,8,5,
"TEST"
(creates
a
file
called
TEST)
OPEN
15,8,15,"I"
(sends
command
to
disk
on
command
channel)
OPEN
A,B,C,Z$
(these
variables
must
be
defined)
PRINT#
PURPOSE:
Fills
a
previously
OPENed
file
with
data.
FORMAT:
PRINT#
file
#,
text
string
The
PRINT#
command
works
exactly
like
the
PRINT
command,
except
the
data goes
to
a
device
other
than
the
screen,
in
this
case
the
disk drive.
When
used
with
a
data
channel,
PRINT#
sends
information
to
a
buffer
in
the
disk
drive
which
then
LOADs
it
onto
the
disk.
When
used
with
a
command
channel,
PRINT#
sends
commands
to
the
disk
drive.
The
command
is
placed
inside
quotes
as
a
text
string.
EXAMPLES:
INITIALIZE
PURPOSE:
FORMAT:
PRINT#
7,C$
(fills
file
7
with
text
string
C$)
PRINT#
15,"I"
(sends
disk
command
on
command
channel)
Initializes
disk
driver
to
power
up
condition.
OPEN
15,8,15,
"I"
or
OPEN
15,8,15
:
PRINT#15,
"I"
Sometimes,
an
error
condition
on
the
disk
will
prevent
you
from
performing
an
operation.
INITIALIZE
returns
the
disk
drive
to
its
original
state
when
power
is
turned
on.
NEW
PURPOSE:
Formats
new
disk
or
re-formats
used
one.
FORMAT:
PRINT#15,
"NEW
0:
disk
name,
id#"
This
command
formats
a
new
disk.
It
is
also
useful
to
erase
an
already-formatted
disk,
as
it
erases
the
entire
disk,
puts
timing
and
block
markers
on,
and
creates
the
directory
and
the
BAM.
The
disk
name
is
for
user
convenience
while
the
id#
is
a
2
digit
alphanumeric
identifier
that
is
placed
in
the
directory
and
every
block
on
the
disk.
If
you
switch
disks
while
writing
data,
the
drive
will
know
by
checking
the
id#.
EXAMPLES:
OPEN
15,8,15,
"NEW
0:
TEST
DISK,
Al"
OPEN
15,8,15
:
PRINT#15,
"N
0:
MY
DISK,
MY"
11

If
the
disk
needs
erasing
but
not
reformatting,
the
same
command
is
used,
but
leave
out
the
id#.
EXAMPLE:
SCRATCH
PURPOSE:
FORMAT:
OPEN
15,8,15,
"N
0:
NEW
INFO"
Erase
a
file
or
files
from
the
disk.
PRINT#15,
"SCRATCH
0:
filename"
This
command
erases
one
or
more
files
from
the
disk,
making
room
for
new
or
longer
files.
Groups
of
files
can
be
erased
at
one
time
by
naming
all
of
them
in
one
scratch
command.
EXAMPLES:
PRINT#15,"S
0:
TEXT"
(erases
file
called
TEXT)
PRINTU5,
"SCRATCHO:
TEXT,
0:TEST,
0:
MUSIC"
(erases
files
TEXT, TEST,
and
MUSIC)
COPY
PURPOSE:
FORMAT:
Duplicate
an
existing
file.
PRINT#.15,"COPY
0:newfilename=0
oldfilename1
COPY allows
you
to
make
a
copy
of
any
program
or
file
on
the
disk.
The
new
file's
name
must
be
different
from
the
old
one.
COPY
can
also
combine
up
to
four
files
into
one new
one.
EXAMPLES:
PRINT#15,"C
0:BACKUP=0
:
ORIGINAL"
PRINT#15,"COPY
0
:NEWFILE=0:
OLD1,0:
OLD2,0"
(combines
OLD1
and
OLD2
into
NEWFILE)
RENAME
PURPOSE:
Change
the
name
of
existing
file.
FORMAT:
PRINT#15,MRENAME0:
newname=0:
oldname"
This
command
lets
you
change
the
name
of
a
file
once
it's
in
the
disk
directory.
RENAME
will
not
work
on
any
files
that
are
currently
open.
EXAMPLE:
PRINT#15,"R
0:GOODNAME=0:
DUMBNAME"
VALIDATE
PURPOSE:
Removes
wasted
spaces
on
disk.
FORMAT:
OPEN
15,8,15,"V0:"
12

After
a
disk
has
had
many
files
saved
and
erased, small
gaps
in
the
data
begin
to
accumulate
and
waste
memory
space
on
the
disk.
VALIDATE
reorganizes
your
disk
so
you can
get
the
most
memory
from
the
available
space.
Also,
this
command
removes
files
that
were
OPENed
but
never
properly
CLOSEd.
CAUTION!
VALIDATE
erases
random
files
(see
chapter
7).
If
your
disk
contains
random
files,
DO
NOT
use
this
command!
READING
THE
ERROR
CHANNEL
Without
the DOS
Support
Program,
there
is
no
way
to
read
the
disk
error
channel
since
you
need
to
use
the
INPUT#
command,
unusable
outside
a
program.
Here
is
a
simple
BASIC
program
to
read
the
error
channel:
10
OPEN
15,8,15
20
INPUT#15,
A$,
B$,
C$,
D$
30
PRINT
A$,
B$, C$,
D$
When
you
use
an
INPUT#
from
the
command
channel,
you
read
up
to
four
variables
that
describe
the
error
condition.
The
first,
third,
and
fourth
are
numbers
so
numberic
variables
can
be
used.
The
inputs
are
organized
as
follows:
First:
error
number
(0
means
no
error).
Second:
error
description.
Third:
track
number
where error
occurred.
Fourth:
block
(sector)
in
track
where error
occurred.
Errors
on
track
18
concern
the
BAM
and
directory.
CLOSE
PURPOSE:
Proper
allocation
of
data
blocks,
closes
entry.
FORMAT:.
CLOSE
file#
This
command
is
very
important.
Once
a
file
that
was
opened
is
no
longer
needed
for
data
entry,
IT
MUST
BE
CLOSED
OR
ELSE
ALL
DATA
IN
THAT
FILE
WILL
BE
LOST.
It
is
very
important
that
the
data
files
be
CLOSEd
before
the
error
channel
(channel
#15)
is
CLOSEd.
Otherwise,
the
disk
drive
will
CLOSE
them
for
you
but
BASIC
will
still
think
they
are
open
and
let
you
try
to
write
to
them.
The
error
channel
should
be
OPENed
first
and
CLOSEd
last
of
all
your
files.
NOTE:
If
your
BASIC
program
leads
to
an
error
condition,
all
files
are
CLOSEd
in
BASIC,
but
not
on
the
disk
drive.
This
is
VERY
DANGEROUS!
Immediately
type:
CLOSE
15:
OPEN
15,8,15:
CLOSE
15
This
will
re-initialize
your
drive
and
make
all
your
files safe.
13

6.
SEQUENTIAL
FILES
Sequential
files
are
stored
and
read
sequentially
from
beginning
to
end.
There
are
basically
three
different
types
of
sequential
files
that
can
be
used. The
first
is
the
program
file,
which
is
abbreviated
in
the
directory
as
PRG.
The
PRG
is
the
only
sequential
file
that
can
store
and
read
programs.
The
second
file,
sequential
(SEQ),
and
the
third
file,
user
(USR),
are
for
data
handling.
These
two
files
must
be
opened
just
like
the
command
channel
in
the
last
chapter.
OPEN
PURPOSE:
Open
a
sequential
file.
FORMAT:
OPEN
file#,
device#,
channel#,
"0:
name,
type,
direction"
The
file
number
is
the
same
as
in
previous
uses
of
the
OPEN
command,
the
device number
is
usually
8,
the
channel
number
is
a
data
channel,
2
through
14.
It's
a
good
idea
to
use
the
same
number
for
both file
and
channel
numbers,
for
easy
remembering
(you
may
have
noticed
this
in
previous
examples).
The
name
is
the
file
name,
for
which
no
wild
cards
or
pattern
matching
may
be
used
if
you're creating
a
write
file.
The
type
can
be
any
one
from
the
list
below,
or
at
least
the
first
letter
of
one.
The
direction
must
be
READ
or
WRITE,
or
at
least
their
first
letters.
FILE
TYPE
MEANING
PRG
Program
file
SEQ
Sequential
file
USR
User
file
REL
Relative
(not
implemented
in
BASIC
2.0)
EXAMPLES:
OPEN
5,8,5,
"0:
DATA,
S,
R"
OPEN
A,B,C,"0:TEXT,
P,W"
OPEN
A,B,C,"0:M
+A$+
"U,W"
(OPENs
a
write
file
with
a
name
specified
by
the
string
variable
A$)
OPEN
2,8,2
"@0:
PHONES,
S,
W"
(replaces
old
version
of
the
file
with
a
new
one)
Once
a
file
has
been
opened
for
reading
or
writing,
three
commands
can
be
used
to
actually
transfer
the
data.
These
commands
are
PRINT#,
INPUT#,
and
GET#.
14

PRINT#
PURPOSE:
Directs
output
to
previously
opened
file.
FORMAT:
PRINT#
file#,
data
list
(no
space
allowed
between
PRINT
and
#)
The
PRINT#
statement
works
exactly
like PRINT:
formatting
capabilities
for
punctuation
and
data
types
work
just
the
same.
But that
means
you
need
to
be
careful
when
putting
data
into
files.
The
file
number
is
the
one
just
OPENed
and
the
data
list
consists
of
variables
and/or
text
inside
quotation
marks.
Care
must
be
taken
when
writing
in
data
so that
it
is
as
easy
as
possible
to
read
out
later.
Commas
used
to
separate
items
will
cause
spaces
to
be
stored
on
the
disk.
Semi-colons
will
keep
spaces
from
being
stored.
If
both
commas
and
semi-colons
are
absent,
a
carriage
return
(CR)
will
be
stored
at
the
end
of
the
data
that
is
written
in.
Consider.the
following
example
program:
10
A$="THIS
IS
A"
20
B$="TEST"
30
OPEN
8,8,8,
"0:TEST
,S,W"
40
PRINT#8,A$,B$"OF
THE
DISK"
50
CLOSE8
60
END
If
you
could
see
the
data
and
its
position
on
the
disk,
it
would
look like
this:
1
2 3 4
567
8 9
10
11
12 13
14
15
16 17
18
19
20
21
22
23
24
25
THISISA
TESTOF
26
27
28
29
30
31
32 33
34
35
THE
DISKCR
eof
(end
of
file)
The
comma,
semi-colon,
and
carriage
return
have
special
meaning
when
stored
to the
disk.
When
used
inside
a
string
or
quotes,
they
will
be
stored
as
regular
characters.
When
used
as
a
separator
between
fields,
the
comma
inserts
spaces
(usually
a
waste
of
memory),
the
semi-colon
doesn't,
and
the
CR
stores
a
carriage
return
on
the
disk.
These
are
important
when
you
use
GET#
or
INPUT#
to
retrieve
the
data
you
stored.
GET#
PURPOSE:
To
get
data
from
the
disk
byte
by
byte.
FORMAT:
GET#
file
#
,•
variable
list
Data
comes
in
byte
by
byte,
including
CR's,
commas,
and
other
separators.
Generally,
it's
safer
to
use
character
string
variables
to
avoid
error
messages.
15

EXAMPLES:
GET#8,
A$
GET#5,
A
(only
works
for
numerical
data)
GET#A,
B$,
C$f
D$
(GETs
more
than
one
variable
at
a
time)
The
GET#
statement
is
very
useful
when
the
actual
data
content
or
structure
is
not
known,
such
as
a
file
on
a
disk
that
has
been damaged.
If
you
are
familiar
with
the
file
and
there
are
no
problems,
INPUT#
is
more
efficient.
But
to
look
at
data
in
an
unfamiliar
or
damaged
file,
the
following
example
program
will
read
the
contents
out
(in
this
case,
from
the
file
created
in
the
PRINT#
example
program).
10
OPEN
8,8,8,
"TEST"
20
GET#8,A$:PRINT
A$;
30 IF
ST=0
THEN
20
(ST
is
a
status
signal)
40
CLOSE
8
50
END
INPUT#
PURPOSE:
Retrieve
disk
data
in
groups.
FORMAT:
INPUT#
file
#,
variable
The
file
number
is
the
same
as
the
one
OPENed
and
the
variable
can
represent
character
strings
ox
numbers.
To
read
a
group
of
data,
separators
are
needed
to
indicate
the
start
and
finish
of
the
group.
These
are
the
comma,
semi-colon,
and
CR,
and
work
as
explained
in
the
section
on
the
PRINT#
command.
Numbers
are
stored
with
a
space
in
front
of
them,
which
is
empty
for
positive
numbers
and
contains
a
negative
sign
for
negative
numbers.
Here's
a
sample
program:
10
OPEN
8,8,8,
"<a0:
DATAFILE,S
,
W"
20
FOR
A=l
TO
10
30
PRINT#8,A
40
NEXT
A
50
CLOSE
8
60
OPEN
2,8,2,"DATAFILE"
70
INPUT#2,B
:
PRINT
B
80
IF
ST=0
THEN
70
90
CLOSE
2
100
END
This
example
program
will
write
the
numbers
1
through
10
to
a
sequential
file
called
DATAFILE.
Lines
70
and
80
will
read
the
data
from
the
disk
and
print
it
out.
See
page
20
for
two
useful
samp1e
prog
rams.
16

7.
RANDOM
FILES
Sequential
files
are
fine
when
you're
just
working
with
a
continuous stream
of
data,
but
some
jobs
need
more
flexibility.
For
example,
if
you have
a
large
mailing
list,
it
would
be
inconvenient
to
scan
the
entire
list
to
find
one
person's
address.
A
random
access
method
would
let
you
pick
out
the
desired
data
without
having
to
read
the
whole
file.
There
are two
file
types
that
can
do
this:
random
files
and
relative
files.
Random
files
are
the
best
choice
when
speed
is
a
desired
factor,
as
in
machine
language
programs.
This
is
because
locations
of
the
data
are
maintained
by
the
program
when
random
files
are
used,
while
relative
file
locations
are
maintained
by
the
DOS.
The
problem
is
random
files
are
easy
to
accidentally
remove
from
the
disk
since
the
DOS
doesn't
maintain
them.
Random
files
are
files
that
have
been
written
to
a
certain
physical
location
on
the
disk.
The
disk
is
divided
into
35
concentric
rings,
or
tracks,
with
each
track
containing
from
17
to
21
sectors.
TRACK
NUMBER
SECTOR
RANGE
TOTAL
SECTORS
1
TO
17
0
TO
20
21
18
TO
24
0
TO
18 19
25
TO
30
0
TO
17
18
31
TO
35
0
TO
16
17
It is
possible
to
read
and
write
to
any
block
on
the
disk,
as
well
as
determine
which
blocks
are
available
for
use.
The
following
commands
explain
how to use
the
random
file
functions.
OPEN
PURPOSE:
OPENs
a
data
channel
for
random
access.
FORMAT:
OPEN
file
4,
device
#,
channel
#,
"#"
When
working
with
random
files,
you
need
to
have
two
channels
open
to
the
disk:
the
command
channel
(15)
to
send
commands
and
a
data
channel
(2
to
14)
for the
data
transfer.
The
data
channel
for
random
access
files
is
OPENed
by
selecting
the
pound
sign,
"#",
as
the
file
name.
The
additional
"#"
on
the
end
of
the
command
causes
the
disk
to
allocate
a
256
byte
buffer
for
the
purpose
of
handling
the
desired
block
of
data.
If
a
buffer
number
is
specified,
the
allocated
buffer
will
be
the
one
you
specified.
EXAMPLES:
OPEN
5,
8,
5,
"#"
(you
don't
care
which
buffer)
OPEN
A,B,C,It#2"
(you
specify
buffer
2)
17
Table of contents
Popular Floppy Disk Drive manuals by other brands

Power Computing
Power Computing ATARI PC720 owner's manual

Sony
Sony MFD-20U operating instructions

Commodore
Commodore AMIGA 2010 installation guide

Sharp
Sharp MZ-80SFD instruction manual

Addonics Technologies
Addonics Technologies Pocket Floppy DigiDrive quick start guide

Hitachi
Hitachi MP-1802 Technical manual