[comp.sys.ibm.pc.programmer] BIOS Int 21/43

holtt@jacobs.CS.ORST.EDU (Tim Holt) (04/05/91)

Problem:
I'm trying to determine if a file exists on a drive (in Q Basic 4.5)
by using the interrupt 21h/AH=43h.  This is the Get/Set File Attr
command.  I then check for file-not-found or path-not-found via
returned values in AX.  Works just fine, until I don't have a floppy
in the drive when I check for a file on the floppy.  Then, the whole
system hangs & I've got to do a hard-reset to reboot (keyboard gone).

Question:  How do I get it to recover from this error state?  Is there
an easier way to see if a file exists?  I'm working in QuickBasic as
mentioned above.  I'd like to stay away from the ON ERROR GOTO... stuff,
as I've got a big modularized program and would like to stay away from the
ON ERROR stuff if possible.

Ideas?  Suggestions???
Thanks...

-$a
--
Tim Holt - Marine Technician		holtt@jacobs.cs.orst.edu
Oregon State University			
College of Oceanograpy / Oc. Admin. 104
Corvallis, OR 97331-5503		(503)737-4447