While developing an assembler-only project on a PIC12F1572 I hit a PC corruption bug in code that I wasn't meddling with. It turned out that a should-have-made-no-difference change in one file had cause the initialisation data for an idata variable in a different file to be broken.
The code is attached. As it stands, it works. If I change line 34 of comms.asm to "if 1" then the initialisation data for "rtos_schedpt" in sched.asm gets written as 0 instead of 20. When I first saw the problem, line 35 of comms.asm specified an absolute address but changing to using the linker file made no difference.
Anonymous
Thanks for the report. I will deal with it when it will be enough my time.
This bug is still present in v1.5.2 and is actually worse than I thought. The apparently harmless change (with a linker-defined address) causes all five bytes of .idata to be initialised wrongly.
I've attached an updated zip with the build results I get (and the makefile tweaked to not need my complex build environment)