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
The two MSBits specify the DPP register that should be used to complete the address. In address 0x9555, the two MSBits are 10B or 0x02. This means that DPP2 is used. Since DPP2 contains the value 0x01 you have to replace the two MSBits of the address with 0x01. So 1001B becomes 0101B which results in the address 0x5555. DPP usage is kind of a pain in the butt when you are debugging but it does allow you locate data and such anywhere in the 16 Mbyte address space and still use 16-bit addressing mode. -Walt