Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to index page
Thread view  Board view
rr

Homepage E-mail

Berlin, Germany,
26.05.2009, 22:45
 

Detecting floppy disk drives (Developers)

What methods are available to detect if (or what type of) floppy disk drives are present on a DOS system?

I found the following:
MEM 0040h:0010h
INT 11h
CMOS 10h

There seem to be more, because all these functions already return "none", but MSD.EXE and file managers (tested VC and FAR) running on MS-DOS 6.22 in QEMU 0.10.5 still report a FDDs A: and B: (40 cylinders, 2 heads, 9 sectors in MSD), although no floppy images were mounted.

---
Forum admin

Rugxulo

Homepage

Usono,
27.05.2009, 00:51

@ rr
 

Detecting floppy disk drives

> What methods are available to detect if (or what type of) floppy disk
> drives are present on a DOS system?

I don't know, but I think I know where to find out:

DJGPP's mntent.c

Rugxulo

Homepage

Usono,
27.05.2009, 02:46

@ Rugxulo
 

Detecting floppy disk drives

> > What methods are available to detect if (or what type of) floppy disk
> > drives are present on a DOS system?
>
> I don't know, but I think I know where to find out:
>
> DJGPP's
> mntent.c

gcc -DTEST mntent.c -o mntent.exe
mntent.exe

0:  Drive A:                            fd      rw,dev=00       a:/
1:  Drive C:                            hd      rw,dev=02       c:/
2:  PRESARIO_RP                         hd      rw,dev=03       d:/
3:  C:\Armslurp\utils\                  subst   rw,dev=02       u:/
4:  C:\Armslurp\zips\                   subst   rw,dev=02       z:/

rr

Homepage E-mail

Berlin, Germany,
28.05.2009, 22:00

@ Rugxulo
 

Detecting floppy disk drives

> I don't know, but I think I know where to find out:
>
> DJGPP's
> mntent.c

mntent doesn't show my "phantom" drives, which is correct.

---
Forum admin

nidud

E-mail

Norway,
07.06.2009, 20:57

@ rr
 

Detecting floppy disk drives

> > I don't know, but I think I know where to find out:
> >
> >
> DJGPP's
> > mntent.c
>
> mntent doesn't show my "phantom" drives, which is correct.

int 13h, ah=15h, dl=drive number (00h/01h) -- GET DISK TYPE
normally this function returns CF set if no drive,
but sometimes it actually works: CF clear, ah=00h (no such drive)

Japheth

Homepage

Germany (South),
27.05.2009, 07:17

@ rr
 

Detecting floppy disk drives

> I found the following:
> MEM 0040h:0010h
> INT 11h
> CMOS 10h

int 13h, ah=08, dl=00
on return, dl=number of FDs, bl=type of first floppy (1,2,3,4,...)

---
MS-DOS forever!

Back to index page
Thread view  Board view
22049 Postings in 2034 Threads, 396 registered users, 82 users online (0 registered, 82 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum