* device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
[fw/sdcc] / doc / sdccman.lyx
index 21b011f5c8c86d4a6450116e82796097704ca541..ef0a41a26f0fe767ef4dbcaaf1f0abb8e45ccfe9 100644 (file)
@@ -2,6 +2,7 @@
 \lyxformat 221
 \textclass book
 \begin_preamble
+
 \usepackage[
   pdftitle={SDCC Compiler User Guide},
   pdfauthor={SDCC development team},
@@ -81,7 +82,7 @@ SDCC Compiler User Guide
 
 
 \size normal 
-SDCC 2.4.0
+SDCC 2.4.3
 \size footnotesize 
 
 \newline 
@@ -455,6 +456,12 @@ The SDCC home page at
  Web links to other SDCC related sites can also be found here.
  This document can be found in the DOC directory of the source package as
  a text or HTML file.
+ A pdf version of this document is available at 
+\begin_inset LatexCommand \url{http://sdcc.sourceforge.net/doc/sdccman.pdf}
+
+\end_inset 
+
+.
  Some of the other tools (simulator and assembler) included with SDCC contain
  their own documentation and can be found in the source distribution.
  If you want the latest unreleased software, the complete source package
@@ -1950,6 +1957,21 @@ make install prefix=$(HOME)/local/sdcc
 \layout Standard
 
 Of course this doesn't change the search paths compiled into the binaries.
+\newline 
+
+\newline 
+Moreover the install path can be changed by defining DESTDIR
+\begin_inset LatexCommand \index{DESTDIR}
+
+\end_inset 
+
+:
+\layout LyX-Code
+
+make install DESTDIR=$(HOME)/sdcc.rpm/
+\layout Standard
+
+Please note that DESTDIR must have a trailing slash!
 \layout Section
 
 Search Paths
@@ -3169,6 +3191,43 @@ bin before running SDCC.
  
 \newline 
 
+\newline 
+WARNING: Visual studio is very picky with line terminations; it expects
+ the 0x0d, 0x0a DOS style line endings, not the 0x0a Unix style line endings.
+ If you are getting a message such as "This makefile was not generated by
+ Developer Studio etc.
+ etc.
+\begin_inset Quotes srd
+\end_inset 
+
+ when opening the sdcc.dsw workspace or any of the *.dsp projects, then you
+ need to convert the Unix style line endings to DOS style line endings.
+ To do so you can use the 
+\begin_inset Quotes sld
+\end_inset 
+
+unix2dos
+\begin_inset Quotes srd
+\end_inset 
+
+ utility freely available on the internet.
+ Doug Hawkins reported in the sdcc-user list that this works:
+\newline 
+
+\newline 
+C:
+\backslash 
+Programming
+\backslash 
+SDCC> unix2dos sdcc.dsw
+\newline 
+C:
+\backslash 
+Programming
+\backslash 
+SDCC> for /R %I in (*.dsp) do @unix2dos "%I"
+\newline 
+
 \newline 
 In order to build SDCC with MSVC you need win32 executables of bison.exe,
  flex.exe, and gawk.exe.
@@ -3419,13 +3478,6 @@ x).
 \end_inset 
 
  as editor this is straightforward.
- If you want to avoid installing the tools you will have some success with
- a bootable Knoppix CD 
-\begin_inset LatexCommand \url{http://www.knoppix.net}
-
-\end_inset 
-
-.
  Prebuilt documentation in html and pdf format is available from 
 \begin_inset LatexCommand \url{http://sdcc.sourceforge.net/snap.php}
 
@@ -4244,7 +4296,7 @@ sourcefile.adb
  - An intermediate file containing debug information needed to create the
  .cdb file (with -
 \begin_inset ERT
-status Collapsed
+status Open
 
 \layout Standard
 
@@ -4610,26 +4662,31 @@ To create a new library file, start by compiling all the required modules.
 \layout Standard
 
 
+\family sans 
 \series bold 
 sdcc -c _divsint.c
 \layout Standard
 
 
+\family sans 
 \series bold 
 sdcc -c _divuint.c
 \layout Standard
 
 
+\family sans 
 \series bold 
 sdcc -c _modsint.c
 \layout Standard
 
 
+\family sans 
 \series bold 
 sdcc -c _moduint.c
 \layout Standard
 
 
+\family sans 
 \series bold 
 sdcc -c _mulint.c
 \newline 
@@ -4644,8 +4701,11 @@ This will create files _divsint.rel, _divuint.rel, _modsint.rel, _moduint.rel,
 \layout Standard
 
 
+\family sans 
 \series bold 
 sdcclib libint.lib _divsint.rel
+\family default 
+
 \begin_inset LatexCommand \index{sdcclib}
 
 \end_inset 
@@ -4654,21 +4714,25 @@ sdcclib libint.lib _divsint.rel
 \layout Standard
 
 
+\family sans 
 \series bold 
 sdcclib libint.lib _divuint.rel
 \layout Standard
 
 
+\family sans 
 \series bold 
 sdcclib libint.lib _modsint.rel
 \layout Standard
 
 
+\family sans 
 \series bold 
 sdcclib libint.lib _moduint.rel
 \layout Standard
 
 
+\family sans 
 \series bold 
 sdcclib libint.lib _mulint.rel
 \series default 
@@ -4685,114 +4749,138 @@ If the file already exists in the library, it will be replaced.
 
 \newline 
 
+\family sans 
 \series bold 
 sdcclib -s libint.lib
+\family default 
+
 \begin_inset LatexCommand \index{sdcclib}
 
 \end_inset 
 
 
 \newline 
+
+\family typewriter 
+\series default 
 _divsint.rel:
 \layout Standard
 
 
-\series bold 
+\family typewriter 
 __divsint_a_1_1
 \layout Standard
 
 
-\series bold 
+\family typewriter 
 __divsint_PARM_2
 \layout Standard
 
 
-\series bold 
+\family typewriter 
 __divsint
 \newline 
 _divuint.rel:
 \layout Standard
 
 
-\series bold 
+\family typewriter 
 __divuint_a_1_1
 \layout Standard
 
 
-\series bold 
+\family typewriter 
 __divuint_PARM_2
 \layout Standard
 
 
-\series bold 
+\family typewriter 
 __divuint_reste_1_1
 \layout Standard
 
 
-\series bold 
+\family typewriter 
 __divuint_count_1_1
 \layout Standard
 
 
-\series bold 
+\family typewriter 
 __divuint
 \newline 
 _modsint.rel:
 \layout Standard
 
 
-\series bold 
+\family typewriter 
 __modsint_a_1_1
 \layout Standard
 
 
-\series bold 
+\family typewriter 
 __modsint_PARM_2
 \layout Standard
 
 
-\series bold 
+\family typewriter 
 __modsint
 \newline 
 _moduint.rel:
 \layout Standard
 
 
-\series bold 
+\family typewriter 
 __moduint_a_1_1
 \layout Standard
 
 
-\series bold 
+\family typewriter 
 __moduint_PARM_2
 \layout Standard
 
 
-\series bold 
+\family typewriter 
 __moduint_count_1_1
 \layout Standard
 
 
-\series bold 
+\family typewriter 
 __moduint
 \newline 
 _mulint.rel:
 \layout Standard
 
 
-\series bold 
+\family typewriter 
 __mulint_PARM_2
 \layout Standard
 
 
-\series bold 
+\family typewriter 
 __mulint
+\family default 
+\series bold 
+
 \newline 
 
 \layout Standard
 
-If the source files are compiled using --debug, the corresponding debug
- information file .adb will be include in the library file as well.
+If the source files are compiled using -
+\begin_inset ERT
+status Open
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-debug
+\begin_inset LatexCommand \index{-\/-debug}
+
+\end_inset 
+
+, the corresponding debug information file .adb will be include in the library
+ file as well.
  The library files created with sdcclib are plain text files, so they can
  be viewed with a text editor.
  It is not recomended to modify a library file created with sdcclib using
@@ -4954,6 +5042,11 @@ Processor Selection Options
  AVR users should probably have a look at avr-gcc 
 \begin_inset LatexCommand \url{ http://savannah.nongnu.org/download/avr-libc/snapshots/}
 
+\end_inset 
+
+ or winavr 
+\begin_inset LatexCommand \url{http://winavr.sourceforge.net}
+
 \end_inset 
 
 .
@@ -6319,7 +6412,13 @@ status Collapsed
 \series default 
  Will not do loop invariant optimizations, this may be turned off for reasons
  explained for the previous option.
- For more details of loop optimizations performed see section Loop Invariants.
+ For more details of loop optimizations performed see Loop Invariants in
+ section 
+\begin_inset LatexCommand \ref{sub:Loop-Optimizations}
+
+\end_inset 
+
+.
  It is recommended that this option NOT be used, #pragma\SpecialChar ~
 noinvariant
 \begin_inset LatexCommand \index{\#pragma noinvariant}
@@ -6735,7 +6834,12 @@ reentrant
 \end_inset 
 
 .
- see section Parameters and Local Variables for more details.
+ See section 
+\begin_inset LatexCommand \ref{sec:Parameters-and-Local-Variables}
+
+\end_inset 
+
+ Parameters and Local Variables for more details.
  If this option is used all source files in the project should be compiled
  with this option.
  
@@ -6820,7 +6924,7 @@ callee_saves
 \series bold 
 -
 \begin_inset ERT
-status Collapsed
+status Open
 
 \layout Standard
 
@@ -6986,14 +7090,16 @@ status Collapsed
 
 
 \series default 
- This option can be used when the code generated is called by a monitor
- program.
- The compiler will generate a 'ret' upon return from the 'main'
+ This option can be used if the code generated is called by a monitor program
+ or if the main routine includes an endless loop.
+ This option might result in slightly smaller code and save two bytes of
+ stack space.
+ The return from the 'main'
 \begin_inset LatexCommand \index{main return}
 
 \end_inset 
 
- function.
+ function will return to the function calling main.
  The default setting is to lock up i.e.
  generate a '
 \family typewriter 
@@ -7111,7 +7217,30 @@ status Collapsed
 
 \series default 
  Hides your ugly and inefficient c-code from the asm file, so you can always
- blame the compiler :).
+ blame the compiler :)
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold 
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-no-peep-comments
+\begin_inset LatexCommand \index{-\/-no-peep-comments}
+
+\end_inset 
+
+
+\series default 
+ Will not include peep-hole comments in the generated files.
 \layout List
 \labelwidthstring 00.00.0000
 
@@ -8267,8 +8396,7 @@ _test_bit
 The bit addressable memory consists of 128 bits which are located from 0x20
  to 0x2f in data memory.
  
-\layout Standard
-
+\newline 
 Apart from this 8051 specific storage class most architectures support ANSI-C
  bitfields
 \begin_inset LatexCommand \index{bitfields}
@@ -8276,15 +8404,6 @@ Apart from this 8051 specific storage class most architectures support ANSI-C
 \end_inset 
 
 
-\newline 
-
-\layout Standard
-
-In accordance with ISO/IEC 9899 bits and bitfields without an explicit signed
- modifier are implemented as unsigned.
-\layout Standard
-
-
 \begin_inset Foot
 collapsed false
 
@@ -8295,6 +8414,8 @@ Not really meant as examples, but nevertheless showing what bitfields are
 \end_inset 
 
 .
+ In accordance with ISO/IEC 9899 bits and bitfields without an explicit
+ signed modifier are implemented as unsigned.
 \layout Subsubsection
 
 sfr
@@ -9012,7 +9133,7 @@ In case of memory mapped I/O devices the keyword
 \emph on 
 volatile
 \emph default 
should be used to tell the compiler that accesses might not be optimized
have to be used to tell the compiler that accesses might not be optimized
  away:
 \layout Verse
 
@@ -9091,37 +9212,81 @@ le space.
 
 
 \family typewriter 
-extern volatile bit SDI;
+extern volatile bit MOSI;\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+/* master out, slave in */
 \newline 
-extern volatile bit SCLK;
+extern volatile bit MISO;\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+/* master in, slave out */
 \newline 
-extern volatile bit CPOL;
+extern volatile bit MCLK;\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+/* master clock */
 \newline 
 
 \newline 
-void DS1306_put(unsigned char value)
+/* Input and Output of a byte on a 3-wire serial bus.
 \newline 
-{
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+If needed adapt polarity of clock, polarity of data and bit order
+\newline 
+\SpecialChar ~
+*/
+\newline 
+unsigned char spi_io(unsigned char out_byte) 
+\newline 
+{ 
 \newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-unsigned char mask=0x80;
+unsigned char i=8;
 \newline 
-
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+do { 
 \newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-while(mask)
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+MOSI = out_byte & 0x80; 
 \newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-{
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+out_byte <<= 1;
+\newline 
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+MCLK = 1; 
 \newline 
 \SpecialChar ~
 \SpecialChar ~
@@ -9131,7 +9296,15 @@ while(mask)
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-SDI=(value & mask)?1:0;
+/* _asm nop _endasm; */\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+/* for slow peripherals */
 \newline 
 \SpecialChar ~
 \SpecialChar ~
@@ -9141,7 +9314,7 @@ SDI=(value & mask)?1:0;
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-SCLK=!CPOL;
+if(MISO) 
 \newline 
 \SpecialChar ~
 \SpecialChar ~
@@ -9151,7 +9324,11 @@ SCLK=!CPOL;
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-SCLK=CPOL;
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+out_byte += 1; 
 \newline 
 \SpecialChar ~
 \SpecialChar ~
@@ -9161,13 +9338,19 @@ SCLK=CPOL;
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-mask/=2;
+MCLK = 0; 
 \newline 
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-}
+} while(--i);
+\newline 
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+return out_byte; 
 \newline 
 }
 \layout Standard
@@ -9177,29 +9360,23 @@ Then, someplace in the code for the first hardware you would use
 
 
 \family typewriter 
-bit at 0x80 SDI;\SpecialChar ~
+bit at 0x80 MOSI;\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 /* I/O port 0, bit 0 */
 \newline 
-bit at 0x81 SCLK;\SpecialChar ~
+bit at 0x81 MISO;\SpecialChar ~
+\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 /* I/O port 0, bit 1 */
 \newline 
-bit CPOL;\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
+bit at 0x82 MCLK;\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-/* This is a variable, let the linker allocate this one */
+/* I/O port 0, bit 2 */
 \layout Standard
 
 Similarly, for the second hardware you would use
@@ -9207,13 +9384,14 @@ Similarly, for the second hardware you would use
 
 
 \family typewriter 
-bit at 0x83 SDI;\SpecialChar ~
+bit at 0x83 MOSI;\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 /* I/O port 0, bit 3 */
 \newline 
-bit at 0x91 SCLK;\SpecialChar ~
+bit at 0x91 MISO;\SpecialChar ~
+\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 /* I/O port 1, bit 1 */
@@ -9223,18 +9401,11 @@ bit
 
 \end_inset 
 
- CPOL;\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
+ at 0x92 MCLK;\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-\SpecialChar ~
-/* This is a variable, let the linker allocate this one */
+/* I/O port 1, bit 2 */
 \layout Standard
 
 and you can use the same hardware dependent routine without changes, as
@@ -9259,6 +9430,11 @@ Parameters
 \end_inset 
 
 
+\begin_inset LatexCommand \label{sec:Parameters-and-Local-Variables}
+
+\end_inset 
+
+
 \layout Standard
 
 Automatic (local) variables and parameters to functions can either be placed
@@ -9289,7 +9465,7 @@ They can be placed on the stack
 
 \end_inset 
 
either by using the
+ by using the
 \emph on 
  -
 \begin_inset ERT
@@ -9308,7 +9484,17 @@ status Collapsed
 
 
 \emph default 
- option or by using the 
+ option, by using 
+\emph on 
+#pragma\SpecialChar ~
+stackauto
+\emph default 
+
+\begin_inset LatexCommand \index{\#pragma stackauto}
+
+\end_inset 
+
+ or by using the 
 \emph on 
 reentrant
 \begin_inset LatexCommand \index{reentrant}
@@ -9697,11 +9883,9 @@ using
 \layout Standard
 
 Interrupt service routines open the door for some very interesting bugs:
-\layout Standard
-
-If the interrupt service routines changes variables which are accessed by
- other functions these variables should be declared 
+\newline 
+If an interrupt service routine changes variables which are accessed by
+ other functions these variables have to be declared 
 \emph on 
 volatile
 \emph default 
@@ -9725,7 +9909,7 @@ atomic
 \emph default 
  (i.e.
  the processor needs more than one instruction for the access and could
- be interrupted while accessing the variable) the interrupt must disabled
+ be interrupted while accessing the variable) the interrupt must be disabled
  during the access to avoid inconsistent data.
  Access to 16 or 32 bit variables is obviously not atomic on 8 bit CPUs
  and should be protected by disabling interrupts.
@@ -9789,24 +9973,54 @@ counter
  
 \layout Standard
 
-A special note here, int (16 bit) and long (32 bit) integer division
-\begin_inset LatexCommand \index{Division}
+The return address and the registers used in the interrupt service routine
+ are saved on the stack
+\begin_inset LatexCommand \index{stack}
 
 \end_inset 
 
-, multiplication
-\begin_inset LatexCommand \index{Multiplication}
-
-\end_inset 
+ so there must be sufficient stack space.
+ If there isn't variables or registers (or even the return address itself)
+ will be corrupted.
+ This 
+\emph on 
+stack overflow
+\emph default 
 
- & modulus
-\begin_inset LatexCommand \index{Modulus}
+\begin_inset LatexCommand \index{stack overflow}
 
 \end_inset 
 
- and floating-point
-\begin_inset LatexCommand \index{Floating point support}
-
+ is most likely to happen if the interrupt occurs during the 
+\begin_inset Quotes sld
+\end_inset 
+
+deepest
+\begin_inset Quotes srd
+\end_inset 
+
+ subroutine when the stack is already in use for f.e.
+ many return addresses.
+\layout Standard
+
+A special note here, int (16 bit) and long (32 bit) integer division
+\begin_inset LatexCommand \index{Division}
+
+\end_inset 
+
+, multiplication
+\begin_inset LatexCommand \index{Multiplication}
+
+\end_inset 
+
+ & modulus
+\begin_inset LatexCommand \index{Modulus}
+
+\end_inset 
+
+ and floating-point
+\begin_inset LatexCommand \index{Floating point support}
+
 \end_inset 
 
  operations are implemented using external support routines developed in
@@ -10141,6 +10355,41 @@ Since the number of interrupts available is chip specific and the interrupt
 \end_inset 
 
  for details on customizing startup.
+\layout Subsection
+
+Z80 Interrupt Service Routines
+\layout Standard
+
+The Z80 uses several different methods for determining the correct interrupt
+ vector depending on the hardware implementation.
+ Therefore, SDCC ignores the optional interrupt number and does not attempt
+ to generate an interrupt vector table.
+\layout Standard
+
+By default, SDCC generates code for a maskable interrupt, which uses an
+ RETI instruction to return from the interrupt.
+ To write an interrupt handler for the non-maskable interrupt, which needs
+ an RETN instruction instead, add the 
+\emph on 
+critical
+\emph default 
+ keyword:
+\layout Verse
+
+
+\family typewriter 
+void nmi_isr (void) critical interrupt
+\newline 
+{ 
+\newline 
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+...
+\newline 
+}
 \layout Section
 
 Enabling and Disabling Interrupts
@@ -10463,7 +10712,12 @@ interrupt priorities
  On some architectures which don't support interrupt priorities these can
  be implemented by manipulating the interrupt mask and reenabling interrupts
  within the interrupt routine.
- Don't add complexity unless you have to.
+ Check there is sufficient space on the stack
+\begin_inset LatexCommand \index{stack}
+
+\end_inset 
+
+ and don't add complexity unless you have to.
  
 \layout Section
 
@@ -10626,7 +10880,12 @@ _sdcc_external_startup()
  initialization.
  On some mcs51 variants xdata has to be explicitly enabled before it can
  be accessed, this is the place to do it.
- See also the compiler option 
+ The startup code clears the complete 256 byte of idata memory, this might
+ cause problems for 128 byte devices (endless loop reported for Chipcon
+ CC1010).
+\layout Standard
+
+See also the compiler option 
 \emph on 
 -
 \begin_inset ERT
@@ -10763,7 +11022,11 @@ if( head != tail-1 )
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-buf[ head++ ] = c; 
+buf[ head++ ] = c;\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+/* access to a 256 byte aligned array */
 \newline 
 } 
 \layout Standard
@@ -13611,7 +13874,8 @@ save
 \end_inset 
 
  - this will save all current options to the save/restore stack.
- See restore.
+ See #pragma\SpecialChar ~
+restore.
 \layout Itemize
 
 restore
@@ -13623,47 +13887,103 @@ restore
  saves & restores can be nested.
  SDCC uses a save/restore stack: save pushes current options to the stack,
  restore pulls current options from the stack.
- See save.
+ See #pragma\SpecialChar ~
+save.
+\newline 
+
 \layout Itemize
 
-nogcse
-\begin_inset LatexCommand \index{\#pragma nogcse}
+callee_saves
+\begin_inset LatexCommand \index{\#pragma callee\_saves}
 
 \end_inset 
 
- - will stop global common subexpression elimination.
-\layout Itemize
 
-noinduction
-\begin_inset LatexCommand \index{\#pragma noinduction}
+\begin_inset LatexCommand \index{function prologue}
 
 \end_inset 
 
- - will stop loop induction optimizations.
-\layout Itemize
+ function1[,function2[,function3...]] - The compiler by default uses a caller
+ saves convention for register saving across function calls, however this
+ can cause unnecessary register pushing & popping
+\begin_inset LatexCommand \index{push/pop}
 
-nojtbound
-\begin_inset LatexCommand \index{\#pragma nojtbound}
+\end_inset 
 
+ when calling small functions from larger functions.
+ This option can be used to switch off the register saving convention for
+ the function names specified.
+ The compiler will not save registers when calling these functions, extra
+ code need to be manually inserted at the entry & exit for these functions
+ to save & restore the registers used by these functions, this can SUBSTANTIALLY
+ reduce code & improve run time performance of the generated code.
+ In the future the compiler (with inter procedural analysis) may be able
+ to determine the appropriate scheme to use for each function call.
+ If -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
 \end_inset 
 
- - will not generate code for boundary value checking, when switch statements
- are turned into jump-tables (dangerous).
- For more details see section 
-\begin_inset LatexCommand \ref{sub:'switch'-Statements}
+-callee-saves command line option is used, the function names specified
+ in #pragma\SpecialChar ~
+callee_saves
+\begin_inset LatexCommand \index{\#pragma callee\_saves}
 
 \end_inset 
 
-.
+ is appended to the list of functions specified in the command line.
 \layout Itemize
 
-nooverlay
-\begin_inset LatexCommand \index{\#pragma nooverlay}
+exclude
+\begin_inset LatexCommand \index{\#pragma exclude}
 
 \end_inset 
 
- - the compiler will not overlay the parameters and local variables of a
- function.
+ none | {acc[,b[,dpl[,dph]]] - The exclude pragma disables the generation
+ of pairs of push/pop
+\begin_inset LatexCommand \index{push/pop}
+
+\end_inset 
+
+ instructions in 
+\emph on 
+I
+\emph default 
+nterrupt
+\begin_inset LatexCommand \index{interrupt}
+
+\end_inset 
+
+\emph on 
+S
+\emph default 
+ervice 
+\emph on 
+R
+\emph default 
+outines.
+ The directive should be placed immediately before the ISR function definition
+ and it affects ALL ISR functions following it.
+ To enable the normal register saving for ISR functions use #pragma\SpecialChar ~
+exclude\SpecialChar ~
+none
+\begin_inset LatexCommand \index{\#pragma exclude}
+
+\end_inset 
+
+.
+ See also the related keyword _naked
+\begin_inset LatexCommand \index{\_naked}
+
+\end_inset 
+
+.
 \layout Itemize
 
 less_pedantic
@@ -13675,37 +13995,30 @@ less_pedantic
  your own now ;-(
 \layout Itemize
 
-noloopreverse
-\begin_inset LatexCommand \index{\#pragma noloopreverse}
+nogcse
+\begin_inset LatexCommand \index{\#pragma nogcse}
 
 \end_inset 
 
- - Will not do loop reversal optimization
+ - will stop global common subexpression elimination.
 \layout Itemize
 
-exclude
-\begin_inset LatexCommand \index{\#pragma exclude}
+noinduction
+\begin_inset LatexCommand \index{\#pragma noinduction}
 
 \end_inset 
 
- none | {acc[,b[,dpl[,dph]]] - The exclude pragma disables generation of
- pair of push/pop
-\begin_inset LatexCommand \index{push/pop}
-
-\end_inset 
+ - will stop loop induction optimizations.
+\layout Itemize
 
- instruction in ISR function (using interrupt
-\begin_inset LatexCommand \index{interrupt}
+noinvariant
+\begin_inset LatexCommand \index{\#pragma noinvariant}
 
 \end_inset 
 
- keyword).
- The directive should be placed immediately before the ISR function definition
- and it affects ALL ISR functions following it.
- To enable the normal register saving for ISR functions use #pragma\SpecialChar ~
-exclude\SpecialChar ~
-none
-\begin_inset LatexCommand \index{\#pragma exclude}
+ - will not do loop invariant optimizations.
+ For more details see Loop Invariants in section
+\begin_inset LatexCommand \ref{sub:Loop-Optimizations}
 
 \end_inset 
 
@@ -13737,33 +14050,44 @@ noiv
 about interrupts.
 \layout Itemize
 
-callee_saves
-\begin_inset LatexCommand \index{\#pragma callee\_saves}
+nojtbound
+\begin_inset LatexCommand \index{\#pragma nojtbound}
 
 \end_inset 
 
+ - will not generate code for boundary value checking, when switch statements
+ are turned into jump-tables (dangerous).
+ For more details see section 
+\begin_inset LatexCommand \ref{sub:'switch'-Statements}
 
-\begin_inset LatexCommand \index{function prologue}
+\end_inset 
+
+.
+\layout Itemize
+
+noloopreverse
+\begin_inset LatexCommand \index{\#pragma noloopreverse}
 
 \end_inset 
 
- function1[,function2[,function3...]] - The compiler by default uses a caller
- saves convention for register saving across function calls, however this
- can cause unnecessary register pushing & popping
-\begin_inset LatexCommand \index{push/pop}
+ - Will not do loop reversal optimization
+\layout Itemize
+
+nooverlay
+\begin_inset LatexCommand \index{\#pragma nooverlay}
 
 \end_inset 
 
- when calling small functions from larger functions.
- This option can be used to switch off the register saving convention for
- the function names specified.
- The compiler will not save registers when calling these functions, extra
- code need to be manually inserted at the entry & exit for these functions
- to save & restore the registers used by these functions, this can SUBSTANTIALLY
- reduce code & improve run time performance of the generated code.
- In the future the compiler (with inter procedural analysis) may be able
- to determine the appropriate scheme to use for each function call.
- If -
+ - the compiler will not overlay the parameters and local variables of a
+ function.
+\layout Itemize
+
+stackauto
+\begin_inset LatexCommand \index{\#pragma stackauto}
+
+\end_inset 
+
+- See option -
 \begin_inset ERT
 status Collapsed
 
@@ -13773,14 +14097,17 @@ status Collapsed
 /
 \end_inset 
 
--callee-saves command line option is used, the function names specified
- in #pragma\SpecialChar ~
-callee_saves
-\begin_inset LatexCommand \index{\#pragma callee\_saves}
+-stack-auto
+\begin_inset LatexCommand \index{-\/-stack-auto}
 
 \end_inset 
 
- is appended to the list of functions specified in the command line.
+ and section 
+\begin_inset LatexCommand \ref{sec:Parameters-and-Local-Variables}
+
+\end_inset 
+
+ Parameters and Local Variables.
 \layout Standard
 
 SDCPP supports the following #pragma directives:
@@ -14275,24 +14602,32 @@ sfr
  is where the chip designers decided to put it.
  Needless to say that they didn't agree on a common name either.
  So that the startup code can correctly initialize xdata variables, you
- should define an sfr with the name _PAGESFR at the appropriate location
- if the default, port P2, is not used for this.
+ should define an sfr with the name _XPAGE
+\family typewriter 
+
+\begin_inset LatexCommand \index{\_XPAGE (mcs51)}
+
+\end_inset 
+
+
+\family default 
+ at the appropriate location if the default, port P2, is not used for this.
  Some examples are:
 \layout Verse
 
 
 \family typewriter 
-sfr at 0x92 _PAGESFR; /* Cypress EZ-USB family */
+sfr at 0x92 _XPAGE; /* Cypress EZ-USB family */
 \layout Verse
 
 
 \family typewriter 
-sfr at 0xaf _PAGESFR; /* some Silicon Labs (Cygnal) chips */
+sfr at 0xaf _XPAGE; /* some Silicon Labs (Cygnal) chips */
 \layout Verse
 
 
 \family typewriter 
-sfr at 0xaa _PAGESFR; /* some Silicon Labs (Cygnal) chips */
+sfr at 0xaa _XPAGE; /* some Silicon Labs (Cygnal) chips */
 \layout Standard
 
 For more exotic implementations further customizations may be needed.
@@ -14318,6 +14653,24 @@ Some MCS51 variants offer features like Double DPTR
  a patch to SDCC.
 \layout Section
 
+DS400 port
+\layout Standard
+
+The DS80C400 microcontroller has a rich set of peripherals.
+ In its built-in ROM library it includes functions to access some of the
+ features, among them is a TCP stack with IP4 and IP6 support.
+ Library headers (currently in beta status) and other files are provided
+ at 
+\size footnotesize 
+
+\begin_inset LatexCommand \url{ftp://ftp.dalsemi.com/pub/tini/ds80c400/c_libraries/sdcc/index.html}
+
+\end_inset 
+
+.
+\layout Section
+
 The Z80 and gbz80 port
 \layout Standard
 
@@ -14479,16 +14832,23 @@ void Intr(void) interrupt 0
 T0IF = 0; /* Clear timer interrupt */
 \newline 
 }
-\layout Standard
+\layout Subsection
 
 Linking and assembling
-\newline 
+\layout Standard
+
 For assembling you can use either GPUTILS'
 \begin_inset LatexCommand \index{gputils (pic tools)}
 
 \end_inset 
 
  gpasm.exe or MPLAB's mpasmwin.exe.
+ GPUTILS is available from 
+\begin_inset LatexCommand \url{http://gputils.sourceforge.net/}
+
+\end_inset 
+
+.
  For linking you can use either GPUTIL's gplink or MPLAB's mplink.exe.
  If you use MPLAB and an interrupt function then the linker script file
  vectors section will need to be enlarged to link with mplink.
@@ -14585,6 +14945,13 @@ $(PRJ).hex: $(OBJS)
 \SpecialChar ~
 \SpecialChar ~
 mplink /v $(PRJ).lkr /m $(PRJ).map /o $(PRJ).hex $(OBJS)
+\layout Standard
+
+Please note that indentations within a
+\family typewriter 
+ Makefile
+\family default 
+ have to be done with a tabulator character.
 \layout Section
 
 The PIC16
@@ -14710,6 +15077,11 @@ status Collapsed
 \layout Subsection
 
 Port Specific Options
+\begin_inset LatexCommand \index{Options PIC16}
+
+\end_inset 
+
+
 \layout Standard
 
 The port specific options appear after the global options in the sdcc --help
@@ -14832,6 +15204,49 @@ status Collapsed
 -preplace-udata-with=[kword] Replaces the default udata keyword for allocating
  unitialized data variables with [kword].
  Valid keywords are: "udata_acs", "udata_shr", "udata_ovr".
+\layout List
+\labelwidthstring 00.00.0000
+
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-ivt-loc <nnnn> positions the Interrupt Vector Table at location <nnnn>.
+ Useful for bootloaders.
+\layout List
+\labelwidthstring 00.00.0000
+
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-asm= sets the full path and name of an external assembler to call.
+\layout List
+\labelwidthstring 00.00.0000
+
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-link= sets the full path and name of an external linker to call.
 \layout Subsubsection
 
 Debugging Options
@@ -14851,7 +15266,22 @@ status Collapsed
 /
 \end_inset 
 
--debug-xtra Similar to --debug, but dumps more information.
+-debug-xtra Similar to -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-debug
+\begin_inset LatexCommand \index{-\/-debug}
+
+\end_inset 
+
+, but dumps more information.
 \layout List
 \labelwidthstring 00.00.0000
 
@@ -14949,8 +15379,12 @@ xxxx
 Directories
 \layout Standard
 
-PIC16 port uses the following directories for searching header files and
- libraries.
+PIC16
+\begin_inset LatexCommand \index{PIC16}
+
+\end_inset 
+
+ port uses the following directories for searching header files and libraries.
 \layout Standard
 \align center 
 
@@ -15071,6 +15505,11 @@ Linker
 \layout Subsection
 
 Pragmas
+\begin_inset LatexCommand \label{sub:PIC16_Pragmas}
+
+\end_inset 
+
+
 \layout Standard
 
 PIC16 port currently supports the following pragmas:
@@ -15098,9 +15537,6 @@ It is important to initialize the stack, otherwise strange things can happen.
 \newline 
 The stack pragma should be used only once in a project.
  Multiple pragmas may result in indeterminate behaviour of the program.
-\newline 
-If you omit setting the pragma the port emits a warning message before linking.
- If not initializing the stack is desired ignore the message.
 \layout LyX-Code
 
 Example:
@@ -15108,15 +15544,124 @@ Example:
 
 \layout LyX-Code
 
-/* initializes stack at RAM address 0x5ff*/
+/* initializes stack at RAM address 0x5ff */
 \layout LyX-Code
 
 #pragma stack 0x5ff
+\layout List
+\labelwidthstring 00.00.0000
+
+udata pragma udata instructs the compiler to emit code so that linker will
+ place a variable at a specific memory bank
+\layout LyX-Code
+
+Example:
+\layout LyX-Code
+
+\layout LyX-Code
+
+/* places variable foo at bank2 */
+\layout LyX-Code
+
+#pragma udata bank2 foo
+\layout LyX-Code
+
+char foo;
+\layout Standard
+
+In order for this pragma to work there are some changes that must be made
+ in the .lkr script used in link stage.
+ In the following example a sample .lkr file is shown:
+\layout LyX-Code
+
+\layout LyX-Code
+
+// Sample linker script for the PIC18F452 processor
+\layout LyX-Code
+
+LIBPATH .
+\layout LyX-Code
+
+CODEPAGE   NAME=vectors    START=0x0            END=0x29           PROTECTED
+\layout LyX-Code
+
+CODEPAGE   NAME=page       START=0x2A           END=0x7FFF
+\layout LyX-Code
+
+CODEPAGE   NAME=idlocs     START=0x200000       END=0x200007       PROTECTED
+\layout LyX-Code
+
+CODEPAGE   NAME=config     START=0x300000       END=0x30000D       PROTECTED
+\layout LyX-Code
+
+CODEPAGE   NAME=devid      START=0x3FFFFE       END=0x3FFFFF       PROTECTED
+\layout LyX-Code
+
+CODEPAGE   NAME=eedata     START=0xF00000       END=0xF000FF       PROTECTED
+\layout LyX-Code
+
+ACCESSBANK NAME=accessram  START=0x0            END=0x7F
+\layout LyX-Code
+
+\layout LyX-Code
+
+DATABANK   NAME=gpr0       START=0x80           END=0xFF
+\layout LyX-Code
+
+DATABANK   NAME=gpr1       START=0x100          END=0x1FF
+\layout LyX-Code
+
+DATABANK   NAME=gpr2       START=0x200          END=0x2FF
+\layout LyX-Code
+
+DATABANK   NAME=gpr3       START=0x300          END=0x3FF
+\layout LyX-Code
+
+DATABANK   NAME=gpr4       START=0x400          END=0x4FF
+\layout LyX-Code
+
+DATABANK   NAME=gpr5       START=0x500          END=0x5FF
+\layout LyX-Code
+
+ACCESSBANK NAME=accesssfr  START=0xF80          END=0xFFF          PROTECTED
+\layout LyX-Code
+
+\layout LyX-Code
+
+SECTION    NAME=CONFIG     ROM=config
+\layout LyX-Code
+
+\layout LyX-Code
+
+SECTION    NAME=bank0      RAM=gpr0
+\layout LyX-Code
+
+SECTION    NAME=bank1      RAM=gpr1
+\layout LyX-Code
+
+SECTION    NAME=bank2      RAM=gpr2
+\layout LyX-Code
+
+SECTION    NAME=bank3      RAM=gpr3
+\layout LyX-Code
+
+SECTION    NAME=bank4      RAM=gpr4
 \layout LyX-Code
 
+SECTION    NAME=bank5      RAM=gpr5
+\layout Standard
+
+The linker will recognise the section name set in the pragma statement and
+ will position the variable at the memory bank set with the RAM field at
+ the SECTION line in the linker script file.
 \layout Subsection
 
 Header Files
+\begin_inset LatexCommand \label{sub:PIC16_Header-Files}
+
+\end_inset 
+
+
 \layout Standard
 
 There is one main header file that can be included to the source files using
@@ -15127,7 +15672,7 @@ pic18fregs.h
 \series default 
 .
  This header file contains the definitions for the processor special registers,
- so it is necessery if the soruce accesses them.
+ so it is necessary if the source accesses them.
  It can be included by adding the following line in the beginning of the
  file:
 \layout LyX-Code
@@ -15142,9 +15687,13 @@ The specific microcontroller is selected within the pic18fregs.h automatically,
 Libraries
 \layout Standard
 
-The libraries that pic16 port depends on are the microcontroller device
- libraries which contain the symbol definitions for the microcontroller
- special function registers.
+The libraries that PIC16
+\begin_inset LatexCommand \index{PIC16}
+
+\end_inset 
+
+ port depends on are the microcontroller device libraries which contain
+ the symbol definitions for the microcontroller special function registers.
  These libraries have the format pic18fxxxx.lib, where 
 \emph on 
 xxxx
@@ -15165,7 +15714,7 @@ Libraries are created with gplib which is part of the gputils package
 Memory Models
 \layout Standard
 
-The following memory models are supported by PIC16 port:
+The following memory models are supported by the PIC16 port:
 \layout Itemize
 
 small model
@@ -15286,8 +15835,13 @@ near
  model's pointers.
 \layout Standard
 
-The standard device libraries (see 4.5.6) contain no reference to pointers,
- so they can be used with both memory models.
+The standard device libraries (see 
+\begin_inset LatexCommand \ref{sub:PIC16_Header-Files}
+
+\end_inset 
+
+) contain no reference to pointers, so they can be used with both memory
+ models.
 \layout Subsection
 
 Stack
@@ -15305,7 +15859,7 @@ FSR1 is assigned as stack pointer
 FSR2 is assigned as frame pointer
 \layout Standard
 
-The following stack models are supported by PIC16 port
+The following stack models are supported by the PIC16 port
 \layout Itemize
 
 small model
@@ -15425,7 +15979,12 @@ Frame pointer FSR2
 
 \series bold 
 Currently stack and frame pointers should be initialized explicit by the
- user at the desired Data RAM position (see 4.5.5 Pragma Stack).
+ user at the desired Data RAM position (see 
+\begin_inset LatexCommand \ref{sub:PIC16_Pragmas}
+
+\end_inset 
+
+ Pragma stack).
  Uninitialized stack and frame pointers can result in unexpected behavior
  of the resulting binary.
 \layout Subsection
@@ -15562,8 +16121,12 @@ on stack, FSR0 points to the beginning
 Interrupts
 \layout Standard
 
-When entering an interrupt, currently the PIC16 port automatically saves
- the following registers:
+When entering an interrupt, currently the PIC16
+\begin_inset LatexCommand \index{PIC16}
+
+\end_inset 
+
+ port automatically saves the following registers:
 \layout Itemize
 
 WREG
@@ -15581,7 +16144,17 @@ PROD (PRODL and PRODH)
 FSR0 (FSR0L and FSR0H)
 \layout Standard
 
-These registers are restored upon return from the interrupt routine
+These registers are restored upon return from the interrupt routine.
+\layout Standard
+
+When entering a high priority interrupt WREG, STATUS and BSR are not explicit
+ saved by software.
+ The hardware shadow registers for WREG, STATUS and BSR are used in these
+ cases.
+\layout Standard
+
+
 \begin_inset Foot
 collapsed false
 
@@ -15631,10 +16204,23 @@ on, which also builds and installs the debugger in the target directory
 Compiling for Debugging
 \layout Standard
 
-The \SpecialChar \-
-\SpecialChar \-
-debug option must be specified for all files for which debug information
- is to be generated.
+The -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash 
+/
+\end_inset 
+
+-debug
+\begin_inset LatexCommand \index{-\/-debug}
+
+\end_inset 
+
+ option must be specified for all files for which debug information is to
+ be generated.
  The complier generates a .adb file for each of these files.
  The linker creates the .cdb
 \begin_inset LatexCommand \index{<file>.cdb}
@@ -16005,7 +16591,8 @@ The following is a list of key mapping for the debugger interface.
 \family typewriter 
 
 \newline 
-;; Current Listing :: 
+;;\SpecialChar ~
+Current Listing :: 
 \newline 
 ;;key\SpecialChar ~
 \SpecialChar ~
@@ -16021,7 +16608,6 @@ The following is a list of key mapping for the debugger interface.
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-\SpecialChar ~
 binding\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -16060,8 +16646,7 @@ Comment
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
-\SpecialChar ~
-------\SpecialChar ~
+-------\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -16083,11 +16668,13 @@ Comment
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
---------
+-------
 \newline 
 ;; 
 \newline 
-;; n\SpecialChar ~
+;;\SpecialChar ~
+n\SpecialChar ~
+\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -16101,7 +16688,7 @@ Comment
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- sdcdb-next-from-src\SpecialChar ~
+sdcdb-next-from-src\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -16113,7 +16700,9 @@ Comment
 \SpecialChar ~
 SDCDB next command 
 \newline 
-;; b\SpecialChar ~
+;;\SpecialChar ~
+b\SpecialChar ~
+\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -16127,7 +16716,7 @@ SDCDB next command
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- sdcdb-back-from-src\SpecialChar ~
+sdcdb-back-from-src\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -16139,7 +16728,9 @@ SDCDB next command
 \SpecialChar ~
 SDCDB back command 
 \newline 
-;; c\SpecialChar ~
+;;\SpecialChar ~
+c\SpecialChar ~
+\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -16153,7 +16744,7 @@ SDCDB back command
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- sdcdb-cont-from-src\SpecialChar ~
+sdcdb-cont-from-src\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -16165,7 +16756,9 @@ SDCDB back command
 \SpecialChar ~
 SDCDB continue command
 \newline 
-;; s\SpecialChar ~
+;;\SpecialChar ~
+s\SpecialChar ~
+\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -16179,7 +16772,7 @@ SDCDB continue command
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- sdcdb-step-from-src\SpecialChar ~
+sdcdb-step-from-src\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -16191,7 +16784,8 @@ SDCDB continue command
 \SpecialChar ~
 SDCDB step command 
 \newline 
-;; ?\SpecialChar ~
+;;\SpecialChar ~
+?\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -16205,7 +16799,8 @@ SDCDB step command
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- sdcdb-whatis-c-sexp\SpecialChar ~
+\SpecialChar ~
+sdcdb-whatis-c-sexp\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -16263,9 +16858,11 @@ SDCDB ptypecommand for data at
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- buffer point 
+\SpecialChar ~
+buffer point 
 \newline 
-;; x\SpecialChar ~
+;;\SpecialChar ~
+x\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -16279,7 +16876,8 @@ SDCDB ptypecommand for data at
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- sdcdbsrc-delete\SpecialChar ~
+\SpecialChar ~
+sdcdbsrc-delete\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -16341,9 +16939,12 @@ SDCDB Delete all breakpoints if no arg
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+\SpecialChar ~
 given or delete arg (C-u arg x) 
 \newline 
-;; m\SpecialChar ~
+;;\SpecialChar ~
+m\SpecialChar ~
+\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -16357,7 +16958,7 @@ given or delete arg (C-u arg x)
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- sdcdbsrc-frame\SpecialChar ~
+sdcdbsrc-frame\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -16472,7 +17073,9 @@ given or display frame arg
 \SpecialChar ~
 buffer point 
 \newline 
-;; !\SpecialChar ~
+;;\SpecialChar ~
+!\SpecialChar ~
+\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -16486,7 +17089,7 @@ buffer point
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- sdcdbsrc-goto-sdcdb\SpecialChar ~
+sdcdbsrc-goto-sdcdb\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -16498,7 +17101,9 @@ buffer point
 \SpecialChar ~
 Goto the SDCDB output buffer 
 \newline 
-;; p\SpecialChar ~
+;;\SpecialChar ~
+p\SpecialChar ~
+\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -16512,7 +17117,7 @@ Goto the SDCDB output buffer
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- sdcdb-print-c-sexp\SpecialChar ~
+sdcdb-print-c-sexp\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -16571,9 +17176,12 @@ SDCDB print command for data at
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- buffer point 
+\SpecialChar ~
+buffer point 
 \newline 
-;; g\SpecialChar ~
+;;\SpecialChar ~
+g\SpecialChar ~
+\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -16587,7 +17195,7 @@ SDCDB print command for data at
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- sdcdbsrc-goto-sdcdb\SpecialChar ~
+sdcdbsrc-goto-sdcdb\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -16599,7 +17207,9 @@ SDCDB print command for data at
 \SpecialChar ~
 Goto the SDCDB output buffer 
 \newline 
-;; t\SpecialChar ~
+;;\SpecialChar ~
+t\SpecialChar ~
+\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -16613,7 +17223,7 @@ Goto the SDCDB output buffer
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- sdcdbsrc-mode\SpecialChar ~
+sdcdbsrc-mode\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -16633,7 +17243,10 @@ Toggles Sdcdbsrc mode (turns it off)
 \newline 
 ;; 
 \newline 
-;; C-c C-f\SpecialChar ~
+;;\SpecialChar ~
+C-c\SpecialChar ~
+C-f\SpecialChar ~
+\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -16641,7 +17254,7 @@ Toggles Sdcdbsrc mode (turns it off)
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- sdcdb-finish-from-src\SpecialChar ~
+sdcdb-finish-from-src\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -16653,7 +17266,10 @@ SDCDB finish command
 \newline 
 ;; 
 \newline 
-;; C-x SPC\SpecialChar ~
+;;\SpecialChar ~
+C-x\SpecialChar ~
+SPC\SpecialChar ~
+\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -16661,7 +17277,7 @@ SDCDB finish command
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- sdcdb-break\SpecialChar ~
+sdcdb-break\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -16681,7 +17297,10 @@ SDCDB finish command
 \SpecialChar ~
 Set break for line with point 
 \newline 
-;; ESC t\SpecialChar ~
+;;\SpecialChar ~
+ESC\SpecialChar ~
+t\SpecialChar ~
+\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -16691,7 +17310,7 @@ Set break for line with point
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- sdcdbsrc-mode\SpecialChar ~
+sdcdbsrc-mode\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -16709,7 +17328,10 @@ Set break for line with point
 \SpecialChar ~
 Toggle Sdcdbsrc mode 
 \newline 
-;; ESC m\SpecialChar ~
+;;\SpecialChar ~
+ESC\SpecialChar ~
+m\SpecialChar ~
+\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -16719,7 +17341,7 @@ Toggle Sdcdbsrc mode
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- sdcdbsrc-srcmode\SpecialChar ~
+sdcdbsrc-srcmode\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -16731,7 +17353,8 @@ Toggle Sdcdbsrc mode
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
- Toggle list mode 
+\SpecialChar ~
+Toggle list mode 
 \newline 
 ;; 
 \newline 
@@ -16753,7 +17376,7 @@ Use the smallest data type to represent your data-value.
  promoted to 'signed int' before doing any operation.
  This promotion can be omitted, if the result is the same.
  The effect of the promotion rules together with the sign-extension is often
- supprising:
+ surprising:
 \begin_deeper 
 \layout Verse
 
@@ -17924,7 +18547,7 @@ splint
 
 \layout Standard
 
-Statically checks c sources
+Statically checks c sources (has anyone adapted splint for SDCC?)
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -18280,7 +18903,7 @@ The SDCC project is hosted on the SDCC sourceforge site at
 
 .
  You'll find the complete set of mailing lists
-\begin_inset LatexCommand \index{Mailing list}
+\begin_inset LatexCommand \index{Mailing list(s)}
 
 \end_inset 
 
@@ -18497,8 +19120,16 @@ Traffic on sdcc-devel and sdcc-user is about 100 mails/month each not counting
 
 \end_inset 
 
-, lists and forums are archived and searchable so if you are lucky someone
- already had a similar problem.
+, lists
+\begin_inset LatexCommand \index{Mailing list(s)}
+
+\end_inset 
+
+ and forums are archived and searchable so if you are lucky someone already
+ had a similar problem.
+ While mails to the lists themselves are delivered promptly their web front
+ end on sourceforge sometimes shows a severe time lag (up to several weeks),
+ if you're seriously using SDCC please consider subscribing to the lists.
 \layout Section
 
 ChangeLog
@@ -18902,10 +19533,22 @@ Loop Optimizations
 \end_inset 
 
 
+\begin_inset LatexCommand \label{sub:Loop-Optimizations}
+
+\end_inset 
+
+
 \layout Standard
 
-Two types of loop optimizations are done by SDCC loop invariant lifting
- and strength reduction of loop induction variables.
+Two types of loop optimizations are done by SDCC 
+\emph on 
+loop invariant
+\emph default 
+ lifting and
+\emph on 
+ strength reduction
+\emph default 
+ of loop induction variables.
  In addition to the strength reduction the optimizer marks the induction
  variables and the register allocator tries to keep the induction variables
  in registers for the duration of the loop.
@@ -20156,7 +20799,12 @@ status Collapsed
 \emph default 
 ).
  E.g.
- some variants of the 8051 MCU allow only 
+ some variants of the 8051 MCU
+\begin_inset LatexCommand \index{MCS51 variants}
+
+\end_inset 
+
+ allow only 
 \family typewriter 
 ajmp
 \family default 
@@ -20582,33 +21230,6 @@ int i,j; /* are valid in ANSI but not valid in SDCC */
 \newline 
 }
 \end_deeper 
-\layout Itemize
-
-functions declared as pointers
-\begin_inset LatexCommand \index{Pointer (to function)}
-
-\end_inset 
-
-
-\begin_inset LatexCommand \index{function pointers}
-
-\end_inset 
-
- must be dereferenced during the call.
-\begin_deeper 
-\layout Verse
-
-
-\family typewriter 
-int (*foo)();
-\newline 
-...
-\newline 
-/* has to be called like this */ 
-\newline 
-(*foo)(); /* ANSI standard allows calls to be made like 'foo()' */
-\end_deeper 
 \layout Section
 
 Cyclomatic Complexity