CWORD
The CWORD macro accesses individual words in the program memory of the 8051. You may use this macro in your programs as follows:
#include <absacc.h> /* Include Macro Definitions */
.
.
.
rval = CWORD [0x0002];
.
.
.
This example reads the contents of the word in program memory at address 0004h (2 × sizeof (unsigned int) = 4).
The range of valid index values for this macro is 0-32767.
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).