next up previous contents index
Next: 3.13 Inline Assembler Code Up: 3. Using SDCC Previous: 3.11 Absolute Addressing   Contents   Index

3.12 Startup Code

The compiler inserts a call to the C routine _sdcc__external__startup() at the start of the CODE area. This routine is in the runtime library. By default this routine returns 0, if this routine returns a non-zero value, the static & global variable initialization will be skipped and the function main will be invoked Other wise static & global variables will be initialized before the function main is invoked. You could add a _sdcc__external__startup() routine to your program to override the default if you need to setup hardware or perform some other critical operation prior to static & global variable initialization.



Johan Knol
2001-07-13