Mail Archives: djgpp/1999/10/23/09:34:46
--- Prashant TR <prashant_tr AT yahoo DOT com> wrote:
>
> Hi everyone,
>
> I needed to get some details about the CPU
> information on a 486DX4. I couldn't find one to test
> this. I would be grateful if you guys could send me
> the output of this program to me. People with access
> to any 486s can also send me the reports.
>
Well, I guess I still can't find the report I need.
So, I again request others to send me reports from
both 486s and Pentiums (no PII or PPro please).
btw: Thanks a lot to all those who sent the output.
Here's the program:
------------------
#include <stdio.h>
unsigned idflag()
{
register unsigned long eax __asm__("ax");
asm("pushfl;
popl %eax;
orl $0x200000, %eax;
pushl %eax;
popfl;
pushfl;
popl %eax;
andl $0x200000, %eax;");
return (eax);
}
unsigned long cpuid(unsigned fn)
{
register unsigned long eax __asm__("ax");
eax = fn;
__asm__("pushl %ebx;
pushl %ecx;
pushl %edx;
cpuid;
popl %edx;
popl %ecx;
popl %ebx");
return (eax);
}
int main()
{
register int level;
if (!idflag()) {
printf("Sorry! No CPUID.\n");
return 0;
}
printf("CPUID level = %d\n", level = cpuid(0));
if (level) printf("CPUID value = %lX\n", cpuid(1));
return 0;
}
-----------
Thanks in advance.
Please mail to me personally at prashant_tr AT yahoo DOT com
-----------
Regards,
Prashant TR
__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com
- Raw text -