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-07-23 23:03
中国DOS联盟论坛 » DOS启动盘 & LOGO技术 (启动盘室) » How can a program detect whether the floppy drive or USB flash drive is not installed? View 538 Replies 2
Original Poster Posted 2003-12-21 00:00 ·  中国 广东 深圳 南山区 电信
初级用户
Credits 133
Posts 8
Joined 2003-02-04 00:00
23-year member
UID 844
Gender Male
Status Offline
Problem:
USBASPI.SYS and DI1000DD.SYS have already been loaded in CONFIG.SYS.
I can read and write the USB flash drive now. But after unplugging the USB flash drive and plugging it back in, I can no longer read or write it. DOS
will say it can't find the drive, "Rrtry /Aboart /Fail", and I have to press "A" to exit.
How should an application determine this so it won't hang?
Floor 2 Posted 2003-12-21 00:00 ·  美国
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
You can also use tools like DREADY (it's included in that super boot disk) to check it.
Wengier - 新DOS时代

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

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

Floor 3 Posted 2003-12-21 00:00 ·  中国 广东 深圳 南山区 电信
初级用户
Credits 133
Posts 8
Joined 2003-02-04 00:00
23-year member
UID 844
Gender Male
Status Offline
Many thanks to Wengier

DREADY can detect it now

But if I want to add it into my application for automatic detection, could you explain the principle?

Using DEBUG to look at DREADY.COM, it seems to use INT21 function 2F

AX=2524i
int 21
ax=352f
int 21
save ES:BX
ax=252f
int 21
..
dx=参数
ax=252f
int 21
reutnr al
Forum Jump: