0

I am writing a new operating system for learning and exploration purposes. And I would like to be able to scan the machine for connected devices (network, keyboard, HDDs, and what have you). This will be used as a first step to install the appropriate drivers.

I have been searching for this on the Internet for a while, but nothing that is of help.

matec
  • 1,316
  • 1
  • 10
  • 22
feeling_lonely
  • 6,665
  • 4
  • 27
  • 53

1 Answers1

3

There is no general simple way to scan for all different hardware on a computer. Probably that is the reason you were not successful when searching for it.

You could start scanning trough PCI devices, then scan for USB devices, etc. However, each of these steps will not be trivial. The osdev wiki will provide some pointers. You could start with scanning pci devices (code examples are in C), and you could look at the source of an operating system written entirely in assembly, like kolobrios, if writing your OS in a C/assembly combination is not an option for you.

matec
  • 1,316
  • 1
  • 10
  • 22
  • Thank you for the reply. I found this (http://www.jbox.dk/sanos/) OS (sanos) doing what I am looking for. However, it is written for 32bit. If you have any idea how to port it to 64 please let me know. That will save me sometime needed for testing...Thank you again. I am not neccessarily tied to Assembly...I can use C or C++ also. – feeling_lonely Feb 12 '14 at 21:28