- ... NAME="86">1.1
- Obviously this has pros and cons
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... not2.1
- If you should know why please drop us a note
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... line3.1
- the command backfills unused memory
with 0x12 and the overall 16 bit sum of the complete 64 kByte block
is zero. If the program counter on an mcs51 runs wild the backfill
pattern 0x12 will be interpreted as an lcall to address 0x1212
(where an emergency routine could sit).
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...bitfields3.2
- Not really meant as examples, but nevertheless showing what bitfields
are about: device/include/mc68hc908qy.h and support/regression/tests/bitfields.c
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...
anyway3.3
- possible exception: if a function is called ONLY from 'interrupt'
functions using a particular bank, it can be declared with the same
'using' attribute as the calling 'interrupt' functions. For instance,
if you have several ISRs using bank one, and all of them call memcpy(),
it might make sense to create a specialized version of memcpy() 'using
1', since this would prevent the ISR from having to save bank zero
to the stack on entry and switch to bank zero before calling the function
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...
-plosgff3.4
- ''-plosgff'' are the assembler options used in http://sdcc.svn.sourceforge.net/viewvc/sdcc/trunk/sdcc/device/lib/mcs51/Makefile.in?view=markup
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ..._endasm;''3.5
- Note, that the single underscore form (_asm and _endasm) are not
C99-compatible, and for C-99 compatibility, the double-underscore
form (__asm and __endasm) has to be used. The latter is also used
in the library functions.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...).3.6
- This is a slightly more stringent rule than absolutely necessary,
but stays always on the safe side. Labels in the form of nnnnn$ are
local labels in the assembler, locality of which is confined within
two labels of the standard form. The compiler uses the same form for
labels within a function (but starting from nnnnn=00100); and places
always a standard label at the beginning of a function, thus limiting
the locality of labels within the scope of the function. So, if the
inline assembler part would be embedded into C-code, an improperly
placed non-local label in the assembler would break up the reference
space for labels created by the compiler for the C-code, leading to
an assembling error.
The numeric part of local labels does not need to have 5 digits (although
this is the form of labels output by the compiler), any valid integer
will do. Please refer to the assemblers documentation for further
details.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... 3.7
- Here, the C-label clabel is translated by the compiler into
a local label, so the locality of labels within the function is not
broken.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... improvement3.8
- These floating point routines (not sinf(), cosf(), ...) for
the mcs51 are implemented in assembler.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...
\%f3.9
- Range limited to +/- 4294967040, precision limited to 8 digits past
decimal
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... speed3.10
- Execution time of printf("%s%c%s%c%c%c", "Hello",
' ', "World", '!', '\r', '\n');
standard 8051 @ 22.1184 MHz, empty putchar()
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... speed3.11
- Execution time of printf("%d", -12345); standard
8051 @ 22.1184 MHz, empty putchar()
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... ms3.12
- printf_tiny integer speed is data dependent, worst case is 0.33 ms
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... speed3.13
- Execution time of printf("%ld", -123456789); standard
8051 @ 22.1184 MHz, empty putchar()
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... speed3.14
- Execution time of printf("%.3f", -12345.678); standard
8051 @ 22.1184 MHz, empty putchar()
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...4.1
- The old format (ie. #pragma stack 0x5ff) is deprecated and will cause
the stack pointer to cross page boundaries (or even exceed the available
data RAM) and crash the program. Make sure that stack does not cross
page boundaries when using the SMALL stack model.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...4.2
- This is not a problem when
- this is a HIGH interrupt ISR and LOW interrupts are disabled
or not used.
- when the ISR is small enough not to reach the next interrupt's vector
address.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...4.3
- NOTE that when the _naked attribute is specified for an interrupt
routine, then NO registers are stored or restored.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... burnout6.1
- burnout is bad for electronic devices, programmers and motorcycle
tyres
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... day7.1
- 220 daily downloads on average Jan-Sept 2006 and about 150 daily downloads
between 2002 and 2005. This does not include other methods of distribution.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...http://sourceforge.net/mail/?group_id=5997.2
- Traffic on sdcc-devel and sdcc-user is about 100 mails/month each
not counting automated messages (mid 2003)
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... encouraged7.3
- the phrase "use in education" might evoke the association
"only fit for use in education". This connotation
is not intended but nevertheless risked as the licensing of SDCC makes
it difficult to offer educational discounts
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... little-endian8.1
- Usually 8-bit processors don't care much about endianness. This is
not the case for the standard 8051 which only has an instruction to
increment its dptr-datapointer so little-endian
is the more efficient byte order.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.