China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-01 05:44
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » [Help] How to get drive letters when programming under DOS? View 1,243 Replies 6
Original Poster Posted 2004-02-01 00:00 ·  中国 江西 抚州 移动
初级用户
Credits 182
Posts 27
Joined 2003-11-12 00:00
22-year member
UID 12731
Gender Male
Status Offline
How can I get the drive letters on a computer with no CD-ROM installed under pure DOS?

For example: the computer has A: C: D: one floppy drive, two hard disk partitions
How can I get the drive letters of these three drives,
The purpose is to store the drive letters into a string array pan$(0 to 255), so that different computers' drive letters can be identified automatically

Hope all you experts can help me!
Floor 2 Posted 2004-02-02 00:00 ·  加拿大 安大略省 多伦多
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
Try this:
http://newdos.yginfo.net/upload/drvtypes.exe
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 3 Posted 2004-02-02 00:00 ·  中国 江西 抚州 移动
初级用户
Credits 182
Posts 27
Joined 2003-11-12 00:00
22-year member
UID 12731
Gender Male
Status Offline
Ha, boss, what I want is the principle or the program itself
Floor 4 Posted 2004-02-02 00:00 ·  中国 河北 唐山 联通
版主
★★★
操作系统爱好者
Credits 1,113
Posts 392
Joined 2002-11-11 00:00
23-year member
UID 228
Gender Male
Status Offline
Your spirit is admirable, but when using pliers do you also need to know how they were manufactured???
What I mean is, for such a small function there's no need to go further and discuss it.
DOS之家 http://doshome.com 站长 葛明阳
Floor 5 Posted 2004-02-02 00:00 ·  中国 江西 抚州 移动
初级用户
Credits 182
Posts 27
Joined 2003-11-12 00:00
22-year member
UID 12731
Gender Male
Status Offline
Hey, I'm afraid that one day I'll be thrown into the desert. Not to mention pliers, even a needle I'd have to make myself
Does any expert know?
Floor 6 Posted 2004-02-02 00:00 ·  中国 河北 唐山 联通
版主
★★★
操作系统爱好者
Credits 1,113
Posts 392
Joined 2002-11-11 00:00
23-year member
UID 228
Gender Male
Status Offline
The first priority in getting into the desert is to find a water source! You're not from Jiangmin, are you? Unless you're making a DOS version antivirus program, otherwise it's not much use.
DOS之家 http://doshome.com 站长 葛明阳
Floor 7 Posted 2004-02-02 00:00 ·  中国 江西 吉安 电信
初级用户
Credits 182
Posts 27
Joined 2003-11-12 00:00
22-year member
UID 12731
Gender Male
Status Offline
Really, it takes all kinds. If you don't know yourself, then don't stop others from trying to figure it out
I know CD-ROM drives can be handled with DOS interrupts, but for hard disks there doesn't seem to be that kind of interrupt
Boss Wengier, do you have any way to solve this?

Forum Jump: