FT_DSKSIZE() Return the maximum capacity of a fixed disk ------------------------------------------------------------------------------ Syntax FT_DSKSIZE( [ <cDrive> ] ) -> nMaxCapacity Arguments <cDrive> is the fixed disk to query. If no drive is sent, the operation will be performed on the default drive. Send without the ":". Returns An integer representing the maximum disk capacity in bytes. Description Function utilizing FT_INT86() to return Maximum Disk Size. Uses FT_INT86() through the internal function _ftDiskInfo(). Examples ? FT_DSKSIZE() // Maximum capacity for default drive ? FT_DSKSIZE( "D" ) // Maximum capacity for Drive D: Source: DISKFUNC.PRG Author: Robert A. DiFalco
Daily Archives: September 18, 2013
FT_DSKFREE
FT_DSKFREE() Return the amount of available disk space Syntax FT_DSKFREE( [ <cDrive> ] ) -> nSpaceAvail Arguments <cDrive> is the fixed disk to query. If no parameter is passed the operation will be performed on the default drive. Do not include the ":". Returns Integer representing the available disk space in bytes. Description Function to return the available space on the passed drive letter or the default drive if no drive is passed. Uses FT_INT86() through the internal function _ftDiskInfo(). Examples ? FT_DSKFREE() // Returns free space on default drive. Source: DISKFUNC.PRG Author: Robert A. DiFalco
FT_DOSVER
FT_DOSVER Return the current DOS major and minor version as a string ------------------------------------------------------------------------------ Syntax FT_DOSVER() -> <cVersion> Arguments None Returns A character string with the major version number first, a period ("."), then the minor version number (e.g., "3.30") Description FT_DOSVER() invokes DOS interrupt 21h, service 30 in order to return the current DOS version. It does this by setting up an array corresponding to machine registers and then calling the toolkit function FT_INT86(). It returns a character string corresponding to the DOS version, as follows: The major version, a period ("."), then the minor version. Examples FUNCTION main() RETURN QOut( "Dos version: " + FT_DOSVER() ) Source: DOSVER.PRG Author: Glenn Scott
FT_DEFAULT
FT_DEFAULT() Retrieve and optionally change the current default drive Syntax FT_DEFAULT( [ <cDrive> ] ) -> cDrive Arguments <cDrive> is optional, and if specified is the new default drive. Returns The current default drive. If a change of default drive is requested, the return value is the drive AFTER the change is made. This allows you to make sure you specified a valid drive (i.e. if you attempt to change the default drive, and the function returns a different drive letter than the one you specified, then the drive does not exist). Description Useful any time you need to know or change the default drive. The source code is written to adhere to Turbo Assembler's IDEAL mode. To use another assembler, you will need to rearrange the PROC and SEGMENT directives, and also the ENDP and ENDS directives (a very minor task). Examples cDrive := FT_DEFAULT() && Get the current drive FT_DEFAULT("C") && Switch to drive C IF FT_DEFAULT("E") != "E" Qout( "Drive E does not exist!" ) ENDIF Source: DEFAULT.ASM Author: Ted Means
FT_CHDIR
FT_CHDIR() Change the current directory ------------------------------------------------------------------------------ Syntax FT_CHDIR( <cDirName> ) -> nResult Arguments <cDirName> is the name of the desired directory. Returns 0 if successful 3 if path not found 99 if invalid parameters passed Description Use this function if you prefer to change the active directory instead of relying on the SET PATH command. The source code is written to adhere to Turbo Assembler's IDEAL mode. To use another assembler, you will need to rearrange the PROC and SEGMENT directives, and also the ENDP and ENDS directives (a very minor task). Examples FT_CHDIR( "C:\CLIPPER" ) FT_CHDIR( "\" ) FT_CHDIR( "..\SOURCE" ) Source: CHDIR.ASM Author: Ted Means