HARRAY
The HARRAY macro may be used to access an array of type object at a fixed absolute address base in the huge memory class. The HARRAY 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 HARRAY macro is defined as follows:
#define HARRAY(object, base) ((object volatile huge *) (base)) /* HDATA */
You may use the HARRAY macro in your programs as shown in the example below:
#include <absacc.h> /* include absolute memory access macros */
:
:
int i;
long l;
l = HARRAY (long, 0x8000)[i]; /* long array at HDATA 0x8000 */
HARRAY (long, 0x8000)[i] = 0x12345678; /* assign a value */
#define DualPortRam HARRAY (int, 0x18000) /* int array at HDATA 0x18000 */
DualPortRam[l] = 0x1234; /* assign a value */
:
: