User manual

156
mikoBasic PRO for PIC32
MikroElektronika
Prototype
sub procedure DisableContextSaving()
Description Use the DisableContextSaving() to instruct the compiler not to automatically perform context-
switching. This means that no register will be saved/restored by the compiler on entrance/exit from
interrupt service routine. This enables the user to manually write code for saving registers upon
entrance and to restore them before exit from interrupt.
Parameters None.
Returns Nothing.
Requires This routine must be called from main.
Example
DisableContextSaving() instruct the compiler not to automatically perform
context-switching
Notes None.
DisableContextSaving
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 specied 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 specied routines always.
Parameters - FuncName: function name
Returns Nothing.
Requires Nothing.
Example
sub procedure rst(p, q as byte)
...
SetFuncCall(second) let linker know that we will call the routine
‘second’
...
end sub
Notes None.
SetFuncCall