Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

The Doszip Commander version 2.21 available (Announce)

posted by nidud E-mail, Norway, 27.01.2012, 20:50
(edited by nidud on 27.01.2012, 21:14)

> However I found a bug: in drive selection dialog DC shows also drive B: But
> I don't have any drive B: because in AUTOEXEC.BAT i have JOIN B:
> C:\FREEDOS\JOIN_B

The testing in DC does not invoke any "hard-error" functions to avoid wakeing up the sleeping disk, so it may fail in some cases.

I have no way of testing the "extra B drive", but I made some changes to the test function that may work:


include clib.inc
include disk.inc

PPROC   _disk_type, disk:word
        mov dx,disk
        .if dl <= 1
            mov ah,15h          ; GET DISK TYPE
            int 13h
            .if CARRY? || !ah
                xor ax,ax
            .elseif disk == 1   ; remapped B drive ? *
                mov bx,disk
                inc bx
                mov ax,440Eh
                int 21h         ; IOCTL - GET LOGICAL DRIVE MAP
                .if al
                    xor ax,ax
                .else
                    mov ax,_DISK_FLOPPY
                .endif
            .else
                mov ax,_DISK_FLOPPY
            .endif
        .else
            mov bx,disk
            inc bx
            mov ax,4409h        ; IOCTL - CHECK IF BLOCK DEVICE REMOTE
            int 21h
            .if CARRY?
                xor ax,ax
            .elseif dh & 80h        ; bit 15: drive is SUBSTituted
                mov ax,_DISK_SUBST
            .elseif dh & 10h        ; bit 12: drive is remote
                mov ax,_DISK_NETWORK
            .else
                mov ax,_DISK_LOCAL
            .endif
        .endif
        ret
PEND    _disk_type

        END


File: dz/src/clib/dir/drvtype.asm

> And please, change to unixish paths like C:/FREEDOS/BIN into normal
> C:\FREEDOS\BIN

File: dz\src\clib\dir\drvtype.asm

Edit: *dl --> disk

 

Complete thread:

Back to the forum
Board view  Mix view
22778 Postings in 2122 Threads, 402 registered users (1 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum