什么是x86处理器的中断标志的实际使用的例子吗? [英] What are examples of practical usage of x86 processor interrupt flag?

查看:168
本文介绍了什么是x86处理器的中断标志的实际使用的例子吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

维基百科说的中断标志决定CPU是否会处理屏蔽硬件中断。如果该标志被设置为1,屏蔽的硬件的中断将被处理,如果清除 - 忽略

我难以理解的是屏蔽或非屏蔽中断。

I'm having difficulty understanding what is maskable or non-maskable interrupt.


  1. 什么是IF标志的实际用途?

  2. 什么是屏蔽/非屏蔽中断,并有什么区别?

P.S。我刚开始深入到汇编语言和处理器的内部运作,所以简单的英语为5岁吧。如果它当然可以=)。

P.S. I'm just starting to delve into Assembly language and inner workings of the processor, so plain English as for 5 years old please. If it is possible of course =).

推荐答案

一个典型的情况如在DOS编程是你禁止中断修改中断处理程序表之前,当你完成重新启用中断。

A typical scenario e.g. in DOS programming is where you disable interrupts before you modify the interrupt handler table and reenable interrupts when you are done.

如果中断被允许发生当你修改表,你会不知道旧的或新的处理程序地址(或各占一半)将要被使用。

If interrupts were allowed to occur when you were modifying the table, you wouldn't know if the old or the new handler address (or half of each) was going to be used.

您也可以有你想要当你在维修等待处理中断再次中断处理程序本身prevent它内禁止从被称为中断的情况。

You can also have situations where you want to disable interrupts within an interrupt handler itself to prevent it from being called again while you are servicing the pending interrupt.

不可屏蔽中断通常是不管发生中断标志的当前状态的 - 我不记得有过处理那些

Non-maskable interrupts are generally ones that occur regardless of the current status of the interrupt flag - I don't recall having ever had to deal with those.

这篇关于什么是x86处理器的中断标志的实际使用的例子吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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