answersLogoWhite

0


Best Answer

interrupt is a signal caused by I/O devices where as subroutine is a part of the program which is excuted rapidly

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Difference between interrupt and subroutine in computer?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is main difference between macro and subroutins?

marco expand where it invoked ,subroutine will go where the subroutine is defined....


3 What is the difference between a function procedure and a subroutine procedure?

Both a function and a subroutine are examples of out-of-line execution calls to code. The main difference is that a function call can be part of an expression and returns a value, whereas the subroutine can be called standalone and does not return a value.


What is the difference between polling and vector interrupt system?

In a computer, a vectored interrupt is an I/O interrupt that tells the part of the computer that handles I/O interrupts at the hardware level that a request for attention from an I/O device has been received and also identifies the device that sent the request. A vectored interrupt is an alternative to a polled interrupt , which requires that the interrupt handler poll or send a signal to each device in turn in order to find out which one sent the interrupt request.


What is the difference between polling and vectored interrupt system with example?

i need compare between vectored interrupt system and polling


What is the difference between branch instruction call sub routine program and interrupt?

Branch Instruction A branch (or jump on some computer architectures, such as the PDP-8 and Intel x86) is a point in a computer program where the flow of control is altered. The term branch is usually used when referring to a program written in machine code or assembly language; in a high-level programming language, branches usually take the form of conditional statements, subroutine calls or GOTO statements. An instruction that causes a branch, a branch instruction, can be taken or not taken: if a branch is not taken, the flow of control is unchanged and the next instruction to be executed is the instruction immediately following the current instruction in memory; if taken, the next instruction to be executed is an instruction at some other place in memory. There are two usual forms of branch instruction: a conditional branch that can be either taken or not taken, depending on a condition such as a CPU flag, and an unconditional branch which is always taken. Call Subroutine instructions Call Subroutine instructions and Return From Subroutine instructions within the instruction stream. The first stage stores a return address in a return register when a Call Subroutine instruction is predicted. The first stage predicts a return to the return address in the return register when a Return From Subroutine instruction is predicted. A second stage decodes each Call Subroutine and Return From Subroutine instruction in order to maintain a Return Stack Buffer that stores a stack of return addresses. Each time the second stage decodes a Call Subroutine instruction, a return address is pushed onto the Return Stack Buffer. Correspondingly, each time the second stage decodes a Return From Subroutine instruction, a return address is popped off of the Return Stack Buffer. The second stage verifies predictions made by the first stage and predicts return addresses for Return From Subroutine instructions that were not predicted by the first stage. A third stage executes Return From Subroutine instructions such that the predictions are verified. Finally, a fourth stage retires Return From Subroutine instructions and ensures that no instructions fetch after a mispredicted return address are committed into permanent state. Program interrupt an interrupt is an asynchronous signal from hardware indicating the need for attention or a synchronous event in software indicating the need for a change in execution. A hardware interrupt causes the processor to save its state of execution via a context switch, and begin execution of an interrupt handler. Software interrupts are usually implemented as instructions in the instruction set, which cause a context switch to an interrupt handler similar to a hardware interrupt. Interrupts are a commonly used technique for computer multitasking, especially in real-time computing. Such a system is said to be interrupt-driven. An act of interrupting is referred to as an interrupt request ("IRQ").


What is the operational difference between the IRET and RET instructions?

Usually return from interrupt restores the flags so that the interrupted code can continue to execute properly. Return from subroutine does not need to do that instruction is used intentionally in that flow of code and known that the flags are or are not destroyed depending on the architecture.


Difference between internal and external interrupt?

internal interrupt is synchronous with the program while external interrupts are asynchronous.


Difference between delay subroutine and ordinary subroutine in context of 8085?

a subroutine is a portion of the code within a larger program which performs a specific function and is independent of remaining code.....delay routines are subroutines used for maintaining the timings of various operations in microprocessor


What are subroutine linkages?

The Mechanism that makes possible to transfer control between the calling program and Subroutine is reffered to as SUBROUTINE LINKAGE


What is difference between vectored and non vectored interrupts?

Vector interrupt --> when processor directly call the respective isr when interrupt occurs so, address of respective isr is usually save in register. Non interrupt Vector --> In this case when interrupt occurs the processor calls a generic isr and in generic isr uaer has to call respective isr by checking status register.


What is the difference between interrupt and system call?

A processor executes its instructions one after another. One of the instructions it can execute is a subroutine call, where it suspends executing the current set of instructions, goes off and executes another set and then returns. This is referred to as 'calling a subroutine.' A 'system call' is a call to a subroutine built into the system, rather than a call to one in your own program. Calls and interrupts work similarly, in that to process an interrupt, the processor goes off and executes a different set of instructions and returns. However, calls are synchronous, they occur in fixed order determined by the program, and the processor only has to remember where it was so it can return to the proper place. Interrupts are asynchronous, they can occur at any time, such as when you hit a key on the keyboard, thus the processor has to remember its place and its state, because the interrupt likely has nothing to do with what it was doing at the time of the interrupt.Disturbing other


What is the difference between software and hardware interrupt?

The difference is that a hardware interrupt is a signal relayed to a system's CPU directly because of some piece of hardware, such as a keyboard or mouse. A software interrupt is a signal sent to indicate that something within a piece of software requires attention.