As the PC is not address mapped(I am not sure,but I can not find the document),I want the program to goto a definit address after some operation have been finished, How can I modify the PC to goto the adress .
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
As the PC is not address mapped(I am not sure,but I can not find the document),I want the program to goto a definit address after some operation have been finished, How can I modify the PC to goto the adress .
Hi,
Just use a function pointer loaded with the literal addres you want to jump to:
void (*jump)(void) = (void (*)(void)) 0xXXXXXXXX;
jump();
You can define the value in your linker command file, simple add to it:
abs_jump_address = 0xXXXXXX;
An in the C code:
extern far void abs_jump_address(void);
abs_jump_address();