直接从Windows调用BIOS例程 [英] calling BIOS routines directly from windows
问题描述
我对BIOS例程有疑问:
当我们在Windows中编写此代码时
mov ah,0x0e
mov al,' !'
int 0x10
这篇关于直接从Windows调用BIOS例程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
它真的直接调用BIOS例程还是将其转换为Win API?
换句话说,我们可以直接从Windows或GNU/Linux调用BIOS例程吗?但是不要认为您可以使用此类代码在Windows或Linux中调用BIOS.
您可以在应用程序模式下使用许多汇编代码,但几乎不使用BIOS.在x86实模式下,可以这样做,但这不是现代OS所使用的.例如,在您的代码中,int 0x10
将引发类似于常规保护错误"的异常.请记住,您正在x86的保护模式下工作.请参阅:
http://en.wikipedia.org/wiki/Protected_mode [ http://en.wikipedia.org/wiki/Real_mode [ http://en.wikipedia.org/wiki/Unreal_mode [mov ah, 0x0e
mov al, '!'
int 0x10
Does it really call BIOS routine directly or converts it to the Win API?
In other words, can we call BIOS routines directly from Windows or GNU/Linux?Of course it calls BIOS directly, tries to do so. But don''t think you can use such code to call BIOS in Windows or Linux.
You can use many assembly codes in the application mode, but hardly BIOS. In x86 real mode, you could, but this is not what modern OS use. For example, in your code, int 0x10
will throw the exception like General Protection Fault. Remember, you are working in the protected mode of x86. Please see:
http://en.wikipedia.org/wiki/Protected_mode[^].
See also:
http://en.wikipedia.org/wiki/Real_mode[^],
http://en.wikipedia.org/wiki/Unreal_mode[^].