go to single .html
[fw/sdcc] / doc / SDCCUdoc-14.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2 <HTML>
3 <HEAD>
4  <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.7">
5  <TITLE>SDCC Compiler User Guide: int (16 bit) and long (32 bit ) support.</TITLE>
6  <LINK HREF="SDCCUdoc-15.html" REL=next>
7  <LINK HREF="SDCCUdoc-13.html" REL=previous>
8  <LINK HREF="SDCCUdoc.html#toc14" REL=contents>
9 </HEAD>
10 <BODY>
11 <A HREF="SDCCUdoc-15.html">Next</A>
12 <A HREF="SDCCUdoc-13.html">Previous</A>
13 <A HREF="SDCCUdoc.html#toc14">Contents</A>
14 <HR>
15 <H2><A NAME="int and long"></A> <A NAME="s14">14. int (16 bit) and long (32 bit ) support.</A> </H2>
16
17 <P>For signed &amp; unsigned int (16 bit) and long (32 bit) variables, division,
18 multiplication and modulus operations are implemented by support routines.
19 These support routines are all developed in ANSI-C to facilitate porting to
20 other MCUs. The following files contain the described routine, all of them
21 can be found in the directory SDCCDIR/sdcc51lib
22 <P>
23 <UL>
24 <LI>_mulsint.c - signed 16 bit multiplication (calls _muluint)</LI>
25 <LI>_muluint.c - unsigned 16 bit multiplication</LI>
26 <LI>_divsint.c - signed 16 bit division (calls _divuint)</LI>
27 <LI>_divuint.c - unsigned 16 bit division.</LI>
28 <LI>_modsint.c - signed 16 bit modulus (call _moduint)</LI>
29 <LI>_moduint.c - unsigned 16 bit modulus.</LI>
30 <LI>_mulslong.c - signed 32 bit multiplication (calls _mululong)</LI>
31 <LI>_mululong.c - unsigned32 bit multiplication.</LI>
32 <LI>_divslong.c - signed 32 division (calls _divulong)</LI>
33 <LI>_divulong.c - unsigned 32 division.</LI>
34 <LI>_modslong.c - signed 32 bit modulus (calls _modulong).</LI>
35 <LI>_modulong.c - unsigned 32 bit modulus.</LI>
36 </UL>
37 <P>All these routines are compiled as non-reentrant and small model. Since
38 they are compiled as non-reentrant, interrupt service routines should not do
39 any of the above operations, if this unavoidable then the above routines will
40 need to ne compiled with the --stack-auto option, after which the source program
41 will have to be compiled with --int-long-rent option.
42 <HR>
43 <A HREF="SDCCUdoc-15.html">Next</A>
44 <A HREF="SDCCUdoc-13.html">Previous</A>
45 <A HREF="SDCCUdoc.html#toc14">Contents</A>
46 </BODY>
47 </HTML>