Keil Logo

A51: Instructions Generated by PDATA or XDATA Variable


Information in this article applies to:

  • C251 Version 1.0 or later
  • C51 Version 5.0 or later

QUESTION

I'm using PDATA and XDATA in my project. What assembly language instructions are generated for accesses to these memory areas:

ANSWER

PDATA refers to one 256-byte "page" of external data. Therefore, PDATA pointers may be stored in a single byte. PDATA memory is accessed using the MOVX @R0 and MOVX @R1 instructions. The upper byte of a PDATA address comes directly from the P2 register. Refer to the startup code in STARTUP.A51 for information on how to set P2.

XDATA refers to the full 64K of addressable external data. Therefore, XDATA pointers may be stored in a word (2 bytes). XDATA memory is accessed using the MOVX @DPTR instruction.

MORE INFORMATION

  • Refer to MOVX in the 8051 Instruction Set Manual.

Last Reviewed: Thursday, February 25, 2021


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.