What Is That Int13h Interface


What Is That Int13h Interface

Sub-Title, "Int 13h Error Codes"

Int13h Interface

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.

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.


The BIOS Interrupt 13h provides functions for direct accessing the disk.

These are some common error codes for the BIOS Int 13h Function 01h

A DOS interrupt used to activate disk functions, such as seek, read, write and format.

00h No error
01h Invalid command
02h Address mark not found
03h Disk write protected (floppy)
04h Request sector not found
05h Reset failed (hard disk)
06h Floppy disk removed/Disk changeline (floppy)
07h Bad parameter table (hard disk)/Initialization failed
08h DMA overrun (floppy)
09h DMA crossed 64K boundary
0Ah Bas sector flag (hard disk)
0Bh Bad track flag (hard disk)
0Ch Media type not found (floppy)
0Dh Invalid number of sectors on format (hard disk)
0Eh Control data address mark detected (hard disk)
0Fh DMA arbitration level out of range (hard error - retry failed)
10h Uncorrectable CRC or ECC data error (hard error - retry failed)
11h ECC corrected data error (soft error - retried OK ) (hard disk)
20h Controller failure
40h Seek failure
80h Disk timout (failed to respond)
AAh Drive not ready (hard disk)
BBh Undefined error (hard disk)
CCh Write fault (hard disk)
E0h Statur register error (hard disk)
FFh Sense operation failed (hard disk)

Back To The Top

Bud's CDs FREE MP3s     Alphabetical Index Of Everything In This Site