This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Assembly Code

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

Parents
  • You can read about addressing modes of the C167 in "C166 Instruction Set Manual". This document in PDF format is here:
    http://www.infineon.com/cgi/ecrm.dll/ecrm/scripts/public_download.jsp?oid=8056&parent_oid=-8137
    Basically, what happens is the following. Bits 15 and 14 of R12 (which was used as a pointer in your example) select which of the four DPPs to use. 10 binary means DPP2. Then the physical address is calculated according to the formula
    Addr = (DPP2 << 14) + (R12 & 0x3FFF)
    In your case it yields 0x5555, as expected.
    There is a DPP override mechanism, which uses EXTP and EXTS instructions. You can find details in the C166 Instruction Set Manual, or you can use compiler generated code as an example.

    - Mike

Reply
  • You can read about addressing modes of the C167 in "C166 Instruction Set Manual". This document in PDF format is here:
    http://www.infineon.com/cgi/ecrm.dll/ecrm/scripts/public_download.jsp?oid=8056&parent_oid=-8137
    Basically, what happens is the following. Bits 15 and 14 of R12 (which was used as a pointer in your example) select which of the four DPPs to use. 10 binary means DPP2. Then the physical address is calculated according to the formula
    Addr = (DPP2 << 14) + (R12 & 0x3FFF)
    In your case it yields 0x5555, as expected.
    There is a DPP override mechanism, which uses EXTP and EXTS instructions. You can find details in the C166 Instruction Set Manual, or you can use compiler generated code as an example.

    - Mike

Children
No data