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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/16/08 18:53
Read: times


 
#153555 - ANSI C
Responding to: ???'s previous message
As Erik has already pointed out, there are things going on before main is ever called. The reason for this is your compiler is doing what is required by ANSI/ISO C, initializing all variables defined at file scope or variables defined with the keyword static before the program is run. If you have not specified a specific initialization the compiler will initialize it to a default value.

If you are using Keil it does this in an assembly file named startup.a51.

List of 19 messages in thread
TopicAuthorDate
SDCC XRAM Problem            01/01/70 00:00      
   Sounds like ...            01/01/70 00:00      
      I *think* I have that covered...            01/01/70 00:00      
         it is NOT            01/01/70 00:00      
            Assembly            01/01/70 00:00      
               I'll try anything once            01/01/70 00:00      
                  OK, here is a way            01/01/70 00:00      
         ANSI C            01/01/70 00:00      
         SDCC startup            01/01/70 00:00      
   unsigned char _sdcc_external_startup(void)            01/01/70 00:00      
      holy cow            01/01/70 00:00      
         The problem is obvious ...            01/01/70 00:00      
            I'm not that bombastic, but agree in principle wit            01/01/70 00:00      
               When someone is familiar with it as you are ...            01/01/70 00:00      
                  show me one from this year            01/01/70 00:00      
                     You have taken my comment wrong.            01/01/70 00:00      
                        My Guess Is That...            01/01/70 00:00      
                           not always ...            01/01/70 00:00      
         obscure?            01/01/70 00:00      

Back to Subject List