hi,
i'm having a problem with jmp from assembly code to C
example:
#pragma asm . . . ljmp a52 #pragma endasm void test(){ . . . a52: . . }
here the compiler output is given as a52 - undefined symbol. please help me to do method jmp from assembly code to C code. As this is involved with very old code. it worked with SPJ Compiler.
Thanks in Advance
The Keil compiler does not accept it.
End of story.
Seems to be highly dependent on the compiler being used. You could perhaps review the .LST files, but the symbol is likely to be localized to the subroutine.
What exactly is the purpose for doing this? Perhaps there is a more rational way to solve the problem without using non-standard hacks?
No, you're not. Your problem is that you somehow got it into your head that you should be able to jump to some arbitrary label in the middle of a C function. Not even C code is allowed to do that, and for very good reason, too. And as if that wasn't enough, you presume to know what the internal symbol name of a label inside some function must be. Well, you presume incorrectly.
In other words, the problem is that what you're trying to do makes no sense whatsoever, and the compiler is fully correct in rejecting your attempt.