??? 08/04/04 19:52 Read: times |
#75432 - RE: Reply to Erik, Russell, Bartosz--- Responding to: ???'s previous message |
See below what?
So what single mnemonic/value/byte is the offending one? The idea is: Get the C compiler to compile the program to ASM, make sure the generated ASM doesn't work, then compare against your working hand-written ASM code. Start modifying your "hand-written" ASM code to gradually turn it into the code identical to the one from the compiler, but never breaking the functionality. Every few instructions changed upload the modified code and test. If fails, back off the changes till it works again. After some time the you will be at the single offending(missing?) instruction which being added/removed/modified breaks the program. I wouldn't be surprised if that was a NOP or using LCALL instead of ACALL or such. This procedure is one absolutely fault-proof method of tracking a bug when you have two pieces of code doing the same thing (with the same algorithm too) and one works and the other doesn't. True, it's a lot of work. But either you DO find the offending piece or you gradually turn your working code into a code identical to the one that's not working and it still works which means you should call ghostbusters because your Keil is haunted. |