变速齿轮Delphi实现
日期:2007年5月2日 作者: 查看:[大字体 中字体 小字体]-
{D7+Win98,不能用于2000}
unit MainUnit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
Button3: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure speed(count:word);stdcall;
const
ExceptionUsed=$03;
var
IDT:array [0..5]of byte;
lpOldGate:dword;
begin
asm
sidt IDT
mov ebx,dword ptr [IDT+2]
add ebx,8*ExceptionUsed
cli
mov dx,word ptr [ebx+6]
shl edx,16d
mov dx,word ptr [ebx]
mov [lpOldGate],edx
mov eax,offset @@Ring0Code
mov word ptr [ebx],ax
shr eax,16d
mov word ptr [ebx+6],ax
int ExceptionUsed
mov ebx,dword ptr[IDT+2]
add ebx,8*ExceptionUsed
mov edx,[lpOldGate]
mov word ptr [ebx],dx
shr edx,16d
mov word ptr [ebx+6],dx
jmp @@exit
@@Ring0Code:
mov al,$34
out $43,al
mov ax,Count
out $40,al
mov al,ah
out $40,al
iretd
@@exit:
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
speed($6000);//慢
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Speed($1044);
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
speed($500);
end;
end. - [1] [2] 下一页
-
- 变速齿轮Delphi实现 相关文章:
- ·变速齿轮Delphi实现
- 变速齿轮Delphi实现 相关软件
- 特别声明:本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作
- 者.文章版权归文章原始作者所有.对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转
- 载的文章有版权问题请联系编辑人员,我们尽快予以更正. 转载请注明来源:http://www.hackhome.com
上一篇:捕捉来自Thread的异常
下一篇:编写通用的程序更新模块
精品推荐
热点TOP10
- ·Delphi下的ADO使用方法!
- ·在Delphi中实现数据分析模块的动态报表
- ·在Delphi中控制扫描仪
- ·用拼音首字符来实现检索功能
- ·让Delphi的DBGrid支持鼠标轮
- ·自 动 隐 藏 的 声 象 按 钮
- ·OpenGL简介
- ·用Delphi制作动态有声标签
- ·从 实 例 看 Delphi 4 中 的 动 态
- ·Delphi中为DBGrid控件添加色彩
- ·常用的BCB & Delphi 函数
- ·产生不重复随机数的简便算法
- ·陈经韬2002原创资料
- ·Delphi2005试用版安装指南
- ·Delphi中ListBox控件的六种特效
- ·第三方控件使用方法
- ·关于SMTP和POP3使用及关于客户-服务端的自动连线问题
- ·关于MP3中的ID3V2格式探讨及我写的ID3V2读取源码
- ·监视打印机部分线程内容
- ·获取其他进程中ListView的文本
