We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi everybody,
I actually work on a LPC2103, and I have a problem with a inline assembler.
In fact, I want to modify the Link Register R14, at the end of an interruption, in order to return in Main Programm at an other location.
But when I compile my programm, the compiler print this error:" error #20: identifier "R14" is undifined.
The problem is that I don't know how you can declare this kind of register.
thank in advance
Chris
To make that, EINT2 interrupt have to be able to be branch to another address in my software.
That's not a strict necessity in your case. Manually messing with the return address should only be considered in very special cases (e.g. you are writing an operating system). This is because in such a case, many more things need to be taken care of than just changing the return address. An interrupt can occur at almost any point in your program - how is the interrupt service routine supposed to know how much stack/etc is being used at the moment ?
In your case, it should be enough to have set/reset a flag in the interrupt service routine which is then evaluated by the regular program. Depending on the status of the flag, the program will either continue its output or start outputting a different set of data.