一个x86汇编中断服务程序可以调用另一个中断? [英] Can an x86 assembly interrupt service routine call another interrupt?

查看:347
本文介绍了一个x86汇编中断服务程序可以调用另一个中断?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以在独立的X686环境调用中断,从中断服务程序中?

Can I call interrupt from within interrupt service routine in freestanding x686 environment?

所以可以做到以下几点:

So can one do the following:

isr:
    pusha
    call doSomething
    int 21h
    popa
iret

如果有可能,那么做这些嵌套中断,有任何显著地下空洞?

If it's possible, then do these nested interrupts have any significant cave ins?

推荐答案

这是中断调用仅仅是类似于一个普通的呼叫与推标志。什么 IRET 所做的就是返回并弹出标志。所以,是的,中断可以递归调用。在另一中断处理程序实际调用中断发生的时间,由于硬件中断在系统上连续运行,除非您禁用,当然他们。

An interrupt call is just analogous to a regular call with flags pushed. And what iret does is it returns and pops the flags. So, yes, interrupts can be called recursively. Actually calling an interrupt in another interrupt handler happens all the time due to hardware interrupts running continuously on the system, unless you disable them of course.

硬件中断有进一步的限制,而同样的处理程序中处理完之前,通常不会被调用。中断处理程序通知硬件通过信号的中断控制器,以提供新的中断。

Hardware interrupts have further restrictions, and usually are not called while inside the same handler before it finishes processing. Interrupt handlers notify the hardware to provide new interrupts by signaling the interrupt controller.

这篇关于一个x86汇编中断服务程序可以调用另一个中断?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆