This is only a preview of the November 1989 issue of Silicon Chip. You can view 46 of the 112 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Items relevant to "The Radfax Decoder":
Articles in this series:
Articles in this series:
Articles in this series:
Articles in this series:
Articles in this series:
Articles in this series:
Articles in this series:
Articles in this series:
|
COMPUTER BITS
By JENNIFER BONNITCHA
Floppy disc drives: formats & options
Despite their limited storage capacity, floppy
discs are still vital to your PC. You need
them to transfer files to and from your
computer and to back up data on your hard
disc.
A computer system can be divided into several main parts. First,
the CPU (central processing unit)
controls all parts of the computer
system while carrying out the instructions of the currently active
program. The main memory (Random Access Memory or RAM) ex-
ecutes or runs the program by
reading each instruction in sequence and performing the requested action. Any data used in
the calculations and the results are
stored in memory.
The remainder of the computer
system is concerned with the way in
- - - - - - - - - (5¼ I n c h ) - - - - - - - - - - -
Sealed
protective
jacket
Liner
Fig.1: a floppy disc is made of flexible mylar which is coated on both sides
with a thin layer of metallic oxide particles and enclosed in a protective
jacket. In operation, the read/write heads move across the disc surface at the
head aperture.
68
SILICON CHIP
which you communicate with the
CPU and RAM. Data and programs
are entered via some input device
such as a keyboard or disc drive,
while the results are displayed on
an output device such as a monitor
or printer.
There are hundreds of operations to keep track of during the
operation of something like a disc
drive, so the I/O (Input/Output) interfaces take care of the details of
connecting an input or output
device to the CPU. Allowing the I/O
interface to worry about these
details translates to smaller programs (at least in theory), since the
program need not concern itself
with the exact whys and wherefores.
Inside most system units there js
sufficient space to mount two
5 ¼-inch floppy disc drives. Aithough a floppy disc drive can take
milliseconds to jump from data area
to data area on the disc, the CPU
can carry out thousands of calculations in that time. Thus a program
which needs to go back and forth to
the disc during calculations will
run at a very sluggish pace indeed.
A hard disc drive rotates constantly at 3600rpm and it takes
about three milliseconds for the
read/write head to move from track
to track. By contrast, a floppy disc
rotates at 300rpm only during
read/write operations and it takes
about eight milliseconds to move.
For most users, a hard disc is the
usual place to store all those
precious bytes but not everyone has
the necessary dollars for this luxury. So from here on in, let's concentrate on the increasingly maligned floppy disc.
connector on the signal ea ble from
the floppy disc controller card. If
you want the new drive to be drive
0, swap the connector with the one
currently on the other disc drive.
Switch 1
O
2
3
4
5
6
7
8
; □ LJ □□□□□□
Position
1-7-8
2
3-4
5-6
System switches
Function
Number of 5'/4inch diskette drives installed
Reserved for co-processor
Amount of RAM on system board
Type of monitor you are using
Switch 2
Position
1-2-3-4
5-6-7-8
Function
Amount of memory options installed
Always in the off position
Fig.2,3: these diagrams
show how DIP switch 1
is used to select the
number of floppy disc
drives in an IBM PC.
Check the manual for
your particular machine,
as there can be
differences between
models.
Number of 5-1/4" diskette drives installed
Switch I
ODrives
I Drive
2-Drives
The floppy disc
A floppy disc (Fig .1) is inade of
flexible Mylar coated on both sides
with a thin layer of metallic oxide
particles and enclosed in a protective jacket. The centre hole ,is
generally reinforced around its
edge since it is here that the disc is
clamped by the drive mechanism.
The disc's recording surface can
store information as binaryencoded data (ls and 0s), the value
at each point on the disc depending
on the magnetic polarity. In operation, the read/write heads move
across the disc surface, either
reading or writing data as required.
Data is stored on the disc by
delivering a series of magnetic
pulses from the heads as they move
across the disc surface. Conversely,
data is read from the disc by deter-
Switch 2
1 □□0000 □□ 11000000001
,~□DODD □□ I l □□ODODDDI
l □ DDOOD □□ l l □ DDODODOI
mining the polarity of the magnetic
field at various points on the disc.
The disc drive or read/write head
differs considerably for floppy disc
drives, high capacity drives and fixed discs.
Installation
It's usually quite easy to add an
extra floppy disc drive to your PC if
you currently only have one drive.
To do this, first remove the system
top cover and faceplate, then slide
the drive through the front panel.
Depending on the make of your
computer, the drive will either be
secured solely by screws or you
may need to attach plastic rails to
the sides of the drive. Slide the
drive into the system unit until it is
flush with the front panel, then install the mounting screws.
Now attach the power supply
connector and plug in the spare
The lower left section of the XT
motherboard contains sockets for
the memory chips while an 8-way
DIP (dual in-line package) switch is
located below and to the right of the
expansion slots (the PC has two
8-way DIP switches). These switches define which options - such
as the number of disc drives, the
amount of memory or the presence
of a maths co-processor - are installed or connected to the PC.
Depending on the make and
model of your computer, you may
need to change these DIP switch
settings. Figs.2 & 3 show the switch
settings for the number of disc
drives in the IBM PC while Figs.4 &
5 are for the IBM XT. Remember,
however, that these figures are a ppropriate to the "genuine article"
(ie, IBM machines) only. If you have
a PC-compatible, you are strongly
advised to check the manual to
determine the correct switch
positions.
It is a good idea to write down the
current DIP switch settings before
you make any changes. That way, if
you encounter difficulties with the
new installation, you can at least go
back to the old configuration.
Formatting
When you have moved the DIP
switches to their appropriate positions, replace the system unit cover.
Now the fun of testing your installation prowess begins!
All discs must be formatted
before use. The process of formatting prepares the disc for use by
DOS by defining a structure of concentric tracks and a filing system to
keep track of just what is stored on
the disc. The formatting process
also analyses any defective areas
on the disc and prepares the disc
for file storage by establishing a
directory and the File Allocation
Table (FAT). When Format divides
the disc into tracks, each track is
then further divided into sectors.
The disc capacity is measured in
kilobytes (Kb), with 1Kb represenNOVEMBER 1989
69
Switch
I
2
3
5
4
I Drive
6
7
8
of~ (j □ □ □ □ □ □
Position
Function
For normal operation is off
Co-processor
Amount of RAM on system board
lype of monitor you are using
Number or 5¼-inch diskette drives installed
2
3-4
5-6
7-8
ting 1024 bytes. Generally one byte
is equivalent to one character so it
is a simple matter to calculate the
amount of space required to store
one page of single-spaced A4 typing. In practice, 80 columns of type
over 25 lines requires approximately 2Kb of storage space.
Early IBM disc drives were
single-sided only with a storage
capacity of 160Kb. The data was
recorded on 40 concentric tracks,
with each track containing eight
sectors and each sector capable of
storing 512 bytes of information.
Thus, 40 tracks x 8 sectors/track x
512 bytes/sector gave a formatted
capacity of 163,840 bytes. DOS 1.1
extended disc I/O support to the
double-sided disc with a formatted
capacity of 327,680 bytes.
Introduction of the XT also saw
the introduction of DOS 2.0. This
enabled the formatting of either
single sided or double sided discs
using either 8 or 9 sectors per
track. Thus, a single sided disc
could now store 184,320 bytes and
a double sided disc could store
368,640 bytes of data (assuming
nine sectors per track).
2 DrNeS
I
IOOOOOOU□ I
ID DODOO □□
Fig.4,5: the XT
machine only has a
single configuration
switch. Positions 7 & 8
select the number of
floppy disc drives
installed as shown
above.
Further advances, both to the
operating system and to drive
technology, now mean that the
5¼-inch disc on the AT is capable
of storing 1,228,800 bytes (1.2
Megabytes) of information - a far
cry from the original 160Kb! DOS
3.0 formats the high capacity disc
to 80 tracks with 15 sectors per
track. Subsequent introduction of
the 3 ½-inch micro-disc has pushed
disc storage limits further by storing the same amount of information
in an even smaller area.
The difference between the
storage capacity of a hard disc and
a floppy disc is a function of the
number of tracks and sectors. The
360Kb floppy disc has 9 sectors per
track with 40 tracks per side; the
XT's 10Mb hard disc consists of
two platters and each of the four
surfaces formats to 306 tracks.
Finally, the AT's 20Mb disc has
four surfaces, each of which format
to 615 tracks. Both the XT and AT
hard discs have 17 sectors per
track compared with the 15 sectors
per track for the high capacity floppy disc (see Table 1).
The AT-style computer generally
Table 1: Floppy Disc Formats
Sides
1
1
2
2
2
Tracks
Sectors/Track
40
8
40
9
40
8
40
9
15
80
Storage Capacity (Bytes)
163,840
184,320
327,680
368,640
1,228,800
Table 1: floppy disc capacity has increased steadily with advances in system
and drive technology. The 5¼-inch floppy disc for the AT machine is now
capable of storing 1.2Mb of information.
70
SILICON CHIP
has a high capacity disc drive
which is capable of reading and
writing to the low capacity 360Kb
disc. However the 360Kb drive cannot format, read from or write to
the high capacity disc. A good rule
of thumb when formatting a 360Kb
disc in a high capacity drive is to
use a fresh disc with the "/4"
option.
Format switches
The Format command has
several switches available for use.
Note that individual manufacturers
may further customise the options
available with the Format command. Fig.6 shows the result of formatting a typical disc.
The Format command is as
follows:
FORMAT Drive:/S/1/8/V/B/4
Note that everything after
"Drive:" is optional, depending on
how you wish to format the disc.
Here's what the various options
mean:
Drive: this specifies the drive
containing the disc you
want to format.
IS
supported by all DOS versions, this switch tells
DOS to format the disc and
include the operating
system files. These system
files are IQ.SYS (IBMIO.SYS); MSDOS.SYS
(IBMDOS.SYS); & COMMAND.COM. The *.SYS
files are hidden and are
"seen" only when the
CHKDSK command is
used.
when this switch is includ/1
ed, DOS 1.1 and above formats the floppy disc as
single sided. If it is not included in the command,
DOS formats discs as double sided, double density.
DOS 2.0 and above uses
/8
this switch to format a
floppy disc with 8 sectors
per track instead of the
usual 9. It may not be used
when formatting a hard
disc.
DOS 2 .0 and a hove
IV
enables the writing of a
magnetic label to the disc.
DOS prompts the user to
Sector 4
Sector 5
Sector 3
Sector 7
Sector 2
Track 39
Head aperture provides access to
each sector on a track as the disk
spins.
Fig.6: this 40-track disc has been formatted into eight sectors for a
capacity of 327,680 bytes. Each sector appears in sequence at the
head aperture as the disc spins.
/B
enter a volume label of up
to 11 characters. Note
that the label serves no
practical purpose; it simply identifies the disc.
with this switch, DOS 2.0
and above formats a disc
with 8 sectors per track
and creates two dummy
files in the root directory
to leave space for later addition of the operating
system files. It is also used
to create a disc onto'which
any version of DOS (1.0,
1.1 or 2.0) can be placed.
It may NOT be used in formatting the hard disc or
with the /S or /V switches.
/4
this option, introduced in
DOS 3.0, is for. formatting
360Kb discs in a high
capacity drive. Caution:
360Kb discs formatted in a
high capacity drive may
not be read or written to
reliably in the 360Kb
drive. Generally, however,
there are few problems. If
you own an AT, you can
always consider installing
an additional 360Kb drive
in your system unit.
Dummy data
When a disc is formatted, any
data stored on the disc is destroyed.
The general procedure is that DOS
Table 2: Format Options
Disk Capacity
320/360Kb
1.2Mb
Hard Disk
Parameters
/S /1 /8 N /B /4
/SN
/SN
Table 2: the format
options available for
various disc capacities.
Each option is explained
in the text.
puts dummy data on the disc and
then reads it back one track at a
time. Any defective tracks are flagged as bad tracks in the File Allocation Table (FAT) to prevent them
from being used for subsequent
data storage.
When writing and reading is
finished, the Format command
writes a new DOS boot sector then
initialises the first FAT by filling it
with zeros. The FAT begins with a
Media Descriptor Byte (MDB)
which tells DOS and programs like
CHKDSK what type of disc it is,
together with the Bad Track information. Generally, DOS maintains
two copies of the FAT so that if one
is physically damaged, it can use
the other. Note that DOS, in the
event of conflict, can't decide
which of the two FATs is correct.
The blank Root Directory follows
the last copy of the FAT since this is
the main directory from which all
others branch and yes, a floppy
disc may have a directory structure. The Root Directory on the floppy disc typically holds from 64 to
224 entries, depending on the disc
type.
From the Root Directory to the
end of the disc, data storage takes
place.
The CHKDSK command
The CHKDSK command is used to
determine the total number of bytes
available on the disc. It must be
issued from a drive or directory
where system files are present. For
example, if the system files are the
C drive, the command is:
C:)CHKDSK A:
The system then displays the
following information:
362496 bytes total disc space
362496 bytes available on disc
xxxxxx bytes total memory
xxxxxx bytes free
Note that if a disc is not formatted, the directory and file allocation
table are not present. Thus, if you
enter the CHKDSK command, DOS
will report the •'Diskette not initialised" error message.
Note also that the figures for
"bytes total memory" and "bytes
free" do not refer to the floppy disc
but to the amount of available RAM
in your computer.
~
NOVEMBER 1989
71
|