How to jump the program execution to a specific address in C?

前端 未结 8 777
感动是毒
感动是毒 2021-01-02 01:17

I want the program to jump to a specific address in memory and continue execution from that address. I thought about using goto but I don\'t have a label rather

8条回答
  •  盖世英雄少女心
    2021-01-02 01:52

    I Propos this code:

    asm(
    "LDR R0,=0x0a0000\n\t" /* Or 0x0a0000 for the base Addr. */
    "LDR R0, [R0, #4]\n\t" /* Vector+4 for PC */
    "BX R0"
    );
    

提交回复
热议问题