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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/19/04 07:18
Read: times


 
#62863 - RE: Keil software - stack question
Responding to: ???'s previous message
Why SP!=STACK_START can be used to indicate stack underflow ?

The article deals with testing SP in the main loop. At the call level of the main loop (0), the SP's value should always equal its initialized value. If SP is less than its initialized value, then more POPs than PUSHs have occurred, or more RETs than CALLs have occurred, or other some other SP manipulation has caused underflow. If SP is greater than its initialized value, the opposite has occurred.

What is the different between stack underflow and stack overflow ?

Underflow is when more data has been removed from the stack than was put on the stack. Overflow is the opposite.


List of 11 messages in thread
TopicAuthorDate
Keil software - stack question            01/01/70 00:00      
   RE: Keil software - stack question            01/01/70 00:00      
      RE: Keil software - stack question            01/01/70 00:00      
         RE: Keil software - stack question            01/01/70 00:00      
         RE: Keil software - stack question            01/01/70 00:00      
            RE: stack pertubation            01/01/70 00:00      
   RE: To Dan Henry - stack question            01/01/70 00:00      
      RE: To Dan Henry - stack question            01/01/70 00:00      
         RE: To Dan Henry - stack question            01/01/70 00:00      
      RE: To Dan Henry - stack question            01/01/70 00:00      
   RE: Keil software - stack question            01/01/70 00:00      

Back to Subject List