FT_FLOPTST

FT_FLOPTST()
 Test diskette drive status

 Syntax

      FT_FLOPTST( <nDrive> ) -> nStatus

 Arguments

     <nDrive> is the diskette drive number, 0 = A:, 1 = B:

 Returns

     -1 - Wrong Parameters
      0 - Drive Loaded and ready to read or write
      1 - Drive Door Open or Diskette inserted upside down
      2 - Diskette is unformatted
      3 - Write protected
      4 - Undetermined

 Description

     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.

 Examples

     iStatus := FT_FLOPTST( 1 )

     DO CASE
        CASE iStatus == 1
           Qout( "The door to drive A is open." )
        CASE iStatus == 2
           Qout( "The diskette in drive A is not formatted." )
        CASE iStatus == 3
           Qout( "The diskette in drive A is write-protected." )
        CASE iStatus == 4
           Qout( "Something is wrong with drive A, but I don't know what." )
     ENDCASE

 Source: FLOPTST.ASM

 Author: Joseph LaCour

 

One response to “FT_FLOPTST

  1. Pingback: FT DOS/BIOS | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.