Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Nanforum Toolkit v2.1 Reference Guide - <b>ft_floptst()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 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

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson