|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Technical Support On-Line Manuals C251 User's Guide |
C251 User's GuidePassing in RegistersThe C251 Compiler uses the registers R11 and R0-R7 for parameter passing. A maximum of 9 parameters may be passed in registers. All other parameters are passed using fixed memory locations or the 251 hardware stack (depending on the function reentrant / static attribute). The following table lists which registers are used for passing parameters.
For parameter passing to C51 functions, 3 byte pointers are used; 3 byte pointers are passed in the registers R1/R2/R3. Refer to PARM51 or PARM251 for more information. C251 allocates registers in the order R11, R7, R6, R5, R4, R3, R2, R1, and R0. If a register is already in use for a parameter variable, C251 continues down the list until a free register is found. The following examples clarify how registers are selected for parameter passing.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||