Assembly Language Programming by Richard BLUM: 6.2.3 interrupted
There are two types of interruptions:
(1) Hardware interruption;
(2) software interruption.
Hardware Device generation hardware interruption.
An event occurs at the hardware layer by sending a signal with hardware interruption (for example, when an I/O port receives an input signal ).
Software Interruption During program generation.
They are signals that give control to another program.
When a program is interrupted, the called program is suspended and the called program takes over for running. The instruction pointer is transferred to the called program and continues to be executed from the called program. When the called program is completed, it can control the return to the called Program (using the interrupt return command ).
Software interruptions are provided by the operating system so that applications can use functions in the operating system and, in some cases, even access to the underlying BIOS system. In Microsoft DOS, 0x21 software interruption is provided for many functions. In Linux, 0x80 is used to provide low-level kernel functions.
Http://blog.sina.com.cn/s/blog_913c070a0100zse4.html
Interruption:
1) it may be unpredictable when something occurs. When the CPU is processing something, an external event (such as a level change, A pulse along the occurrence or timer overflow) requests the CPU to quickly process, so the CPU temporarily stops the current job and forwards it to the processing of the event. After the service interruption is handled, return to the place where the service was originally suspended to continue the original work.
2) for the deprived kernel, after the interruption scheduling is completed, the task is returned not to the original execution point immediately, but to the task with the highest priority in the ready state to start running.
3) No return value;
4) parameters cannot be passed.
Function:
1) when is it predictable;
2) After the function scheduling is completed, the original code snippet will be returned for further execution;
3) return value;
4) parameters can be passed.
Similarities:
1) the site is saved before scheduling;
2) call a Subcode.