Re: NewQ: Difference between an isr and a subroutine is that an isr has no arguments
- From: James Beck <jim@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 28 Nov 2006 17:50:42 -0500
In article <12mp47ilq7kab2d@xxxxxxxxxxxxxxxxxx>, grante@xxxxxxxx says...
On 2006-11-28, Wilco Dijkstra <Wilco_dot_Dijkstra@xxxxxxxxxxxx> wrote:No, but you need to know where your "arguments" are and if they aren't
Since you don't know what is in the resisters when the ISR is
jumped to the idea of function arguments is meaningless.
The unstated assumption seems to be that function arguments are
passed in registers?
somehow passed by a register or a pointer in a register then you are
just talking about a global variable and that is not a function argument
in my book.
.
Well I can see some good uses for interrupts with arguments,
making interrupt routines even easier to write in C. I'm sure
someone has patented the idea already as it is quite obvious...
Obvious but impossible (in general). The hardware designer has
no way of knowing how the ISR is going to expect arguments to
be passed. If varies from one language to the next, from one
compiler to the next, and even from one build to the next when
compiler flags are changed.
- References:
- Differences between interrupt service routine (ISR) and a subroutine
- From: 2005
- Re: Differences between interrupt service routine (ISR) and a subroutine
- From: Tom Lucas
- NewQ: Difference between an isr and a subroutine is that an isr has no arguments
- From: 2005
- Re: NewQ: Difference between an isr and a subroutine is that an isr has no arguments
- From: James Beck
- Re: NewQ: Difference between an isr and a subroutine is that an isr has no arguments
- From: Wilco Dijkstra
- Re: NewQ: Difference between an isr and a subroutine is that an isr has no arguments
- From: Grant Edwards
- Differences between interrupt service routine (ISR) and a subroutine
- Prev by Date: Re: NewQ: Difference between an isr and a subroutine is that an isr has no arguments
- Next by Date: Re: NewQ: Difference between an isr and a subroutine is that an isrhas no arguments
- Previous by thread: Re: NewQ: Difference between an isr and a subroutine is that an isr has no arguments
- Next by thread: Re: NewQ: Difference between an isr and a subroutine is that an isr has no arguments
- Index(es):