This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

LJMP in C?

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.

Parents
  • Martin,

    There's not really some better "embedded C" way to do something like this. In general, most everyone will tell you that if you have some code that requires you to generate a specific assembly instruction or do something specific with a register, then that routine belongs in assembly since C was made to abstract all that away. There are always work-arounds, but like my example, they're generally not pretty.

Reply
  • Martin,

    There's not really some better "embedded C" way to do something like this. In general, most everyone will tell you that if you have some code that requires you to generate a specific assembly instruction or do something specific with a register, then that routine belongs in assembly since C was made to abstract all that away. There are always work-arounds, but like my example, they're generally not pretty.

Children
No data