Mikroelektronika MIKROE-724 データシート
158
mikoBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
Prototype
sub procedure SetFuncCall(dim FuncName as string)
Description
If the linker encounters an indirect function call (by a pointer to function), it assumes that any routine
whose address was taken anywhere in the program can be called at that point if it’s prototype matches
the pointer declaration.
Use the SetFuncCall directive within routine body to instruct the linker which routines can be called
indirectly from that routine:
SetFunCCall (called_func[, ,...])
Routines specified in the
SetFunCCall
argument list will be linked if the routine containing
SetFunCCall
directive is called in the code no matter whether any of them was explicitly called or
not.
Thus, placing
SetFuncCall
directive in main will make compiler link specified routines always.
Parameters
-
FuncName
: function name
Returns
Nothing.
Requires
Nothing.
Example
sub procedure first(p, q as byte)
...
SetFuncCall(second) ‘ let linker know that we will call the routine
‘second’
...
end sub
Notes
The
SetFuncCall
directive can help the linker to optimize function frame allocation in the compiled
stack.
SetFuncCall
Prototype
sub procedure SetOrg(dim RoutineName as string, dim address as longint)
Description
Use the
SetOrg()
routine to specify the starting address of a routine in ROM.
Parameters
-
RoutineName
: routine name
-
address
: starting address
Returns
Nothing.
Requires
This routine must be called from main.
Example
SetOrg(UART1_Write, 0x1234)
Notes
None.
SetOrg