FT DOS/BIOS

 FT_CHDIR()       Change the current directory
 FT_DEFAULT()     Retrieve and optionally change the current default drive
 FT_DOSVER()      Return the current DOS major and minor version as a string
 FT_DSKFREE()     Return the amount of available disk space
 FT_DSKSIZE()     Return the maximum capacity of a fixed disk
 FT_FLOPTST()     Test diskette drive status
 FT_HANDCNT()     Count number of available DOS (not network) file handles
 FT_INP()         Retrieve a byte from a specified I/O port
 FT_INT86()       Execute a software interrupt
 FT_ISPRINT()     Check printer status
 FT_ISSHARE()     Determine if DOS "Share" is installed
 FT_MKDIR()       Create a subdirectory
 FT_OUTP()        Write a byte to a specified I/O port
 FT_PEEK()        Retrieve a byte from a specified memory location.
 FT_POKE()        Write a byte to a specified memory location
 FT_REBOOT()      Force a warm or cold boot
 FT_RMDIR()       Delete a subdirectory
 FT_SETDATE()     Set the DOS system date
 FT_SETTIME()     Set the DOS system time
 FT_SYSMEM()      Determine the amount of conventional memory installed
 FT_TEMPFIL()     Create a file with a unique name

FT_TEMPFIL

FT_TEMPFIL()
 Create a file with a unique name

 Syntax

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

 Arguments

     <cPath> is the directory where you want to create the temporary
     file.  If you omit this argument, the root of the current drive
     is assumed ("\").

     If <lHide> is .T., then the file will be created with the hidden
     attribute set.  The default is .F.

 Returns

     <cFileSpec> should be your path, including the name of the newly
     created unique file.  Use this with FOPEN(), etc.

     If a DOS error occurred when trying to create the file, a
     null string will be returned.

 Description

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

 Examples

     Create a unique file in the root of the current drive:

            myFile := FT_TEMPFIL()

     Create a unique file in the current directory and hide it:

            myFile := FT_TEMPFIL(".\", .t.)

     Create a unique file on another drive, but do not hide it:

            myFile := FT_TEMPFIL("e:\nanfor\src\")

 Source: TEMPFILE.PRG

 Author: Glenn Scott

 

FT_SYSMEM

FT_SYSMEM()
 Determine the amount of conventional memory installed

 Syntax

      FT_SYSMEM() -> nMemSize

 Arguments

     None

 Returns

     A numeric corresponding to the number of K memory.

 Description

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

 Examples

     QOut( "Conventional memory installed: " + Str( FT_SYSMEM() ) + "K" )

 Source: SYSMEM.PRG

 Author: Glenn Scott

 

FT_SETTIME

FT_SETTIME()
 Set the DOS system time
------------------------------------------------------------------------------

 Syntax

      FT_SETTIME( <cTime> ) -> <lResult>

 Arguments

     <cTime> is a string in the form <hh:mm:ss> that you want to set
     the current DOS system time to.

     Use 24-hour time.  It is up to you to send in a valid time.  If
     DOS doesn't think it is valid, it won't reset the time anyway.

 Returns

     <lResult> is simply the result of FT_INT86(), passed back
     to your program.

 Description

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

 Examples

  The following program takes a time string from the command line and sets
  the DOS system time:

   FUNCTION main( cTime )

      cTime := iif( cTime == nil, time(), cTime )
      QOut( "Setting time to: " + cTime  + "... " )
      FT_SETTIME( cTime )
      Qout( "Time is now: " + time() )

   RETURN ( nil )

 Source: SETTIME.PRG

 Author: Glenn Scott

 

FT_SETDATE

FT_SETDATE()
 Set the DOS system date

 Syntax

      FT_SETDATE( <dDate> ) -> <lResult>

 Arguments

     <dDate> is a Clipper date variable that you want to set the current
     DOS system date to.

     It is up to you to send in a valid date.  The
     year must be within the range 1980 through 2099.  If DOS
     thinks the date is not valid, it won't change the date.

 Returns

     <lResult> is simply the result of FT_INT86(), passed back
     to your program.

 Description

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

 Examples

  The following program takes a date from the command line and sets
  the DOS system date:

   FUNCTION main( cDate )

      cDate := iif( cDate == nil, dtoc( date() ), cDate )
      QOut( "Setting date to: " + cDate  + "... " )
      FT_SETDATE( ctod( cDate ) )
      Qout( "Today is now: " + dtoc( date() ) )

   RETURN ( nil )

 Source: SETDATE.PRG

 Author: Glenn Scott

 

FT_RMDIR

FT_RMDIR()
 Delete a subdirectory

 Syntax

      FT_RMDIR( <cDirName> ) -> nResult

 Arguments

     <cDirName> is the name of the directory to delete.

 Returns

      0  if successful
      3  if Path Not Found
      5  if Access Denied (directory not empty)
     16  if attempt to delete current directory.
     99  if invalid parameters passed

 Description

    This function is useful if you need to remove a subdirectory for
    some reason.

    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_RMDIR( "C:\CLIPPER" )
    FT_RMDIR( "\EXAMPLE" )
    FT_RMDIR( "..\SOURCE" )

 Source: RMDIR.ASM

 Author: Ted Means