When the operating system or an application wants to access the hard disk, it
traditionally employs BIOS services to do
this. The primary interface to the BIOS has been the software interrupt known as Int13h,
where "Int" stands of course for interrupt and "13h" is the number 19
in hexadecimal notation.
The Int13h interface supports many different commands that can be given to the BIOS,
which then passes them on to the hard disk. These include most anything that you would
normally want to do with a disk--reading, writing, formatting, and so on. Int13h has been
the standard for many years because it has been used by DOS for ages. It is only 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 below.
Using Int13h 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 Int13h interface allocates 24 bits for the specification of the drive's
geometry, broken up as follows:
- 10 bits for the cylinder number, or a total of 1,024 cylinders.
- 8 bits for the head number, or a total of 256 heads.
- 6 bits for the sector number, or a total of 63 sectors (by convention, sectors are
numbered starting with one instead of zero, so there are only 63).
This means that the Int13h interface can support disks containing up to approximately
16.5 million sectors, which at 512 bytes per sector yields a maximum of 8.46 GB (or 7.88 GiB). Of course, twenty years ago when this
methodology was developed, an 8 GB hard disk was Buck Rogers fantasyland material; a 10 MB
hard disk was a luxury. Today, for many PC users, an 8 GB hard disk is "a bit on the
small side".
As a result, the Int13h interface has finally come to the end of its
usefulness in modern systems, and has been replaced with a newer interface called Int13h extensions. Int13h still may be used by
DOS and some other older operating systems, and for other compatibility purposes.
Next: Int13h Extensions