Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!bellcore!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!caen!umich!vela!w8sdz From: w8sdz@vela.acs.oakland.edu (Keith Petersen) Newsgroups: comp.binaries.ibm.pc.d Subject: Re: WANTED: Low Level HD Formatter Message-ID: <4970@vela.acs.oakland.edu> Date: 31 Jan 91 21:27:39 GMT References: <1991Jan29.180600.28788@unipalm.uucp> <1991Jan31.115625.22186@aplcen.apl.jhu.edu> Reply-To: w8sdz@vela.acs.oakland.edu (Keith Petersen) Organization: Oakland University, Rochester MI Lines: 45 ---Forwarded message: Date: Tue, 20 Jun 89 13:42:58 CDT From: "Rich Winkel - UMC Math Department" 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