how to access a particular register of a microcontroller using pointers
<p>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:</p>

<pre><code>#define WDTCTL     (*((volatile unsigned short *)0x0120))
#define P1DIR (*((volatile unsigned char *)0x0022))
</code></pre>

<p>This method of works absolutely fine but I do not understand how it works. </p>

<p>I  will be glad if someone could explain it to me.</p>