[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] Interrupt vector redirection scheme
From: |
Dmitry K. |
Subject: |
Re: [avr-libc-dev] Interrupt vector redirection scheme |
Date: |
Tue, 4 Sep 2007 08:41:03 +1100 |
User-agent: |
KMail/1.5 |
On Monday 03 September 2007 19:59, Michael Schulze wrote:
> Hi,
>
> > Very interesting idea. Though there is a discrepancy: function
> > redir_func() keeps the SREG already after it is scratched (sbiw,
> > eor).
>
> I can't find the definition of that function. Where is it defined?
Your file redirvec.S:
redir_func:
sbiw ZL, 0 ; test for zero
...
eor r1, r1 ; clear zero register, as assumed to
...
in r0, _SFR_IO_ADDR(SREG) ; load status. SREG is a SFR macro
push r0 ; save loaded status. Assumes irqs are
[...]
> You have a very thin HAL or small operating
> system which offers the possibility of loading and executing of
> different applications (one at a time) depending on the actual state or
> environment.
[...]
Aha, I have understood. Yes, it is an absolutely other level
of program design. The simplest decision with the 'if' operator
is not so convinient here.
Regards,
Dmitry.