首页
社区
课程
招聘
[求助]这个函数为什么会蓝屏?
2009-5-13 08:41 3495

[求助]这个函数为什么会蓝屏?

2009-5-13 08:41
3495
这个函数为什么会蓝屏?

PPTE GetPteAddress( PVOID VirtualAddress )
{
        PPTE pPTE = 0;
        __asm
        {
                cli                    //disable interrupts
                pushad
                mov esi, PROCESS_PAGE_DIR_BASE
                mov edx, VirtualAddress
                mov eax, edx
                shr eax, 22
                lea eax, [esi + eax*4]  //pointer to page directory entry
                test [eax], 0x80        //is it a large page?  
                              //运行到这里会蓝屏 eax=c0300010 syser 输入命令 d eax 看这里的值都是问号
                jnz Is_Large_Page      //it's a large page
                mov esi, PROCESS_PAGE_TABLE_BASE
                shr edx, 12
                lea eax, [esi + edx*4]  //pointer to page table entry (PTE)
                mov pPTE, eax
                jmp Done

                //NOTE: There is not a page table for large pages because
                //the phys frames are contained in the page directory.
                Is_Large_Page:
                mov pPTE, eax

                Done:
                popad
                sti                    //reenable interrupts
        }//end asm

        return pPTE;

}//end GetPteAddress

代码是网上找来的 编译后运行就蓝屏了 错误在哪?请大侠指出

阿里云助力开发者!2核2G 3M带宽不限流量!6.18限时价,开 发者可享99元/年,续费同价!

收藏
点赞0
打赏
分享
最新回复 (2)
雪    币: 364
活跃值: (152)
能力值: ( LV12,RANK:450 )
在线值:
发帖
回帖
粉丝
weolar 10 2009-5-13 09:00
2
0
也许是PAE模式
雪    币: 150
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
cpuArt 2009-5-13 09:23
3
0
谢谢楼上的回答 禁用PAE后 蓝屏不出现了
游客
登录 | 注册 方可回帖
返回