Re: AVR IAR C Compiler

Aug 04, 2005 2 Replies


Due to this, the register values are being tampered, which were set


> by other functions.

Hold it right there. You're writing a C function. If it wants to take values from other functions, put them in the argument list, not in registers.


C is not assembler, so don't pretend otherwise. One of the differences is that you *have to* give up control over the CPU registers, and leave them to the C compiler to work with.


You're fighting the C compiler instead of using it. Don't.

Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de) Even if all the snow were burnt, ashes would remain.

Big parameter list? Have you considered simply passing a pointer to a structure?

Steve

formatting link

"Vidya" skrev i meddelandet news: snipped-for-privacy@f14g2000cwb.googlegroups.com...

Why not push these registers in your function before use?

A. P. Richelieu

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required