论文部分内容阅读
上一讲介绍了常用的程序设计方法,这一讲专门介绍计算机的中断概念和处理方法。什么是“中断”呢?譬如你正在画图,这时电话铃响了,你必须中断正在进行的画图工作去接电话,打完电话后你又继续画图。计算机的中断与此类似,当CPU正在执行一段程序时,如果外部设备提出中断请求,则CPU在恰当的时候响应中断,转去执行为外部设备服务的中断子程序,这个工作处理完毕后再返回到原来执行的程序。为了保证返回时能继续原先的工作,除了需保存返回地址外,还必须保留中断的现场情况。
The last talk about the commonly used programming methods, this talk devoted to the computer interrupt concepts and methods of treatment. For example, if you are drawing a picture, the phone rang. You must interrupt the drawing work in progress to pick up the phone. After you finish the call, you continue to draw the picture. Computer interrupts Similarly, when the CPU is executing a program, if the external device makes an interrupt request, the CPU responds to the interrupt at the appropriate time and goes to execute the interrupt subroutine that serves the external device and returns to work after it has been processed To the original implementation of the program. In order to ensure the return to continue the original work, in addition to the need to save the return address, but also must keep the scene of the interruption.