1. Space check
Hello,
Does somebody know how to check
your harddisk for disk space ?
P.Quist
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
2. Re: Space check
Patrick Quist wrote:
>
> Hello,
>
> Does somebody know how to check
> your harddisk for disk space ?
>
Greetings:
Here is a short routine (written by Jiri or Jacques?)
I've lost the original, sorry I can't credit it better.
include machine.e
include wildcard.e
global function dskspace(integer drive_num)
-- returns the number of available bytes on a disk, 0 if drive not
recognized
-- drive_num 0 is the default, 1 is A: etc...
sequence reg_list
reg_list = repeat(0, 10)
reg_list[REG_AX] = #3600 -- call DOS function 36H
reg_list[REG_DX] = drive_num
reg_list = dos_interrupt(#21, reg_list)
-- BX: available clusters; CX: bytes per cluster; AX: sectors per
cluster
-- Note: DX * CX * AX gives the total number of bytes on the disk
return reg_list[REG_BX] * reg_list[REG_CX] * reg_list[REG_AX]
end function -- dskspace
Regards,
Irv
http://www.mindspring.com/~mountains -- Euphoria programming archives
3. Re: Space check
Irv wrote
:Greetings:
:Here is a short routine (written by Jiri or Jacques?)
:I've lost the original, sorry I can't credit it better.
Doesn=B4t matter. I wrote, or better said, translated it from the book =B4=
Dos
subroutines for C and Assembler=B4, by Leo J. Scanlon and Mark R. Parker,=
Windcrest-McGraw-Hill, 1993.
Ad