I am debugging my code with Keil v5, but I found that there was a reentrant function. Every time when I the break point went to a specific variable, the address of the variable was always different. For example, if this time is MOV WR6, @DPTR+#0x06, the next time will be MOV WR6, @DPTR+#0x08, and then it will be MOV WR6, @DPTR+#0x0A. This situation will cause an error when compling the code, but if I change the reentrant function into unreentrant function, it will correct the compling error.
Could anyone tell me that why this could happen and what would be the root cause? And how could I fix the error?
Thanks in advance!
MOV WR6, @DPTR+#0x08,
that is not a (standard) '51 instruction explain
That's true. This instrution is from NXP's product.
This instrution is from NXP's product.
Have you any idea just how little information is contained in that statement? NXP has well in the 1000s of "products".
She probably meant to say 80251. I'm not a user, but remember seeing WR6 mentioned in various bits of sample code.
Philips (it was those days) never got on the 251 wagon, they did the AFF XP instead