Dear all, I have a question about jumping to some specific label in other file(in Keil C51 project)
Ex. In file A there is one label named _xxx. In file B can we use
goto _xxx
? (maybe _xxx should be declared as extern, right ?)
The reason why I want this is: We did NOT want to do the tasks before label _xxx because they are wrong...! And unfornately file A is located in ROM and we can not modify it...
So we want to just jump to label _xxx and skip wrong codes....
And unfornately file A is located in ROM and we can not modify it assume file a contains void Ralph(void)
change your calls in your code from Ralph(); to RalphReplace();
then write void RalphReplace(void) in your code
STAY AWAY FROM GOTO!
Erik
2 considerations:
a. What I want to call is NOT a function,but a piece of code segments b. If re-write RalphReplace() then I did NOT have enough code space for it
a. What I want to call is NOT a function,but a piece of code segments
what is "a piece of code segments"
What I want to call is NOT a function,but a piece of code segments
OK. Exactly what stops you from placing the code you want to just to inside a FUNCTION!? Place the function at an absolute location and branch to it (that is a call). What's the problem? Why mess up your life?
just = jump !
<to self> Ditch the tome I wrote describing how to utilize post-processing tools to generate what you need.</to self>
The mere fact that you're a taker, not a learner, demonstrates that you are ill-equipped to understand how to achieve it. Takers lose, learners win.