Hello, I write some code for a microcontroller (251 family) in C language. depending on some stuff, i will continue in a way or another way, so i will call the desired function as Function(); This will lead to an ECALL in asm, which mean PC up on the stack.. How can i explain to compiler that a EJMP is desired in my case, i do not need to come back ever, i do not need the PC on the stack (remember, i do this in C...) The function called is (also) in another C file (not the same file), where there are more files into one project. Any suggestion would be appreciated, thanX
In C the goto is local to the function.
i have some intrinsic functions defined in keil stuff which tells to compiler to use basic asm commands (intrinsic.h), so, using this command _ejmp_ (<address>); will be translated in ASM as EJMP <address> but i cannot see how the locator will write inside the address... any suggestion ?
"In C the goto is local ..."
There seems to be an echo in here.
Is _ejmp_ an intrinsic command in keil c51 ?
I had never came across such intinsic command.
What we have in keil intrins.h is _chkfloat_ _crol_ _cror_ _irol_ _iror_ _nop_ _pop_ _push_ _testbit_
And for proper functioning of your program even if you jump from C routine you will have to come back to the point you left the function.
Suvidh