| ??? 01/12/08 10:07 Read: times |
#149355 - *Very* Dangerous game! Responding to: ???'s previous message |
Chico Magalhães said:
About the PC, how can I read its value? Before answering that, you really need to explain why you need to do it? The PC (Program Counter) is absolutely fundamental to the operation of your program - if you mess with it, you can totally destroy the correct sequence of fetching bytes from your code memory! Not only can this mean that you might execute instructions in the wrong order - it could easily mean that you execute bytes that should not be instructions at all! eg, if you mess with the PC such that the next byte the CPU fetches is actually the operand of an instruction, the CPU will still attempt to decode & execute that byte as an instruction...!! So, why do you (think you) need to read the value of the PC? Or is this purely out of acadenic interest? |



