int 13h in windows protected mode?

浪尽此生 提交于 2019-12-06 11:21:29

No, The Windows sub-system, upon initialization during boot, would have reconfigured the BIOS interrupt handling for the kernel as the BIOS calls are 16bit, not protected mode and hence int 13h would be invalid. That is the reason why there are drivers which are written for 32bit protected mode which bypasses the BIOS completely.

Which begs the question - why are you trying to do that?

Windows will kill your code on any attempt to communicate with the BIOS as if saying 'Hey, you code, you talk to me as the Windows Boss, you cannot bypass me, mwuah ha ha DO NOT TREAD ON OUTSIDE MY DOMAIN'.

The only time int 13h would be used would be during boot stage BEFORE windows loads or if you are using MSDOS as the system i.e. no windows, just boot into MSDOS, then the int 13h would be valid to use. In both cases, they would be 16bit mode and hence the BIOS would be accessible.

There is a common interrupt 0x2E I believe, that is the kernel's system call, as far as I know.

In short, I would not recommend trying to bypass the Windows system, that is why there is a such thing as a driver to do that for you, you would be better off to interact with the driver as part of the disk i/o subsystem and let that handle it for you.

With the right permissions (administrator has them), you can use Win32 CreateFile and related functions to access physical drives and logical partitions directly. See the MSDN documentation.

As others have mentioned it won't work unless you are using 16 bit - MSDOS, but if you are on a 32 bit system and have debug.exe you could try it for yourself. (You may crash your OS!) Simply enter the commands mov ax, etc.. int 13h etc.. then execute it.

Int 13h doesn't work in Windows try

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!