Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.

ID: 21103, IA32 CPUID 3.0 for Delphi

by Al Gun Email: Anonymous

Intel's CPUID function. New functions added, some bugs fixed. Advanced HT testing and list of CPU's, Updated 10/03/2007
Download Details
FTP  download also available
CDN Login Required to Download. (You will be redirected to the login page if you click on the Download Link)
To download this, you must have registered:
A free membership

For Delphi, Version 4.0  to 7.0 2437 downloads
Copyright: No significant restrictions

Size: 1,080,885 bytes
Updated on Fri, 09 Mar 2007 20:35:17 GMT
Originally uploaded on Tue, 18 Nov 2003 03:22:50 GMT
SHA1 Hash: D4C5E2D21435174A8FC2DD4242C7224EDD71EDAB
MD5 Hash: 8F39252397D5965483934311FD2A05CE

    Explore the files in this upload

Update 10/03/2007
On terminate program end with exception or run time error. Bug fixed. A dangling pointer was created by pHT variable.

Update 27/12/2006

Code revised and updated according to Intel's CPUID Instruction Dcoumentation (September 2006, DN. 241618-031)

Updated 17/12/2004
> Bugs creating external error messages,
> Hyper-Threading Testing more enjoyable now :)

> When optimization enabled, it was an external error in HTErrorStr

> Availability of CPUID instruction
> Hyper-Technology Advanced functions
> CPU affinity testing
> Running an application with CPU affinity
> Thread functions

Previous Fixes...
>Cache & TLB information, improved.
>CPU Feature information, FPU On-Chip info was missing
Next two functions translated from CpuId3a.asm
* GetCpuType: Identifies processor type;
* 0=8086/8088 processor
* 2=Intel 286 processor
* 3=Intel386(TM) family processor
* 4=Intel486(TM) family processor
* 5=Pentium(R) family processor
* 6=P6 family of processors
* F=Pentium 4 family of processors
* GetFpuType: Identifies FPU type;
* 0=FPU not present
* 1=FPU present
* 2=287 present (only if _cpu_type=3)
* 3=387 present (only if _cpu_type=3)

following functions modified / added from CpuID3b.asm and Eric L. Palmer's WinCPUTest program.

function CheckHT: BOOL;
Returns True if Hyper-Threading Technology supported.

function HTErrorStr: string;
Retrieves Hyper-Threading Technology error string.

function GetCpuSpeed(msTime: DWORD): Double;
Initialises CPU’s clock speed and calculates CPU frequency
default is 1000ms = 1second

procedure InitCacheInfo(CacheList: TStrings);
Initialises CPU’s Cache and TLB (Translation Lookaside Buffers)
information and passes string values to TStrings, which could be
used with a TMemo, TList, or any other component with TStrings.

procedure InitCPUInfo;
Main procedure of all above, initialises pre-defined CPUInfo,
CpuFeatures, CpuExtFeatures structures and the information can be
used to display all the information about default CPU.

All source code and help file included.

CpuID3a.pas had some assembler issues, fixed, 8086/88, 286 cpu detecting snippets removed, and line 203 invalid operan combination of mov di, replaced with mov edi to make code applicable for Delphi 7 version, because I got lots of complaints about that issue.
-by the way this took for two years to fix, ehhhmmmm, I am an Australian guys, things work around here a little bit slow, sorry!

   Latest Comments  View All Add New

Move mouse over comment to see the full text

Could not retrieve comments. Please try again later.

Server Response from: ETNACDC03