I am trying to write 0xAA to Address location 0x5555. The following code is working. May someone kindly explain in details how C167 controller interpret it? Why is #09555H used???
MOV DPP2,#0001H
MOV R12,#09555H
MOVB RL1,#00AAH
MOV [R12],RL1
You must be using small memory model and near data pointers. The C166 compiler utilizes DPP addressing mechanism of the C167 microcontroller for near data pointers, which means that a near absolute address will most likely be translated to a different physical address. To specify absolute physical address, you have to use far, huge or xhuge pointers. Use macros from absacc.h, they were designed for that:
MVAR(char, 0x5555) = '\xAA';