Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

detecting devices 2

Status
Not open for further replies.

Sangita

Programmer
Jan 13, 2002
7
IN
hi,
is it possible to detect devices like keyboard,mouse and other devices are connectd to the system and also to find out whether floppy drive is enabled or disabled using C code(syntax).....if yes plz do let me know knoe the syntax for it.

thanx in advance
sangita
 
Hi Sangeeta,

It is verymuch possible to check for the hardware devices connected to the system. The simplest way to check is to write a bitpattern in to the buffers of the devices and read it back again. If both match, the device exists. For this you need to know their buffer addresses (refer to IBM/PC and Clones)

Other way is to use the DOS routines and generate the interrupts to find the devices (like its 0x22 for mouse) and u may verify their existance.

I am sorry, I don't have the addresses with me but just ideas. That is all I can help. Obviously, I would consider this as an advance C programming and would take good understanding of interrupts, interrupt routine details, pointer manipulation and stuff...

Have fun coding...;-)

Roy.
user.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top