Chapter – 9
Handling Large Hard Disks
In the previous chapter, we discussed the BIOS-Disk functions and the use of interrupts to access the physical media of the hard disks. We used INT 13H functions there to access the hard disks.
The INT 13H interface supports many different commands such as reading, writing, formatting and verifying etc. that can be given to the BIOS, which then passes them on to the hard disk. As it has been used by DOS for a long time, INT13H has been the standard for many years.
The INT 13H allocates 24 bits for the specification of the geometry of the drive and requires the invoking program to know the specific parameters of the hard disk, and provide exact head, cylinder and sector addressing to the routines to allow disk access.
The BIOS uses the geometry for the hard disk as it is set up in the BIOS setup program. The 24 bits, allocated by the INT 13H interface for the specification of the drive geometry are broken up as follows:
- 10 bits for the cylinder number. Thus the maximum limit of total cylinders may be up to 1,024 cylinders.
- 8 bits for the head number. Thus the maximum limit of total heads is up to 256.
- 6 bits for the sector number. Thus a maximum total of sectors may be up to 63 sectors.
Thus the maximum sectors supported by this approach may be up to, 1024 * 256 * 63 = 16515072.
This means that the INT13H interface can support disks containing up to approximately 16.5 million sectors, which at 512 bytes per sector leads a maximum of 8.46 GB. That is exactly I want to explain. Thus by using all these functions or INT 13H, we can access the disks up to 8.46 GB only.
That is why, in recent years that the limitations of this old interface have caused it to be abandoned in favor of a new way of addressing hard disks, as described next in this chapter.
First of all, let me tell you a Story!
Eleven years ago, when I was in seventh standard, in my school, I heard about the hard disk with the capacity of 42 MB, perhaps it was WDA-L42 of IBM. It was really difficult for me and my friends to imagine such a big capacity of hard disk, that time.
The INT 13H methodology was developed about twenty years ago from today. You can now understand that an 8 GB hard disk was much bigger to fit even in dreams in that age. But today, if we talk about an 8 GB hard disk to any personal computer users, he may not like to use it saying it small in storage capacity.
This is the reason that INT 13H interface has finally come to the end of its usefulness in modern systems. INT 13H used 24 bits to allocate the disk geometry and unfortunately it was not possible to expand the existing INT 13H BIOS interface because if it was done, a lot of older hardware and software would stop working, and you can understand that the today’s computer market can never bear such a big change with millions of older software and hardware products to stop working.
Keeping this condition in mind, INT 13H has been replaced with a newer interface called INT 13H extensions. However INT 13H still may be used by DOS and some other older operating systems and for other compatibility purposes.
The new INT 13H interface uses 64 bits instead of 24 bits for addressing and allows a maximum hard drive size of 9.4 * 1021 bytes which is in fact 9.4 trillion gigabytes or 9400000000000 Gigabytes. I hope now we are relaxed for some time until this limit is broken.
Some Important functions of the Extension for Interrupt 13H has been described next. You can use these function in programming in the same way as you were using the functions of INT 13H. This is also a reason that these functions are called the extensions of INT 13H.
|Sample Chapters from book DATA RECOVERY WITH AND WITHOUT PROGRAMMING by Author Tarun Tyagi
Publishers of the Book
Number of Pages
Price of the Book
BPB Publications, New Delhi, India
$69.00 (Including Shipping Charges, Cost of Book and Other expenses, Free Source Code CD included with the Book)