I now have a new un-bagged 'clone' machine but it did not come with a park utility. The supplier says that I do not need one but I am still worried about moving the machine without parking the heads. Is he right?
E. Winters, London
Park or ship utilities were needed in the past to move hard disk heads into a safe place before the computer could be moved, or even be turned off. This was because the delicate heads are only kept from contacting the delicate surface of the disk by the air currents caused by the spinning. When the disk stops spinning a spring forces the head down onto the surface.
Some drives used an area of the disk as a 'landing zone', which was simply a point after the normal data area. This is the parameter which you set when introducing a new hard disk to the BIOS, and if you are in any doubt you make it about 25 tracks after the last data track.
Other drives have a more solid locking affair which hold the heads in place well away from the actual platters.
However, all this has become rather irrelevant since the replacement of band stepper motors by voice coils. A stepper arrangement would position the disk head over the required track by turning a motor by a very precise amount. Voice coil positioning works by positioning the heads using a variable strength magnetic field in the same way as the magnet in a loudspeaker manipulates the cone. This is very fast and has few moving parts to wear when compared to any stepper system. It also has the happy side effect that when the power is removed and the field disappears the head is bound to return rapidly to the side of the disk.
Therefore, drives with a voice coil do not need to be parked when the power is removed, and assuming you have a relatively modern drive then this will be the case for your machine.
On the subject of accidental contact between the heads and the disk, I should point out that the idea of this resulting in instant devastation is a complete myth. In reality it happens all the time and disks are designed to take it, with toughened surfaces covered by a lubricating agent to prevent damage. The best chance of mechanical damage to any modern hard disk comes from a shock transmitted to the bearings that the platters are mounted on.
Frank Leonhardt
H. Patel, London
I'm afraid that QBasic cannot do this - it is a BASIC interpreter only. It should not be confused with the Microsoft QuickBasic compiler and if Microsoft had any sense they would have called it something different in order to avoid this.
If you are happy programming in QBasic you will find QuickBasic easy to use and you should be able to use it to compile your existing programs.
Unfortunately entries cannot be accepted in QBasic because the arena can only use .EXE or .COM files.
Frank Leonhardt.
G. Leigh
We can find no trace of them either. If any readers can help on this one please contact Computer Answers on the number below.
Hemi Patel, London
Opening a sealed hard disk is, of course, a kill-or-cure situation and should only be attempted for recreational purposes. Several Conner units reach this stage of disassembly and the solution is to insert a blunt lever into the seal and prise the mechanism out of the case. The only thing holding it there is friction.
Frank Leonhardt
Meanwhile, Lars P. Fischer from Aalborg has written in pointing out that the public domain GNU YACC and LEX I mentioned in the September issue are not public domain - well not quite. The GNU version of YACC, wittily renamed Bison, is covered by the GNU General Public License which means its free and you can copy and modify it as much as you like as long as you never charge for it. There is no actual GNU LEX but the Free Software Foundation recommend Flex instead, which is written by Vern Paxson and is public domain. This means it is free and you can copy and modify it as much as you like, etc. Confused? You should expect to be if you accept free source code from a Unix hacker.
Frank Leonhardt.
Computer Answers can be contacted on 081-429 3047, by Fax on 081-868 3754 or via e-mail as uab1018@dircon.UUCP or leo2@cix.compulink.co.uk
To make setting up drives easy, IBM decided to give each different layout of drive likely to be fitted to an AT its own type number in the range 1 to 14. This covered most units available at the time, up to a maximum capacity of 120Mb. Since then drive types from 15 to 47 have been added, but clone makers have not always agreed on the same definition for the 33 new types. To confuse the issue further, there is no reason to expect all hard disks to be labelled with their type number and some drives do not fit any of the predefined types anyway.
In order to get around the latter problem, BIOS manufacturers often allow a user defined drive type which allows you to enter the physical characteristics of any drive. This is typically type 47; if it allows two user defined types - a useful feature - the other is often 46.
So, if you know your drive type or its dimensions then you simply enter them. In the real world, however, we all know that you won't have this information written on the drive so you have to find out some other way.
You can always telephone the drive manufacturers who can often help, though this is not always the case. There are a lot of drive manufacturers and they make a huge number of different models with special variations for OEMs. They also tend to make drives for each other to sell under different names and model numbers. Then there are drive manufacturers who go out of business.
So how can you find out for yourself? If you know the capacity and the number of heads you can guess the number of sectors per track and calculate back to get the number of cylinders. Generally, old MFM drives had 17 sectors per track and newer, RLL drives have 26. Therefore a 30Mb drive must contain around 61500 512 byte sectors. If there are four heads then each cylinder holds 26 sectors times four, or 104 sectors/cylinder. It follows that there must be around 591 cylinders.
You can obviously deduce other missing information in this way, but it is often the case that you have no clues to start with.
If the drive was originally formatted on a PC there is a sneaky way of finding out its shape. On sector one, cylinder zero head zero all drives have a master boot record (MBR). This contains some code which is used to find an active partition with an operating system boot record and to boot from it. It also contains the partition table itself in the last 66 bytes.
The partition table contains, amongst other things, the first and last head and cylinders of all the partitions. The last cylinder of the last partition is probably the last cylinder on the drive.
The easy way to read this information is using DOS's FDISK utility. Unfortunately the version supplied with current versions of DOS does not display cylinder numbers as Microsoft must have decided that this was confusing. If you can get hold of FDISK from DOS 3.3 you can use this - it is one of the few utilities which does not fuss if you run it with newer versions of DOS.
Alternatively you can decode the partition table yourself if you have a disk editor. Remember, all hard disks must have at least one head and one track so you can set up the drive type to anything you like and it should still read the MBR!
The partition table itself starts at offset 0x1be in the sector and contains up to four 16 byte entries and an end marker of 0x55aa. Unused entries are filled with nulls.
The first byte of an entry is either a code for bootable (0x80) or zero. Anything else means the table is corrupted. The next byte is the starting head for the partition and the next two bytes are used to encode the start track and sector. The low six bits of offset two are the sector number and the high two bits are the high two bits of the ten bit track number. The low eight bits of the track are at offset three.
There then follows a partition type byte at offset four and next three bytes contain the end of the partition encoded in exactly the same way.
Finally there are two double words. The first is the relative sector number for the start of the partition and the second is the length of the partition in sectors. These fields may seem redundant as they could be calculated from the start and end positions by the BIOS, which knows the capacity of each cylinder. However, it can be very useful for you if you don't know this and you are trying to determine the dimensions of the drive!
From the example partition table entry shown in the table you can deduce that you are dealing with a 17 sector drive because the difference between head zero sector one track zero and head one sector one track zero is 17 sectors. If it packs 65467 sectors into 427 cylinders you can also deduce that there must be nine heads.
Frank Leonhardt
Offset | Value | Meaning |
0 | 80 | Flag for bootable partition |
1 | 01 | Start on head one |
2 | 01 00 | Start sector one, track zero |
4 | 06 | MS-DOS 4+ extended partition flag |
5 | 08 | End on head eight |
6 | 51 ab | End on sector 17, track 427 |
8 | 11 00 00 00 | Start logical sector 17 |
c | bb ff 00 00 | Length 65467 sectors(32Mb) |