Notice Of Closure

Please note that this website is due to close down on 15th June 2020.

In the interim I will try to move as much content as possible over to my GitHub account. Thanks to everyone who has supported the site over the years.

» Help

How to retrieve the CPU vendor ID


Here is a little assembly code routine that shows how to retrieve the computer's CPU vendor ID.

function GetCPUVendor: string;
  aVendor: array [0 .. 2] of LongWord;
  iI, iJ: Integer;
    push  ebx
    xor   eax, eax
    dw    $A20F // CPUID instruction
    mov   LongWord ptr aVendor, ebx
    mov   LongWord ptr aVendor[+4], edx
    mov   LongWord ptr aVendor[+8], ecx
    pop   ebx
  for iI := 0 to 2 do
    for iJ := 0 to 3 do
      Result := Result +  
        Chr((aVendor[iI] and ($000000ff shl(iJ * 8))) shr(iJ * 8));
Author: Unknown
Contributor: Bill Miller
Added: 2014-01-22
Last updated: 2014-01-22

« Return to contents »