I wanted to know how to access a particular register in a microcontroller having mapped at a particular fixed address. I googled about this issue and I found the following:
#define WDTCTL (*((volatile unsigned short *)0x0120))
#define P1DIR (*((volatile unsigned char *)0x0022))
This method of works absolutely fine but I do not understand how it works.
I will be glad if someone could explain it to me.