SW500009 Microchip Technology, SW500009 Datasheet - Page 70

HI-TECH FOR DSPIC/PIC24

SW500009

Manufacturer Part Number
SW500009
Description
HI-TECH FOR DSPIC/PIC24
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC24 & DsPICr
Datasheet

Specifications of SW500009

Supported Families
PIC24
Core Architecture
PIC, DsPIC
Software Edition
Standard
Kit Contents
Software And Docs
Tool Type
Compiler
Mcu Supported Families
PIC24 MCUs And DsPIC DSCs
Lead Free Status / RoHS Status
Not applicable / RoHS Compliant
For Use With/related Products
DSPIC3X/PIC24
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
025
778-1003
778-1003
Function Calling Convention
3.6.2.1 Structure Return Values
Composite return values (struct and union) of size 4 bytes or smaller are returned in memory as
with 16-bit and 32-bit return values. For composite return values of greater than 4 bytes in size,
the structure or union is copied into the struct psect. Data is copied using a library routine which
uses FSR for the source address, btemp for the destination address and W for the structure size. For
example:
will exit with the following code:
3.7 Function Calling Convention
The baseline PIC devices have a two-level deep hardware stack which is used to store the return
address of a subroutine call. Typically, PICC uses a call instruction to transfer control to a C function
when it is called, however on baseline processors, the size of the stack severely limits the level of
nested C function calls possible.
bly jump instruction and a lookup table, or jump table. A function is called by jumping directly to
its address after storing the address of a jump table instruction which will be able to return control
back to the calling function. The address is stored as an object local to the function being called. The
56
By default, function calls on baseline PICs are implemented using a method involving an assem-
struct fred
{
} ;
struct fred return_struct(void)
{
}
movlw ?a_return_struct+0
movwf fsr
movlw structret
movwf btemp
movlw 8
global structbank
call structbank
int ace[4];
struct fred wow;
return wow;
C Language Features

Related parts for SW500009