DVAR
The DVAR macro accesses variables of any type at fixed absolute memory locations in the data/idata memory class.
The DVAR macro is defined as:
#define DVAR(object, addr) (*((object volatile data *)(addr))) /* DATA/IDATA */
You may use this macro in your programs as follows:
#include <absacc.h> /* include absolute memory access macros */
:
:
int i;
long l;
l = DVAR (long, 0xE0); /* read long value at IDATA 0E0H */
DVAR (int, 0x10) = i; /* write the value of i to IDATA 10H */
#define IO DVAR (char, 0x20) /* IO port at IDATA 20H */
if (IO == 0) IO = 1; /* test port and write 1 to IO address */