??? 02/23/08 19:44 Read: times |
#151347 - Rogue programs? Responding to: ???'s previous message |
Russ Cooper said:
But on the 8051, the only way for a program to access code memory is with either MOVC A,@A+PC or MOVC A,@A+DPTR. That's a pretty expensive ordeal when compared with all the speedy variants of MOV that manipulate internal data memory. I think that's why you might want to have a 'const' element that's not in code memory. True, but then just put it in internal memory and don't modify it. Again, my question would be whether "const" is just to protect against rogue programs modifying variables they know they shouldn't modify? Regards, Craig Steiner |