{D7+Win98,不能用於2000}
單位mainnit;
介面
用途
Windows,Messages,Sysutils,變體,類,圖形,控件,表單,表單,
對話,stdctrls;
類型
tform1 = class(tform)
Button 1:Tbutton;
Button2:tbutton;
Button3:Tbutton;
過程button1Click(發件人:tobject);
過程button2Click(發件人:tobject);
過程button3Click(發件人:tobject);
私人的
{私人聲明}
民眾
{公開聲明}
結尾;
var
form1:tform1;
執行
{$ r *.dfm}
過程速度(count:word); stdcall;
const
異常= $ 03;
var
IDT:字節的數組[0..5];
lpoldgate:dword;
開始
ASM
sidt idt
MOV EBX,DWORD PTR [IDT+2]
添加EBX,8*例外
CLI
mov dx,單詞ptr [ebx+6]
SHL EDX,16d
mov dx,word ptr [ebx]
mov [lpoldgate],edx
mov eax,offset @@ ring0code
mov word ptr [ebx],斧頭
Shr Eax,16d
mov Word ptr [EBX+6],斧頭
int例外
MOV EBX,DWORD PTR [IDT+2]
添加EBX,8*例外
MOV EDX,[lpoldgate]
mov Word Ptr [EBX],DX
Shr Edx,16d
mov Word Ptr [EBX+6],DX
JMP @@退出
@@ ring0code:
MOV AL,34美元
$ 43,al
MOV AX,計數
$ 40,Al
Mov Al,啊
$ 40,Al
IRETD
@@出口:
結尾;
結尾;
過程tform1.button1Click(發件人:tobject);
開始
速度($ 6000); //慢
結尾;
過程tform1.button2Click(發件人:tobject);
開始
速度($ 1044);
結尾;
過程tform1.button3click(發件人:tobject);
開始
速度($ 500);
結尾;
結尾。