I'm new into using the MSP430 with Code composer and i was doing a lab assignment where i had simple instructions coded in.
I ran this instruction:
mov.w #'ABC', R9
in result, I obtain a #0x4241
in R9
.
i understand that the above in quote 'ABC' are ASCII string and when converted, A= 41 B= 42 C=43 and that C is kicked out as only a word is stored, so A and B is stored.
What I don't understand is:
why is it 4241
instead of 4142
?
Since A
is 41
and B
is 42
?
In a word : endianness
Your word is being stored Lest Significant Byte first : 0x4241.
On a "big Endian" machine, it would be stored as 0x4142.