Mikroelektronika MIKROE-350 Data Sheet

Page of 526
Nested Calls Limitations
There are no Nested Calls Limitations, except by RAM size. A Nested call repre-
sents a function call to another function within the function body. With each function
call, the stack increases for the size of the returned address. Number of nested calls
is equel to the capacity of RAM which is left out after allocation of all variables. 
Important notes:
- There are many different types of derivates, so it is necessary to be familiar with   
characteristics and special features of the microcontroller in you are using. 
- Some of the AVR MCUs have hardware multiplier. Due to this, be sure to pay 
attention when porting code from one MCU to another, because compiled code 
can vary by its size. 
- Not all microcontrollers share the same instruction set. It is advisable to carefully  
read the instruction set of the desired MCU, before you start writing your code.  
Compiler automatically takes care of appropiate instruction set, and if unapropriate  
asm instruction is used in in-line assembly, compiler will report an error. 
- Program counter size is MCU dependent. Thus, there are two sets of libraries : 
- MCUs with program counter size larger than 16 bits (flash memory size 
larger than 128kb) 
- MCUs with program counter size less or equal 16 bits (flash memory size
smaller than 128kb) 
- Assembly SPM instruction and its derivates must reside in Boot Loader section of 
program memory. 
- Part of flash memory can be dedicated to Boot Loader code. For details, refer to  
AVR memory organization. 
Related topics: mikroBasic PRO for AVR specifics, AVR memory organization
104
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
8051 Specifics
mikroBasic PRO for AVR
CHAPTER 4