Change IS_DS390 to .model=FLAT24
[fw/sdcc] / doc / sdccman.html / node35.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2
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 -->
8 <HTML>
9 <HEAD>
10 <TITLE>3.16 MCS51 Memory Models</TITLE>
11 <META NAME="description" CONTENT="3.16 MCS51 Memory Models">
12 <META NAME="keywords" CONTENT="sdccman">
13 <META NAME="resource-type" CONTENT="document">
14 <META NAME="distribution" CONTENT="global">
15
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">
19
20 <LINK REL="STYLESHEET" HREF="sdccman.css">
21
22 <LINK REL="next" HREF="node36.html">
23 <LINK REL="previous" HREF="node34.html">
24 <LINK REL="up" HREF="node19.html">
25 <LINK REL="next" HREF="node36.html">
26 </HEAD>
27
28 <BODY >
29 <!--Navigation Panel-->
30 <A NAME="tex2html766"
31  HREF="node36.html">
32 <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A> 
33 <A NAME="tex2html760"
34  HREF="node19.html">
35 <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A> 
36 <A NAME="tex2html754"
37  HREF="node34.html">
38 <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> 
39 <A NAME="tex2html762"
40  HREF="node1.html">
41 <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents_motif.gif"></A> 
42 <A NAME="tex2html764"
43  HREF="node61.html">
44 <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index_motif.gif"></A> 
45 <BR>
46 <B> Next:</B> <A NAME="tex2html767"
47  HREF="node36.html">3.17 DS390 Memory Models</A>
48 <B> Up:</B> <A NAME="tex2html761"
49  HREF="node19.html">3. Using SDCC</A>
50 <B> Previous:</B> <A NAME="tex2html755"
51  HREF="node34.html">3.15 Floating Point Support</A>
52  &nbsp <B>  <A NAME="tex2html763"
53  HREF="node1.html">Contents</A></B> 
54  &nbsp <B>  <A NAME="tex2html765"
55  HREF="node61.html">Index</A></B> 
56 <BR>
57 <BR>
58 <!--End of Navigation Panel-->
59
60 <H2><A NAME="SECTION000416000000000000000">
61 3.16 MCS51 Memory Models</A>
62 </H2>
63
64 <P>
65 SDCC allows two memory models for MCS51 code, small and large. Modules
66 compiled with different memory models should <I>never</I> be combined
67 together or the results would be unpredictable. The library routines
68 supplied with the compiler are compiled as both small and large. The
69 compiled library modules are contained in seperate directories as
70 small and large so that you can link to either set. 
71
72 <P>
73 When the large model is used all variables declared without a storage
74 class will be allocated into the external ram, this includes all parameters
75 and local variables (for non-reentrant functions). When the small
76 model is used variables without storage class are allocated in the
77 internal ram.
78
79 <P>
80 Judicious usage of the processor specific storage classes and the
81 'reentrant' function type will yield much more efficient code, than
82 using the large model. Several optimizations are disabled when the
83 program is compiled using the large model, it is therefore strongly
84 recommdended that the small model be used unless absolutely required.
85
86 <P>
87 <HR>
88 <!--Navigation Panel-->
89 <A NAME="tex2html766"
90  HREF="node36.html">
91 <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A> 
92 <A NAME="tex2html760"
93  HREF="node19.html">
94 <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A> 
95 <A NAME="tex2html754"
96  HREF="node34.html">
97 <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> 
98 <A NAME="tex2html762"
99  HREF="node1.html">
100 <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents_motif.gif"></A> 
101 <A NAME="tex2html764"
102  HREF="node61.html">
103 <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index_motif.gif"></A> 
104 <BR>
105 <B> Next:</B> <A NAME="tex2html767"
106  HREF="node36.html">3.17 DS390 Memory Models</A>
107 <B> Up:</B> <A NAME="tex2html761"
108  HREF="node19.html">3. Using SDCC</A>
109 <B> Previous:</B> <A NAME="tex2html755"
110  HREF="node34.html">3.15 Floating Point Support</A>
111  &nbsp <B>  <A NAME="tex2html763"
112  HREF="node1.html">Contents</A></B> 
113  &nbsp <B>  <A NAME="tex2html765"
114  HREF="node61.html">Index</A></B> 
115 <!--End of Navigation Panel-->
116 <ADDRESS>
117 <I>Johan Knol</I>
118 <BR><I>2001-07-13</I>
119 </ADDRESS>
120 </BODY>
121 </HTML>