Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Detect the available drives on DOS (Developers)

posted by SuperIlu Homepage, Berlin, Germany, 07.07.2023, 21:14

Hi,

I face an interesting problem for a file selection dialog I want to create:
How do I detect which drive letters are actually available/used in DOS (using either DJGPP or a DOS/BIOS INT)?

I guess it is always safe to assume A, B and C are there?
What happens when no secondary disk drive is installed?
I found _dos_setdrive() in DJGPP and INT21 0Eh, but I'm not sure what happens when I _set_drive() with a non existing drive?
Also the return value is "the highest drive present", so that won't help me with gaps (e.g. A present, B isn't, C is, D-W are not and X is a mapped network drive).
Also, there is the 'undocumented' INT21 32h. Would that work for network-drives as well?

What would be the best practice to only find available drives (like e.g. DosZip file commander does)?

cheers
Ilu

---
Javascript on MS-DOS? Try DOjS https://github.com/SuperIlu/DOjS
Fediverse: @dec_hl@mastodon.social

 

Complete thread:

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