PWORD
The PWORD macro accesses individual words in one page of the external data memory of the 8051. You may use this macro in your programs as follows:
#include <absacc.h> /* Include Macro Definitions */
.
.
.
rval = PWORD [0x0002];
PWORD [0x0002] = 57;
.
.
.
This example reads and writes the contents of the word in pdata memory at address 0004h (2 × sizeof (unsigned int) = 4).
The range of valid index values for this macro is 0-127.
Note
- The index used with this macro does not represent the memory address of the integer value. To obtain the memory address, you must multiply the index by the size of an integer (2 bytes).