Go to the first, previous, next, last section, table of contents.

Calling conventions

The first three words of arguments are passed in registers `R0' through `R2'. All remaining arguments are pushed onto the stack, last to first, so that the lowest numbered argument not passed in a register is at the lowest address in the stack. The registers are always filled, so a double word argument starting in `R2' would have the most significant word in `R2' and the least significant word on the stack.

When a function is compiled with the default options, it must return with registers `R3' through `R6' unchanged. Registers `R0' through `R2' are volatile.

Note that functions compiled with different calling conventions cannot be run together without some care.


Go to the first, previous, next, last section, table of contents.