Datasheet
Directive orgal
If the user wants to place its routines, constants, etc, above a specified address in
ROM, #pragma orgall directive should be used:
#pragma orgall 0x200
This doesn't apply to IVT, Handler table and Goto table.
Directive funcorg
You can use the #pragma orgall directive to specify the starting address of a rou-
tine in ROM using routine name only:
#pragma funcorg <func_name> <starting_address>
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 func-
tions listed in the called_func list.
These functions will be linked if the function
func_name is called in the code no mat-
ter 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.
105
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Specifics
mikroC PRO for AVR
CHAPTER 3