How Can We ADD SUBROUTINE just after main ...

General discussion on mikroC PRO for AVR.
Post Reply
Author
Message
tristacis
Posts: 1
Joined: 01 Feb 2016 08:37

How Can We ADD SUBROUTINE just after main ...

#1 Post by tristacis » 01 Feb 2016 08:52

Dear forum members I stuck at some point while creating the program. I was writing the main routine and some sub routine and want to those sub routine execution just after main routine in flash memory not want that compiler decide that I know how to use org directive but how do we know the main function length and place org value for that for example i have written..


void SUBROUTINE() org 0x0900 /// randomly
{
BLAH..
BLAH..
}
void main() org 0x0400
{
BLAH..
BLAH..
BLAH..
SUBROUTINE();
}

if mains end at 0x0500

how do we know that i should make subroutine organisation at 0x0501 in microc compiler I dont want to use asm...


I know the another way to do so by reading stats and function boundries in statistics but I want variable and easy method not ruse. :|

please help

Post Reply

Return to “mikroC PRO for AVR General”