Page 1 of 1
Sector starts counting at 1
Posted: Tue Aug 26, 2008 1:36 pm
by DLBuunk
Does anyone know why in CHS-format sector-count starts at 1 instead of 0. Is there any (historical) reason for this?
Re: Sector starts counting at 1
Posted: Tue Aug 26, 2008 1:45 pm
by bewing
The reason is that it was a horrible mistake that Western Digital made, 40+ years ago.
There is certainly no good reason for it.
Re: Sector starts counting at 1
Posted: Thu Aug 28, 2008 1:58 pm
by Telgin
bewing wrote:The reason is that it was a horrible mistake that Western Digital made, 40+ years ago.
There is certainly no good reason for it.
Heh, I can't think of a good reason, but cylinder and header indexes start at zero right? Surely WD wouldn't just arbitrarily decide that sectors start at 1 without some reason. Maybe not a good one, but there's got to be a reason.
Re: Sector starts counting at 1
Posted: Thu Aug 28, 2008 2:07 pm
by bewing
Most likely, they were using sector 0 of one or more tracks for a soft-sector timing pulse -- so it was not available for data.
Re: Sector starts counting at 1
Posted: Thu Aug 28, 2008 5:33 pm
by Troy Martin
bewing wrote:Most likely, they were using sector 0 of one or more tracks for a soft-sector timing pulse -- so it was not available for data.
Oooh, good one. I think it was some half-drunken programmer who forgot computers start counting at 0.
Re: Sector starts counting at 1
Posted: Fri Sep 12, 2008 7:06 pm
by DT170x
Remember the SHIP command.
The ship command (if you got a very old MS-DOS disk) put the sector to 0 because if you move the computer around they think that you will damage the hard drive.
Re: Sector starts counting at 1
Posted: Sat Sep 13, 2008 3:26 am
by AJ
I certainly remember "parker", on our old Apricot (a 286, IIRC). You were advised to run this program before each time you turned the computer off to "park the drive heads" - perhaps that did the same as ship.
Cheers,
Adam
Re: Sector starts counting at 1
Posted: Sun Sep 14, 2008 9:45 pm
by bewing
Yes, but those programs set the head CYLINDER number, not the sector number. Usually, they moved the heads to the very inside cylinder (near the hub) which was called the "landing zone" -- a term you can sometimes still see in BIOSes today. That cylinder was never formatted.
Re: Sector starts counting at 1
Posted: Sun Sep 14, 2008 9:50 pm
by Brendan
Hi,
bewing wrote:Yes, but those programs set the head CYLINDER number, not the sector number. Usually, they moved the heads to the very inside cylinder (near the hub) which was called the "landing zone" -- a term you can sometimes still see in BIOSes today. That cylinder was never formatted.
I remember that too - the idea was to put the disk heads somewhere safe, so that if the computer is bumped the heads don't scratch part of the disk where your data is stored. Not sure if modern hard drives still do this or not...
Cheers,
Brendan
Re: Sector starts counting at 1
Posted: Mon Sep 15, 2008 1:47 pm
by JAAman
yes, iirc, modern HDDs do still do this, just a little different...
(most if not all) IDE drives never need to be 'park'ed, instead, the arm is built so that if the drive looses power, it will automatically swing to a safe zone
this must be done, since a drives head is gliding on a layer of air just barely above the surface of the disk, the air cushion is created by the force of the spinning disk, if that disk slows its spin while the head is over the disk surface, it will drop onto the still spinning disk, and create a gouge that will destroy any data under the arm... (and at the same time make that part of the disk unusable thereafter)
modern drives are built so that the arm will automatically swing safely to the side as soon as the drive looses power (so even if the drive were to be cut off suddenly from power, it will still happen)
with newer drives, i dont think its even possible to send the heads to the landing zone... and there is no point to doing so anyway, only older (pre-IDE) drives need this done manually
Re: Sector starts counting at 1
Posted: Tue Sep 16, 2008 2:46 am
by AJ
Thanks for that interesting insight and nice to know I didn't type "parker" for all those years for no reason!
Cheers,
Adam