How to fetch hardware information of my computer ?

If you are new to OS Development, plan on spending some time here first before going into the other forums.

Moderator: Moderators

Post Reply
stoic1979
Posts: 2
Joined: Tue Jul 08, 2008 7:29 pm
Location: Japan
Contact:

How to fetch hardware information of my computer ?

Post by stoic1979 » Tue Jul 08, 2008 7:40 pm

Hi Dear OS Developers.

This is my first message on this website and i feel this is a very good website for knowledge sharing and learning new interesting things about computers.

I have programmed a small boot loader as recommended on this website.

I want to know information about the hardware on my computer , esp. the size of RAM , if floppy-drive is present, if CD drive is present , how many partitions in hard disk etc.

Can anyone help me please.

Thanks & Regards,
STOIC
Victory comes with perseverance.

Andyhhp
Moderator
Posts: 387
Joined: Tue Oct 23, 2007 10:05 am
Location: 127.0.0.1
Contact:

Post by Andyhhp » Fri Jul 11, 2008 8:13 pm

Hi

I can help with a few of those:

Floppy Disks)
http://www.osdever.net/tutorials/detect ... drives.php
This tutorial explains a very easy way to find out about floppy drives. It just asks CMOS for some information and interprets it.

Number of Partitions)
This is found in a completely different way. Like the bootsector on a floppy disk, the first (few) segments of a hard disk are special. If it is partitioned, it will contain the Master Partition Table, which is like the FAT data table but contains records of the partitions on the hard disk.
http://en.wikipedia.org/wiki/Master_boot_record

As for the others, Im afraid that I cant help you. Knowing the amount of RAM would be nice but I dont know how to. There is a BIOS call that is supposed to return the number of kilobytes of RAM but it is inaccurate for some reason and shouldn't be used.

Maybe Mike can help out some more,

Andrew
Image

Post Reply