home *** CD-ROM | disk | FTP | other *** search
- 'Sat Apr 22, 1989 11:01:08 am
- '*****************************************************************************
- 'This routine checks if a file exists on the default drive. If the returned
- 'value is 0 then the file does NOT exist, if 1 the file exists.
- 'NOTE: This routine does not work right now. Do not use.
- '*****************************************************************************
- DECLARE FUNCTION exist (file$)
- TYPE RegType
- ax AS INTEGER
- bx AS INTEGER
- cx AS INTEGER
- dx AS INTEGER
- bp AS INTEGER
- si AS INTEGER
- di AS INTEGER
- flags AS INTEGER
- END TYPE
-
- DIM SHARED inregs AS RegType, outregs AS RegType
-
- file$ = "junk"
- PRINT exist(file$)
-
- FUNCTION exist (file$)
- file$ = file$ + CHR$(0)
- file = SADD(file$)
- inregs.ax = (23 * 256): inregs.cx = 0: inregs.dx = file
- CALL interrupt(&H21, inregs, outregs)
- al = outregs.ax: IF al > 0 THEN al = 0 ELSE al = 1
- exist = al
- END FUNCTION
-
-
-
-
-
-
-
-