获取CPU序列号的Delphi程序
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程序的更多相关文章
- C# 获取CPU序列号、网卡MAC地址、硬盘序列号封装类,用于软件绑定电脑
using System.Management; namespace GLaLa { /// <summary> /// hardware_mac 的摘要说明. /// </summ ...
- C#获取cpu序列号 硬盘ID 网卡硬地址以及操作注册表 .
转:http://blog.csdn.net/smartsmile2012/article/details/8682295 #region 获取cpu序列号 硬盘ID 网卡硬地址 /**/ /// & ...
- 获取硬盘序列号的Fortran程序
以前写了个获取硬盘序列号的fortran程序,但未经实证 program FortranDemo Use Kernel32 Implicit None Interface SUBROUTINE Get ...
- 获取CPU序列号、网卡MAC地址、硬盘序列号
<pre name="code" class="csharp"> using System; using System.Collections; u ...
- C# 中获取CPU序列号/网卡mac地址
1.cpu序列号2.mac序列号3.硬盘id在给软件加序列号时这三个应该是最有用的,可以实现序列号和机器绑定,对保护软件很有好处.哈哈. using System; using System.Ma ...
- Java获取CPU序列号
获取CPU序列号 /** * 获取CPU序列号 * @return */ public static String getCpuId() throws IOException { Process pr ...
- 几个获取Windows系统信息的Delphi程序
1.获取windows版本信息 可以通过Windows API函数GetVersionEx来获得. 具体程序如下: Procedure Tform1.Button1Click(sender:TObje ...
- 获取 CPU 序列号
function GetCpuID: string; var _eax, _ebx, _ecx, _edx: Longword; s, s1, s2: string; begin asm push e ...
- 获取CPU序列号
public string GetCPUSerialNo() { string cpuSerialNo = string.Empty; ManagementClass managementClass ...
随机推荐
- lvs负载均衡概述
- sudo passwd root输入普通用户密码后显示用户不再sudoers文件中
在写上一篇VirtualBox创建共享文件夹的时候,在运行下图授权时,root密码一直输入错误 然后我就在终端输入 su root,却发现需要密码,但我却不知道密码是什么 于是我就在终端输入如下命令, ...
- html 知识点
web服务本质 import socket def main(): sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.bind ...
- atom那些事儿
基于electron(Electron 的底层基于Chromium 和node.js)
- HOJ3237----BFS/DFS
/* 注意两点 . 不可以使用替换可用节点为不可用节点的方法进行DFS 因为角落也可能有油,替换了就出不来.(某学长指导) . 可用通过开一个数组(例如我的b[][]数组) 用了存储到当前位置剩余最大 ...
- Java笔记(十六)并发容器
并发容器 一.写时复制的List和Set CopyOnWrite即写时复制,或称写时拷贝,是解决并发问题的一种重要思路. 一)CopyOnWriteArrayList 该类实现了List接口,它的用法 ...
- Linux下redis 的部署、主从与集群
老男孩Python全栈6期——redis--------------------------Linux 操作系统 默认的内存管理机制RSS:page cache:anno page:Linux操作系统 ...
- node+express跨域处理
- npm install出现"Unexpected end of JSON input while parsing near"
打开命令行输入 npm cache clean --force 重新npm i,即可解决报错
- 基于socket构造c/s 架构软件
1.socket作用 socket层介于应用层和传输层之间,它起着连接应用层和传输层的功能,同时它能连接应用层和网络层. socket把复杂的tcp/ip协议隐藏在socket接口后面,对用户来说,一 ...