Keil Logo

C51: WHAT IS THE ADDRESS RANGE ACCEPTABLE BY XBYTE MACRO


Information in this article applies to:

  • C51 All Versions

QUESTION

When I use the XBYTE macro, what is the largest element I can access? In the following example, how long may Z be?

#define Z 0x0000

XBYTE[Z] = 0xAA;
XBYTE[Z] = 0x55;

ANSWER

Macros, like XBYTE and CBYTE, may be used to access explicit memory addresses. These macros access the full XDATA or CODE address spaces which are 64K Bytes long. Therefore, the largest value you may specify for the XBYTE or CBYTE index is 65535.

MORE INFORMATION

  • Refer to XBYTE in the Cx51 User's Guide.

SEE ALSO

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.