8051 Specifics

Types Efficiency

First of all, you should know that 8051 ALU, which performs arithmetic operations, is optimized for working with bytes. Although mikroBasic PRO for 8051 is capable of handling very complex data types, 8051 may choke on them, especially if you are working on some of the older models. This can dramatically increase the time needed for performing even simple operations. Universal advice is to use the smallest possible type in every situation. It applies to all programming in general, and doubly so with microcontrollers. Types efficiency is determined by the part of RAM memory that is used to store a variable/constant. See the example.

Nested Calls Limitations

There are no Nested Calls Limitations, except by RAM size. A Nested call represents 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.

Note: There are many different types of derivatives, so it is necessary to be familiar with characteristics and special features of the microcontroller in you are using.

Xdata Specifics

ATMEL 8051 Specifics

Silicon Laboratories 8051 Specifics

Copyright (c) 2002-2013 mikroElektronika. All rights reserved.
What do you think about this topic ? Send us feedback!
Want more examples and libraries? 
Find them on LibStock - A place for the code