Hi Jerome,

> First under MS-DOS, INT 21 Function 4408, reports “error 1, Invalid function 
> number”
> for drive N & X. But for those drives, FreeDOS reports “error 15, Invalid 
> drive”

That would be in DosDevIOctl() in the kernel, command C_REMMEDIA,
which seems to be missing in the kernel implementation, returning
DE_INVLDFUNC unless attr & ATTR_EXCALLS. In the latter case, it
falls through to something which might be quite unrelated, but
APPARENTLY wants to end up doing this for the return status:

          execrh((request FAR *) & CharReqHdr, dpbp->dpb_device);
...
if (r->AL == 0x08)
            r->AX = (CharReqHdr.r_status & S_BUSY) ? 1 : 0;

Note that C_REMMEDIA for block device calls is defined to be
0x0f, not 8, which is confusing in the code comments for the
int 21.44xx handling which mention C_REMMEDIA while 21.4408
is the correct IOCTL call, but differs from the device call.

INT 21 - DOS 3.0+ - IOCTL - CHECK IF BLOCK DEVICE REMOVABLE
        AX = 4408h
        BL = drive number (00h = default, 01h = A:, etc)
Return: CF clear if successful
            AX = media type (0000h removable, 0001h fixed)
        CF set on error
            AX = error code (01h,0Fh) (see #01680 at AH=59h/BX=0000h)

Not to be confused with:

(Table 02595)
Values for device driver command code:
...
 0Fh (15) (DOS 3.0+) REMOVABLE MEDIA (block devices)

So this might be a kernel problem which Jeremy could investigate.

> The other difference I’ve seen is INT 2F, FN 1500. MS-DOS reports
> 1 CD Starting at Drive X:, FreeDOS returns no CD Drives.

That sounds like a problem of SHSUCDX. Does using MSCDEX instead
of SHSUCDX solve this or maybe even both issues in FreeDOS? :-)

The SHSUCDX code for this once was (have not checked new versions) this:

CD_Number label near ; 00h get number of drive letters
        mov     al, NoDrives
        cbw
        mov     _BX, ax
        mov     al, FirstDriveNo
        mov     _CX, ax
        jmp     NCExit

This looks correct at first glance, maybe some ETHERDFS interaction?

Regards, Eric



_______________________________________________
Freedos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to