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 04:26
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » How to write a program under DOS to detect whether a CD-ROM drive is installed? View 7,323 Replies 45
Floor 31 Posted 2003-04-08 00:00 ·  中国 广东 广州 增城区 电信
元老会员
★★★
Credits 1,468
Posts 407
Joined 2002-10-21 00:00
23-year member
UID 34
Gender Male
From 广州
Status Offline
I installed a virtual CD-ROM drive and it's the same. You can install one or two virtual CD-ROM drives to test it. If there really is no way, then it can only stay like this.
欢迎大家观临我的个人主页:

http://dosdiy.bluepc.com.cn/
http://dosdiy.ys168.com/


EMAIL: lydong@china.com.cn lydong@yeah.net
----------------------------------------------
Floor 32 Posted 2003-04-08 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
I think that order obtained from the interrupt can't be changed, but an additional subroutine could be written to automatically sort the drive letters before output.
Wengier - 新DOS时代

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

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

Floor 33 Posted 2003-04-08 00:00 ·  中国 广东 广州 增城区 电信
元老会员
★★★
Credits 1,468
Posts 407
Joined 2002-10-21 00:00
23-year member
UID 34
Gender Male
From 广州
Status Offline
All right
欢迎大家观临我的个人主页:

http://dosdiy.bluepc.com.cn/
http://dosdiy.ys168.com/


EMAIL: lydong@china.com.cn lydong@yeah.net
----------------------------------------------
Floor 34 Posted 2003-04-09 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
OK, I just added automatic alphabetical sorting to FINDCD. download link:
Open attachment link expired (admin note 2009-4-28)


Wengier - 新DOS时代

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

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

Floor 35 Posted 2003-04-10 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
lydong, do you find this latest FINDCD easy to use? Does it need any more features added?
Wengier - 新DOS时代

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

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

Floor 36 Posted 2003-04-11 00:00 ·  中国 台湾 台北市 私立沪江高级中学
元老会员
★★★★★
Credits 8,312
Posts 3,551
Joined 2003-03-22 00:00
23-year member
UID 1225
Gender Male
Status Offline
Moderator Wengier, can FINDCD be rewritten in C?? Because I've only learned a little PASCAL, so I'm not very familiar with it... Thanks, moderator
MSN:tiqit2@hotmail.com
Floor 37 Posted 2003-04-11 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
Rewrite it in C? That would be the same as writing it all over again. Also, FINDCD is a direct assembly+PASCAL combination, and I'm not very clear on how assembly+C can be combined directly.
Wengier - 新DOS时代

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

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

Floor 38 Posted 2003-04-12 00:00 ·  中国 广东 广州 增城区 电信
元老会员
★★★
Credits 1,468
Posts 407
Joined 2002-10-21 00:00
23-year member
UID 34
Gender Male
From 广州
Status Offline
Ha, I'm very happy. This FINDCD is very well written. It's meant for finding CD-ROM drives, so it doesn't need too many other functions. Thanks!
欢迎大家观临我的个人主页:

http://dosdiy.bluepc.com.cn/
http://dosdiy.ys168.com/


EMAIL: lydong@china.com.cn lydong@yeah.net
----------------------------------------------
Floor 39 Posted 2003-04-22 00:00 ·  中国 上海 电信
初级用户
Credits 195
Posts 35
Joined 2003-04-17 00:00
23-year member
UID 1580
Gender Male
Status Offline
I wonder if you could provide the complete source code. I want to know about the “add environment variable subroutine” part?

Floor 40 Posted 2003-04-23 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
The assembly subroutine for the “add environment variable subroutine” part was not written by me. Its contents are as follows:

function InsertEnvVar:Boolean; assembler;
asm mov es,
mov es,es:
mov ax,es:
dec ax
mov es,ax
mov dx,es:
shl dx,4
inc ax
mov es,ax
cld
xor di,di
xor ax,ax
mov cx,dx
@@l1: repne scasb
mov bx,di
dec cx
scasb
jnz @@l1
cmp word ptr es:,1
jnz @@no_ext
scasw
sub cx,2
repne scasb
jnz @@err
@@no_ext:
cmp cx,10
jl @@err
push ds
push es
pop ds
mov si,di
add di,10
mov cx,si
sub cx,bx
std
dec si
dec di
rep movsb
cld
pop ds
mov si,offset env
mov di,bx
mov cx,10
rep movsb
mov al,1
jmp @@e
@@err:
mov al,0
@@e:
end;
Wengier - 新DOS时代

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

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

Floor 41 Posted 2003-04-23 00:00 ·  中国 吉林 吉林市 教育网
初级用户
Credits 195
Posts 35
Joined 2003-04-17 00:00
23-year member
UID 1580
Gender Male
Status Offline
Thanks
Floor 42 Posted 2003-04-25 00:00 ·  中国 山东 济南 联通
初级用户
Credits 195
Posts 35
Joined 2003-04-17 00:00
23-year member
UID 1580
Gender Male
Status Offline
Does PrefixSeg equal 42h, the PSP?
How come I couldn't get it to work?
I don't want to keep trying.
Could the moderator help wrap it into an assembly function?
With one input parameter being the pointer to the string to set.


Floor 43 Posted 2003-04-26 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
That function is meant to be used as-is; I don't know the specifics very clearly either.
Wengier - 新DOS时代

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

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

Floor 44 Posted 2003-04-27 00:00 ·  中国 吉林 吉林市 教育网
初级用户
Credits 195
Posts 35
Joined 2003-04-17 00:00
23-year member
UID 1580
Gender Male
Status Offline
I finally modified it successfully, but it only just works. I don't know whether there are any potential problems though?
Floor 45 Posted 2003-09-20 00:00 ·  中国 陕西 西安 电信
高级用户
★★
OS/2女孩
Credits 639
Posts 183
Joined 2003-06-14 00:00
23-year member
UID 5148
Gender Female
Status Offline
This thread has been added to the digest section
REM 喜欢DOS,因为它的简单
REM 喜欢OS/2,因为它不再矫饰
REM 喜欢BASIC,因为它并不幼稚
REM 喜欢GNU,因为它杂乱无章
Forum Jump: