我可以有一个具体的和有用的例子Int 13H AH=00h
.一个例子在nasm编码的处理器上运行在16位模式,使我可以理解在实践中,Int 13H AH=00h
必须有一个影响的代码,如果我删除它会导致错误或更改.
我在virtualbox上使用img软盘,我在 Boot 扇区上。
我理解了这个理论:Int 13H AH=00h
磁盘系统迫使控制器重新校准驱动器磁头(寻找磁道0)。
我想走得比理论更远,用真实的使用Int 13H AH=00h
的示例代码来理解。
我下面的tutorial使用了Int 13H AH=00h
,但它对代码没有影响,没有用,相反,我需要一个对Int 13H AH=00h
有真实的用处和影响的实际示例
2条答案
按热度按时间46scxncf1#
例如,这是qemu mbr代码。检查
******
之间的部分。di = 5
是从磁盘读取的尝试次数。因此,如果错误发生CF = 1
,代码递减di
,并在5次尝试后,我们有di = 0
,并在下一步代码生成消息"Error loading operating system"
。字符串
kr98yfug2#
Int 13H AH=00h在像VirtualBox这样的虚拟机上是无用的,就像这个文档说的那样。
如果Int 13H AH=00h稍后在VM之外使用,则需要保留它。
不可能有一个具体的和有用的例子对虚拟机上的Int 13 H AH= 00 h的代码有真实的影响。在google,stackoverflow,chatgpt上没有工作的例子
随着SSD驱动器的出现,该功能不再真正有任何用途,特别是因为int 0x13不再用于使用UEFI的现代操作系统,其中实模式BIOS功能仍然存在以实现向后兼容性。