Saturday, May 30, 2009

Interrupt and its use in assembly language

Interrupt:
The interrupt is defined loosely to any exceptional event that causes CPU to temporarily transfer its control from currently executing program to a different program, which provide service to the exceptional event. An interrupt may be generated by a number of sources, which may be either internal or external to the CPU.
OCCURRING:
There is a problem here in the computer’s ability to know when a peripheral device has performed a given operation. Suppose we wish to find some data on a magnetic tape and are unwilling to wait for the tape to be searched, desiring to perform other calculations while waiting. If the computer must continually look to see whether the tape drive now has the data available, then time is lost and programming complexity is increased. To alleviate this, the computer bus is generally provided with control lines which are called interrupt lines, and a peripheral device can raise one of these lines when it has completed an action and is ready for attention.
-------
Interrupt use in Assembly language:
The 8085 has five interrupt signals that cab be used to interrupt a program execution. One of the signals, INTR (interrupt Request), is identical to the 8080A microprocessor interrupt signal (INT) the others are enhancements to the 8080A . the microprocessor acknowledges an interrupt by the ITA ( interrupt acknowledge) signal.
The 8080A interrupt processes controlled by the interrupt Enable flip-flop , which is internal to the processor can be set or reset by using software instructions. If the flip-flop is enabled and the input to the interrupt signal INT (pin 14) goes high, the microprocessor is interrupted. This is a mask able interrupt and can be disabled. The 8080A has only one interrupt signal; it does not have a non mask able interrupt. The 8085 has an interrupt signal called INTR (pin 10) functionally identical with the 8080A interrupt. However, the 8085 has additional interrupt signals as well. To avoid confusion, we will refer to the interrupt process that is common to both the processors as the 8080A interrupt. The best way to describe the 8080A interrupt process is to compare it to a telephone with a blinking light instead of a rig.
The cpu responds to the interrupt signal by storing the return address from the program counter into a memroy stack and then control branches to a service routine the processes the required I/O transfer. The way that the unit to another. In principle , there are two methods for accomplishing this. One is called the branch address is assigned to a fixed location in memory. in a vectored interrupt , the source that interrupts supplies the branch information computers the interrupt vector to the computer. The information is called the interrupt vector.

No comments:

Post a Comment