Keil Logo

C166: ACCESSING THE FULL ADDRESS RANGE


Information in this article applies to:

  • C166 Version 3.12
  • C166 Version 4.03

QUESTION

Is it possible to access the full address range (16Mb) in C?

ANSWER

Yes. The huge and xhuge memory types allow access to the full 16Mb address range of the C167. The huge memory type only uses 16-bit address calculation, so the maximum size of an object may be 64kb, however, it is the optimum memory type for the microcontroller. The xhuge memory type does not have a limit on the maximum size of an object.

For example, you may declare variables and pointers using these memory types. Here are some examples:

unsigned char xhuge foo;
int huge bar;
unsigned char huge thing[50000];
char xhuge *xptr;
long huge *baz;

If you choose the HLARGE memory model, the variables default to being huge.

MORE INFORMATION

Last Reviewed: Friday, July 15, 2005


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