delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/22/13:38:21

From: infinity girl <entropic AT mpx DOT com DOT au>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: HELLO! Anyone with a 486DX4 ?
Date: Fri, 22 Oct 1999 20:16:28 +1000
Organization: Optus Internet
Lines: 81
Message-ID: <3810397C.CD75EBA2@mpx.com.au>
References: <19991021105944 DOT 2777 DOT rocketmail AT web1001 DOT mail DOT yahoo DOT com>
NNTP-Posting-Host: dialup-wdc24726.mpx.com.au
Mime-Version: 1.0
X-Trace: news1.mpx.com.au 940587363 288 198.142.247.26 (22 Oct 1999 10:16:03 GMT)
X-Complaints-To: abuse AT mpx DOT com DOT au
NNTP-Posting-Date: 22 Oct 1999 10:16:03 GMT
X-Mailer: Mozilla 4.5 [en] (Win95; I)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

hey there :)


i'm {unfortunately} using a 486DX2/66
i dunno if u wanted data from these, but i got the message "Sorry!  No
CPUID."


daniel.




Prashant TR 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.
> 
> Here it is:
> -----------
> #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;
> }
> -----------
> 
> Thank in advance.
> If possible, please CC to me as well.
> 
> ----
> Prashant TR
> __________________________________________________
> Do You Yahoo!?
> Bid and sell for free at http://auctions.yahoo.com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019