??? 06/15/07 06:41 Read: times |
#140819 - It does not and it cannot. Responding to: ???'s previous message |
How does the MCU distinguish whether the stored byte is data or instruction opcode.
Simple answer: It cannot distinguish between the two, so it does not even try. If you put "data" in your ROM that consists of opcodes that make up a meaningful code sequence, you can make the MCU execute it just as if you had written it in actual assembly. Of course, if the program counter ever gets set to an address that does not containg meaningful code (because it contains some sort of data), the MCU will still attempt to execute the data as if it was code and produce the most wonderful garbage. |