-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFPSIZE.PAS
More file actions
executable file
·50 lines (40 loc) · 919 Bytes
/
FPSIZE.PAS
File metadata and controls
executable file
·50 lines (40 loc) · 919 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
program test;
uses dos,dosmem,go32;
{$ASMMODE INTEL}
function EXTsize(drv:byte):dword;
Type
FDG_STRUCT = record
bufsize, {size of buffer}
flags : word; {information flags}
cylinders,
heads,
sectorsPerTrack : dword;
sectorsOnDrivelo,
sectorsondrivehi: Dword;
bytesPerSector : word;
end;
var
r : trealregs;
infobuf : FDG_STRUCT;
dosbuf:Tdosmem;
begin
dosbuf.init(30);
fillchar(r, sizeof(r), 0);
fillchar(infobuf, sizeof(FDG_STRUCT), 0);
infobuf.flags := 0;
infobuf.bufsize:=30;
dosbuf.put(infobuf);
With r do
Begin
flags := 0;
ah:=$48;
dl:=$80;
ds :=dosbuf.segment;
si := 0;
end;
realintr($13, r);
dosbuf.get(infobuf);
dosbuf.done;
EXTsize:=infobuf.sectorsondrivelo;
dosbuf.done;
end;