SMALL

Abbreviation

SM

Arguments

None.

Default

SMALL

Description

This directive controls the selection of the memory model to be implemented. The SMALL memory model places all function variables and local data segments in the internal data memory of the 8051 system. This allows for very efficient access to data objects. The address space of the SMALL memory model, however, is limited.

Regardless of memory model, variables may be declared to be in any of the 8051 memory ranges. However, place frequently used directives (such as loop counters and array indices) in internal data memory. This significantly improves system performance.

NOTES

The stack required for function calls is always placed in internal memory.

You should always start using the SMALL memory model. Then, as your application grows, you can place large variables and data in other memory areas by explicitly declaring the memory area with the variable declaration.

See Also

COMPACT, LARGE, ROM

Example


#pragma small