Cx51 User's Guide

LARGE Compiler Directive

Abbreviation

LA

Arguments

None.

Default

SMALL

µVision

Options — Target — Memory Model.

Description

This directive selects the LARGE memory model where all variables and local data segments of functions and procedures reside (as defined) in the external data memory of the 8051 system. Up to 64 KBytes of external data memory may be accessed. This, however, requires the long and therefore inefficient form of data access through the data pointer (DPTR).

Regardless of memory model type, you may declare variables in any of the 8051 memory ranges. However, placing frequently-used variables (such as loop counters and array indices) in internal data memory significantly improves system performance.

Note

  • The stack required for function calls is always placed in IDATA memory.
See Also

COMPACT, ROM, SMALL

Example
C51 SAMPLE.C LARGE

#pragma large