Bios Call Article Index for
Bios
Website Links For
Bios
 

Information About

Bios Call





INTERRUPT TABLE

  address Pointer: VPT Video Parameter Table
  address Pointer: DPT Diskette Parameter Table
  address Pointer: VGCT Video Graphics Character Table
  "http://wwwinformationdelightinfo/encyclopedia/entry/MS-DOS" class="copylinks">MS-DOS Functions
  address Pointer: FDPT Fixed Disk Paramter Table (1st hard drive)
  address Pointer: FDPT Fixed Disk Paramter Table (2nd hard drive)






Function Table


































AH = 00h   Reset Disk Drives
AH = 01h   Check Drive Status
AH = 02h   Read Sectors From Drive
AH = 03h   Write Sectors To Drive
AH = 04h   Verify Sectors
AH = 05h   Format Track
AH = 08h   Read Drive Parameters
AH = 09h HD Initialize Disk Controller
AH = 0Ah HD Read Long Sectors From Drive
AH = 0Bh HD Write Long Sectors To Drive
AH = 0Ch HD Move Drive Head To Cylinder
AH = 0Dh HD Reset Disk Drives
AH = 0Eh PS/2 Controller Read Test
AH = 0Fh PS/2 Controller Write Test
AH = 10h HD Test Whether Drive Is Ready
AH = 11h HD Recalibrate Drive
AH = 12h PS/2 Controller RAM Test
AH = 13h PS/2 Drive Test
AH = 14h HD Controller Diagnostic
AH = 15h   Read Drive Type
AH = 16h FD Detect Media Change
AH = 17h FD Set Media Type For Format ( used by DOS versions <= 3.1 )
AH = 18h FD Set Media Type For Format ( used by DOS versions >= 3.2 )
AH = 41h EXT Test Whether Extensions Are Available
AH = 42h EXT Read Sectors From Drive
AH = 43h EXT Write Sectors To Drive
AH = 44h EXT Verify Sectors
AH = 45h EXT Lock/Unlock Drive
AH = 46h EXT Eject Drive
AH = 47h EXT Move Drive Head To Sector
AH = 48h EXT Read Drive Parameters
AH = 49h EXT Detect Media Change

Second column is empty == function may be used both for floppy and hard disk.

"FD" == for floppy disk only.

"HD" == for hard disk only.

"PS/2" == for hard disk on PS/2 system only.

"EXT" == part of the Int 13h Extensions which were written in the 1990s to support hard drives with more than 8 GBytes.


INT 13h AH=00h: Reset Disk Drives

Parameters:


INT 13h AH=01h: Check Drive Status

Parameters:
Results:
  { Border "1" cellspacing="0" cellpadding="3" width="95%" align="center"
  { Border "1" cellspacing="0" cellpadding="3" width="95%" align="center"




Results:






CFSet On Error, Clear If No Error
AHReturn Code
DLnumber of hard disk drives
DHlogical last index of heads = number_of - 1 (because index starts with 0)
CXlogical last index of cylinders = number_of - 1 (because index starts with 0)

logical last index of sectors per track = number_of (because index starts with 1)

Remarks:

Logical values of function 08h may/should differ from physical CHS values of function 48h.

Result register CX contains both cylinders and sector/track values, see remark of function 02h.


INT 13h AH=0Ah: Read Long Sectors From Drive

The only difference between this function and function 02h (see above) is that function 0Ah reads 516 bytes per sector
instead of only 512. The last 4 bytes contains the Error Correction Code ECC, a checksum of sector data.


INT 13h AH=42h: Extended Read Sectors From Drive

Parameters:





Registers
AH42h = function number for extended read
DLdrive index (e.g. 1st HDD = 80h)
DS:SIsegment:offset pointer to the DAP, see below












DAP : Disk Address Packet
offset rangesizedescription
00h1 bytesize of DAP = 16 = 10h
01h1 byteunused, should be zero
02h1 bytenumber of sectors to be readed, 0..127 (= 7Fh)
03h1 byteunused, should be zero
04h..07h4 bytessegment:offset pointer to the memory buffer to which sectors will be transferred
08h..0Fh8 bytesabsolute number of the start of the sectors to be read (1st sector of drive has number 0)


Results:



CFSet On Error, Clear If No Error
AHReturn Code



INT 13h AH=48h: Extended Read Drive Parameters

Parameters:





Registers
AH48h = function number for extended_read_drive_parameters
DLdrive index (e.g. 1st HDD = 80h)
DS:SIsegment:offset pointer to Result Buffer, see below














Result Buffer
offset rangesizedescription
00h..01h2 bytessize of Result Buffer = 30 = 1Eh
02h..03h2 bytesinformation flags
04h..07h4 bytesphysical number of cylinders = last index + 1 (because index starts with 0)
08h..0Bh4 bytesphysical number of heads = last index + 1 (because index starts with 0)
0Ch..0Fh4 bytesphysical number of sectors per track = last index (because index starts with 1)
10h..17h8 bytesabsolute number of sectors = last index + 1 (because index starts with 0)
18h..19h2 bytesbytes per sector
1Ah..1Dh4 bytesoptional pointer to Enhanced Disk Drive (EDD) configuration parameters
which may be used for subsequent interrupt 13h Extension calls (if supported)



Results:



CFSet On Error, Clear If No Error
AHReturn Code


Remark: Physical CHS values of function 48h may/should differ from logical values of function 08h.


INT 18H: EXECUTE BASIC

Description:

This interrupt traditionally jumped to an implementation of BASIC stored in ROM. This call would typically be invoked if the BIOS was unable to identify any bootable volumes on startup. As time went on and BASIC was no longer shipped on all PCs, this interrupt would simply prompt the user to insert a bootable volume and press a key.


INT 21H: MS-DOS FUNCTIONS



INT 21h AH=00h: Exit To Shell

Parameters:


INT 21h AH=01h: Read Input From Keyboard

Parameters:
Results:


INT 21h AH=02h: Write Character To Output

Parameters:


SEE ALSO



EXTERNAL LINKS

  • http://www.embeddedarm.com/Manuals/EBIOS-UM.PDF // Embedded BIOS User’s Manual

  • http://www.23cc.com/free-fdisk/specs-edd11.pdf // Int 13h Extensions

  • http://www.missl.cs.umd.edu/winint/index1.html

  • http://hdebruijn.soo.dto.tudelft.nl/newpage/interupt/out-0100.htm

  • http://home.arcor.de/wzwz.de/wiki/interrupt/i13_en.htm // Turbo Pascal examples for reading sectors

  • http://www.ctyme.com/rbrown.htm // HTML version of Ralf Brown Interrupt List