delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/08/03/16:55:40

Sender: root AT delorie DOT com
Message-ID: <37A7563C.FF6D5A62@inti.gov.ar>
Date: Tue, 03 Aug 1999 17:51:08 -0300
From: salvador <salvador AT inti DOT gov DOT ar>
Organization: INTI
X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i686)
X-Accept-Language: es-AR, en, es
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Re: CPU identification (Was: Re: uname -m ?)
References: <Pine DOT SUN DOT 3 DOT 91 DOT 990803104713 DOT 1847N-100000 AT is> <37A6E429 DOT 6245A110 AT softhome DOT net>
Reply-To: djgpp-workers AT delorie DOT com

Laurynas Biveinis wrote:

> Eli Zaretskii wrote:
> > Because there's no easy way to identify the exact CPU type.  If you
> > know about a safe way to do that without crashing on all supported
> > platforms, including NT and DOSEmu, please submit a change for the
> > `uname' library function.
>
> I wrote program for this. It uses ways to detect CPU type
> strictly according to Pentium II documentation. It doesn't
> use any privileged instructions, so it should (?) work on
> NT

NT defines an environment variable with the CPU ID, so I think the program
should first try with it if NT is detected.

> and DOSEMU. However:
>   - It detects any better than 486 clone as "i586"
>   - it won't detect any 386/486 clone which differently
> uses undefined EFLAGS bits
>   - it has been tested only on one system and correctly
> reported that original Intel Pentium II 333MHz is a "i686"

Why don't use the routines found in Allegro? they are very well tested.

SET

--
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Visit my home page: http://welcome.to/SetSoft or
http://www.geocities.com/SiliconValley/Vista/6552/
Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org
                    set AT ieee DOT org set-soft AT bigfoot DOT com
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA Phone: +(5411) 4759 0013



- Raw text -


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