Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/31/08 09:00
Read: times


 
#152739 - Processor doesn't just ignore instructions!
Responding to: ???'s previous message
Deep Veer said:
but here when i pop acc two times , it ignore the RET

No, the processor doesn't just ignore the instruction! If the instruction has been fetched from CODE memory, it will be executed

The only way to ensure that an instruction is not executed is to ensure that it is not fetched from CODE memory - eg, by having a jump around it.

If you have POPped the "real" return address from the stack, then executing a RET will simply take whatever is left on the top of the stack, and use that as its return address. If you haven't taken care to ensure that this represents a valid return address then the result could be very interesting indeed...

List of 15 messages in thread
TopicAuthorDate
call routine problem            01/01/70 00:00      
   Yes, but...            01/01/70 00:00      
      call routine            01/01/70 00:00      
   what do you mean by "come out"?            01/01/70 00:00      
      call routine            01/01/70 00:00      
   Does not ignore RET but...            01/01/70 00:00      
      Good implementation            01/01/70 00:00      
         one of the reasons might be...            01/01/70 00:00      
         call routine            01/01/70 00:00      
            please explain...            01/01/70 00:00      
               Two things need explaining            01/01/70 00:00      
            Processor doesn't just ignore instructions!            01/01/70 00:00      
   I guess ...            01/01/70 00:00      
      call routine            01/01/70 00:00      
   use sjmp ljmp ajmp            01/01/70 00:00      

Back to Subject List