I have a code problem that worked in the previous version of the compiler on PIC18F26K22.
That's because the compiler doesn't really work for K42 processors
. Effects you observe are due to linker error that makes use of several libraries impossible. Due to bigger RAM, K42 processors have FSRx registers (instrumental in indirect addressing) placed much higher in memory than previous PIC18 processors but linker ignores it while linking libraries. Effects are easy to imagine.
There are other quirks, also in software simulator (ICD wasn't even implemented), so I would not recommend using mE compilers with K42 processors yet.
Frankly, after finding errors in compiler, in simulator, in definition files, and in mikroProg Suite (not to mention new IDE quirks) I stopped analyzing the last release so there may be more problems than I know of. Obviously, mE is mainly concentrated on selling more hardware and software developers get barely enough time to be able to introduce changes that are directed at reaching this goal (vide
mikroSDK addition). No time to remove years old bugs and quirks or solidly prepare for new processors