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

branch to absolute address

I wrote a piece of code running in 8051 microcontroller. The code is to write another piece of code to memory starting from, say, 0x1234. After this is done, it will jump to address 0x1234 to execute the code there. In assembly, just ljmp 0x1234
But how to do this in C51?

  • You can't.
    This is not the sort of thing that the 'C' language is designed to do.

    The closest you could get would be to cast the address as a function, and call it.
    Obviously, this would leave a couple of bytes on the stack. But you could do a bit of assembler to clear that up