- INT 13
INT 13 is shorthand for
interrupt0x13, the 20th interrupt vectorin an x86based computer system. (Interrupts start at zero, and are labeled with hexadecimalvalues.) INT is an x86 instruction that triggers a software interrupt, and 0x13 is the vector passed to the instruction. The BIOStypically sets up a real mode interrupt handlerat this vector that provides sector based hard disk and floppy disk read and write services using Cylinder Head Sector(CHS) addressing.
real modeoperating systems such as MS-DOS, calling INT 0x13 would jump into the computer's BIOS code for Low Level Disk Services, which will carry out sector-based disk read or write for the program. In MS-DOS, it serves as a foundation for higher-level INT 21functions which deal with file systemaccess.
protected modeoperating systems such as Microsoft Windows NTderivatives (e.g. NT4, 2000 XP and 2003 Server) or Linuxwith dosemu, will intercept the call and pass it to the operating system's native disk I/O mechanism. Windows 9xand Windows for Workgroups 3.11could also bypass BIOS routines when using 32-bit File Access.
The original BIOS real-mode INT 0x13 interface supports drives of sizes up to about 504 MB using what is commonly referred to as "Physical CHS addressing". This limit originates from the hardware interface of the
x86disk hardware. The BIOS used the CHS address given in the INT 0x13 call, and transmitted it directly to the hardware interface.
This interface was later extended to support addressing of up to exactly 8064 MB using what is commonly referred to as "Logical CHS addressing". This limit originates from a combination of the register value based calling convention used in the INT 0x13 interface, and the goal of maintaining backward compatibility. There were originally a number of BIOS that offered incompatible versions of this interface, but eventually the computer industry standardized on the interface developed in the Award BIOS. This limit uses 1024 cylinders, 256 heads, 63 sectors, and 512 byte blocks, giving roughly 7.875 GB of addressing (1024 * 256 * 63 * 512).
To support even larger addressing modes, an interface known as "INT13h Extensions" was introduced by
Western Digitaland Phoenix Technologiesas part of BIOS Enhanced Disk Drive Services (EDD) standard. It uses 64-bit Logical Block Addressing (LBA) which allows addressing up to 8 ZB (the drive can also support 32-bit or 48-bit LBA which allows up to 2 TB or 128 PB respectively). This is a packet interface, because it uses a pointer to a "packet" of information rather than the register based calling convention of the original INT 13 interface. This packet is a data structure that contains an interface version, data size, and LBAs.
List of INT 13h services
=INT 13h AH=01h: Check Drive Status=
=INT 13h AH=02h: Read Sectors From Drive=
=INT 13h AH=42h: Extended Read Sectors From Drive=
=INT 13h AH=48h: Extended Read Drive Parameters=
Remark: Physical CHS values of function 48h may/should differ from logical values of function 08h.
BIOS interrupt call
INT (x86 instruction)
* DPMI (DOS Protected Mode Interface)
* [http://www.phoenix.com/NR/rdonlyres/9BEDED98-6B3F-4DAC-BBB7-FA89FA5C30F0/0/specsedd11.pdf BIOS Interrupt 13h Extensions]
* [http://www.dewassoc.com/support/bios/bios_interrupt_13h_extensions.htm BIOS Interrupt 13h Extensions]
* [http://www.linux.com/howtos/Large-Disk-HOWTO-4.shtml History of BIOS and IDE limits]
* [http://www.cs.cmu.edu/~ralf/files.html Ralf Brown's comprehensive Interrupt List]
* [http://www.ousob.com/ng/bios/ng1706f.php Norton Guide about int 13h, ah = 00h .. 1ah]
Wikimedia Foundation. 2010.