cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1999/11/11/03:04:49

Date: Thu, 11 Nov 1999 07:58:46 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Ben Davis <ben AT vjpoole DOT freeserve DOT co DOT uk>
cc: djgpp AT delorie DOT com
Subject: Re: Mixing BIOS and DOS disk functions
In-Reply-To: <80cuqf$3k0$1@news5.svr.pol.co.uk>
Message-ID: <Pine.SUN.3.91.991111075426.16947R-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Wed, 10 Nov 1999, Ben Davis wrote:

> If I run the installation program off the hard disk, making sure the floppy
> disk is in the drive before it needs it, it does the following every time:
> 1. It calls biosdisk() to find out if the right disk is in (supposedly).
> 2. It doesn't detect the disk, and it asks for Disk 1.
> 3. Next time it calls biosdisk(), it detects the disk properly and
> continues.
> 
> It is then that the rest of the disk is read using DOS functions.

BIOS is tricky, and it seems that your code that calls biosdisk is not 
patient enough.  The first call to biosdisk after a floppy was changed in 
the drive usually fails with a special error code (I think it's 6, but 
I'm not sure), to signal a disk change.  You need to retry the call 
again, sometimes several times (due to motor start time) until it 
succeeds.

If you want a working example of such code, look at the source of the 
library function `getmntent' (it's in djlsr202.zip, file name 
src/libc/compat/mntent/mntent.c).  It uses BIOS and DOS functions 
together and it always works.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019