Default 0xFF in unused flash memory (MOV R7,A)

C8051F360

It has recently occured to me that the default instruction 0xFF that exists in all un-used flash memory is not a NOP instruction.

I understand that flash memory just works that way, and the legacy of the 8051 instruction set must be maintained, but what happens if the stack corrupts the program counter? Would it not be better to have it executing NOPs instead of MOV R7,A instructions? (assuming it landed on empty flash-ROM)

I suppose it could execute code from anywhere - with varying degrees of dangerousness.

I don't know the answer. Any thoughts?

More questions in this forum