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

Dual DPTR push in ISR - why?

I'm looking to optimize an ISR written in C and wondered why version 6.21 pushes both DPTR when it doesn't use them both?

Parents
  • What happens if the run task is using the alternate dptr when the ISR is envoked? The ISR does not change the dptr selector. The dptr register is setup using dpl & dph. The dptr register is accessed using dptr, which is now using dpl1 & dph1. RAM would get very corrupted on an intermittent basis. This would be a nasty bug that could slip though testing.

Reply
  • What happens if the run task is using the alternate dptr when the ISR is envoked? The ISR does not change the dptr selector. The dptr register is setup using dpl & dph. The dptr register is accessed using dptr, which is now using dpl1 & dph1. RAM would get very corrupted on an intermittent basis. This would be a nasty bug that could slip though testing.

Children