program meghajto_informaciok;

uses Dos;

type
DosDPB = record
Drive, UnitNo: byte;
BytesPerSector: word;
LastSectorInCluster: byte;
ShiftCount: byte;
ReservedSectors: word;
FATCount: byte;
RootDirEntries, FirstDataSector, LastCluster: word;
end;

var
Regs: Registers;

begin
Regs.AH := $1F;
MsDos(Regs);
if Regs.AL = 0 then
with DosDPB(Ptr(Regs.DS, Regs.BX)^) do
begin
Writeln(#10#13'Parameters for drive ',
Chr(Ord('A') + Drive), ':'#13#10);
Writeln('Sector size: ':24, BytesPerSector, ' bytes');
Writeln('Sectors per cluster: ':24, LastSectorInCluster +1);
Writeln('Clusters on drive: ':24, LastCluster -1);
Writeln('Total drive space: ':24, longint(BytesPerSector) *
(LastSectorInCluster +1) * (LastCluster -1),' bytes'#13#10);
Writeln('Number of FATs: ':24, FATCount);
Writeln('Root directory size: ':24, RootDirEntries, ' entries');
end
else Writeln('Error!');
end.