News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Another CPU ID Program

Started by dedndave, January 03, 2010, 11:26:03 AM

Previous topic - Next topic

dedndave

hi folks
i would like to see how this runs on different machines
source is included, as always.............

          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 1
      bFamily: 15
   bExtFamily: 0
       bModel: 4
    bExtModel: 0
        bType: 0
        bStep: 3
     bMmxBits: 00000001b
   w3DNowBits: 0000000000000000b
     wSseBits: 0000000000000111b
   dwMiscBits: 00000000000000101011101101110111b
      szBrand: Intel(R) Pentium(R) 4 CPU 3.00GHz
     szVendor: GenuineIntel
        szMmx: MMX
      sz3DNow:
        szSse: SSE3

NOTE - this routine is preliminary
it has a few problems, not the least of which is that it may provide inaccurate information for non-Intel/AMD processors

;    -    dwMiscBits
;               0_1 values come from CPUID function 1
;               8_1 values come from CPUID function 80000001h
;
;               Bit(s) Source        Name    Description
;
;                 0    0_1 edx:00    FPU     on-chip FPU
;                 1    0_1 edx:01    VME     virtual mode enhancements
;                 2    0_1 edx:02    DE      debug extension
;                 3    8_1 ecx:00    LAHF64  lahf/sahf in 64-bit mode
;                 4    0_1 edx:04    RDTSC   rdtsc instruction
;                 5    8_1 edx:29    LM64    Intel 64/AMD long mode
;                 6    0_1 edx:06    PAE     physical address extension
;                 7    0_1 ecx:23    POPCNT  popcnt instruction
;                 8    0_1 edx:08    CX8     cmpxchg8 instruction
;                 9    0_1 edx:24    FXSR    fxsave/fxrstor instructions
;                10    8_1 edx:11    SYSCALL syscall/sysret instructions
;                11    0_1 edx:11    SEP     sysenter/sysexit instructions
;                12    0_1 edx:28    HTT     hyper-threading technology
;                13    0_1 ecx:13    CX16    cmpxchg16 instruction
;                14                          unused in this version
;                15    0_1 edx:15    CMOV    cmov instructions
;               16-23  0_1 ebx:16-23         total thread count if HTT = 1
;               24-31                        unused in this version

jj2007

          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 1
      bFamily: 6
   bExtFamily: 0
       bModel: 14
    bExtModel: 0
        bType: 0
        bStep: 8
     bMmxBits: 00000001b
   w3DNowBits: 0000000000000000b
     wSseBits: 0000000000000111b
   dwMiscBits: 00000000000000001000101101010111b
      szBrand: Intel(R) Celeron(R) M CPU        420  @ 1.60GHz
     szVendor: GenuineIntel
        szMmx: MMX
      sz3DNow:
        szSse: SSE3

brethren

          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 2
      bFamily: 15
   bExtFamily: 0
       bModel: 8
    bExtModel: 4
        bType: 0
        bStep: 2
     bMmxBits: 00000011b
   w3DNowBits: 0000000000000011b
     wSseBits: 0000000000000111b
   dwMiscBits: 00000000000000101011111101111111b
      szBrand: AMD Turion(tm) 64 X2 Mobile Technology TL-52
     szVendor: AuthenticAMD
        szMmx: MMX+
      sz3DNow: 3DNow!+
        szSse: SSE3
Press any key to continue ...

hutch--


          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 1
      bFamily: 6
   bExtFamily: 0
       bModel: 7
    bExtModel: 1
        bType: 0
        bStep: 10
     bMmxBits: 00000001b
   w3DNowBits: 0000000000000000b
     wSseBits: 0000000000011111b
   dwMiscBits: 00000000000001001011101101111111b
      szBrand: Intel(R) Core(TM)2 Quad CPU    Q9650  @ 3.00GHz
     szVendor: GenuineIntel
        szMmx: MMX
      sz3DNow:
        szSse: SSE4.1
Press any key to continue ...
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

hutch--


          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 1
      bFamily: 15
   bExtFamily: 0
       bModel: 4
    bExtModel: 0
        bType: 0
        bStep: 10
     bMmxBits: 00000001b
   w3DNowBits: 0000000000000000b
     wSseBits: 0000000000000111b
   dwMiscBits: 00000000000000011011101101111111b
      szBrand: Genuine Intel(R) CPU 3.80GHz
     szVendor: GenuineIntel
        szMmx: MMX
      sz3DNow:
        szSse: SSE3
Press any key to continue ...
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

FORTRANS

Hi,

Steve

          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000200h
    bVendorID: 1
      bFamily: 6
   bExtFamily: 0
       bModel: 8
    bExtModel: 0
        bType: 0
        bStep: 3
     bMmxBits: 00000001b
   w3DNowBits: 0000000000000000b
     wSseBits: 0000000000000001b
   dwMiscBits: 00000000000000001000101101010111b
      szBrand:
     szVendor: GenuineIntel
        szMmx: MMX
      sz3DNow:
        szSse: SSE
Press any key to continue ...

          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 1
      bFamily: 6
   bExtFamily: 0
       bModel: 13
    bExtModel: 0
        bType: 0
        bStep: 6
     bMmxBits: 00000001b
   w3DNowBits: 0000000000000000b
     wSseBits: 0000000000000011b
   dwMiscBits: 00000000000000001000101100010111b
      szBrand: Intel(R) Pentium(R) M processor 1.70GHz
     szVendor: GenuineIntel
        szMmx: MMX
      sz3DNow:
        szSse: SSE2
Press any key to continue ...

          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000200h
    bVendorID: 1
      bFamily: 5
   bExtFamily: 0
       bModel: 4
    bExtModel: 0
        bType: 0
        bStep: 3
     bMmxBits: 00000001b
   w3DNowBits: 0000000000000000b
     wSseBits: 0000000000000000b
   dwMiscBits: 00000000000000000000000100010111b
      szBrand:
     szVendor: GenuineIntel
        szMmx: MMX
      sz3DNow:
        szSse:
Press any key to continue ...

dedndave

#6
very cool guys - many thanks   :U

Vortex


          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 1
      bFamily: 15
   bExtFamily: 0
       bModel: 4
    bExtModel: 0
        bType: 0
        bStep: 9
     bMmxBits: 00000001b
   w3DNowBits: 0000000000000000b
     wSseBits: 0000000000000111b
   dwMiscBits: 00000000000000101011101101111111b
      szBrand: Intel(R) Pentium(R) 4 CPU 3.20GHz
     szVendor: GenuineIntel
        szMmx: MMX
      sz3DNow:
        szSse: SSE3

Gunner

          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 1
      bFamily: 15
   bExtFamily: 0
       bModel: 2
    bExtModel: 0
        bType: 0
        bStep: 7
     bMmxBits: 00000001b
   w3DNowBits: 0000000000000000b
     wSseBits: 0000000000000011b
   dwMiscBits: 00000000000000011001101101010111b
      szBrand: Intel(R) Pentium(R) 4 CPU 2.40GHz
     szVendor: GenuineIntel
        szMmx: MMX
      sz3DNow:
        szSse: SSE2
Press any key to continue ...
~Rob (Gunner)
- IE Zone Editor
- Gunners File Type Editor
http://www.gunnerinc.com

fearless

          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 1
      bFamily: 6
   bExtFamily: 0
       bModel: 7
    bExtModel: 1
        bType: 0
        bStep: 7
     bMmxBits: 00000001b
   w3DNowBits: 0000000000000000b
     wSseBits: 0000000000011111b
   dwMiscBits: 00000000000001001011101101111111b
      szBrand: Intel(R) Core(TM)2 Quad  CPU   Q9550  @ 2.83GHz
     szVendor: GenuineIntel
        szMmx: MMX
      sz3DNow:
        szSse: SSE4.1
Press any key to continue ...
ƒearless

Bill Cravener

          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 1
      bFamily: 15
   bExtFamily: 0
       bModel: 6
    bExtModel: 0
        bType: 0
        bStep: 4
     bMmxBits: 00000001b
   w3DNowBits: 0000000000000000b
     wSseBits: 0000000000000111b
   dwMiscBits: 00000000000000101011101101111111b
      szBrand: Intel(R) Pentium(R) D CPU 2.80GHz
     szVendor: GenuineIntel
        szMmx: MMX
      sz3DNow:
        szSse: SSE3
Press any key to continue ...
My MASM32 Examples.

"Prejudice does not arise from low intelligence it arises from conservative ideals to which people of low intelligence are drawn." ~ Isaidthat

BasilYercin


          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 2
      bFamily: 15
   bExtFamily: 0
       bModel: 15
    bExtModel: 1
        bType: 0
        bStep: 0
     bMmxBits: 00000011b
   w3DNowBits: 0000000000000011b
     wSseBits: 0000000000000011b
   dwMiscBits: 00000000000000001000111101111111b
      szBrand: AMD Sempron(tm) Processor 3000+
     szVendor: AuthenticAMD
        szMmx: MMX+
      sz3DNow: 3DNow!+
        szSse: SSE2
Press any key to continue ...

GregL


          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 1
      bFamily: 15
   bExtFamily: 0
       bModel: 6
    bExtModel: 0
        bType: 0
        bStep: 4
     bMmxBits: 00000001b
   w3DNowBits: 0000000000000000b
     wSseBits: 0000000000000111b
   dwMiscBits: 00000000000000101011101101111111b
      szBrand: Intel(R) Pentium(R) D CPU 3.20GHz
     szVendor: GenuineIntel
        szMmx: MMX
      sz3DNow:
        szSse: SSE3
Press any key to continue ...

MichaelW

P3:

          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000200h
    bVendorID: 1
      bFamily: 6
   bExtFamily: 0
       bModel: 7
    bExtModel: 0
        bType: 0
        bStep: 3
     bMmxBits: 00000001b
   w3DNowBits: 0000000000000000b
     wSseBits: 0000000000000001b
   dwMiscBits: 00000000000000001000101101010111b
      szBrand:
     szVendor: GenuineIntel
        szMmx: MMX
      sz3DNow:
        szSse: SSE
eschew obfuscation

Siekmanski

          EAX: 0
          ECX: 120
          EDX: 00403AB0h
       cbSize: 120
dwCoreAffMask: 00000000000000000000000000000001b
dwIdCpuStatus: 00000000h
    bVendorID: 1
      bFamily: 6
   bExtFamily: 0
       bModel: 15
    bExtModel: 0
        bType: 0
        bStep: 11
     bMmxBits: 00000001b
   w3DNowBits: 0000000000000000b
     wSseBits: 0000000000001111b
   dwMiscBits: 00000000000001001011101101111111b
      szBrand: Intel(R) Core(TM)2 Quad CPU    Q6600  @ 2.40GHz
     szVendor: GenuineIntel
        szMmx: MMX
      sz3DNow:
        szSse: SSSE3