User guide

72
VTB USER GUIDE
GETFREE
Reads the property of a driver: total dimension and number of free bytes. The informations are written in the structure
ObjectName_dinfo
Syntax
.GetFree(drv as char) as char
Parameters
drv Index of the driver:
0 = A:
1 = B:
Structure ObjectName_dinfo
.btot Disk dimension in bytes
.bfree Number of available bytes
Example
err=disk.GetFree(0)
ser_puts("bytes free: ")
ser_printl("#.###.###.### ",disk_dinfo.bfree)
ser_puts("su ")
ser_printl("#.###.###.### ",disk_dinfo.btot)
CHDRV
Sets the current driver. All successive functions without the name of driver in the path will refer to the current one.
Syntax
.ChDrv(drv as char) as char
Parameters
drv Index of the driver:
0 = A:
1 = B:
Example
err=disk.ChDrv(”B:”)
err=disk.OpenCreate(1,”file.txt”) ' create file.txt in driver B:
TESTDRV
Tests the presence of a driver. This is the only function wich doesn't return the code error as the others.
Syntax
.TestDrv(drv as char) as char
Parameters
drv Index of the driver:
0 = A:
1 = B:
Return value
Char 0 No driver found
1 Driver found
WARNING: This function tests only the presence of the disk but not the presence of a FAT.