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

前端 未结 8 758
感动是毒
感动是毒 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 02:02

    This is what I am using for my bootstrap loader(MSP430AFE253,Compiler = gcc,CodeCompeserStudio);

    #define API_RESET_VECT 0xFBFE
    #define JUMP_TO_APP()  {((void (*)()) (*(uint16_t*)API_RESET_VECT)) ();}
    

提交回复
热议问题