User manual

148
mikoC PRO for dsPIC
MikroElektronika
Directive funcorg
You can use the #pragma funcorg directive to specify the starting address of a routine in ROM using routine name
only:
#pragma funcorg <func_name> <starting_address>
Related topics: Indirect Function Calls
Indirect Function Calls
If the linker encounters an indirect function call (by a pointer to function), it assumes that any of the functions addresses
of which were taken anywhere in the program, can be called at that point. Use the #pragma funcall directive to instruct
the linker which functions can be called indirectly from the current function:
#pragma funcall <func_name> <called_func>[, <called_func>,...]
A corresponding pragma must be placed in the source module where the function func_name is implemented. This
module must also include declarations of all functions listed in the called_func list.
These functions will be linked if the function func_name is called in the code no matter whether any of them was called
or not.
Note : The #pragma funcall directive can help the linker to optimize function frame allocation in the compiled
stack.
Related topics: Linker Directives