This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Wrong code generation.

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 ????

Parents
  • I am only familiar with the C51, but I suspect that the same points apply. When looking at code, the disassembler will attempt to find labels that match a value - but it's not psychic and consequently may display an inappropriate label that just happens to have the right value. This can be very confusing.

    The important question is: is the code actually wrong?

Reply
  • I am only familiar with the C51, but I suspect that the same points apply. When looking at code, the disassembler will attempt to find labels that match a value - but it's not psychic and consequently may display an inappropriate label that just happens to have the right value. This can be very confusing.

    The important question is: is the code actually wrong?

Children