DOS/BIOS

Name

DOS/BIOS -- 

Function

<cVersion>          FT_DOSVER()
nSpaceAvail         FT_DSKFREE( [ <cDrive> ] )
nMaxCapacity        FT_DSKSIZE( [ <cDrive> ] )
nStatus             FT_FLOPTST( <nDrive> )
nRetCode            FT_ISSHARE()
<lResult>           FT_SETDATE( <dDate> )
<lResult>           FT_SETTIME( <cTime> )
nMemSize            FT_SYSMEM()
cFileSpec           FT_TEMPFIL( [ <cPath> ] [, <lHide> ] )

Description

Function FT_DOSVER

 FT_DOSVER() --> <cVersion>

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.

Function FT_DSKFREE()

 FT_DSKFREE( [ <cDrive> ] ) --> nSpaceAvail

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().

Function FT_DSKSIZE()

 FT_DSKSIZE( [ <cDrive> ] ) --> nMaxCapacity

Function utilizing FT_INT86() to return Maximum Disk Size. Uses FT_INT86() through the internal function _ftDiskInfo().

Function FT_FLOPTST()

 FT_FLOPTST( <nDrive> ) --> nStatus

FT_FLOPTST() is designed as a full replacement for ISDRIVE(). Where ISDRIVE() returns just .T. or .F. depending if the diskette drive is ready or not, FT_FLOPTST() returns a numeric code designating the diskette drive's status.

FT_FLOPTST() is particularly useful in backup and restore programs that need to test the floppy drive before writing/reading from a floppy disk.

No testing has been performed on systems with more than 2 floppy drives. If the third drive is "C" and the fourth "D" then there should be no problems.

This function does not currently check subst'd drives. So if you have SUBST E: A:\ then FT_FLOPTST( ASC("E")-ASC("A") ) == 4 Any suggestions to fix this limitation are appreciated.

Function FT_ISSHARE()

 FT_ISSHARE() --> nRetCode

Uses DOS interrupt 2Fh (MultiPlex interrupt), service 10h to determine if DOS SHARE.COM is loaded.

Function FT_SETDATE()

 FT_SETDATE( <dDate> ) --> <lResult>

FT_SETDATE() uses NANFOR.LIB's FT_INT86() function to invoke the DOS Set Date service (Interrupt 33, service 43).

Function FT_SETTIME()

 FT_SETTIME( <cTime> ) --> <lResult>

FT_SETTIME() uses NANFOR.LIB's FT_INT86() function to invoke the DOS Set Time service (Interrupt 33, service 45).

Function FT_SYSMEM()

 FT_SYSMEM() --> nMemSize

FT_SYSMEM() simply reports the amount of conventional memory (up to 640K) installed.

FT_SYSMEM() uses DOS interrupt 12h to get this information. For information, refer to Peter Norton's _Programmer's Guide to the IBM PC_ (Brady).

Function FT_TEMPFIL()

 FT_TEMPFIL( [ <cPath> ] [, <lHide> ] ) --> cFileSpec

This function uses DOS Interrupt 21, service 5Ah (Create temporary file) to create a unique filename in a directory you specify. There will be no extension. After the file is created, you may then fopen() it and do any i/o you need (see the test driver in the source code).

This function requires FT_INT86().