1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
3 <!--Converted with LaTeX2HTML 99.1 release (March 30, 1999)
4 original version by: Nikos Drakos, CBLU, University of Leeds
5 * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
6 * with significant contributions from:
7 Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
10 <TITLE>3.12 Startup Code</TITLE>
11 <META NAME="description" CONTENT="3.12 Startup Code">
12 <META NAME="keywords" CONTENT="sdccman">
13 <META NAME="resource-type" CONTENT="document">
14 <META NAME="distribution" CONTENT="global">
16 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
17 <META NAME="Generator" CONTENT="LaTeX2HTML v99.1 release">
18 <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
20 <LINK REL="STYLESHEET" HREF="sdccman.css">
22 <LINK REL="next" HREF="node32.html">
23 <LINK REL="previous" HREF="node30.html">
24 <LINK REL="up" HREF="node19.html">
25 <LINK REL="next" HREF="node32.html">
29 <!--Navigation Panel-->
32 <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
35 <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
38 <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A>
41 <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents_motif.gif"></A>
44 <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index_motif.gif"></A>
46 <B> Next:</B> <A NAME="tex2html711"
47 HREF="node32.html">3.13 Inline Assembler Code</A>
48 <B> Up:</B> <A NAME="tex2html705"
49 HREF="node19.html">3. Using SDCC</A>
50 <B> Previous:</B> <A NAME="tex2html699"
51 HREF="node30.html">3.11 Absolute Addressing</A>
52   <B> <A NAME="tex2html707"
53 HREF="node1.html">Contents</A></B>
54   <B> <A NAME="tex2html709"
55 HREF="node61.html">Index</A></B>
58 <!--End of Navigation Panel-->
60 <H2><A NAME="SECTION000412000000000000000">
65 The compiler inserts a call to the C routine <I>_sdcc__external__startup()</I>
66 at the start of the CODE area. This routine is in the runtime library.
67 By default this routine returns 0, if this routine returns a non-zero
68 value, the static & global variable initialization will be skipped
69 and the function main will be invoked Other wise static & global
70 variables will be initialized before the function main is invoked.
71 You could add a <I>_sdcc__external__startup()</I> routine to
72 your program to override the default if you need to setup hardware
73 or perform some other critical operation prior to static & global
74 variable initialization.