If you have QB45, try....<br>
<br>
' $DYNAMIC<br>
DEFINT A-Z<br>
TYPE RegTypeX<br>
AX AS INTEGER<br>
bx AS INTEGER<br>
CX AS INTEGER<br>
dx AS INTEGER<br>
bp AS INTEGER<br>
si AS INTEGER<br>
di AS INTEGER<br>
FLAGS AS INTEGER<br>
DS AS INTEGER<br>
ES AS INTEGER<br>
END TYPE<br>
<br>
DECLARE FUNCTION DiskFree& (Drive$)<br>
PRINT "There are"; DiskFree& ("A"); " bytes free on A:"<br>
<br>
FUNCTION DiskFree& (Drive$)<br>
DIM InRegs AS RegTypeX, OutRegs AS RegTypeX<br>
<br>
InRegs.AX = &H3600<br>
InRegs.dx = ASC(UCASE$(Drive$)) - ASC("A") + 1<br>
CALL interrupt(&H21, InRegs, OutRegs)<br>
IF OutRegs.AX = -1 THEN<br>
PRINT "Invalid drive or disk not in drive."<br>
EXIT FUNCTION<br>
END IF<br>
Temp& = OutRegs.AX<br>
temp2& = OutRegs.dx<br>
<br>
DiskFree& = OutRegs.AX * OutRegs.bx * OutRegs.CX<br>
<br>
END FUNCTION<br>
<br>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.