Keil Logo

XSMALL Compiler Directive

Abbreviation

XSM

Arguments

None.

Default

TINY

µVision

Options — C251 Compiler — Memory Model — Memory Model.

Description

This directive implements the XSMALL memory model. The XSMALL memory model places all function variables and local data segments in the near memory of the 251 system. This ensures efficient access to near data objects. The default data pointer is 4 bytes which allows full access to the entire 251 address space.

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

Note

  • The stack required for function calls is always placed in near memory, refered as memory class EDATA.
  • If your total variable space is less than 64 Kbytes, you should attempt to use the XTINY memory model instead of XSMALL.
See Also

HPTR

Example
C251 SAMPLE.C XSMALL

#pragma xsmall
  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.