Re: Differences between interrupt service routine (ISR) and a subroutine
- From: "Tom Lucas" <news@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 28 Nov 2006 18:27:01 -0000
"2005" <uws2003@xxxxxxxxx> wrote in message
news:1164736936.337323.40270@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi
This is another homework question isn't it?
What are the differences between ISR and a subroutine in embedded
systems, how about the following:
- interrupts are disabled by the microprocessor prior to calling the
isr
Not always - google for nested interrupts.
- isr's are always smaller
Not necessarily. ISRs _should_ be kept small but that doesn't always
happen.
- an isr cannot be written in C
Not true but when written in C you normally need an attribute to tell
the compiler that the function is to be an ISR.
- a subroutine always has arguments
Not true. void Subroutine(void); is a perfectly acceptable prototype.
- the CPU flags are stored on the stack in addition to the return
address
That is true (although I suspect some pedants will find an example of
systems that don't).
.
- Follow-Ups:
- References:
- Prev by Date: Differences between interrupt service routine (ISR) and a subroutine
- Next by Date: Re: Differences between interrupt service routine (ISR) and a subroutine
- Previous by thread: Differences between interrupt service routine (ISR) and a subroutine
- Next by thread: NewQ: Difference between an isr and a subroutine is that an isr has no arguments
- Index(es):
Relevant Pages
|