Page 1 of 1
cd drive present or not
Posted: Mon Aug 04, 2003 11:00 pm
by chaand
i need to know whether cd drive or not form dos. i need c c++ or assembly code to detect that.
interrupt or pnp api function for the above.
any idea please reply.
RE:cd drive present or not
Posted: Mon Aug 04, 2003 11:00 pm
by Jamethiel
Search the Interrupt List for MSCDEX. There's bound to be a detect call in there somewhere.
RE:cd drive present or not
Posted: Tue Aug 05, 2003 11:00 pm
by CarbonBased
If it's an ATAPI CD-ROM, I believe you can query the ATA/IDE controller to see if a CD-ROM drive is present.
If it's SCSI, however, you'll have to research the SCSI controller you're using, 'cuz they're all different.
Cheers,
Jeff
RE:cd drive present or not
Posted: Wed Aug 06, 2003 11:00 pm
by chaand
yes, it is an atapi cd-rom. i have tried the int13h with ah=48h. given the buffer size as 48h but after the int call the size assigned is showing only 26 (base 10)value in the starting location of the buffer. so what can i do ?
if it is 66 itself then i can try the string stored in 28h for ata , atapi or like that
what can i do for that
help me
RE:cd drive present or not
Posted: Wed Aug 06, 2003 11:00 pm
by CarbonBased
You'll probably have to actually query the IDE controller directly. Take a look at the IDE identify command.
Cheers,
Jeff
RE:cd drive present or not
Posted: Wed Aug 06, 2003 11:00 pm
by Jamethiel
This old message may contain a small amount of helpful information:
http://www.osdev.org/board.jsp?message=2844
RE:cd drive present or not
Posted: Sun Aug 10, 2003 11:00 pm
by chaand
i go through the message in
http://www.osdev.org/board.jsp?message=2844
but i did know how to send the Identify Packet Device command (0xa1)
please reply me how it is possible