Mail Archives: djgpp/1997/01/09/02:19:53
On Wed, 8 Jan 1997, Shawn Hargreaves wrote:
> I have recently discovered a problem with the file selector routines in
> Allegro, which is caused by selecting disk B: on a machine with only one
> floppy drive. DOS displays the "please insert disk B into drive A"
> message, which results in a lockup because the Allegro keyboard handler
> prevents the continue keypress getting through to DOS.
>
> I've racked my brains but can't think of any way round this - please
> someone tell me there is an easy solution :-) I need to either disable
> the message, or detect whether disk B really exists, but I have no idea
> how to do either. Any ideas?
I've been through this brain-racking sessions myself several times, and
learned a simple truth: before throwing in the towel, always scan Ralf
Brown's Interrupt List. Here's another case in point: the following two
rabbits out of Ralf's hat will allow you (1) to see whether drive A: can
at all be called B: sometimes (21440E will return AL = 0 if it can't
ever be called B:); (2) if it can be mapped, to know what was the last
name (A: or B:) with which this drive was referenced; and (3) to set
drive A: to be referenced as B: (or as A:, if it was last referenced as
B:) with a call to 21440F, so DOS will not pop up that infamous message.
Note the caveat that DR DOS doesn't support these calls. This probably
means that on DR DOS that message won't pop, but the only way to be sure
is to try (if you at all both to support DR DOS). FWIW, the `getmntent'
library function uses 21440E, and I never heard any complains from DR
DOS users (if there are any ;-).
--------D-21440E-----------------------------
INT 21 - DOS 3.2+ - IOCTL - GET LOGICAL DRIVE MAP
AX = 440Eh
BL = drive number (00h=default,01h=A:,etc)
Return: CF set on error
AX = error code (01h,0Fh) (see #1020 at AH=59h/BX=0000h)
CF clear if successful
AL = 00h block device has only one logical drive assigned
1..26 the last letter used to reference the drive (1=A:,etc)
Notes: DR DOS 3.41-5.0 DRIVER.SYS does not support drive mapping and thus
always returns AL=00h
in addition to the normal operation, if Stacker is installed, this
call also sets the volume number at offset 58h in the Stacker
device driver (DR DOS 3.41-5.0 only; use AX=4408h otherwise)
(see AX=4404h"Stacker",INT 25/AX=CDCDh)
SeeAlso: AX=4408h,AX=440Fh,INT 2F/AX=122Bh
--------D-21440F-----------------------------
INT 21 - DOS 3.2+ - IOCTL - SET LOGICAL DRIVE MAP
AX = 440Fh
BL = physical drive number (00h=default,01h=A:,etc))
Return: CF set on error
AX = error code (01h,0Fh) (see #1020 at AH=59h/BX=0000h)
CF clear if successful
drive now responds to next logical drive number
Notes: maps logical drives to physical drives, similar to DOS's treatment
of a single physical floppy drive as both A: and B:
DR DOS 3.41-5.0 DRIVER.SYS does not support drive mapping and thus
always returns an error on this function
SeeAlso: AX=440Eh,INT 2F/AX=122Bh
- Raw text -