Keil Logo

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)
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.