Page 1 of 1

How to detect processor string and speed?

Posted: Mon Mar 28, 2011 11:09 am
by HeinanXP
Hello,

How can I detect the processor string (For example: Intel Core i7) and the speed of it (For example: 2.66 GHz)?

Thanks,

Re: How to detect processor string and speed?

Posted: Mon Mar 28, 2011 2:48 pm
by halofreak1990
The Processor Brand string can be accessed by CPUID, using eax = 0x80000002, 0x80000003 and 0x80000004 in sequence
It's a 48 byte null-terminated string, returned in four byte sequences via eax, ebx, ecx and edx per call
For more information about CPUID, read the wikipedia article at http://en.wikipedia.org/wiki/CPUID

The processor speed has to be obtained by running a speed test. Methods vary, so you'll have to find something that suits your desired level of accuracy.

Re: How to detect processor string and speed?

Posted: Mon Mar 28, 2011 5:20 pm
by HeinanXP
I really didn't understand what you said.. Could you please post some kind of code explaining exactly what do you mean?

Re: How to detect processor string and speed?

Posted: Tue Mar 29, 2011 12:14 am
by Andyhhp
Could you please post some kind of code explaining exactly what do you mean?
What are you on about? halofreak1990 posted a link to wikipedia which explains, with code example, exactly how to do what you want.

~Andrew