This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Questions re: DIS2000.exe for the CCS 3.3



Using code composer V3.3 toolset, there is a tool called DIS2000.exe.  Having trouble finding documentation on the tool. 

We are using the tool to convert the .out file into a nicely formatted file as an input into an internal tool to determine which opcodes the software is using (for safety design reasons).  The main issue I am having is that the tool seems to convert constant data (fixed data in a table for example) into an opcode/mnemonic that is incorrect.  So, if the data in the last point of the table is converted into an opcode that expects data in the next address, the opcode that actually immediately follows the table is missed.

Does anyone have any tips on using this tool or documentation for the command line switches that might be available to help with this issue?

  • The disassembler should be covered in the Assembly Language Tools book, but it is not.  I filed SDSCM00037443 in our SDOWP system to get that fixed.  Feel free to track that with the SDOWP link in my sig below.

    In the meantime "dis2000 -h" gives you a usage summary.

    I think you have mixed code and data in the same section.  Is that right?  If so, there is little the disassembler can do.  The disassembler works on the file a section at a time.  The section header flags are inspected to know whether a section contains code or data, and then the disassembler acts accordingly.  If a single section contains both code and data, the choice made by the disassembler will be wrong for some range of addresses.  In such a case there is no way to know when to switch between instruction handling and data handling.  Presume the disassembler thinks the section is code.  When it encounters a word which cannot possibly be an instruction it outputs some hex display instead.  It returns to displaying instructions the next time it sees a valid opcode.  Of course, this is all quite unreliable.  But there is no way to do it any better.

    The best answer, I suspect, is to not combine code and data into the same section.  I can't think of anything you can do with code and data in the same section that you cannot do with separate sections of code and data.

    Thanks and regards,

    -George