Hi, everybody
I have to make an indirect call or jump but i do not know how to do it.
For example i have to make the following jump or call:
Address FE00: CA 00 54 78 53 FA ....
I have to make a jump or call at the address which
contained in address FE00 (jump to CA00 address).
Can anyone tell me how can i do it in assemby or C?
I am using the mc9s12dg256 controller and codewarrior v3.1.
Thanks
Nikos
Solved! Go to Solution.
asm:
asm{
LDX 0xFE00
JMP 0,X
}
C:
typedef void (** near pfptr)(void);
{
(*((pfptr)(void*)0xFE00))(); // jump to subroutine, whose 16bit address is stored at 0xFE00
}
asm:
asm{
LDX 0xFE00
JMP 0,X
}
C:
typedef void (** near pfptr)(void);
{
(*((pfptr)(void*)0xFE00))(); // jump to subroutine, whose 16bit address is stored at 0xFE00
}
Thank you for your help, kef