DARRAY
The DARRAY macro may be used to access an array of type object at a fixed absolute address base in the data memory class. The DARRAY macros scales the index by the size of object and adds the result to base. The final address is then used to access the memory.
The DARRAY macro is defined as follows:
#define DARRAY(object, base) ((object volatile data *) (base)) /* DATA/IDATA */
You may use the DARRAY macro in your programs as shown in the example below:
#include <absacc.h> /* include absolute memory access macros */
:
:
int i;
long l;
l = DARRAY (long, 0x80)[i]; /* long array at IDATA 0x80 */
DARRAY (long, 0x80)[i] = 0x12345678; /* assign a value */