是否有任何方法可以在没有蓝屏的情况下在x64 Vista SP2(AMD64)上保存\加载中断描述符表?这是我在MASM中制作蓝屏的代码:
IDTINFO struct
word idtLimit ?
dword lowIDTBase ?
dword highIDTBase ?
IDTINFO ends
getInterruptDescriptorTable proto :DWORD
.code
getInterruptDescriptorTable PROC idtInfo_arg:DWORD
local idtInfo_locl :IDTINFO
sidt idtInfo_locl
lea eax, idtInfo_locl
push [eax]
mov eax, idtInfo_arg
pop [eax]
getInterruptDescriptorTable endp
end
嗯,我是汇编语言的新手,所以可能会有一些明显的错误。
编辑以下是.h文件中的原型:
extern void getInterruptDescriptorTable(IDTINFO*);
在这里,调用.c文件:
IDTINFO idtInfo = {0};
getInterruptDescriptorTable(&idtInfo);
C:中的IDTINFO结构
typedef struct
{
unsigned short idtLimit;
unsigned int lowIDTBase;
unsigned int highIDTBase;
} IDTINFO;
x64系统受补丁保护机制保护。没有bsod,您无法访问idt:http://en.wikipedia.org/wiki/Kernel_Patch_Protection
很可能是将idtInfo_arg
声明为DWORD
的问题,因为您处于64位模式,所以需要将其更改为QWORD
,并使用rax
而不是eax
。
你能发布调用你函数的代码吗?