I have a program that I have been developing for 6 months or so and suddenly, while debugging, the program counter ends up off in never-never land. On closer inspection I see that a function is being called with JSR ( in the same page so this is ok) but the assembly being generated tries to return using RTC instead of RTS.
I have looked for this issue on the forum and learned that I should make sure my function prototype is correct with no implicit parameter declarations. Check. The other possible explanation did not make any sense to me, it was something about there being two returns in the same subroutine?
Help would be appreciated.