Hardware CPU Detection? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Hardware CPU Detection?

SephirothSephiroth Fayetteville, NC, USAPosts: 1,035Member
How would I detect whether a user's processor is an AMD or an Intel? I ask because I am starting to learn the extras (MMX, SSE, and SSE2 now, and 3DNow later) and depending on what chip the user has, I'll know which instructions to test for.

-[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]

Comments

  • AsmGuru62AsmGuru62 Posts: 6,519Member
    : How would I detect whether a user's processor is an AMD or an Intel? I ask because I am starting to learn the extras (MMX, SSE, and SSE2 now, and 3DNow later) and depending on what chip the user has, I'll know which instructions to test for.
    :
    : -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]
    :
    [blue]Try this:

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/getsysteminfo.asp

    Did not use it myself, but from the description sounds like it can detect the CPU type.[/blue]
  • Johnny13Johnny13 Posts: 128Member
    What's wrong with CPUID? it does no doubt return the brand.[code]Input OutPut
    EAX=0 EBX,EDX,ECX 12 chars ID string containing manufacturer
    ('GenuineIntel', 'UMC UMC UMC ',
    'AuthenticAMD', 'CyrixInstead','NexGenDriven')[/code]
Sign In or Register to comment.