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.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">
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="node34.html">
23 <LINK REL="previous" HREF="node32.html">
24 <LINK REL="up" HREF="node19.html">
25 <LINK REL="next" HREF="node34.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="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   <B> <A NAME="tex2html735"
53 HREF="node1.html">Contents</A></B>
54   <B> <A NAME="tex2html737"
55 HREF="node61.html">Index</A></B>
58 <!--End of Navigation Panel-->
60 <H2><A NAME="SECTION000414000000000000000">
61 3.14 int(16 bit) and long (32 bit) Support</A>
65 For signed & 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 <installdir>/share/sdcc/lib.
74 <I><pending: tabularise this></I>
78 _mulsint.c - signed 16 bit multiplication (calls _muluint)
80 _muluint.c - unsigned 16 bit multiplication
82 _divsint.c - signed 16 bit division (calls _divuint)
84 _divuint.c - unsigned 16 bit division
86 _modsint.c - signed 16 bit modulus (call _moduint)
88 _moduint.c - unsigned 16 bit modulus
90 _mulslong.c - signed 32 bit multiplication (calls _mululong)
92 _mululong.c - unsigned32 bit multiplication
94 _divslong.c - signed 32 division (calls _divulong)
96 _divulong.c - unsigned 32 division
98 _modslong.c - signed 32 bit modulus (calls _modulong)
100 _modulong.c - unsigned 32 bit modulus
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.
112 <!--Navigation Panel-->
113 <A NAME="tex2html738"
115 <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
116 <A NAME="tex2html732"
118 <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
119 <A NAME="tex2html726"
121 <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A>
122 <A NAME="tex2html734"
124 <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents_motif.gif"></A>
125 <A NAME="tex2html736"
127 <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index_motif.gif"></A>
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   <B> <A NAME="tex2html735"
136 HREF="node1.html">Contents</A></B>
137   <B> <A NAME="tex2html737"
138 HREF="node61.html">Index</A></B>
139 <!--End of Navigation Panel-->
142 <BR><I>2001-07-13</I>