SW500007 Microchip Technology, SW500007 Datasheet - Page 72

PICC-18 PRO

SW500007

Manufacturer Part Number
SW500007
Description
PICC-18 PRO
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC18r
Datasheets

Specifications of SW500007

Supported Families
PIC18
Core Architecture
PIC
Software Edition
Professional
Kit Contents
Software And Docs
Mcu Supported Families
PIC18
Tool Function
Compiler
Tool Type
Compiler
Lead Free Status / RoHS Status
Not applicable / RoHS Compliant
For Use With/related Products
PIC18 Series
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
015P
778-1002
778-1002
Functions
3.6.2 Function Return Values
Function return values are passed to the calling function as follows:
3.6.2.1 8-Bit Return Values
Eight-bit values are returned from a function in the W register. For example, the function:
will exit with the following code:
3.6.2.2 16-Bit and 32-bit Return Values
16-bit and 32-bit values are returned in temporary memory locations, with the least significant word
in the lowest memory location. For example, the function:
will exit with the following code:
3.6.2.3 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 the library routine
structcopy which uses FSR0 for the source address, FSR1 for the destination address and W for
the structure size. For example:
58
char return_8(void){
}
movlw
return
int return_16(void){
}
movlw
movwf
movlw
movwf
return
return 0;
return 0x1234;
0
34h
btemp
12h
btemp+1
C Language Features

Related parts for SW500007