offset SavedGate; movsd; movsd; } } void __fastcall TForm1::Button1Click(TObject *Sender) { GotoRing0(); } ebx; // 开始恢复原中断门 mov esi offset OurGate; movsd; movsd; int IntNo; mov edi ebx; mov esi ebx; movsd; movsd; mov edi offset SavedGate; mov esi IntNo*8; mov edi dword ptr [IDTR+2]; add ebx ax; sidt fword ptr IDTR; mov ebx 16; mov [OurGate+6] ax; shr eax offset NewInt; mov [OurGate] 0x0000}; void GotoRing0() { asm { mov eax 0xee00 0x0028 SavedGate; WORD OurGate[4]={0 CR0; // 试验一下Ring3不能执行的特权指令 } void __declspec(naked) NewInt() //新中断 { Ring0Proc(); asm iretd; } #define IntNo 9 DWORDLONG IDTR 代码如下:void Ring0Proc() // 在Ring0中执行你自已的代码 { asm mov eax