Unit CPUid; 

 Interface 

 Type 

 TCpuType = (cpu8086, cpu286, cpu386, cpu486, cpuPentium); 

 Function CpuType : TCpuType;
Function CpuTypeString : String; Implementation Uses
SysUtils; Function CpuType : TCpuType; ASSEMBLER;
Asm
// 8086 CPU 检测
push ds
pushf
pop bx
mov ax, 0fffh
and ax, bx
push ax
popf
pushf
pop ax
and ax, 0f000h
cmp ax, 0f000h
mov ax, cpu8086
je @@End_CpuType // 80286 CPU检测 or bx, 0f000h
push bx
popf
pushf
pop ax
and ax, 0f000h
mov ax, cpu286
jz @@End_CpuType // 386 CPU 检测 db 66h
pushf
db 66h
pop ax
db 66h
mov cx, ax
db 66h
xor ax, 0h
dw 0004h
db 66h
push ax
db 66h
popf
db 66h
pushf
db 66h
pop ax
db 66h
xor ax, cx
mov ax, cpu386
je @@End_CpuType // 486 CPU 检测 db 66h
pushf
db 66h
pop ax
db 66h
mov cx, ax
db 66h
xor ax, 0h
dw 0020h
db 66h
push ax
db 66h
popf
db 66h
pushf
db 66h
pop ax
db 66h
xor ax, cx
mov ax, cpu486
je @@End_CpuType // Pentium CPU 检测 db 66h
mov ax, 1
dw 0
db 66h
db 0Fh
db 0a2h
db 66h
and ax, 0F00H
dw 0
db 66h
shr ax, 8
sub ax, 1 @@End_CpuType: pop ds End; Function CpuTypeString : String; Var Kind : TCpuType; Begin Kind := CpuType; Case Kind Of cpu8086 : Result := '8086';
cpu286 : Result := '286';
cpu386 : Result := '386';
cpu486 : Result := '486';
cpuPentium : Result := 'Pentium'; Else Result := Format ('P%d', [Ord (kind)]); End; End; End.

获取CPU序列号的Delphi程序的更多相关文章

  1. C# 获取CPU序列号、网卡MAC地址、硬盘序列号封装类,用于软件绑定电脑

    using System.Management; namespace GLaLa { /// <summary> /// hardware_mac 的摘要说明. /// </summ ...

  2. C#获取cpu序列号 硬盘ID 网卡硬地址以及操作注册表 .

    转:http://blog.csdn.net/smartsmile2012/article/details/8682295 #region 获取cpu序列号 硬盘ID 网卡硬地址 /**/ /// & ...

  3. 获取硬盘序列号的Fortran程序

    以前写了个获取硬盘序列号的fortran程序,但未经实证 program FortranDemo Use Kernel32 Implicit None Interface SUBROUTINE Get ...

  4. 获取CPU序列号、网卡MAC地址、硬盘序列号

    <pre name="code" class="csharp"> using System; using System.Collections; u ...

  5. C# 中获取CPU序列号/网卡mac地址

    1.cpu序列号2.mac序列号3.硬盘id在给软件加序列号时这三个应该是最有用的,可以实现序列号和机器绑定,对保护软件很有好处.哈哈.   using System; using System.Ma ...

  6. Java获取CPU序列号

    获取CPU序列号 /** * 获取CPU序列号 * @return */ public static String getCpuId() throws IOException { Process pr ...

  7. 几个获取Windows系统信息的Delphi程序

    1.获取windows版本信息 可以通过Windows API函数GetVersionEx来获得. 具体程序如下: Procedure Tform1.Button1Click(sender:TObje ...

  8. 获取 CPU 序列号

    function GetCpuID: string; var _eax, _ebx, _ecx, _edx: Longword; s, s1, s2: string; begin asm push e ...

  9. 获取CPU序列号

    public string GetCPUSerialNo() { string cpuSerialNo = string.Empty; ManagementClass managementClass ...

随机推荐

  1. JVM之浮点数(float)表示

    1. 浮点数的组成:符号位.指数位.尾数位. 1.1 符号位: 占1位,表示正负数: 1.2 指数位: 占8位: 1.3 尾数位: 占23位. 2.  浮点数的表示: 2.1 取值: sflag * ...

  2. BZOJ-8-2115: [Wc2011] Xor

    https://www.lydsy.com/JudgeOnline/problem.php?id=2115 题意 : 给出一个连通无向图,求从1到n异或和最小的路径. 思路 :随意找一条简单路径 1- ...

  3. Web Service 消息格式

    当客户端和Web Service服务器进行通信时,他们交换消息.客户端发送请求消息到Web Service服务器. Web Service服务器响应并返回消息.这就像普通的HTTP,浏览器发送一个HT ...

  4. 使用 universalimageloader 缓存图片的配置类及使用方法

    0.gradle 配置 dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:juni ...

  5. VC6.0学习C语言入门SDK

    度网盘链接 VC6.0    密码:t6bd VS2010 密码:3of2 C语言入门教程 在线视频地址(PS此链接摘抄至博主lellansin) Acfun.tv:http://www.acfun. ...

  6. Android的系统属性:build.propSystemProperties

    获取build.prop的键值信息: String sn = SystemProperties.get(SN_INFO); 其中key值为: public static final String SN ...

  7. [HNOI2017/AHOI2017]影魔

    Description: 奈文摩尔有 \(n\) 个灵魂,他们在影魔宽广的体内可以排成一排,从左至右标号 \(1\) 到 \(n\).第 \(i\) 个灵魂的战斗力为 \(k_i\),灵魂们以点对的形 ...

  8. 【Newtonsoft.Json】自己实现JsonConverter ,精简返回的数据结果

    Newtonsoft.Json的Json数据转换很好用,也提供了很多直接使用的类型

  9. BZOJ2240 : ural1676 Mortal Combat

    首先如果最大匹配不足$n$个那么显然每条边都不可能在匹配为$n$的方案中. 对于一条边$(u,v)$,如果它可能在最大匹配中,有两种情况: $1.(u,v)$是当前方案的匹配边. $2.$可以沿着$( ...

  10. C++学习笔记51:排序

    //直接插入排序函数模板 template <class T> void insertionSort(T a[], int n) { int i, ; T temp; ; i < n ...