Steven J Ackerman wrote:

The 8051 is a modified Harvard architecture with separate data and program address spaces.

Unless your hardware allows you to map part of the data space into the program space, you will not be able to execute opcodes in data space.



That's bad Smiley

I've also searched the net a bit, finding people being curious about the same question, but I have found only this:

8052 forums wrote:

Download the 8051 "bible", chapter 1, page1 (talking about basics!) and read about the 8052 memory organisation. You will see that the 8052 is designed to have separate DATA (read RAM) and PROGRAM (read ROM) memories. You can not execute from DATA memory, you can not write to PROGRAM memory. To execute from RAM on an 8052, connect the RAM chip like this:

/WR (P3.6) from 8052 to /WE pin of RAM chip,
/PSEN from 8052 to /OE pin of RAM chip.
/EA to +5V.

This will allow you to write to the RAM chip as external data memory (but not read from it), and read from it as program memory starting from address 01000h. Instructions from 00000h to 00fffh will be executed from internal (EEP)ROM.