- INT 13
INT 13 is shorthand for
interrupt 0x13, the 20thinterrupt vector in anx86 based computer system. (Interrupts start at zero, and are labeled withhexadecimal values.) INT is an x86 instruction that triggers asoftware interrupt , and 0x13 is the vector passed to the instruction. TheBIOS typically sets up areal mode interrupt handler at this vector that provides sector based hard disk and floppy disk read and write services usingCylinder Head Sector (CHS) addressing.Overview
Under
real mode operating systems such asMS-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-levelINT 21 functions which deal withfile system access.Newer
protected mode operating systems such asMicrosoft Windows NT derivatives (e.g. NT4, 2000 XP and 2003 Server) orLinux withdosemu , will intercept the call and pass it to the operating system's native disk I/O mechanism.Windows 9x andWindows for Workgroups 3.11 could also bypass BIOS routines when using32-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
x86 disk 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 Digital andPhoenix Technologies as part of BIOS Enhanced Disk Drive Services (EDD) standard. It uses 64-bitLogical Block Address ing (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
Drive Table
=INT 13h AH=01h: Check Drive Status=Parameters:
=INT 13h AH=02h: Read Sectors From Drive=Parameters:
Results:
=INT 13h AH=42h: Extended Read Sectors From Drive=Parameters:
=INT 13h AH=48h: Extended Read Drive Parameters=Parameters:
Remark: Physical CHS values of function 48h may/should differ from logical values of function 08h.
See also
*
INT 10
*BIOS interrupt call
*Cylinder-head-sector
*INT (x86 instruction)
* DPMI (DOS Protected Mode Interface)External links
* [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.