Previous: 4.80.1.2. CPU_getProcessorSpeed function To the Table of Contents Next: 4.80.1.4. CPU_haveMMX function
4.80.1.2. CPU_getProcessorSpeed function Table of Contents 4.80.1.4. CPU_haveMMX function

- 4.80.1.3. -
Table of Contents
4. Standard Units
4.80. ZenTimer - Full-featured ZTimer Library
4.80.1. ZenTimer Unit Procedures and Functions
4.80.1.3. CPU_getProcessorType function


4.80.1.3. CPU_getProcessorType function

Targets: MS-DOS, OS/2, Win32


ZenTimer Unit

Returns the type of processor in the system.

Declaration:
function CPU_getProcessorType: DWord;
Remarks:
Returns the type of processor in the system. Note that if the CPU is an unknown Pentium family processor that we don't have an enumeration for, the return value will be greater than or equal to the value of CPU_UnkPentium (depending on the value returned by the CPUID instruction).

Following constants are defined:
const
  CPU_unknown     = 0;      // Unknown proccessor
  CPU_i386        = 1;      // Intel 80386 processor
  CPU_i486        = 2;      // Intel 80486 processor
  CPU_Pentium     = 3;      // Intel Pentium(R) processor
  CPU_PentiumPro  = 4;      // Intel PentiumPro(R) processor
  CPU_PentiumII   = 5;      // Intel PentiumII(R) processor
  CPU_PentiumIII  = 6;      // Intel PentiumIII(R) processor
  CPU_Pentium4    = 7;      // Intel PentiumIII(R) processor
  CPU_UnkPentium  = $FFFF;  // Unknown Intel Pentium family processor
Also defined CpuTypes array strings.
const
  CpuTypes: array [0..8] of string = (
   'Unknown',
   'Intel 80386',
   'Intel 80486',
   'Intel Pentium(R)',
   'Intel PentiumPro(R)',
   'Intel PentiumII(R)',
   'Intel PentiumIII(R)',
   'Intel Pentium4(R)',
   'Unknown Pentium'
   );
Example:
{$ifndef __CON__}
  This program must be compiled for MS-DOS, OS/2 or Win32 console mode
{$endif}
uses ZenTimer;
begin
  Writeln('CPU is ', CpuTypes[CPU_getProcessorType]);
end.



Previous: 4.80.1.2. CPU_getProcessorSpeed function To the Table of Contents Next: 4.80.1.4. CPU_haveMMX function
4.80.1.2. CPU_getProcessorSpeed function Table of Contents 4.80.1.4. CPU_haveMMX function

- 4.80.1.3. -