2009-10-25 09:31 PM
unexpected jump
2011-05-17 06:05 AM
What happens if the program counter goes to a location loaded with 0x00?
(for example,I know that if the location contains a ''nop'' op-code it goes to the next location.) Since the 0x00 is not an op-code,what happens ? thanks! :) Thanks Spectre p.s. I have already read the an on the emc interferences2011-05-17 06:05 AM
Hi,
if the micro decodes and illegal opcode, you'll get an illegal opcode reset. Check the status register of the reset controller to see reset source. Coluber2011-05-17 06:05 AM
Dear brazov2,
I didn't understand your answer.I know that I can check the reset source but I have mentioned the emc application note only because I have read on it the illegal op-codes list. I agree with you that if the program counter pointer goes on a illegal op-code I'll get an mcu reset.But I'm interested about a block filled with 0x00. regards Spectre [ This message was edited by: spectre on 23-10-2009 14:19 ]2011-05-17 06:05 AM
Hi spectre,
can you better specify the problem you want to solve? If you want to remove illegal byte 00h from your code and you have a block of all zeros, perhaps you can simply fill it with TRAP opcode (83h) to keep a better control of unexpected jumps instead of getting an illegal opcode reset. coluber2011-05-17 06:05 AM
Dear brazov2,
I have solved my issue. (I was not sure that 0x00 is an illegal opcode.) regards Spectre :)