HelpPC 2.10 Quick Reference Utility Copyright 1991 David Jurgens

                       INT 13 - Diskette BIOS Services

                For more information see the following topics:

    INT 13,0  Reset disk system
    INT 13,1  Get disk status
    INT 13,2  Read disk sectors
    INT 13,3  Write disk sectors
    INT 13,4  Verify disk sectors
    INT 13,5  Format disk track
    INT 13,6  Format track and set bad sector flag (XT & portable)
    INT 13,7  Format the drive starting at track (XT & portable)
    INT 13,8  Get current drive parameters (XT & newer, see note ╪)
    INT 13,9  Initialize 2 fixed disk base tables (XT & newer, see note ╪)
    INT 13,A  Read long sector (XT & newer, see note ╪)
    INT 13,B  Write long sector (XT & newer, see note ╪)
    INT 13,C  Seek to cylinder (XT & newer, see note ╪)
    INT 13,D  Alternate disk reset (XT & newer, see note ╪)
    INT 13,E  Read sector buffer (XT & portable only)
    INT 13,F  Write sector buffer (XT & portable only)
   INT 13,10  Test for drive ready (XT & newer, see note ╪)
   INT 13,11  Recalibrate drive (XT & newer, see note ╪)
   INT 13,12  Controller ram diagnostic (XT & portable only)
   INT 13,13  Drive diagnostic (XT & portable only)
   INT 13,14  Controller internal diagnostic (XT & newer, see note ╪)
   INT 13,15  Read disk type/DASD type (XT BIOS from 1/10/86 & newer)
   INT 13,16  Disk change line status (XT BIOS from 1/10/86 & newer)
   INT 13,17  Set dasd type for format (XT BIOS from 1/10/86 & newer)
   INT 13,18  Set media type for format (BIOS date specific)
   INT 13,19  Park fixed disk heads (AT & newer)
   INT 13,1A  Format ESDI drive unit (PS/2 50+)

       ╪  The 1983 version of the "IBM XT BIOS Technical Reference"
          shows these functions are available for the XT but many other
          programming references say they aren't available until the AT.
          This is probably due to misunderstanding the design of the disk
          BIOS.   Upon bootup the hard disk BIOS replaces the default
          INT 13h diskette handler with the hard disk INT 13h handler.

       Most disk BIOS calls use the following parameter scheme:

           AH = function request number
           AL = number of sectors  (1-128 dec.)
           CH = cylinder number  (0-1023 dec.)
           CL = sector number  (1-17 dec.)
           DH = head number  (0-15 dec.)
           DL = drive number (0=A:, 1=2nd floppy, 80h=drive 0, 81h=drive 1)
           DL = drive number (0=A:, 1=2nd floppy, 80h=C:, 81h=D:)
                Note that some programming references use (0-3) as the
                drive number which represents diskettes only.
           ES:BX = address of user buffer

       and return with:
       CF = 0 if successful
          = 1 if error
       AH = status of operation  (see INT 13,STATUS)

       - INT 13 diskette read functions should be retried at least 3
         times to assure the disk motor has time to spin up to speed
       - physical sector numbers can be converted to and from DOS sector
         numbers with the following formulas:

         dos_sector = (sector - 1) + (head * sectors_per_track) +
                      (track * sectors_per_track * num_heads)

         physical_sector = 1 + (dos_sector  MOD  sectors_per_track)
         physical_head = (dos_sector / sectors_per_track)  MOD  num_heads
         physical_track = dos_sector / (sectors_per_track * num_heads)

       - registers DS, BX, CX and DX are preserved
       - see  INT 13,STATUS

Esc or Alt-X to exit int 13 Home/PgUp/PgDn/End ←↑↓→
Converted to HTML in 2006 by Timo Bingmann