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. 团队协作统一vue代码风格,vscode做vue项目时的一些配置

    1. 安装Vetur 扩展 主要是用于让vscode能识别vue文件,对vue代码进行高丽处理,并且它内置了一些代码格式化的设置 2. 安装ESLint 如果你的项目已经开启了eslint规范, 再有 ...

  2. 学习笔记——在vue中如何配置Jest(一)

    最近在搞Jest单元测试,如何在vue中安装和使用jest我就不说了,前一篇文章简单的说了一下在使用jest时遇到的一些问题,但是我觉得并没有真正的解决的很好.后面会在学习过程中更新前面的那篇文章,加 ...

  3. shell几种字符串加密解密的方法

    第一种:[ Python 与 Bash Shell 的结合 ]这个命令会让你输入一个字符串,然后会再输出一串加密了的数字. 加密代码[照直输入]:python -c 'print reduce(lam ...

  4. 7种方法实现移动端Retina屏幕1px边框效果

    在Reina(视网膜)屏幕的手机上,使用CSS设置的1px的边框实际会比视觉稿粗很多.在之前的项目中,UI告诉我说我们移动项目中的边框全部都变粗了,UI把他的设计稿跟我的屏幕截图跟我看,居然真的不一样 ...

  5. BZOJ.4558.[JLOI2016]方(计数 容斥)

    BZOJ 洛谷 图基本来自这儿. 看到这种计数问题考虑容斥.\(Ans=\) 没有限制的正方形个数 - 以\(i\)为顶点的正方形个数 + 以\(i,j\)为顶点的正方形个数 - 以\(i,j,k\) ...

  6. 教你用Windows自带工具给优盘/移动硬盘添加密码

    教你用Windows自带工具给优盘/移动硬盘添加密码 本文中优盘,移动硬盘和分区操作方式一样,为方便描述,下文将只说优盘 优盘成了很多人每天都会用到的工具,有时候自己优盘会存着一些不希望别人看到的文件 ...

  7. 考前停课集训 Day7 嘞

    Day7 正如一个大佬提醒的那样,棕名是会被嘲讽的 果然…… 在洛谷里…… 算了. 不必在意. 马上就要退役了. NOIP,开始的地方,也是结束的地方. 如果一群OIer比你小 还会嘲讽你, 你就该退 ...

  8. [jzoj]3760.【BJOI2014】Euler

    Link https://jzoj.net/senior/#main/show/3760 Description 欧拉函数  φ(n)  定义为不超过正整数 n 并且与 n 互素的整数的数目. 可以证 ...

  9. eclipse中安装pydev插件出现duplicate location

    eclipse中安装pydev插件出现duplicate location,主要是因为之前已经填写了该地址并且已经加载了,具体的解决办法见下链接: http://jingyan.baidu.com/a ...

  10. Linux安装gcc时碰到的有关问题解决(解决gcc依赖有关问题)

    Linux安装gcc时碰到的有关问题解决(解决gcc依赖有关问题) rpm安装gcc时碰到的有关问题解决(解决gcc依赖有关问题) 提示:error: Failed dependencies: clo ...