home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hall of Fame
/
HallofFameCDROM.cdr
/
open
/
qbinters.lzh
/
FREE.BAS
< prev
next >
Wrap
BASIC Source File
|
1989-04-24
|
953b
|
39 lines
'Mon Apr 24, 1989 8:55:26 am
'****************************************************************************
'This routine returns the amount of space available on a disk drive.
'*****************************************************************************
TYPE RegType
ax AS INTEGER
bx AS INTEGER
cx AS INTEGER
dx AS INTEGER
bp AS INTEGER
si AS INTEGER
di AS INTEGER
flags AS INTEGER
END TYPE
DIM SHARED inregs AS RegType, outregs AS RegType
DECLARE FUNCTION Free (drive)
CONST default = 0: a = 1: b = 2: c = 3: d = 4: e = 5
f = Free(default)
PRINT "Free = "; USING "##########,"; f
FUNCTION Free (drive)
inregs.ax = &H3600: inregs.bx = 0: inregs.cx = 0: inregs.dx = drive
CALL interrupt(&H21, inregs, outregs)
a = outregs.ax: b = outregs.bx: c = outregs.cx: d = outregs.dx
total = a * c * d
PRINT "Total ="; USING "##########,"; total
Free = a * c * b
END FUNCTION