[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] assembly-c mix and interrupts
From: |
Joerg Wunsch |
Subject: |
Re: [avr-gcc-list] assembly-c mix and interrupts |
Date: |
Mon, 30 Nov 2009 06:18:06 +0100 (MET) |
darkschine <address@hidden> wrote:
> my code was actually already written in C and looked something like:
>
> ISR(vector){
> interruptHandler();
> }
Which is less than ideal because the compiler *always* has to preserve
all the registers that could possibly be destroyed by
interruptHandler(). If possible, always write the code directly into
the ISR.
> The compiler does not make sure that all necessary registers are
> saved and restored properly and apparently I am the first to notice
> this.
The chances that this is really the case are about 1E-6. ;-)
As the thread subject is about assembly-C mix, it is much more likely
that your mix is the reason rather than the compiler-generated code
that has been used by millions of AVR-GCC users before.
> I'm starting to wish I wrote the whole thing in assembly! ;)
You should probably have written the whole thing in C instead, as this
completely avoids the class of errors you are currently running into.
--
cheers, J"org .-.-. --... ...-- -.. . DL8DTL
http://www.sax.de/~joerg/ NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)
- [avr-gcc-list] assembly-c mix and interrupts, darkschine, 2009/11/19
- Re: [avr-gcc-list] assembly-c mix and interrupts, Julius Luukko, 2009/11/19
- Message not available
- Re: [avr-gcc-list] assembly-c mix and interrupts, Julius Luukko, 2009/11/20
- [avr-gcc-list] Re: assembly-c mix and interrupts, David Brown, 2009/11/20
- Re: [avr-gcc-list] assembly-c mix and interrupts, darkschine, 2009/11/29
- Re: [avr-gcc-list] assembly-c mix and interrupts,
Joerg Wunsch <=
- Re: [avr-gcc-list] assembly-c mix and interrupts, darkschine, 2009/11/30
- RE: [avr-gcc-list] assembly-c mix and interrupts, Weddington, Eric, 2009/11/30
- RE: [avr-gcc-list] assembly-c mix and interrupts, darkschine, 2009/11/30
- Re: [avr-gcc-list] assembly-c mix and interrupts, Paul Stoffregen, 2009/11/30
- RE: [avr-gcc-list] assembly-c mix and interrupts, darkschine, 2009/11/30
RE: [avr-gcc-list] assembly-c mix and interrupts, Weddington, Eric, 2009/11/19
Re: [avr-gcc-list] assembly-c mix and interrupts, Ruud Vlaming, 2009/11/19
[avr-gcc-list] Re: assembly-c mix and interrupts, David Brown, 2009/11/19
Re: [avr-gcc-list] assembly-c mix and interrupts, Erik Christiansen, 2009/11/20