Hi, here is what is probably a very easy question, but I am missing something important as far as programming goes on MSP430s.
The problem has something to do with how ptrs are dereferenced for char data. I know ptrs are 16-bits long. In the code below:
unsigned char data = 5; unsigned char * addr = & data;
I use the debug window to see that the value for addr is
0x3BDC
Here is a memory view of that address:
What I don't understand is that even though addr is an unsigned char *, the actual data byte (the number "5" in this case), is actually at address
0x3BDD
NOT at the address 0x3BDC which is what the debugger shows:
Can anybody explain why this is? How would I ensure that the unsigned char data byte is actually at the address value specified? (and not the address one byte later)