-
-
[原创]获取CPU信息
-
发表于:
2009-7-4 13:47
9217
-
研究了一下 Intel CPU的CPUID指令
搞了一个晚上~弄出来这个东西~!
呵呵``没什么技术~别见笑
附件是完整原文件,和偶收集的一点资料
编译环境:winxp sp3 RadASM
.586p
.model flat ,stdcall
NULL equ 0
MB_OK equ 0
ExitProcess PROTO :DWORD
MessageBoxA PROTO :DWORD,:DWORD,:DWORD,:DWORD
includelib kernel32.lib
includelib user32.lib
include windows.inc
.data
szText db 128 dup(?)
szCaption db "CPU 型号",0
.code
start:
lea edi,szText
mov eax,80000002h
cpuid
mov [edi+4*0],eax
mov [edi+4*1],ebx
mov [edi+4*2],ecx
mov [edi+4*3],edx
mov eax,80000003h
cpuid
mov [edi+4*4],eax
mov [edi+4*5],ebx
mov [edi+4*6],ecx
mov [edi+4*7],edx
mov eax,80000004h
cpuid
mov [edi+4*8],eax
mov [edi+4*9],ebx
mov [edi+4*10],ecx
mov [edi+4*11],edx
push 0
lea eax,szCaption
push eax
lea eax,szText
push eax
push NULL
call MessageBoxA
xor eax,eax
push eax
call ExitProcess
end start
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课