Sector starts counting at 1
Sector starts counting at 1
Does anyone know why in CHS-format sector-count starts at 1 instead of 0. Is there any (historical) reason for this?
If you don't know what to say, please shut up.
Re: Sector starts counting at 1
The reason is that it was a horrible mistake that Western Digital made, 40+ years ago.
There is certainly no good reason for it.
There is certainly no good reason for it.
Re: Sector starts counting at 1
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.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.
Re: Sector starts counting at 1
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.
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: Sector starts counting at 1
Oooh, good one. I think it was some half-drunken programmer who forgot computers start counting at 0.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.
Re: Sector starts counting at 1
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.
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.
DT Model 1540 OS 1% <Kernel>
Re: Sector starts counting at 1
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
Cheers,
Adam
Re: Sector starts counting at 1
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
Hi,
Cheers,
Brendan
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...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.
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Re: Sector starts counting at 1
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
(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
Thanks for that interesting insight and nice to know I didn't type "parker" for all those years for no reason!
Cheers,
Adam
Cheers,
Adam