BIOS int 13H,AH=02(读软盘)和堆栈段
如果我不初始化堆栈段,会发生什么?
某些情况下会导致读取错误吗?
If I don't initial stack segments, what will happen?
Will when some case cause reading errors?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您调用软件中断(或进行任何调用)时,您的堆栈段寄存器最好具有有效值,因为
int
(或call
)指令需要一个有效的堆栈用于将返回地址存储到您的代码中。此外,被调用的子例程通常期望有一个有效的堆栈,可以在其中推送一些寄存器以完成其工作。事实上,您的堆栈段寄存器最好始终具有有效值,否则一旦发生第一个周期性中断,所有内容都会崩溃并烧毁。
Your stack segment register better have a valid value when you invoke a software interrupt, (or make any call,) because the
int
(orcall
) instruction needs a valid stack in which to store the return address to your code. Also, the invoked subroutine usually expects that there is a valid stack in which it canpush
some registers in order to do its job.As a matter of fact, your stack segment register better have a valid value at all times, otherwise everything will crash and burn as soon as the first periodic interrupt occurs.