flat assembler
Message board for the users of flat assembler.
Index
> Windows > Check Intel processor support . |
Author |
|
revolution 13 Sep 2017, 11:52
You can use the CPUID instruction to obtain the capabilities. It has many input values and output values. Too many to list here. The Wikipedia page might not be up to date so check the manuals give all the details about how to find the data.
|
|||
13 Sep 2017, 11:52 |
|
catafest 14 Sep 2017, 13:31
Thank's for link - I will follow the link.
Also I will come with a answer if I solve this issue. |
|||
14 Sep 2017, 13:31 |
|
catafest 14 Sep 2017, 20:53
I think I have found a solution based on some internet links:
Code: format PE GUI 4.0 entry start include 'win32ax.inc' ;--- http://x86.renejeschke.de/html/file_module_x86_id_45.html section '.code' code readable executable start: ; INVOKE CPUID FUNCTION 0x00000000 xor eax,eax cpuid ; EXTRACT VENDOR STRING FROM mov [out_buffer.vendor_ebx],ebx mov [out_buffer.vendor_edx],edx mov [out_buffer.vendor_ecx],ecx ; CHECK FOR FUNCTION 0x00000001 cmp eax,0x00000001 jl .NoCPUID_FN1 ; INVOKE CPUID FUNCTION 0x00000001 mov eax,0x00000001 cpuid ; TEST FOR HTT Hyper-Threading Technology test edx,00010000000000000000000000000000b jz .NoHTT mov [out_buffer.htt_arch4],'YES ' .NoHTT: ; TEST FOR MMX test edx,00000000100000000000000000000000b jz .NoMMX mov [out_buffer.mmx_ach4],'YES ' .NoMMX: ; TEST FOR SSE test edx,00000010000000000000000000000000b jz .NoSSE mov [out_buffer.sse_ach4],'YES ' .NoSSE: ; TEST FOR SSE2 test edx,00000100000000000000000000000000b jz .NoSSE2 mov [out_buffer.sse2_ach4],'YES ' .NoSSE2: ; TEST FOR SSE3 test ecx,00000000000000000000000000000001b jz .NoSSE3 mov [out_buffer.sse3_ach4],'YES ' .NoSSE3: .NoCPUID_FN1: ; DISPLAY RESULTS AND QUIT invoke MessageBox,NULL,out_buffer,'CPUID',MB_OK+MB_ICONINFORMATION invoke ExitProcess,0 jmp $ ;--- SECTION DATA STRUCTURE FOR MESSAGE BOX section '.data' data readable writeable out_buffer: db 'VENDOR',2,9,'- ' .vendor_ebx dd 0 .vendor_edx dd 0 .vendor_ecx dd 0 db 9,13,10 db 'NoHTT',2,9,'- ' .htt_arch4 dd 'NO ' db 9,10 db 'MMX',2,9,'- ' .mmx_ach4 dd 'NO ' db 9,10 db 'SSE',2,9,'- ' .sse_ach4 dd 'NO ' db 9,10 db 'SSE2',2,9,'- ' .sse2_ach4 dd 'NO ' db 9,10 db 'SSE3',2,9,'- ' .sse3_ach4 dd 'NO ' db 9,10 db 0 ; end out_buffer ;--- DEFAULT DATA INCLUDES section '.idata' import data readable library kernel32,'kernel32.dll',\ user32,'user32.dll' include 'api\kernel32.inc' include 'api\user32.inc' http://www.felixcloutier.com/x86/CPUID.html https://software.intel.com/sites/default/files/article/405250/how-to-detect-new-instruction-support-in-the-4th-generation-intel-core-processor-family.pdf http://x86.renejeschke.de/html/file_module_x86_id_45.html https://imgur.com/INd74Hk |
|||
14 Sep 2017, 20:53 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.