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.3 MCS51/DS390 Storage Class Language Extensions</TITLE>
11 <META NAME="description" CONTENT="3.3 MCS51/DS390 Storage Class Language Extensions">
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="node23.html">
23 <LINK REL="previous" HREF="node21.html">
24 <LINK REL="up" HREF="node19.html">
25 <LINK REL="next" HREF="node23.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="tex2html580"
47 HREF="node23.html">3.4 Pointers</A>
48 <B> Up:</B> <A NAME="tex2html574"
49 HREF="node19.html">3. Using SDCC</A>
50 <B> Previous:</B> <A NAME="tex2html568"
51 HREF="node21.html">3.2 Command Line Options</A>
52   <B> <A NAME="tex2html576"
53 HREF="node1.html">Contents</A></B>
54   <B> <A NAME="tex2html578"
55 HREF="node61.html">Index</A></B>
58 <!--End of Navigation Panel-->
59 <!--Table of Child-Links-->
60 <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
63 <LI><A NAME="tex2html581"
64 HREF="node22.html#SECTION00043100000000000000">3.3.1 xdata</A>
65 <LI><A NAME="tex2html582"
66 HREF="node22.html#SECTION00043200000000000000">3.3.2 data</A>
67 <LI><A NAME="tex2html583"
68 HREF="node22.html#SECTION00043300000000000000">3.3.3 idata</A>
69 <LI><A NAME="tex2html584"
70 HREF="node22.html#SECTION00043400000000000000">3.3.4 bit</A>
71 <LI><A NAME="tex2html585"
72 HREF="node22.html#SECTION00043500000000000000">3.3.5 sfr / sbit</A>
74 <!--End of Table of Child-Links-->
77 <H2><A NAME="SECTION00043000000000000000">
78 3.3 MCS51/DS390 Storage Class Language Extensions</A>
82 In addition to the ANSI storage classes SDCC allows the following
83 MCS51 specific storage classes.
87 <H3><A NAME="SECTION00043100000000000000">
92 Variables declared with this storage class will be placed in the extern
93 RAM. This is the <B>default</B> storage class for Large Memory model,
98 <TT>xdata unsigned char xduc;</TT>
102 <H3><A NAME="SECTION00043200000000000000">
107 This is the <B>default</B> storage class for Small Memory model.
108 Variables declared with this storage class will be allocated in the
113 <TT>data int iramdata;</TT>
117 <H3><A NAME="SECTION00043300000000000000">
122 Variables declared with this storage class will be allocated into
123 the indirectly addressable portion of the internal ram of a 8051,
128 <TT>idata int idi;</TT>
132 <H3><A NAME="SECTION00043400000000000000">
137 This is a data-type and a storage class specifier. When a variable
138 is declared as a bit, it is allocated into the bit addressable memory
147 <H3><A NAME="SECTION00043500000000000000">
152 Like the bit keyword, <I>sfr / sbit</I> signifies both a data-type
153 and storage class, they are used to describe the special function
154 registers and special bit variables of a 8051, eg:
158 <TT>sfr at 0x80 P0; /* special function register P0 at location
161 <TT>sbit at 0xd7 CY; /* CY (Carry Flag) */</TT>
165 <!--Navigation Panel-->
166 <A NAME="tex2html579"
168 <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
169 <A NAME="tex2html573"
171 <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
172 <A NAME="tex2html567"
174 <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A>
175 <A NAME="tex2html575"
177 <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents_motif.gif"></A>
178 <A NAME="tex2html577"
180 <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index_motif.gif"></A>
182 <B> Next:</B> <A NAME="tex2html580"
183 HREF="node23.html">3.4 Pointers</A>
184 <B> Up:</B> <A NAME="tex2html574"
185 HREF="node19.html">3. Using SDCC</A>
186 <B> Previous:</B> <A NAME="tex2html568"
187 HREF="node21.html">3.2 Command Line Options</A>
188   <B> <A NAME="tex2html576"
189 HREF="node1.html">Contents</A></B>
190   <B> <A NAME="tex2html578"
191 HREF="node61.html">Index</A></B>
192 <!--End of Navigation Panel-->
195 <BR><I>2001-07-13</I>