User manual
236
mikoBasic PRO for PIC32
MikroElektronika
In rst case, compiler will recognize your attempt, but in order to save Flash space, and boost performance, it will
automatically replace all instances of this constant in code with it’s literal value.
In the second case your constant will be placed in Flash in the exact location specied.
To place a routine on a specic address in Flash memory you should write the following:
sub procedure proc(dim par as word) org 0x9D000000
‘ Procedure will start at the address 0x9D000000;
...
end sub
org directive can be used with main routine too. For example:
program Led_Blinking
main: org 0x9D000000 ‘ main procedure starts at 0x9D000000
...
end
Directive orgall
Use the orgall directive to specify the address above which all routines and constants will be placed. Example:
main:
orgall(0x9D000000) ‘ All the routines, constants in main program will be above the
address 0x9D000000
...
end.