What's the best way to do this in C? #pragma ASM LJMP APP_START; //Run app #pragma ENDASM ..or, is that it? APP_START does not exist. This is the launch point of an application loader. The actual app will be done as an entirely different project to be loaded higher in memory at a later time. Thanks.
The language per se doesn't really have the notion of a call that doesn't return. ... with the possible exception of the standard library function exit() which does just that ;-) A return from the end of main would achieve the same thing, i.e. the "C way" of doing this would be to terminate the loader's main() like this:
typedef void (*t_application)(void); t_application application = 0; void main() { /* do stuff here */ /* ... */ if (!application) while(1) ; /* endless loop */ application(); }