Keil Logo Arm Logo

C166 User's Guide

Memory Model

The most significant impact on code size and execution speed is the selected memory model. Compiling in the small model always generates the smallest, fastest code possible.

The SMALL directive instructs the compiler to use the small memory model. In this memory model, all variables are stored in near memory (unless they are explicitly located elsewhere) and are accessed using short, 16-bit near addresses. Programs with more than 64K of code may use medium model (which still stores variables in near memory).

If you must use the large or compact memory model and if you use a C167-compatible device, you should consider the xlarge, hlarge, or hcompact models. These memory models generate better code for C167 devices.

arm-logo-small

Keil logo
Important information

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