cd drive present or not

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
chaand

cd drive present or not

Post 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.
Jamethiel

RE:cd drive present or not

Post by Jamethiel »

Search the Interrupt List for MSCDEX. There's bound to be a detect call in there somewhere.
CarbonBased

RE:cd drive present or not

Post 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
chaand

RE:cd drive present or not

Post 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
CarbonBased

RE:cd drive present or not

Post by CarbonBased »

You'll probably have to actually query the IDE controller directly.  Take a look at the IDE identify command.

Cheers,
Jeff
Jamethiel

RE:cd drive present or not

Post by Jamethiel »

This old message may contain a small amount of helpful information:

http://www.osdev.org/board.jsp?message=2844
chaand

RE:cd drive present or not

Post 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
Post Reply