Search code examples
keil8051

What exactly is the startup.A51 code included in Keil IDE for 8051?


When I create a new project in Keil uVision, it asks me regarding adding a startup code ie startup.A51. To which I click on NO

enter image description here

still, when I go to debug, I see it consumes 389 states. I am curious to know what does that 389 states contain!


Solution

  • From http://www.keil.com/support/docs/1296.htm :

    • Clears DATA and optionally PDATA and XDATA memory
    • Sets up the reentrant stacks (if necessary))
    • Initializes C Global Variables (see INIT.A51)
    • Sets the Stack Pointer (SP)
    • Jumps to your MAIN C function