Marc,
Thanks for your prompt reply. My target process will be MC9S12XDP512. I will try your method.
I just tried the same code in Visual C++, both chData and shData have the same value at the first byte. So the Intel kingdom is different from the Motorola world
Does the compiler have an options to change that? Any way, I doubt it. I do remember when I use LDD $1000 in HC11 language, the data in 0x1000 will be put in A and 0x1001 will be in B.
Pang