Keil™, An ARM® Company

C166 User's Guide

HOLD Compiler Directive

Abbreviation HL
Arguments A memory type (near, idata, sdata, or bdata)
and a size between 0 and 16384.
Default HOLD (near 6)
µVision Options — Target — Data.
Description 

The HOLD directive allows you to locate smaller data objects in the near, idata, sdata, or bdata memory areas instead of the default memory space associated with the memory model. These memory areas are accessed more efficiently than the far or huge memory areas.

By default, objects are located in the memory space specified by the selected memory model. Objects that are 6 bytes or smaller in size are located in the NEAR memory space. Objects that require more than 6 bytes of memory are located in the far or huge memory areas (in the LARGE, HLARGE, XLARGE COMPACT, or HCOMPACT memory models).

See Also COMPACT, HCOMPACT, HLARGE, LARGE, MEDIUM, SMALL, XLARGE
Example 
C166 SAMPLE.C HOLD (idata 2, near 6)

#pragma HL (sdata 10)