07.04.2013 Views

MPLAB C Compiler for PIC24 MCUs and dsPIC DSCs ... - Microchip

MPLAB C Compiler for PIC24 MCUs and dsPIC DSCs ... - Microchip

MPLAB C Compiler for PIC24 MCUs and dsPIC DSCs ... - Microchip

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

FIGURE 4-2: CALL OR RCALL<br />

Stack grows<br />

toward<br />

greater<br />

addresses<br />

Run Time Environment<br />

The called function (callee) can now allocate space <strong>for</strong> its local context (Figure 4-3).<br />

FIGURE 4-3: CALLEE SPACE ALLOCATION<br />

Stack grows<br />

toward<br />

greater<br />

addresses<br />

Return addr [23:16]<br />

Return addr [15:0]<br />

Parameter 1<br />

SP (W15)<br />

FP (W14)<br />

© 2008 <strong>Microchip</strong> Technology Inc. DS51284H-page 71<br />

:<br />

Parameter n-1<br />

Parameter n<br />

Caller’s Frame<br />

Local Variables<br />

<strong>and</strong> Temporaries<br />

Previous FP<br />

Return addr [23:16]<br />

Return addr [15:0]<br />

Parameter 1<br />

:<br />

Parameter n-1<br />

Parameter n<br />

Caller’s Frame<br />

SP (W15)<br />

FP (W14)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!