SW500009 Microchip Technology, SW500009 Datasheet - Page 68

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
Functions
This construct is primarily intended for equating the address of a C identifier with a microprocessor
special function register. To place a user-defined variable at an absolute address, define it in a
separate psect and instruct the linker to place this psect at the required address as specified in Section
3.12.3.5.
no symbols associated with them. Because the linker never sees any symbols for these objects it is
not aware that they have been allocated space and it cannot make any checks for overlap of absolute
variables with other objects. It is entirely the programmer’s responsibility to ensure that absolute
variables are allocated memory that is not already in use.
3.6 Functions
3.6.1 Function Argument Passing
The method used to pass function arguments depends on the size of the argument or arguments.
area of the called function. If there are subsequent arguments, these arguments are also passed in the
argument area of the called function. The argument area is referenced by an offset from the symbol
?_function, where function is the name of the function concerned.
W register, with subsequent arguments being passed in the argument area of the called function.
function builds up the variable argument list and passes a pointer to the variable part of the argument
list in btemp. Btemp is the label at the start of the temp psect (the psect used for temporary data).
The function test() will receive the parameter b in its function argument block and a in the W register.
A call:
would generate code similar to:
54
Absolute variables are accessed using the address specified with their definition, thus there are
If there is only one argument, and it is one byte in size, it is passed in the W register.
If there is only one argument, and it is greater than one byte in size, it is passed in the argument
If there is more than one argument, and the first argument is one byte in size, it is passed in the
In the case of a variable argument list, which is defined by the ellipsis symbol ..., the calling
Take, for example, the following ANSI-style function:
_Portvar EQU 06h
void test(char a, int b)
{
}
test( a, 8);
C Language Features

Related parts for SW500009