Date: Tue, 20 Jun 89 13:42:58 CDT
From: "Rich Winkel - UMC Math Department" <MATHRICH@UMCVMB.MISSOURI.EDU>
To: Info-IBMPC@WSMR-SIMTEL20.ARMY.MIL
Subject: Re: Resetting Interleave on a Slow Hard Disk

Your low disk performance is probably due to a non-optimal interleave
factor.  The interleave is a number which indicates how many physical
sectors lie between consecutive logical sectors on a track.  With a fast
enough controller and cpu, the logical sectors could be placed in
sequential order around the track, but with a PC-level machine reading
consecutive sectors, by the time the machine is finished digesting sector
N, the next physical sector has already passed by the head, so it can't be
read until the disk undergoes a full rotation.  The solution is to place
logical sector N+1 two or more sectors away from sector N, so that N+1 is
about to pass under the head at the same time that the hardware is ready
for it.  Anyway, on PC style machines, an interleave of 3 is usually best.
The original IBM XTs came with an interleave factor of 6, so the hard disk
had about half the performance that it was capable of.  The interleave
factor is determined at 'primary format' time.  Primary formatting is NOT
what the dos FORMAT.COM does.  If you want to do a primary format, you
have to either use debug to write your own short machine language program,
or, on some hard disk controllers, you can run a relatively 'user
friendly' routine that's built into your hard disk bios at address C800:5.
I recommend writing the program, since not all controllers have the C800:5
routine.  Here's what you do:

DEBUG                     (run debug.com from the dos prompt)
A 100                     ; assemble a program
MOV AX,0703               ; the 03 here is the interleave to use
XOR BX,BX
MOV ES,BX                 ; this gets around a pesky bug in the XT bios
MOV CX,0001
MOV DX,0080               ; use 80 for the first hard disk, 81 for second
INT 13                    ; do the format ... takes a few minutes
INT 20                    ; terminate program
(enter a null line here to get out of input mode)
G                         (run the program that you just typed in)
Q                         (exit to dos)

After this, you'll need to run FDISK and the dos FORMAT to finish setting
up the disk.  Of course, don't forget to BACK UP YOUR FILES before you do
anything ... this procedure will wipe the slate clean.

Rich
