next up previous contents index
Next: 3.14.3 Assembler Routine (non-reentrant) Up: 3.14 Interfacing with Assembler Previous: 3.14.1 Global Registers used   Contents   Index

3.14.2 Registers usage

Unless the called function is declared as _naked, or the --callee-saves/--all-callee-saves command line option or the corresponding callee_saves pragma are used, the caller will save the registers (R0-R7) around the call, so the called function can destroy they content freely.

If the called function is not declared as _naked, the caller will swap register banks around the call, if caller and callee use different register banks (having them defined by the _using modifier).

The called function can also use DPL, DPH, B and ACC observing that they are used for parameter/return value passing.



2008-12-05