DISKSIZE

Top  Previous  Next

Action

Returns the size of the Disk

 

 

Syntax

lSize = DISKSIZE()

 

 

Remarks

lSize

A Long Variable, which is assigned with the capacity of the disk in Bytes

 

This functions returns the capacity of the disk.

 

 

See also

INITFILESYSTEM , OPEN , CLOSE, FLUSH , PRINT, LINE INPUT, LOC, LOF , EOF , FREEFILE , FILEATTR , SEEK , BSAVE , BLOAD , KILL , DISKFREE , GET , PUT , FILEDATE , FILETIME , FILEDATETIME , DIR , FILELEN , WRITE , INPUT

 

 

ASM

Calls

_GetDiskSize

Input

none

Output

16-r19: Long-Value of capacity in Bytes

 

 

Partial Example

Dim Gbtemp1 As Byte' scratch byte

Gbtemp1 = Initfilesystem(1)' we must init the filesystem once

If Gbtemp1 > 0 Then

 Print#1 ,"Error "; Gbtemp1

Else

 Print#1 ," OK"

Print "Disksize : "; Disksize()' show disk size in bytes

Print "Disk free: "; Diskfree()' show free space too

End If