Reshaped doc's
[fw/sdcc] / doc / sdccman.html / node33.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.14 int(16 bit) and long (32 bit) Support</TITLE>
11 <META NAME="description" CONTENT="3.14 int(16 bit) and long (32 bit) Support">
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="node34.html">
23 <LINK REL="previous" HREF="node32.html">
24 <LINK REL="up" HREF="node19.html">
25 <LINK REL="next" HREF="node34.html">
26 </HEAD>
27
28 <BODY >
29 <!--Navigation Panel-->
30 <A NAME="tex2html738"
31  HREF="node34.html">
32 <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A> 
33 <A NAME="tex2html732"
34  HREF="node19.html">
35 <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A> 
36 <A NAME="tex2html726"
37  HREF="node32.html">
38 <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> 
39 <A NAME="tex2html734"
40  HREF="node1.html">
41 <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents_motif.gif"></A> 
42 <A NAME="tex2html736"
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="tex2html739"
47  HREF="node34.html">3.15 Floating Point Support</A>
48 <B> Up:</B> <A NAME="tex2html733"
49  HREF="node19.html">3. Using SDCC</A>
50 <B> Previous:</B> <A NAME="tex2html727"
51  HREF="node32.html">3.13 Inline Assembler Code</A>
52  &nbsp <B>  <A NAME="tex2html735"
53  HREF="node1.html">Contents</A></B> 
54  &nbsp <B>  <A NAME="tex2html737"
55  HREF="node61.html">Index</A></B> 
56 <BR>
57 <BR>
58 <!--End of Navigation Panel-->
59
60 <H2><A NAME="SECTION000414000000000000000">
61 3.14 int(16 bit) and long (32 bit) Support</A>
62 </H2>
63
64 <P>
65 For signed &amp; unsigned int (16 bit) and long (32 bit) variables, division,
66 multiplication and modulus operations are implemented by support routines.
67 These support routines are all developed in ANSI-C to facilitate porting
68 to other MCUs, although some model specific assembler optimations
69 are used. The following files contain the described routine, all of
70 them can be found in &lt;installdir&gt;/share/sdcc/lib.
71 <BR>
72
73 <BR>
74 <I>&lt;pending: tabularise this&gt;</I>
75 <BR>
76
77 <BR>
78 _mulsint.c - signed 16 bit multiplication (calls _muluint)
79 <BR>
80 _muluint.c - unsigned 16 bit multiplication
81 <BR>
82 _divsint.c - signed 16 bit division (calls _divuint)
83 <BR>
84 _divuint.c - unsigned 16 bit division
85 <BR>
86 _modsint.c - signed 16 bit modulus (call _moduint)
87 <BR>
88 _moduint.c - unsigned 16 bit modulus
89 <BR>
90 _mulslong.c - signed 32 bit multiplication (calls _mululong)
91 <BR>
92 _mululong.c - unsigned32 bit multiplication
93 <BR>
94 _divslong.c - signed 32 division (calls _divulong)
95 <BR>
96 _divulong.c - unsigned 32 division
97 <BR>
98 _modslong.c - signed 32 bit modulus (calls _modulong)
99 <BR>
100 _modulong.c - unsigned 32 bit modulus 
101 <BR>
102
103 <BR>
104 Since they are compiled as <I>non-reentrant</I>, interrupt service
105 routines should not do any of the above operations. If this is unavoidable
106 then the above routines will need to be compiled with the <I>-stack-auto</I>
107 option, after which the source program will have to be compiled with
108 <I>-int-long-rent</I> option.
109
110 <P>
111 <HR>
112 <!--Navigation Panel-->
113 <A NAME="tex2html738"
114  HREF="node34.html">
115 <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A> 
116 <A NAME="tex2html732"
117  HREF="node19.html">
118 <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A> 
119 <A NAME="tex2html726"
120  HREF="node32.html">
121 <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> 
122 <A NAME="tex2html734"
123  HREF="node1.html">
124 <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents_motif.gif"></A> 
125 <A NAME="tex2html736"
126  HREF="node61.html">
127 <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index_motif.gif"></A> 
128 <BR>
129 <B> Next:</B> <A NAME="tex2html739"
130  HREF="node34.html">3.15 Floating Point Support</A>
131 <B> Up:</B> <A NAME="tex2html733"
132  HREF="node19.html">3. Using SDCC</A>
133 <B> Previous:</B> <A NAME="tex2html727"
134  HREF="node32.html">3.13 Inline Assembler Code</A>
135  &nbsp <B>  <A NAME="tex2html735"
136  HREF="node1.html">Contents</A></B> 
137  &nbsp <B>  <A NAME="tex2html737"
138  HREF="node61.html">Index</A></B> 
139 <!--End of Navigation Panel-->
140 <ADDRESS>
141 <I>Johan Knol</I>
142 <BR><I>2001-07-13</I>
143 </ADDRESS>
144 </BODY>
145 </HTML>