Keil™, An ARM® Company

C166 User's Guide

Small Model

The small memory model (selected with the SMALL directive) uses the segmented mode of the C16x/ST10/XC16x microcontroller. This is the default memory model if no model is specified. In this memory model:

  • Variables are stored in near memory.
  • Functions are stored in near memory and are accessed using near calls.

This memory model provides the same efficient code as the Tiny Memory Model but code and data are not limited to 64K. You may locate variables and use functions with far, huge, and xhuge memory types which permit full use of the C16x/ST10 address capabilities.

This memory model is the best choice for programs that have small code and small data requirements but require access to more than 64K of address space.