Цитата(Tech @ Nov 29 2005, 11:46)

Как в IAR AVR должны передаваться аргументы во внешнюю ассемблерную функцию?
Register assignment using the new calling convention
In the new calling convention, as many parameters as possible are passed in registers.
The remaining parameters are passed on the stack. The compiler may change the order
of the parameters in order to achieve the most efficient register usage.
The algorithm for assigning parameters to registers is quite complex in the new calling
convention. For details, you should create a list file and see how the compiler assigns the
different parameters to the available registers, see Creating skeleton code, page 96.
Below follows some examples of combinations of register assignment.
A function with the following signature (not C++):
void foo(char __far * a, int b, char c, int d)
would have a allocated to R18:R17:R16, b to R21:R20 (alignment requirement
prevents R20:R19), c to R19 (first fit), and d to R23:R22 (first fit).
...
Все это из файла EWAVR_CompilerReference.pdf
AVR® IAR C/C++ Compiler Reference Guide Fourth edition: February 2005
Part number: CAVR-4
стр.103 (физически это стр.125)
Да и вот еще:
This guide applies to version 4.x of AVR IAR Embedded Workbench