PDA

Click to See Complete Forum and Search --> : Detect hardware


DaNoVB
Jul 2nd, 2002, 05:00 AM
Hi.
I'm trying to detect hardware in C or ASM, but I posted it here because I think this should be done in C, but I'm not sure
I just want to know, which drives (like A:\, B:\, C:\) exist in the pc where my app is running.
But:
- It is for running on my own os, so: I can't use the windows api's and also not use the dos interrupt 21h.
Anybody suggestions??
Please help me out of this problem I'm already fighting centuries, for my feeling.

DaNoVB
Jul 3rd, 2002, 12:20 PM
Come on, somebody of you smart guys knows this.

abdul
Jul 3rd, 2002, 02:05 PM
You'll probably have to do some research on this. Infact, these letters like A:, B:, C: are assigned by Windows and other Operating Systems might use a different symbol. So you'll have to check all the drives (Primary Master/Slave, and Secondry Master/Slave) and see if you get any single. Then you'll also have to recognize that certain drive in order to work with it. That's why developers have to write device drivers for you software to communicate or recognize the floppy drive, hard drive, cdrom or any other disk drive. Unfortunately, I have't worked with any of them so I can't really help you but you can look up different interrupts and their functions and you might find some useful information (especially BIOS interrupts). Search for Ralph Brown's Interrupt List(or similar name) which has reference for almost all the interrupts and their functions including specific paramters that you need to know.

CornedBee
Jul 10th, 2002, 07:24 PM
And don't forget that if you want to assign drive letters (linux doesn't BTW) you must take care of partitioning.

DaNoVB
Jul 11th, 2002, 04:08 AM
Yes, already found a snippet that may work...testing it