Function 18, subfunction 11 - get information on the disk subsystem.
Parameters:
- eax = 18 - function number
- ebx = 11 - subfunction number
- ecx = type of the table:
- 1 = short version, 10 bytes
- 2 = full version, 65536 bytes
- edx = pointer to the buffer (in the application) for the table
Returned value:
- function does not return value
Format of the table: short version:
- +0: byte: information about FDD's (drives for floppies),
AAAABBBB, where AAAA gives type of the first drive, BBBB -
of the second regarding to the following list:
- 0 = there is no drive
- 1 = 360Kb, 5.25''
- 2 = 1.2Mb, 5.25''
- 3 = 720Kb, 3.5''
- 4 = 1.44Mb, 3.5''
- 5 = 2.88Mb, 3.5'' (such drives are not used anymore)
For example, for the standard configuration from one 1.44-drive
here will be 40h, and for the case 1.2Mb on A: and 1.44Mb on B:
the value is 24h.
- +1: byte: information about hard disks and CD-drives, AABBCCDD,
where AA corresponds to the controller IDE0, ..., DD - IDE3:
- 0 = device is absent
- 1 = hard drive
- 2 = CD-drive
For example, in the case HD on IDE0 and CD on IDE2
this field contains 48h.
- +2: 4 db: number of the retrieved partitions on hard disks
at accordingly IDE0,...,IDE3.
If the hard disk on IDEx is absent, appropriate byte is zero,
otherwise it shows number of the recognized partitions, which
can be not presented (if the drive is not formatted or if
the file system is not supported). Current version of the kernel
supports only FAT16 and FAT32 for hard disks.
- +6: 4 db: reserved
Format of the table: full version:
- +0: 10 db: same as for the short version
- +10: 100 db: data for the first partition
- +110: 100 db: data for the second partition
- ...
- +10+100*(n-1): 100 db: data for the last partition
The partitions are located as follows: at first sequentially all
recoginzed partitions on HD on IDE0 (if present),
then on HD on IDE1 (if present) and so on up to IDE3.
Format of the information about partition
(at moment only FAT is supported):
- +0: dword: first physical sector of the partition
- +4: dword: last physical sector of the partition
(belongs to the partition)
- +8: dword: sectors per one copy of FAT
- +12 = +0xC: dword: number of copies of FAT
- +16 = +0x10: dword: number of sectors per cluster
- +20 = +0x14: dword: bytes per sector;
current implementation expects 0x200 = 512 in this field
- +24 = +0x18: dword: first root cluster in FAT32, 0 for FAT16
- +28 = +0x1C: dword: first physical sector of FAT
- +32 = +0x20: dword: first physical root sector for FAT16,
ignored for FAT32
- +36 = +0x24: dword: number of root sectors for FAT16,
0 for FAT32
- +40 = +0x28: dword: physical sector of the beginning of
the data area
- +44 = +0x2C: dword: maximum number of a cluster
- +48 = +0x30: dword: physical sector of the information
about the file system for FAT32, ignored for FAT16
- +52 = +0x34: dword: value used as boundary for special
values in FAT
- +56 = +0x38: dword: value used for bad clusters in FAT
- +60 = +0x3C: dword: value used as the end marker for FAT chain
- +64 = +0x40: dword: mask for FAT items
- +68 = +0x44: byte: file system type: 16 или 32
- +69 = +0x45: 31 db: reserved
Remarks:
- The short table can be used for obtaining the information about
available devices.
- First two fields in the information about partition
gives the parameters of partition, other - parameters of
FAT file system. For other file systems (when they will be
supported) specific for file system information will be, of
course, another, but first two fields will have the same sense.