Keil Logo



Help. I need to create a string table in HCONST in my 251 program. I need my program to run in X-Tiny memory model by default. How do I do that?


Creating a table of strings in HCONST is easy to do. The following code will help you get started:

const char far str1 [] = "This is string 1";
const char far str2 [] = "This is string 2";
const char far str3 [] = "This is string 3";

const char far * const far junk [] =
  str1, str2, str3,

In this example, the strings str1, str2, and str3 are stored in HCONST (the const char far does that). The array junk is an array of pointers to const char far things (str1, str2, and str3). To make junk live in HCONST, you must also put the const far in front of junk.

Last Reviewed: Thursday, May 20, 2004

Did this article provide the answer you needed?
Not Sure
  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.