ARM Technical Support Knowledge Articles

RESERVING MEMORY ACCESSED WITH XBYTE AND XWORD

Applies to: C51 C Compiler

Answer


Information in this article applies to:


QUESTION

I'm using XBYTE and XWORD to access memory directly. How can I reserve the memory so the compiler doesn't locate variables where I have located my memory buffer?

ANSWER

You may declare an xdata array using the _at_ keyword to reserve memory as follows:

unsigned char xdata buffer [100] _at_ 0x8000;

to reserve 100 bytes starting at 8000h. This ensures that the compiler does not locate any other variables at this location.

MORE INFORMATION

SEE ALSO

Article last edited on: 2005-07-15 13:15:59

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential