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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/13/06 13:29
Modified:
  12/13/06 13:31

Read: times


 
#129403 - Still ...
Responding to: ???'s previous message
not necessarily

I'd consider manually fiddling with things on the stack in C(using in-line assembly or something dang close to it) something that's worth triple-checking before actually doing it.

What can you find on the stack (when you're programming on a PC) ? The function's local variables and arguments (which are readily accessible without resorting to assembly), the return address (if you really really want to know where your function was called from, or if you really really want to break your program in a nasty way), the callees variables and arguments (why would you want to mess with those, apart from creating a real nightmare maintenance-wise?) ...

About the only legitimate reason for fiddling with the stack contents would be to call something that has a different calling convention which is incompatible with your C compiler.

List of 22 messages in thread
TopicAuthorDate
Help me for inline assembly            01/01/70 00:00      
   wait a min!            01/01/70 00:00      
      Explain!            01/01/70 00:00      
         Help me for inline assembly            01/01/70 00:00      
            How 'C' systems start.            01/01/70 00:00      
      how to link the assembled file            01/01/70 00:00      
         You still haven't said            01/01/70 00:00      
         RTFM            01/01/70 00:00      
   Keil C51 and the SRC directive            01/01/70 00:00      
   Before you go there...            01/01/70 00:00      
      sometimes inline assembler is because            01/01/70 00:00      
         Heh.            01/01/70 00:00      
      absolutly!            01/01/70 00:00      
      To Access Stack            01/01/70 00:00      
         Why ?            01/01/70 00:00      
            not necessarily            01/01/70 00:00      
               That's my line!            01/01/70 00:00      
               Still ...            01/01/70 00:00      
                  I think ...            01/01/70 00:00      
                  The only useful information on the stack ...            01/01/70 00:00      
                     Yes, but...            01/01/70 00:00      
                        Not want, but have to            01/01/70 00:00      

Back to Subject List