Writing code to detect processor
Re: Writing code to detect processor
detecting processor speed is a convoluted process.
if its a pentium class you can use rdtsc on it and time a known instruction.
if its < pentium, you have to resort to lots of tricks (ie: make, model, stepping etc).
or
use some extended bios info stored in the tables in the bios, which give processor speed, motherboard type/maker, etc.
detecting ram is much easier. let something like grub do it for you and use its value. (grub just uses some of the extended bios calls)
if its a pentium class you can use rdtsc on it and time a known instruction.
if its < pentium, you have to resort to lots of tricks (ie: make, model, stepping etc).
or
use some extended bios info stored in the tables in the bios, which give processor speed, motherboard type/maker, etc.
detecting ram is much easier. let something like grub do it for you and use its value. (grub just uses some of the extended bios calls)
-- Stu --