Assembly Language Help (alang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Int 13h Function 05h
 Summary                                   Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
     On floppy disks, the address field list consists of a series of
     4-byte entries, one entry per sector, in the following format:
 
     Byte     Contents
 
     0        Cylinder
     1        Head
     2        Sector
     3        Sector-size code
              00h (if 128 bytes per sector)
              01h (if 256 bytes per sector)
              02h (if 512 bytes per sector (standard))
              03h (if 1,024 bytes per sector)
 
     On floppy disks, the number of sectors per track is taken from the
     BIOS floppy disk parameter table whose address is stored in the
     vector for Int 1Eh.
 
     When this function is used for floppy disks on the PC/AT or PS/2,
     it should be preceded by a call to Int 13h Function 17h to select
     the type of medium to be formatted.
 
     On fixed disks, the upper 2 bits of the 10-bit cylinder number are
     placed in the upper 2 bits of register CL.
 
     On PC/XT-286, PC/AT, and PS/2 fixed disks, ES:BX points to a
     512-byte buffer containing byte pairs for each physical disk
     sector as follows:
 
     Byte     Contents
 
     0        00h for good sector
              80h for bad sector
     1        sector number
 
     For example, to format a track with 17 sectors and an interleave
     of two, ES:BX would point to the following 34-byte array at the
     beginning of a 512-byte buffer:
 
       BYTE   00h,01h,00h,0ah,00h,02h,00h,0bh,00h,03h,00h,0ch
       BYTE   00h,04h,00h,0dh,00h,05h,00h,0eh,00h,06h,00h,0fh
       BYTE   00h,07h,00h,10h,00h,08h,00h,11h,00h,09h
                                    -♦-