Board index » delphi » How to check 486? Is x87 used?

How to check 486? Is x87 used?

Anybody can tell me how to check if the CPU in use is 486? Using the
following program seems to be able to check up to 386 and 387, but on 486
(even dx) and P, I got '2-0', stand for 386 or higher without x87. In this
case, does TP still use x87 code?

The program is like this:

{start here}

{$A+,B-,D+,E+,F-,G+,I+,L+,N+,O-,P-,Q-,R-,S+,T-,V+,X+}
{$M 16384,0,655360}
begin
  writeln(test8086, '-', test8087)
end.

{that it}

Libing PENG (libing.p...@rug.ac.be)
--------------------------------------------------------------
Q: What's the difference between a software producer and God?
A: There are people who believe what God says.
--------------------------------------------------------------

 

Re:How to check 486? Is x87 used?


Conrad Wei-Li Song (conrads...@mail.utexas.edu) wrote:

:       The problem is that test8086 and test8087 only test up to a 386.  To
: test for a 486 you'll have to add some code:

: { This code assumes that processor is at least a 386.  It checks to see if }
: { the AC bit (which is not present on a 386) can be modified.  The AC bit  }
: { is bit #18.                                                              }
: { This code modified from the Intel486 DX Microprocessor Data Book.        }

Thanks!

--

Libing PENG (libing.p...@rug.ac.be)
--------------------------------------------------------------
Q: What's the difference between a software producer and God?
A: There are people who believe what God says.
--------------------------------------------------------------

Re:How to check 486? Is x87 used?


Quote
Libing Peng (lp...@eduserv.rug.ac.be) wrote:

: Conrad Wei-Li Song (conrads...@mail.utexas.edu) wrote:

: :     The problem is that test8086 and test8087 only test up to a 386.  To
: : test for a 486 you'll have to add some code:

: : { This code assumes that processor is at least a 386.  It checks to see if }
: : { the AC bit (which is not present on a 386) can be modified.  The AC bit  }
: : { is bit #18.                                                              }
: : { This code modified from the Intel486 DX Microprocessor Data Book.        }

: Thanks!

I know the code for long.
My recent problem is , how to distinguish this to be P5 or a 486??
: --

Thanks

Re:How to check 486? Is x87 used?


and...@news.hk.super.net (Mr Anders Lee) wrote:

Quote
>I know the code for long.
>My recent problem is , how to distinguish this to be P5 or a 486??
>: --

There is an excellent routine that can distinguish between 8086,
80286, 80386, 80486, and Pentinum.  It is in the book "Turbo Pascal
6.0 Techniques and Utilities" by Neil Rubenking.

Check it out.

Mark

Other Threads