+\end_inset
+
+
+\layout Subsubsection
+
+Processor Selection Options
+\begin_inset LatexCommand \index{Options processor selection}
+
+\end_inset
+
+
+\begin_inset LatexCommand \index{Processor selection options}
+
+\end_inset
+
+
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-mmcs51
+\begin_inset LatexCommand \index{-mmcs51}
+
+\end_inset
+
+
+\series default
+ Generate code for the MCS51
+\begin_inset LatexCommand \index{MCS51}
+
+\end_inset
+
+ family of processors.
+ This is the default processor target.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-mds390
+\begin_inset LatexCommand \index{-mds390}
+
+\end_inset
+
+
+\series default
+ Generate code for the DS80C390
+\begin_inset LatexCommand \index{DS80C390}
+
+\end_inset
+
+ processor.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-mds400
+\begin_inset LatexCommand \index{-mds400}
+
+\end_inset
+
+
+\series default
+ Generate code for the DS80C400
+\begin_inset LatexCommand \index{DS80C400}
+
+\end_inset
+
+ processor.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-mz80
+\begin_inset LatexCommand \index{-mz80}
+
+\end_inset
+
+
+\series default
+ Generate code for the Z80
+\begin_inset LatexCommand \index{Z80}
+
+\end_inset
+
+ family of processors.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-mgbz80
+\begin_inset LatexCommand \index{-mgbz80}
+
+\end_inset
+
+
+\series default
+ Generate code for the GameBoy Z80
+\begin_inset LatexCommand \index{GameBoy Z80}
+
+\end_inset
+
+ processor.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-mavr
+\begin_inset LatexCommand \index{-mavr}
+
+\end_inset
+
+
+\series default
+ Generate code for the Atmel AVR
+\begin_inset LatexCommand \index{AVR}
+
+\end_inset
+
+ processor (In development, not complete).
+ AVR users should probably have a look at avr-gcc
+\begin_inset LatexCommand \url[FIXME: official URL?]{ http://savannah.nongnu.org/download/avr-libc/snapshots/}
+
+\end_inset
+
+.
+\layout Comment
+
+I think it is fair to direct users there for now.
+ Open source is also about avoiding unnecessary work .
+ But I didn't find the 'official' link.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-mpic14
+\begin_inset LatexCommand \index{-mpic14}
+
+\end_inset
+
+
+\series default
+ Generate code for the PIC 14
+\begin_inset LatexCommand \index{PIC14}
+
+\end_inset
+
+-bit processors (In development, not complete).
+\layout Comment
+
+p16f627 p16f628 p16f84 p16f873 p16f877?
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-mtlcs900h
+\series default
+ Generate code for the Toshiba TLCS-900H
+\begin_inset LatexCommand \index{TLCS-900H}
+
+\end_inset
+
+ processor (In development, not complete).
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-mxa51
+\begin_inset LatexCommand \index{-mxa51}
+
+\end_inset
+
+
+\series default
+ Generate code for the Philips XA51
+\begin_inset LatexCommand \index{XA51}
+
+\end_inset
+
+ processor (In development, not complete).
+\layout Subsubsection
+
+Preprocessor Options
+\begin_inset LatexCommand \index{Options preprocessor}
+
+\end_inset
+
+
+\begin_inset LatexCommand \index{Preprocessor options}
+
+\end_inset
+
+
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-I<path>
+\begin_inset LatexCommand \index{-I<path>}
+
+\end_inset
+
+
+\series default
+ The additional location where the pre processor will look for <..h> or
+\begin_inset Quotes eld
+\end_inset
+
+..h
+\begin_inset Quotes erd
+\end_inset
+
+ files.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-D<macro[=value]>
+\begin_inset LatexCommand \index{-D<macro[=value]>}
+
+\end_inset
+
+
+\series default
+ Command line definition of macros.
+ Passed to the pre processor.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-M
+\begin_inset LatexCommand \index{-M}
+
+\end_inset
+
+
+\series default
+ Tell the preprocessor to output a rule suitable for make describing the
+ dependencies of each object file.
+ For each source file, the preprocessor outputs one make-rule whose target
+ is the object file name for that source file and whose dependencies are
+ all the files `#include'd in it.
+ This rule may be a single line or may be continued with `
+\backslash
+'-newline if it is long.
+ The list of rules is printed on standard output instead of the preprocessed
+ C program.
+ `-M' implies `-E'.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-C
+\begin_inset LatexCommand \index{-C}
+
+\end_inset
+
+
+\series default
+ Tell the preprocessor not to discard comments.
+ Used with the `-E' option.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-MM
+\begin_inset LatexCommand \index{-MM}
+
+\end_inset
+
+
+\size large
+\bar under
+
+\series default
+\size default
+\bar default
+Like `-M' but the output mentions only the user header files included with
+ `#include
+\begin_inset Quotes eld
+\end_inset
+
+file"'.
+ System header files included with `#include <file>' are omitted.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-Aquestion(answer)
+\begin_inset LatexCommand \index{-Aquestion(answer)}
+
+\end_inset
+
+
+\series default
+ Assert the answer answer for question, in case it is tested with a preprocessor
+ conditional such as `#if #question(answer)'.
+ `-A-' disables the standard assertions that normally describe the target
+ machine.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-Aquestion
+\series default
+ (answer) Assert the answer answer for question, in case it is tested with
+ a preprocessor conditional such as `#if #question(answer)'.
+ `-A-' disables the standard assertions that normally describe the target
+ machine.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-Umacro
+\begin_inset LatexCommand \index{-Umacro}
+
+\end_inset
+
+
+\series default
+ Undefine macro macro.
+ `-U' options are evaluated after all `-D' options, but before any `-include'
+ and `-imacros' options.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-dM
+\begin_inset LatexCommand \index{-dM}
+
+\end_inset
+
+
+\series default
+ Tell the preprocessor to output only a list of the macro definitions that
+ are in effect at the end of preprocessing.
+ Used with the `-E' option.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-dD
+\begin_inset LatexCommand \index{-dD}
+
+\end_inset
+
+
+\series default
+ Tell the preprocessor to pass all macro definitions into the output, in
+ their proper sequence in the rest of the output.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-dN
+\begin_inset LatexCommand \index{-dN}
+
+\end_inset
+
+
+\size large
+\bar under
+
+\series default
+\size default
+\bar default
+Like `-dD' except that the macro arguments and contents are omitted.
+ Only `#define name' is included in the output.
+\layout Subsubsection
+
+Linker Options
+\begin_inset LatexCommand \index{Options linker}
+
+\end_inset
+
+
+\begin_inset LatexCommand \index{Linker options}
+
+\end_inset
+
+
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-L\SpecialChar ~
+-
+\series default
+
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+
+\series bold
+-lib-path
+\begin_inset LatexCommand \index{-\/-lib-path}
+
+\end_inset
+
+
+\begin_inset LatexCommand \index{-L -\/-lib-path}
+
+\end_inset
+
+
+\bar under
+
+\series default
+\bar default
+<absolute path to additional libraries> This option is passed to the linkage
+ editor's additional libraries
+\begin_inset LatexCommand \index{Libraries}
+
+\end_inset
+
+ search path.
+ The path name must be absolute.
+ Additional library files may be specified in the command line.
+ See section Compiling programs for more details.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-xram-loc
+\series default
+
+\begin_inset LatexCommand \index{-\/-xram-loc}
+
+\end_inset
+
+<Value> The start location of the external ram
+\begin_inset LatexCommand \index{xdata}
+
+\end_inset
+
+, default value is 0.
+ The value entered can be in Hexadecimal or Decimal format, e.g.: -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-xram-loc 0x8000 or -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-xram-loc 32768.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-code-loc
+\series default
+
+\begin_inset LatexCommand \index{-\/-code-loc}
+
+\end_inset
+
+<Value> The start location of the code
+\begin_inset LatexCommand \index{code}
+
+\end_inset
+
+ segment, default value 0.
+ Note when this option is used the interrupt vector table is also relocated
+ to the given address.
+ The value entered can be in Hexadecimal or Decimal format, e.g.: -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-code-loc 0x8000 or -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-code-loc 32768.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-stack-loc
+\series default
+
+\begin_inset LatexCommand \index{-\/-stack-loc}
+
+\end_inset
+
+<Value> By default the stack
+\begin_inset LatexCommand \index{stack}
+
+\end_inset
+
+ is placed after the data segment.
+ Using this option the stack can be placed anywhere in the internal memory
+ space of the 8051.
+ The value entered can be in Hexadecimal or Decimal format, e.g.
+ -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-stack-loc 0x20 or -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-stack-loc 32.
+ Since the sp register is incremented before a push or call, the initial
+ sp will be set to one byte prior the provided value.
+ The provided value should not overlap any other memory areas such as used
+ register banks or the data segment and with enough space for the current
+ application.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-data-loc
+\series default
+
+\begin_inset LatexCommand \index{-\/-data-loc}
+
+\end_inset
+
+<Value> The start location of the internal ram data
+\begin_inset LatexCommand \index{data}
+
+\end_inset
+
+ segment.
+ The value entered can be in Hexadecimal or Decimal format, eg.
+ -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-data-loc 0x20 or -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-data-loc 32.
+ (By default, the start location of the internal ram data segment is set
+ as low as possible in memory, taking into account the used register banks
+ and the bit segment at address 0x20.
+ For example if register banks 0 and 1 are used without bit variables, the
+ data segment will be set, if -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-data-loc is not used, to location 0x10.)
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-idata-loc
+\series default
+
+\begin_inset LatexCommand \index{-\/-idata-loc}
+
+\end_inset
+
+<Value> The start location of the indirectly addressable internal ram
+\begin_inset LatexCommand \index{idata}
+
+\end_inset
+
+, default value is 0x80.
+ The value entered can be in Hexadecimal or Decimal format, eg.
+ -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-idata-loc 0x88 or -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-idata-loc 136.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-out-fmt-ihx
+\begin_inset LatexCommand \index{-\/-out-fmt-ihx}
+
+\end_inset
+
+
+\bar under
+
+\series default
+\bar default
+The linker output (final object code) is in Intel Hex format.
+\begin_inset LatexCommand \index{Intel hex format}
+
+\end_inset
+
+ (This is the default option).
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-out-fmt-s19
+\begin_inset LatexCommand \index{-\/-out-fmt-s19}
+
+\end_inset
+
+
+\bar under
+
+\series default
+\bar default
+The linker output (final object code) is in Motorola S19 format
+\begin_inset LatexCommand \index{Motorola S19 format}
+
+\end_inset
+
+.
+\layout Subsubsection
+
+MCS51 Options
+\begin_inset LatexCommand \index{Options MCS51}
+
+\end_inset
+
+
+\begin_inset LatexCommand \index{MCS51 options}
+
+\end_inset
+
+
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-model-large
+\begin_inset LatexCommand \index{-\/-model-large}
+
+\end_inset
+
+
+\series default
+ Generate code for Large model programs see section Memory Models for more
+ details.
+ If this option is used all source files in the project should be compiled
+ with this option.
+ In addition the standard library routines are compiled with small model,
+ they will need to be recompiled.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-model-small
+\begin_inset LatexCommand \index{-\/-model-small}
+
+\end_inset
+
+
+\series default
+\size large
+\emph on
+
+\size default
+\emph default
+Generate code for Small Model programs see section Memory Models for more
+ details.
+ This is the default model.
+\layout Subsubsection
+
+DS390 Options
+\begin_inset LatexCommand \index{Options DS390}
+
+\end_inset
+
+
+\begin_inset LatexCommand \index{DS390 options}
+
+\end_inset
+
+
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-model-flat24
+\series default
+
+\begin_inset LatexCommand \index{-\/-model-flat24}
+
+\end_inset
+
+
+\size large
+\emph on
+
+\size default
+\emph default
+Generate 24-bit flat mode code.
+ This is the one and only that the ds390 code generator supports right now
+ and is default when using
+\emph on
+-mds390
+\emph default
+.
+ See section Memory Models for more details.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-stack-10bit
+\series default
+
+\begin_inset LatexCommand \index{-\/-stack-10bit}
+
+\end_inset
+
+ Generate code for the 10 bit stack mode of the Dallas DS80C390 part.
+ This is the one and only that the ds390 code generator supports right now
+ and is default when using
+\emph on
+-mds390
+\emph default
+.
+ In this mode, the stack is located in the lower 1K of the internal RAM,
+ which is mapped to 0x400000.
+ Note that the support is incomplete, since it still uses a single byte
+ as the stack pointer.
+ This means that only the lower 256 bytes of the potential 1K stack space
+ will actually be used.
+ However, this does allow you to reclaim the precious 256 bytes of low RAM
+ for use for the DATA and IDATA segments.
+ The compiler will not generate any code to put the processor into 10 bit
+ stack mode.
+ It is important to ensure that the processor is in this mode before calling
+ any re-entrant functions compiled with this option.
+ In principle, this should work with the
+\emph on
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-stack-auto
+\begin_inset LatexCommand \index{-\/-stack-auto}
+
+\end_inset
+
+
+\emph default
+ option, but that has not been tested.
+ It is incompatible with the
+\emph on
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-xstack
+\begin_inset LatexCommand \index{-\/-xstack}
+
+\end_inset
+
+
+\emph default
+ option.
+ It also only makes sense if the processor is in 24 bit contiguous addressing
+ mode (see the
+\emph on
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-model-flat24 option
+\emph default
+).
+\layout Subsubsection
+
+Optimization Options
+\begin_inset LatexCommand \index{Options optimization}
+
+\end_inset
+
+
+\begin_inset LatexCommand \index{Optimization options}
+
+\end_inset
+
+
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-nogcse
+\begin_inset LatexCommand \index{-\/-nogcse}
+
+\end_inset
+
+
+\series default
+ Will not do global subexpression elimination, this option may be used when
+ the compiler creates undesirably large stack/data spaces to store compiler
+ temporaries.
+ A warning message will be generated when this happens and the compiler
+ will indicate the number of extra bytes it allocated.
+ It recommended that this option NOT be used, #pragma\SpecialChar ~
+NOGCSE
+\begin_inset LatexCommand \index{\#pragma NOGCSE}
+
+\end_inset
+
+ can be used to turn off global subexpression elimination
+\begin_inset LatexCommand \index{Subexpression elimination}
+
+\end_inset
+
+ for a given function only.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-noinvariant
+\begin_inset LatexCommand \index{-\/-noinvariant}
+
+\end_inset
+
+
+\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.It
+ recommended that this option NOT be used, #pragma\SpecialChar ~
+NOINVARIANT
+\begin_inset LatexCommand \index{\#pragma NOINVARIANT}
+
+\end_inset
+
+ can be used to turn off invariant optimizations for a given function only.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-noinduction
+\begin_inset LatexCommand \index{-\/-noinduction}
+
+\end_inset
+
+
+\series default
+ Will not do loop induction optimizations, see section strength reduction
+ for more details.It is recommended that this option is NOT used, #pragma\SpecialChar ~
+NOINDUCT
+ION
+\begin_inset LatexCommand \index{\#pragma NOINDUCTION}
+
+\end_inset
+
+ can be used to turn off induction optimizations for a given function only.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-nojtbound
+\begin_inset LatexCommand \index{-\/-nojtbound}
+
+\end_inset
+
+
+\size large
+\bar under
+
+\series default
+\size default
+\bar default
+ Will not generate boundary condition check when switch statements
+\begin_inset LatexCommand \index{switch statement}
+
+\end_inset
+
+ are implemented using jump-tables.
+ See section Switch Statements for more details.
+ It is recommended that this option is NOT used, #pragma\SpecialChar ~
+NOJTBOUND
+\begin_inset LatexCommand \index{\#pragma NOJTBOUND}
+
+\end_inset
+
+ can be used to turn off boundary checking for jump tables for a given function
+ only.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-noloopreverse
+\begin_inset LatexCommand \index{-\/-noloopreverse}
+
+\end_inset
+
+
+\series default
+\size large
+
+\size default
+Will not do loop reversal
+\begin_inset LatexCommand \index{Loop reversing}
+
+\end_inset
+
+optimization.
+\layout List
+\labelwidthstring 00.00.0000
+
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-
+\series bold
+nolabelopt
+\series default
+
+\begin_inset LatexCommand \index{-\/-nolabelopt }
+
+\end_inset
+
+Will not optimize labels (makes the dumpfiles more readable).
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-no-xinit-opt
+\begin_inset LatexCommand \index{-\/-no-xinit-opt}
+
+\end_inset
+
+
+\series default
+ Will not memcpy initialized data in far space from code space.
+ This saves a few bytes in code space if you don't have initialized data.
+\layout Subsubsection
+
+Other Options
+\begin_inset LatexCommand \index{Options other}
+
+\end_inset
+
+
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-c\SpecialChar ~
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-compile-only
+\begin_inset LatexCommand \index{-\/-compile-only}
+
+\end_inset
+
+
+\begin_inset LatexCommand \index{-c -\/-compile-only}
+
+\end_inset
+
+
+\series default
+ will compile and assemble the source, but will not call the linkage editor.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\series default
+
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+
+\series bold
+-c1mode
+\begin_inset LatexCommand \index{-\/-c1mode}
+
+\end_inset
+
+
+\series default
+ reads the preprocessed source from standard input and compiles it.
+ The file name for the assembler output must be specified using the -o option.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-E
+\begin_inset LatexCommand \index{-E}
+
+\end_inset
+
+
+\series default
+ Run only the C preprocessor.
+ Preprocess all the C source files specified and output the results to standard
+ output.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-o\SpecialChar ~
+<path/file>
+\begin_inset LatexCommand \index{-o <path/file>}
+
+\end_inset
+
+
+\series default
+The output path resp.
+ file where everything will be placed.
+ If the parameter is a path, it must have a trailing slash (or backslash
+ for the Windows binaries) to be recognized as a path.
+
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-stack-auto
+\begin_inset LatexCommand \index{-\/-stack-auto}
+
+\end_inset
+
+
+\series default
+\size large
+\emph on
+
+\size default
+\emph default
+All functions in the source file will be compiled as
+\emph on
+reentrant
+\emph default
+
+\begin_inset LatexCommand \index{reentrant}
+
+\end_inset
+
+, i.e.
+ the parameters and local variables will be allocated on the stack
+\begin_inset LatexCommand \index{stack}
+
+\end_inset
+
+.
+ see section Parameters and Local Variables for more details.
+ If this option is used all source files in the project should be compiled
+ with this option.
+
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-xstack
+\begin_inset LatexCommand \index{-\/-xstack}
+
+\end_inset
+
+
+\series default
+ Uses a pseudo stack in the first 256 bytes in the external ram for allocating
+ variables and passing parameters.
+ See section on external stack for more details.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-callee-saves
+\begin_inset LatexCommand \index{-\/-callee-saves}
+
+\end_inset
+
+
+\begin_inset LatexCommand \index{function prologue}
+
+\end_inset
+
+ function1[,function2][,function3]....
+
+\series default
+ The compiler by default uses a caller saves convention for register saving
+ across function calls, however this can cause unneccessary register pushing
+ & popping when calling small functions from larger functions.
+ This option can be used to switch the register saving convention for the
+ function names specified.
+ The compiler will not save registers when calling these functions, no extra
+ code will be generated 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 interprocedural analysis) will be able
+ to determine the appropriate scheme to use for each function call.
+ DO NOT use this option for built-in functions such as _mulint..., if this
+ option is used for a library function the appropriate library function
+ needs to be recompiled with the same option.
+ If the project consists of multiple source files then all the source file
+ should be compiled with the same -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-callee-saves option string.
+ Also see #pragma\SpecialChar ~
+CALLEE-SAVES
+\begin_inset LatexCommand \index{\#pragma CALLEE-SAVES}
+
+\end_inset
+
+.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-debug
+\begin_inset LatexCommand \index{-\/-debug}
+
+\end_inset
+
+
+\bar under
+
+\series default
+\bar default
+When this option is used the compiler will generate debug information, that
+ can be used with the SDCDB.
+ The debug information is collected in a file with .cdb extension.
+ For more information see documentation for SDCDB.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-peep-file
+\series default
+
+\begin_inset LatexCommand \index{-\/-peep-file}
+
+\end_inset
+
+<filename> This option can be used to use additional rules to be used by
+ the peep hole optimizer.
+ See section Peep Hole optimizations for details on how to write these rules.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-S
+\begin_inset LatexCommand \index{-S}
+
+\end_inset
+
+
+\size large
+\bar under
+
+\series default
+\size default
+\bar default
+Stop after the stage of compilation proper; do not assemble.
+ The output is an assembler code file for the input file specified.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-Wa_asmOption[,asmOption]
+\series default
+
+\begin_inset LatexCommand \index{-Wa\_asmOption[,asmOption]}
+
+\end_inset
+
+...
+ Pass the asmOption to the assembler.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-Wl_linkOption[,linkOption]
+\series default
+
+\begin_inset LatexCommand \index{-Wl\_linkOption[,linkOption]}
+
+\end_inset
+
+...
+ Pass the linkOption to the linker.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-int-long-reent
+\begin_inset LatexCommand \index{-\/-int-long-reent}
+
+\end_inset
+
+
+\series default
+ Integer (16 bit) and long (32 bit) libraries have been compiled as reentrant.
+ Note by default these libraries are compiled as non-reentrant.
+ See section Installation for more details.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-cyclomatic
+\begin_inset LatexCommand \index{-\/-cyclomatic}
+
+\end_inset
+
+
+\bar under
+
+\series default
+\bar default
+This option will cause the compiler to generate an information message for
+ each function in the source file.
+ The message contains some
+\emph on
+important
+\emph default
+ information about the function.
+ The number of edges and nodes the compiler detected in the control flow
+ graph of the function, and most importantly the
+\emph on
+cyclomatic complexity
+\begin_inset LatexCommand \index{Cyclomatic complexity}
+
+\end_inset
+
+
+\emph default
+ see section on Cyclomatic Complexity for more details.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-float-reent
+\begin_inset LatexCommand \index{-\/-float-reent}
+
+\end_inset
+
+
+\bar under
+
+\series default
+\bar default
+ Floating point library is compiled as reentrant
+\begin_inset LatexCommand \index{reentrant}
+
+\end_inset
+
+.See section Installation for more details.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-nooverlay
+\begin_inset LatexCommand \index{-\/-nooverlay}
+
+\end_inset
+
+
+\series default
+ The compiler will not overlay parameters and local variables of any function,
+ see section Parameters and local variables for more details.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-main-return
+\begin_inset LatexCommand \index{-\/-main-return}
+
+\end_inset
+
+
+\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'
+\begin_inset LatexCommand \index{main return}
+
+\end_inset
+
+ function.
+ The default option is to lock up i.e.
+ generate a 'ljmp '.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-no-peep
+\begin_inset LatexCommand \index{-\/-no-peep}
+
+\end_inset
+
+
+\series default
+ Disable peep-hole optimization.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-peep-asm
+\begin_inset LatexCommand \index{-\/-peep-asm}
+
+\end_inset
+
+
+\series default
+ Pass the inline assembler code through the peep hole optimizer.
+ This can cause unexpected changes to inline assembler code, please go through
+ the peephole optimizer
+\begin_inset LatexCommand \index{Peephole optimizer}
+
+\end_inset
+
+ rules defined in the source file tree '<target>/peeph.def' before using
+ this option.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-iram-size
+\series default
+<Value>
+\begin_inset LatexCommand \index{-\/-iram-size<Value>}
+
+\end_inset
+
+ Causes the linker to check if the internal ram usage is within limits of
+ the given value.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-xram-size
+\series default
+<Value>
+\begin_inset LatexCommand \index{-\/-xram-size<Value>}
+
+\end_inset
+
+ Causes the linker to check if the external ram usage is within limits of
+ the given value.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-code-size
+\series default
+<Value>
+\begin_inset LatexCommand \index{-\/-code-size<Value>}
+
+\end_inset
+
+ Causes the linker to check if the code usage is within limits of the given
+ value.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-nostdincl
+\begin_inset LatexCommand \index{-\/-nostdincl}
+
+\end_inset
+
+
+\series default
+ This will prevent the compiler from passing on the default include path
+ to the preprocessor.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-nostdlib
+\begin_inset LatexCommand \index{-\/-nostdlib}
+
+\end_inset
+
+
+\series default
+ This will prevent the compiler from passing on the default library
+\begin_inset LatexCommand \index{Libraries}
+
+\end_inset
+
+ path to the linker.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-verbose
+\begin_inset LatexCommand \index{-\/-verbose}
+
+\end_inset
+
+
+\series default
+ Shows the various actions the compiler is performing.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-V
+\begin_inset LatexCommand \index{-V}
+
+\end_inset
+
+
+\series default
+ Shows the actual commands the compiler is executing.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-no-c-code-in-asm
+\begin_inset LatexCommand \index{-\/-no-c-code-in-asm}
+
+\end_inset
+
+
+\series default
+ Hides your ugly and inefficient c-code from the asm file, so you can always
+ blame the compiler :).
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-i-code-in-asm
+\begin_inset LatexCommand \index{-\/-i-code-in-asm}
+
+\end_inset
+
+
+\series default
+ Include i-codes in the asm file.
+ Sounds like noise but is most helpfull for debugging the compiler itself.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-less-pedantic
+\begin_inset LatexCommand \index{-\/-less-pedantic}
+
+\end_inset
+
+
+\series default
+ Disable some of the more pedantic warnings (jwk burps: please be more specific
+ here, please!)
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-print-search-dirs
+\begin_inset LatexCommand \index{-\/-print-search-dirs}
+
+\end_inset
+
+
+\series default
+ Display the directories in the compiler's search path
+\layout Subsubsection
+
+Intermediate Dump Options
+\begin_inset LatexCommand \index{Options intermediate dump}
+
+\end_inset
+
+
+\begin_inset LatexCommand \index{Intermediate dump options}
+
+\end_inset
+
+
+\layout Standard
+
+The following options are provided for the purpose of retargetting and debugging
+ the compiler.
+ These provided a means to dump the intermediate code (iCode
+\begin_inset LatexCommand \index{iCode}
+
+\end_inset
+
+) generated by the compiler in human readable form at various stages of
+ the compilation process.
+
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-dumpraw
+\begin_inset LatexCommand \index{-\/-dumpraw}
+
+\end_inset
+
+
+\series default
+ This option will cause the compiler to dump the intermediate code into
+ a file of named
+\emph on
+<source filename>.dumpraw
+\emph default
+ just after the intermediate code has been generated for a function, i.e.
+ before any optimizations are done.
+ The basic blocks
+\begin_inset LatexCommand \index{Basic blocks}
+
+\end_inset
+
+ at this stage ordered in the depth first number, so they may not be in
+ sequence of execution.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-dumpgcse
+\begin_inset LatexCommand \index{-\/-dumpgcse}
+
+\end_inset
+
+
+\series default
+ Will create a dump of iCode's, after global subexpression elimination
+\begin_inset LatexCommand \index{Global subexpression elimination}
+
+\end_inset
+
+, into a file named
+\emph on
+<source filename>.dumpgcse.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-dumpdeadcode
+\begin_inset LatexCommand \index{-\/-dumpdeadcode}
+
+\end_inset
+
+
+\series default
+ Will create a dump of iCode's, after deadcode elimination
+\begin_inset LatexCommand \index{Dead-code elimination}
+
+\end_inset
+
+, into a file named
+\emph on
+<source filename>.dumpdeadcode.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-dumploop
+\begin_inset LatexCommand \index{-\/-dumploop}
+
+\end_inset
+
+
+\series default
+\size large
+
+\size default
+Will create a dump of iCode's, after loop optimizations
+\begin_inset LatexCommand \index{Loop optimization}
+
+\end_inset
+
+, into a file named
+\emph on
+<source filename>.dumploop.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-dumprange
+\begin_inset LatexCommand \index{-\/-dumprange}
+
+\end_inset
+
+
+\series default
+\size large
+
+\size default
+Will create a dump of iCode's, after live range analysis
+\begin_inset LatexCommand \index{Live range analysis}
+
+\end_inset
+
+, into a file named
+\emph on
+<source filename>.dumprange.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-dumlrange
+\begin_inset LatexCommand \index{-\/-dumlrange}
+
+\end_inset
+
+
+\series default
+ Will dump the life ranges
+\begin_inset LatexCommand \index{Live range analysis}
+
+\end_inset
+
+ for all symbols.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-dumpregassign
+\begin_inset LatexCommand \index{-\/-dumpregassign}
+
+\end_inset
+
+
+\bar under
+
+\series default
+\bar default
+Will create a dump of iCode's, after register assignment
+\begin_inset LatexCommand \index{Register assignment}
+
+\end_inset
+
+, into a file named
+\emph on
+<source filename>.dumprassgn.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-dumplrange
+\begin_inset LatexCommand \index{-\/-dumplrange}
+
+\end_inset
+
+
+\series default
+ Will create a dump of the live ranges of iTemp's
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-dumpall
+\begin_inset LatexCommand \index{-\/-dumpall}
+
+\end_inset
+
+
+\size large
+\bar under
+
+\series default
+\size default
+\bar default
+Will cause all the above mentioned dumps to be created.
+\layout Subsection
+
+Environment variables
+\begin_inset LatexCommand \index{Environment variables}
+
+\end_inset
+
+
+\layout Standard
+
+SDCC recognizes the following environment variables:
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+SDCC_LEAVE_SIGNALS
+\begin_inset LatexCommand \index{SDCC\_LEAVE\_SIGNALS}
+
+\end_inset
+
+
+\series default
+ SDCC installs a signal handler
+\begin_inset LatexCommand \index{signal handler}
+
+\end_inset
+
+ to be able to delete temporary files after an user break (^C) or an exception.
+ If this environment variable is set, SDCC won't install the signal handler
+ in order to be able to debug SDCC.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+TMP
+\begin_inset LatexCommand \index{TMP}
+
+\end_inset
+
+,\SpecialChar ~
+TEMP
+\begin_inset LatexCommand \index{TEMP}
+
+\end_inset
+
+,\SpecialChar ~
+TMPDIR
+\begin_inset LatexCommand \index{TMPDIR}
+
+\end_inset
+
+
+\series default
+ Path, where temporary files will be created.
+ The order of the variables is the search order.
+ In a standard *nix environment these variables are not set, and there's
+ no need to set them.
+ On Windows it's recommended to set one of them.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+SDCC_HOME
+\begin_inset LatexCommand \index{SDCC\_HOME}
+
+\end_inset
+
+
+\series default
+ Path, see
+\begin_inset Quotes sld
+\end_inset
+
+2.3 Install and search paths
+\begin_inset Quotes srd
+\end_inset
+
+.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+SDCC_INCLUDE
+\begin_inset LatexCommand \index{SDCC\_INCLUDE}
+
+\end_inset
+
+
+\series default
+ Path, see
+\begin_inset Quotes sld
+\end_inset
+
+2.3 Install and search paths
+\begin_inset Quotes srd
+\end_inset
+
+.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold
+SDCC_LIB
+\begin_inset LatexCommand \index{SDCC\_LIB}
+
+\end_inset
+
+
+\series default
+ Path, see
+\begin_inset Quotes sld
+\end_inset
+
+2.3 Install and search paths
+\begin_inset Quotes srd
+\end_inset
+
+.
+\layout Standard
+
+There are some more environment variables recognized by SDCC, but these
+ are solely used for debugging purposes.
+ They can change or disappear very quickly, and will never be documentated.
+\layout Subsection
+
+MCS51/DS390 Storage Class
+\begin_inset LatexCommand \index{Storage class}
+
+\end_inset
+
+ Language Extensions
+\layout Standard
+
+In addition to the ANSI storage classes SDCC allows the following MCS51
+ specific storage classes.
+\layout Subsubsection
+
+xdata
+\begin_inset LatexCommand \index{xdata}
+
+\end_inset
+
+
+\layout Standard
+
+Variables declared with this storage class will be placed in the extern
+ RAM.
+ This is the
+\series bold
+default
+\series default
+ storage class for Large Memory model, e.g.:
+\newline
+
+\newline
+
+\family typewriter
+xdata unsigned char xduc;
+\layout Subsubsection
+
+data
+\begin_inset LatexCommand \index{data}
+
+\end_inset
+
+
+\layout Standard
+
+This is the
+\series bold
+default
+\series default
+ storage class for Small Memory model.
+ Variables declared with this storage class will be allocated in the internal
+ RAM, e.g.:
+\layout Verse
+
+
+\family typewriter
+data int iramdata;
+\layout Subsubsection
+
+idata
+\begin_inset LatexCommand \index{idata}
+
+\end_inset
+
+
+\layout Standard
+
+Variables declared with this storage class will be allocated into the indirectly
+ addressable portion of the internal ram of a 8051, e.g.:
+\layout Verse
+
+
+\family typewriter
+idata int idi;
+\layout Subsubsection
+
+bit
+\begin_inset LatexCommand \index{bit}
+
+\end_inset
+
+
+\layout Standard
+
+This is a data-type and a storage class specifier.
+ When a variable is declared as a bit, it is allocated into the bit addressable
+ memory of 8051, e.g.:
+\layout Verse
+
+
+\family typewriter
+bit iFlag;
+\layout Subsubsection
+
+sfr
+\begin_inset LatexCommand \index{sfr}
+
+\end_inset
+
+ / sbit
+\begin_inset LatexCommand \index{sbit}
+
+\end_inset
+
+
+\layout Standard
+
+Like the bit keyword,
+\emph on
+sfr / sbit
+\emph default
+signifies both a data-type and storage class, they are used to describe
+ the special function registers and special bit variables of a 8051, eg:
+\layout Verse
+
+
+\family typewriter
+sfr at 0x80 P0; /* special function register P0 at location 0x80 */
+\newline
+sbit at 0xd7 CY; /* CY (Carry Flag
+\begin_inset LatexCommand \index{Flags}
+
+\end_inset
+
+
+\begin_inset LatexCommand \index{Carry flag}
+
+\end_inset
+
+) */
+\layout Subsection
+
+Pointers
+\begin_inset LatexCommand \index{Pointers}
+
+\end_inset
+
+
+\layout Standard
+
+SDCC allows (via language extensions) pointers to explicitly point to any
+ of the memory spaces
+\begin_inset LatexCommand \index{Memory model}
+
+\end_inset
+
+ of the 8051.
+ In addition to the explicit pointers, the compiler uses (by default) generic
+ pointers which can be used to point to any of the memory spaces.
+\newline
+
+\newline
+Pointer declaration examples:
+\layout Verse
+
+
+\family typewriter
+/* pointer physically in xternal ram pointing to object in internal ram
+ */
+\newline
+data unsigned char * xdata p;
+\newline
+
+\newline
+/* pointer physically in code rom pointing to data in xdata space */
+\newline
+xdata unsigned char * code p;
+\newline
+
+\newline
+/* pointer physically in code space pointing to data in code space */
+\newline
+code unsigned char * code p;
+\newline
+
+\newline
+/* the folowing is a generic pointer physically located in xdata space */
+\newline
+char * xdata p;
+\layout Standard
+
+Well you get the idea.
+
+\newline
+
+\newline
+All unqualified pointers are treated as 3-byte (4-byte for the ds390)
+\emph on
+generic
+\emph default
+ pointers.
+
+\size small
+
+\newline
+
+\newline
+
+\size default
+The highest order byte of the
+\emph on
+generic
+\emph default
+ pointers contains the data space information.
+ Assembler support routines are called whenever data is stored or retrieved
+ using
+\emph on
+generic
+\emph default
+ pointers.
+ These are useful for developing reusable library
+\begin_inset LatexCommand \index{Libraries}
+
+\end_inset
+
+ routines.
+ Explicitly specifying the pointer type will generate the most efficient
+ code.
+\layout Subsection
+
+Parameters
+\begin_inset LatexCommand \index{Parameters}
+
+\end_inset
+
+ & Local Variables
+\begin_inset LatexCommand \index{Local variable}
+
+\end_inset
+
+
+\layout Standard
+
+Automatic (local) variables and parameters to functions can either be placed
+ on the stack or in data-space.
+ The default action of the compiler is to place these variables in the internal
+ RAM (for small model) or external RAM (for large model).
+ This in fact makes them
+\emph on
+static
+\begin_inset LatexCommand \index{static}
+
+\end_inset
+
+
+\emph default
+ so by default functions are non-reentrant
+\begin_inset LatexCommand \index{reentrant}
+
+\end_inset
+
+.
+\newline
+
+\newline
+They can be placed on the stack
+\begin_inset LatexCommand \index{stack}
+
+\end_inset
+
+ either by using the
+\emph on
+ -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-stack-auto
+\begin_inset LatexCommand \index{-\/-stack-auto}
+
+\end_inset
+
+
+\emph default
+ option or by using the
+\emph on
+reentrant
+\begin_inset LatexCommand \index{reentrant}
+
+\end_inset
+
+
+\emph default
+ keyword in the function declaration, e.g.:
+\layout Verse
+
+
+\family typewriter
+unsigned char foo(char i) reentrant
+\newline
+{
+\newline
+...
+
+\newline
+}
+\layout Standard
+
+Since stack space on 8051 is limited, the
+\emph on
+reentrant
+\emph default
+keyword or the
+\emph on
+ -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-stack-auto
+\emph default
+ option should be used sparingly.
+ Note that the reentrant keyword just means that the parameters & local
+ variables will be allocated to the stack, it
+\emph on
+does not
+\emph default
+ mean that the function is register bank independent.
+\newline
+
+\newline
+Local variables can be assigned storage classes and absolute
+\begin_inset LatexCommand \index{Absolute addressing}
+
+\end_inset
+
+ addresses, e.g.:
+\layout Verse
+
+
+\family typewriter
+unsigned char foo() {
+\newline
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+xdata unsigned char i;
+\newline
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+bit bvar;
+\newline
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+data at 0x31 unsiged char j;
+\newline
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+...
+
+\newline
+}
+\layout Standard
+
+In the above example the variable
+\emph on
+i
+\emph default
+ will be allocated in the external ram,
+\emph on
+bvar
+\emph default
+ in bit addressable space and
+\emph on
+ j
+\emph default
+ in internal ram.
+ When compiled with
+\emph on
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-stack-auto
+\emph default
+ or when a function is declared as
+\emph on
+reentrant
+\emph default
+ this should only be done for static variables.
+\layout Standard
+
+Parameters however are not allowed any storage class, (storage classes for
+ parameters will be ignored), their allocation is governed by the memory
+ model in use, and the reentrancy options.
+\layout Subsection
+
+Overlaying
+\begin_inset LatexCommand \index{Overlaying}
+
+\end_inset
+
+
+\layout Standard
+
+For non-reentrant
+\begin_inset LatexCommand \index{reentrant}
+
+\end_inset
+
+ functions SDCC will try to reduce internal ram space usage by overlaying
+ parameters and local variables of a function (if possible).
+ Parameters and local variables of a function will be allocated to an overlayabl
+e segment if the function has
+\emph on
+no other function calls and the function is non-reentrant and the memory
+ model
+\begin_inset LatexCommand \index{Memory model}
+
+\end_inset
+
+ is small.
+
+\emph default
+ If an explicit storage class
+\begin_inset LatexCommand \index{Storage class}
+
+\end_inset
+
+ is specified for a local variable, it will NOT be overlayed.
+\layout Standard
+
+Note that the compiler (not the linkage editor) makes the decision for overlayin
+g the data items.
+ Functions that are called from an interrupt service routine should be preceded
+ by a #pragma\SpecialChar ~
+NOOVERLAY
+\begin_inset LatexCommand \index{\#pragma NOOVERLAY}
+
+\end_inset
+
+ if they are not reentrant.
+\layout Standard
+
+Also note that the compiler does not do any processing of inline
+\begin_inset LatexCommand \index{inline}
+
+\end_inset
+
+ assembler code, so the compiler might incorrectly assign local variables
+ and parameters of a function into the overlay segment if the inline assembler
+ code calls other c-functions that might use the overlay.
+ In that case the #pragma\SpecialChar ~
+NOOVERLAY should be used.
+\layout Standard
+
+Parameters and Local variables of functions that contain 16 or 32 bit multiplica
+tion
+\begin_inset LatexCommand \index{Multiplication}
+
+\end_inset
+
+ or division
+\begin_inset LatexCommand \index{Division}
+
+\end_inset
+
+ will NOT be overlayed since these are implemented using external functions,
+ e.g.:
+\layout Verse
+
+
+\family typewriter
+#pragma SAVE
+\newline
+#pragma NOOVERLAY
+\begin_inset LatexCommand \index{\#pragma NOOVERLAY}
+
+\end_inset
+
+
+\newline
+void set_error(unsigned char errcd)
+\newline
+{
+\newline
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+P3 = errcd;
+\newline
+}
+\newline
+#pragma RESTORE
+\newline
+
+\newline
+void some_isr () interrupt
+\begin_inset LatexCommand \index{interrupt}
+
+\end_inset
+
+ 2 using
+\begin_inset LatexCommand \index{using}
+
+\end_inset
+
+ 1
+\newline
+{
+\newline
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+...
+\newline
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+set_error(10);
+\newline
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+...
+
+\newline
+}
+\layout Standard
+
+In the above example the parameter
+\emph on
+errcd
+\emph default
+ for the function
+\emph on
+set_error
+\emph default
+ would be assigned to the overlayable segment if the #pragma\SpecialChar ~
+NOOVERLAY was
+ not present, this could cause unpredictable runtime behavior when called
+ from an ISR.
+ The #pragma\SpecialChar ~
+NOOVERLAY ensures that the parameters and local variables for
+ the function are NOT overlayed.
+\layout Subsection
+
+Interrupt Service Routines
+\layout Standard
+
+SDCC allows interrupt service routines to be coded in C, with some extended
+ keywords.
+\layout Verse
+
+
+\family typewriter
+void timer_isr (void) interrupt 2 using 1
+\newline
+{
+\newline
+..
+
+\newline
+}
+\layout Standard
+
+The number following the
+\emph on
+interrupt
+\begin_inset LatexCommand \index{interrupt}
+
+\end_inset
+
+
+\emph default
+ keyword is the interrupt number this routine will service.
+ The compiler will insert a call to this routine in the interrupt vector
+ table for the interrupt number specified.
+ The
+\emph on
+using
+\emph default
+ keyword is used to tell the compiler to use the specified register bank
+ (8051 specific) when generating code for this function.
+ Note that when some function is called from an interrupt service routine
+ it should be preceded by a #pragma\SpecialChar ~
+NOOVERLAY
+\begin_inset LatexCommand \index{\#pragma NOOVERLAY}
+
+\end_inset
+
+ if it is not reentrant.
+ 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
+
+ operations are implemented using external support routines developed in
+ ANSI-C, if an interrupt service routine needs to do any of these operations
+ then the support routines (as mentioned in a following section) will have
+ to be recompiled using the
+\emph on
+ -
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-stack-auto
+\begin_inset LatexCommand \index{-\/-stack-auto}
+
+\end_inset
+
+
+\emph default
+ option and the source file will need to be compiled using the
+\emph on
+-
+\begin_inset ERT
+status Collapsed
+
+\layout Standard
+
+\backslash
+/
+\end_inset
+
+-int-long-ren
+\emph default
+t
+\begin_inset LatexCommand \index{-\/-int-long-rent}
+
+\end_inset
+
+ compiler option.
+\layout Standard
+
+If you have multiple source files in your project, interrupt service routines
+ can be present in any of them, but a prototype of the isr MUST be present
+ or included in the file that contains the function
+\emph on
+main
+\emph default
+.
+\layout Standard
+
+Interrupt Numbers and the corresponding address & descriptions for the Standard
+ 8051 are listed below.
+ SDCC will automatically adjust the interrupt vector table to the maximum
+ interrupt number specified.
+\newline
+
+\layout Standard
+
+
+\begin_inset Tabular
+<lyxtabular version="3" rows="6" columns="3">
+<features>
+<column alignment="block" valignment="top" leftline="true" width="0in">
+<column alignment="block" valignment="top" leftline="true" width="0in">
+<column alignment="block" valignment="top" leftline="true" rightline="true" width="0in">
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+Interrupt #
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+Description
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+Vector Address
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+0
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+External 0
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+0x0003
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+1
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+Timer 0
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+0x000B
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+2
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+External 1
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+0x0013
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+3
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+Timer 1
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+0x001B
+\end_inset
+</cell>
+</row>
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+4
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+Serial
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+0x0023
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\newline
+
+\newline
+If the interrupt service routine is defined without
+\emph on
+using
+\begin_inset LatexCommand \index{using}
+
+\end_inset
+
+
+\emph default
+ a register bank or with register bank 0 (using 0), the compiler will save
+ the registers used by itself on the stack upon entry and restore them at
+ exit, however if such an interrupt service routine calls another function
+ then the entire register bank will be saved on the stack.
+ This scheme may be advantageous for small interrupt service routines which
+ have low register usage.
+\layout Standard
+
+If the interrupt service routine is defined to be using a specific register
+ bank then only
+\emph on
+a, b & dptr
+\emph default
+ are save and restored, if such an interrupt service routine calls another
+ function (using another register bank) then the entire register bank of
+ the called function will be saved on the stack.
+ This scheme is recommended for larger interrupt service routines.
+\layout Standard
+
+Calling other functions from an interrupt service routine is not recommended,
+ avoid it if possible.
+\newline
+
+\newline
+Also see the _naked modifier.
+\layout Subsection
+
+Critical Functions
+\layout Standard
+
+
+\shape italic
+<TODO: this isn't implemented at all!>
+\shape default
+
+\newline
+
+\newline
+A special keyword may be associated with a function declaring it as
+\emph on
+critical
+\emph default
+.
+ SDCC will generate code to disable all interrupts upon entry to a critical
+ function and enable them back before returning.
+ Note that nesting critical functions may cause unpredictable results.
+\layout Verse
+
+
+\family typewriter
+int foo () critical
+\newline
+{
+\newline
+...
+
+\newline
+...
+
+\newline
+}
+\layout Standard
+
+The critical attribute maybe used with other attributes like
+\emph on
+reentrant.
+\layout Subsection
+
+Naked Functions
+\begin_inset LatexCommand \index{Naked functions}
+
+\end_inset
+
+
+\layout Standard
+
+A special keyword may be associated with a function declaring it as
+\emph on
+_naked
+\begin_inset LatexCommand \index{\_naked}
+
+\end_inset
+
+.
+
+\emph default
+The
+\emph on
+_naked
+\emph default
+ function modifier attribute prevents the compiler from generating prologue
+\begin_inset LatexCommand \index{function prologue}
+
+\end_inset
+
+ and epilogue
+\begin_inset LatexCommand \index{function epilogue}
+
+\end_inset
+
+ code for that function.
+ This means that the user is entirely responsible for such things as saving
+ any registers that may need to be preserved, selecting the proper register
+ bank, generating the
+\emph on
+return
+\emph default
+ instruction at the end, etc.
+ Practically, this means that the contents of the function must be written
+ in inline assembler.
+ This is particularly useful for interrupt functions, which can have a large
+ (and often unnecessary) prologue/epilogue.
+ For example, compare the code generated by these two functions:
+\layout Verse
+
+
+\family typewriter
+data unsigned char counter;
+\newline
+void simpleInterrupt(void) interrupt
+\begin_inset LatexCommand \index{interrupt}
+
+\end_inset
+
+ 1
+\newline
+{
+\newline
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+counter++;
+\newline
+}
+\newline
+
+\newline
+void nakedInterrupt(void) interrupt 2 _naked
+\newline
+{
+\newline
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+_asm
+\begin_inset LatexCommand \index{\_asm}
+
+\end_inset
+
+
+\newline
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+inc\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+_counter
+\newline
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+reti\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+; MUST explicitly include ret in _naked function.
+\newline
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+_endasm
+\begin_inset LatexCommand \index{\_endasm}
+
+\end_inset
+
+;
+\newline
+}
+\layout Standard
+
+For an 8051 target, the generated simpleInterrupt looks like:
+\layout Verse
+
+
+\family typewriter
+_simpleIterrupt:
+\newline
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+push\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+acc
+\newline
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+push\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+b
+\newline
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+push\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+dpl
+\newline
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+push\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+dph
+\newline
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+push\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+psw
+\newline
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+mov\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+psw,#0x00
+\newline
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+inc\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+_counter
+\newline
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+pop\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+psw
+\newline
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+pop\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+dph
+\newline
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+pop\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+dpl
+\newline
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+pop\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+b
+\newline
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+pop\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~