Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service

search inside this forum
search inside all forums
ICDPPCNEXUS debugger for codewarrior: disassembly fails
Willem v. Aug 12, 2014 at 05:28 AM (05:28 hours)
Staff: Takao Y.

  • I have the ICDPPCNEXUS debugger for CodeWarrior 128k starter Edition Version 1.34

    It looks to me that de disassembler in the Code Windows contain some errors.

    I see:

    00000228 8104 SE_LBZ R0,04(R4)
    0000022A 9106 SE_STB R0,04(R6)

    As far as I know, this should be decoded as:

    00000228 8104 SE_LBZ R0,01(R4)
    0000022A 9106 SE_STB R0,01(R6)

    Is this problem allready fixed?


  • Greetings,

    The decoding is correct. This is because it is in SD4 mode:

    "Format used by 16-bit load and store class instructions. The SD4 field is a 4-bit unsigned immediate value zero-extended to 32 bits, shifted left according to the size of the operation, and then added to the base register to form a 32-bit EA. For byte operations, no shift is performed. For half-word operations, the immediate is shifted left one bit (concatenated with 0b0). For word operations, the immediate is shifted left two bits (concatenated with 0b00). For future double-word operations, the immediate is shifted left three bits (concatenated with 0b000)."

    Since this is a word operation, the value of 4'b0001 is shifted left two bits to equal 4'b0100, which is equal to 0x04.

    Does that make sense to you?

    Takao Yamada

    • Dear Takao,

      Iam debugging an application for a mpc5644a.
      The code is a part of memcpy.
      The debugger shows that data is moved byte by byte.
      for example:

      register R6 = 0xfff and R4 =0x40001fff
      the debugger shows:
      R0 is loaded with the data from 0x1000 which is 0x18
      R0 is stored at 0x40002000 ( a single byte (0x18) appeared in the memory window)

      so it does not make sense to me, but thanks for your reaction.



Add comment

   Want to comment? Please login or create a new PEMicro account.

© 2018 P&E Microcomputer Systems Inc.
Website Terms of Use and Sales Agreement