I'm using the Keil C251 Compiler Optimizing 80251 C Compiler Version 1.x (DLL 1.24) The following instruction is in a function called after an SIO Interrupt: byLength = abyRecBuf[0] And the generated code is 7E7301D0 MOV R7,ABYRECBUF 7E004D MOV R0,#4D A5A607 MOV @R0?#BOOTDOWN#Value 4D is byLength's memory address and Value is a parameter from BootDown witch has nothing to do with the SIO interrupt. Is it a compiler bug ????
We've been using the 251 compiler for a couple of years and haven't seen a bug like this. One thing to do is to turn off the optimization and see if this fixes the problem. Have you checked with the simulator or an emulator to make sure that there is a real bug? Sometimes the compiled code is not...obvious, especially with the expanded 251 instruction set.