get CPU id (很全的)[5]

[入库:2005年8月18日] [更新:2007年3月25日]

本文简介:选择自 ypyrock 的 blog

  db $0f,$a2               /// cpuid
  test edx,$8000000
  jz noselfsnoop
  mov edx,0
  mov tempcheck,edx
noselfsnoop:
  pop edx
  pop ecx
  pop ebx
  pop eax
  end;
checkselfsnoop:=(tempcheck=0);
end;
function tcpudata.checkdebugtracestore:boolean;
label nodebugtracestore;
var tempcheck:dword;
begin
tempcheck:=1;
asm
  push eax
  push ebx
  push ecx
  push edx
  mov eax,1
  db $0f,$a2               /// cpuid
  test edx,$200000
  jz nodebugtracestore
  mov edx,0
  mov tempcheck,edx
nodebugtracestore:
  pop edx
  pop ecx
  pop ebx
  pop eax
  end;
checkdebugtracestore:=(tempcheck=0);
end;
function tcpudata.checkfxsavefxrstor:boolean;
label nofxsavefxrstor;
var tempcheck:dword;
begin
tempcheck:=1;
asm
  push eax
  push ebx
  push ecx
  push edx
  mov eax,1
  db $0f,$a2               /// cpuid
  test edx,$1000000
  jz nofxsavefxrstor
  mov edx,0
  mov tempcheck,edx
nofxsavefxrstor:
  pop edx
  pop ecx
  pop ebx
  pop eax
  end;
checkfxsavefxrstor:=(tempcheck=0);
end;
function tcpudata.checkmmx:boolean;
label nommx;
var tempcheck:dword;
begin
tempcheck:=1;
asm
  push eax
  push ebx
  push ecx
  push edx
  mov eax,1
  db $0f,$a2               /// cpuid
  test edx,$800000
  jz nommx
  mov edx,0
  mov tempcheck,edx
nommx:
  pop edx
  pop ecx
  pop ebx
  pop eax
  end;
checkmmx:=(tempcheck=0);
end;
function tcpudata.checkmmxplus:boolean;
label nommxplus;
var tempcheck:dword;
begin
tempcheck:=1;
asm
  push eax
  push ebx
  push ecx
  push edx
  mov eax,$80000001
  mov ebx,0
  mov ecx,0
  mov edx,0
  db $0f,$a2               /// cpuid
  test edx,$400000
  jz nommxplus
  mov edx,0
  mov tempcheck,edx
nommxplus:
  pop edx
  pop ecx
  pop ebx
  pop eax
  end;
checkmmxplus:=(tempcheck=0);
end;
function tcpudata.checksse:boolean;
label nosse;
var tempcheck:dword;
begin
tempcheck:=1;
asm
  push eax
  push ebx
  push ecx
  push edx
  mov eax,1
  db $0f,$a2               /// cpuid
  test edx,$2000000
  jz nosse
  mov edx,0
  mov tempcheck,edx
nosse:
  pop edx
  pop ecx
  pop ebx
  pop eax
  end;
checksse:=(tempcheck=0);
end;
function tcpudata.checksse2:boolean;
label nosse2;
var tempcheck:dword;
begin
tempcheck:=1;
asm
  push eax
  push ebx
  push ecx
  push edx
  mov eax,1
  db $0f,$a2               /// cpuid
  test edx,$4000000
  jz nosse2
  mov edx,0
  mov tempcheck,edx
nosse2:
  pop edx
  pop ecx
  pop ebx
  pop eax
  end;
checksse2:=(tempcheck=0);
end;
function tcpudata.checkamd3dnow:boolean;
label noamd3dnow;
var tempcheck:dword;
begin
tempcheck:=1;
asm
  push eax
  push ebx
  push ecx
  push edx
  mov eax,$80000001
  mov ebx,0
  mov ecx,0
  mov edx,0

本文关键:delphi cpu id
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top