📄 unit1.pas
字号:
unit Unit1; //CPUID
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Label1: TLabel;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
function getcpuid:string;
function cpuid:longint;assembler;register;
var
temp:longint;
begin
asm
push ebx
push edi
mov edi,eax
mov eax,1
dw $a20f
mov temp,edx
pop edi
pop ebx
end;
result:=temp;
end;
begin
result:=inttohex(cpuid,8);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Label1.Caption:='本机的 CPU_ID: “ '+getcpuid+' ”';
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -