中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-01 21:07
48,037 topics / 350,122 posts / today 2 new / 48,249 members
DOS开发编程 & 发展交流 (开发室) » How to write a program in C language to control the CD-ROM drive?
Printable Version  2,120 / 13
Floor1 profree Posted 2004-08-19 00:00
中级用户 Posts 132 Credits 478
Found some materials, all are in assembly, but I don't understand assembly. How to write it in C language? Thanks
Floor2 zhaojinpo Posted 2004-08-19 00:00
初级用户 Posts 31 Credits 183
One should know one's limits, and should not be overreaching!
Floor3 wchong Posted 2004-08-20 00:00
银牌会员 Posts 510 Credits 1,186
Is the English of the 2nd floor very good? Translate some shares!
Floor4 JonePeng Posted 2004-08-20 00:00
金牌会员 Posts 1,883 Credits 4,562 From 广东广州
The following program is a small program I shrank from a CD player program a few years ago to open and close the CD drive, for you to play with. But there is a shortcoming, it can only run in pure DOS. When running in the DOS window of Win9x, if there is no disc in the CD drive, it cannot be opened, but it can be closed.



[ Last edited by JonePeng on 2006-5-1 at 00:48 ]
Floor5 profree Posted 2004-08-21 00:00
中级用户 Posts 132 Credits 478
The following is the statement from zhaojinpo on 2004-8-19 22:22:40: You can see the introduction from http://www.he.net/~marcj/cdrom.html! The source code is at ftp://ftp.he.net/pub/marcj/cdrom.c

Floor6 JonePeng Posted 2004-08-23 00:00
金牌会员 Posts 1,883 Credits 4,562 From 广东广州
ftp://ftp.he.net/pub/marcj/cdrom.c I tried it, but there seems to be some problem. Why is there no reaction from the CD drive? It doesn't open, close, or read the disc! The LZ means to compile a program to open and close the CD drive, and the above C program I adapted works well. Rename the compiled EXE to EJ.EXE. Just press EJ and hit Enter under DOS to open the CD drive, and input again to close it. I always like to use it. ^_^
Floor7 profree Posted 2004-08-25 00:00
中级用户 Posts 132 Credits 478
Yes, I used the file ftp://ftp.he.net/pub/marcj/cdrom.c, but it seems to be of no use and there's no response. The program on the 4th floor is pretty good, thank you.
Floor8 qingfen Posted 2006-04-22 21:18
初级用户 Posts 22 Credits 70
I hope to use port programming instead of interrupts to write??
Floor9 johnsonlam Posted 2006-04-24 11:39
银牌会员 Posts 497 Credits 1,410 From 九龍,香港
QCDROM "Assembly Language Master" (I said) produced, supports UltraDMA, quite stable, with SHSUCDX V3.03A (Jack R. Ellis modified version) is even more "fast"!

http://johnson.tmfc.net/freedos

There are QCDROM and SHCDX33A downloads!

[ Last edited by johnsonlam on 2006-4-24 at 11:40 ]
Floor10 qingfen Posted 2006-04-25 03:07
初级用户 Posts 22 Credits 70
I want to ask about the statement of the moderator on the 4th floor:
for(i=0;i<2;i++) and ch=getbuff&0x01;
What is the function of i<, and it seems that lt, amp are not defined?

[ Last edited by qingfen on 2006-4-26 at 01:10 ]
Floor11 JonePeng Posted 2006-05-01 00:51
金牌会员 Posts 1,883 Credits 4,562 From 广东广州
Originally posted by qingfen at 2006-4-25 03:07:
for(i=0;i < 2;i++) and ch=getbuff & 0x01;
What is the function of i <, and it seems that lt and amp are not defined?


Previously, this forum was a DVBBS forum, which was particularly sensitive to the "&" and less-than symbols in the source code, turning "&" into "&amp" and less-than signs into "%lt" and so on. Now the source code on the 4th floor has been updated.
Floor12 CrazyWind Posted 2006-05-03 10:16
初级用户 Posts 12 Credits 131
What is the principle of controlling the CD-ROM drive switch? Are all CD-ROM drives the same? Is there an introduction in some "XXX Interrupt Compendium"?
Floor13 qingfen Posted 2006-05-05 13:12
初级用户 Posts 22 Credits 70
Oh, that's how it is. But how can Windows system be compatible with so many CD-ROM drives? And what's the difference between kernel drivers and device drivers?
Floor14 darkradx Posted 2006-05-05 20:56
高级用户 Posts 420 Credits 972
Bend it yourself regarding ATAPI Spec
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023