How do I disassemble?


Closed Thread
Results 1 to 15 of 15
  1. #1

    Default How do I disassemble?

    I keep reading posts on the web that say go to mplab, import your hex file, then goto View->Disassembly Listing but it doesn't work. Nothing ever comes up inside the window... just blankness. I am supposed to see basically the same thing as my whatever.lst file right? So how do I get it to do that? I must be missing a step somewhere...

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,597


    Did you find this post helpful? Yes | No

    Default Re: How do I disassemble?

    I never used MPLAB. Does it have a Help feature, or forum?

    Robert

  3. #3
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Default Re: How do I disassemble?

    I think you can't get this from a single Hex file ...

    here you only can see .asm disassembly file ( W/o comments nor source )
    FILE/IMPORT ... Then VIEW/Program file

    if you want the VIEW/ disassembly window ... you need the whole project to have been compiled before !

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  4. #4


    Did you find this post helpful? Yes | No

    Default Re: How do I disassemble?

    I understand that I will not be able to decompile, but everywhere I look, it says I should be able to disassemble. I know I'm gonna get assembly language back, but I can read assembly, I cannot read hex...

  5. #5
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: How do I disassemble?

    Use MPLAB to look at the Program memory after loading the hex file.
    Dave Purola,
    N8NTA
    EN82fn

  6. #6
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,597


    Did you find this post helpful? Yes | No

    Default Re: How do I disassemble?

    You shouldn't need anything else besides the hex file.

    http://en.m.wikipedia.org/wiki/Decompiler

    The problem is that decompilers don't all translate back to the same version of assembler.

    You can do it, you just need all the proper tools.

    Robert

  7. #7


    Did you find this post helpful? Yes | No

    Default Re: How do I disassemble?

    Quote Originally Posted by Demon View Post
    You shouldn't need anything else besides the hex file.

    http://en.m.wikipedia.org/wiki/Decompiler

    The problem is that decompilers don't all translate back to the same version of assembler.

    You can do it, you just need all the proper tools.

    Robert
    Ok, we seem to be mixing terms tho... I was under the impression that when it comes to MC programming, that there is a distinct difference betwteen disassemble and decompile. Correct me if I am under the wrong idea, but I thought the reason disassembly is possible is because assembly is standardized more than with normal type programming for software. The way I understand it, we are really kind of double translating or double compiling on pic unless we want to learn to write in assembly. ie.. PBP3--> assembly--> hex or C--> assembly--> hex or Proton --> assembly--> hex, and this is why disassembly is usually possible even if decompile probly wont be....

  8. #8
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,597


    Did you find this post helpful? Yes | No

    Default Re: How do I disassemble?

    A quick google to jog my memory:

    "Each assembly language is specific to a particular computer architecture..."

    So you can quickly guess there are numerous versions of what we call assembler.


    Also, programming is programming, doesn't matter if on microchips, PCs or mainframes. A decompiler will generate source code (PBP in this case) and a disassembler will generate some version of assembler (MPLAB assembler in this case).

    You could contact PBP or MPLAB support and ask if such tools are available. I wouldn't hold my breath.

    You could use another disassembler, go through that and migrate over manually to MPLAB assembler. This would probably be your best option.

    Good luck getting another disassembler (if you're not buying one from a reputable source). I wouldn't know which download to trust in this world of hackers.

    Maybe if you ran it on a standalone PC not connected to your network or the internet, it couldn't call home, infect/damage a critical PC or browse through your "stuff".

    Yes, I lean on the paranoid side of the fence when it comes to downloads.

    Robert

  9. #9
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,597


    Did you find this post helpful? Yes | No

    Default Re: How do I disassemble?

    Quote Originally Posted by Dave View Post
    Use MPLAB to look at the Program memory after loading the hex file.
    Dave, does this show contents in hex?

    If yes, is there a way to export and then convert into MPLAB assembler?

    (a tool could already be available for all I know)

    Robert

  10. #10
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: How do I disassemble?

    It does show it in assembly.
    Dave Purola,
    N8NTA
    EN82fn

  11. #11
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,597


    Did you find this post helpful? Yes | No

    Default Re: How do I disassemble?

    So who's volunteering for a Assembler-PBP decompiler?

    But then we get into the issue of PBP v2.6c versus v3.

    Robert

  12. #12


    Did you find this post helpful? Yes | No

    Default Re: How do I disassemble?

    There is a decompiler for Windows. Its called IDA. It costs a skrillion Deutsche Marks. It will disassemble a PIC executable (but not of course decompile - to do that it needs to know about the compiler).

    I believe the Oshonsoft line of simulators will disassemble - they have a trial version.

    If you Google for "PIC disassembler" you will find myriad on and off line PIC disassemblers but not decompilers, and if you did find one it would be to C.

    All things considered unless you only need to make tiny changes to the device in question, better of understand its function (as a black box) and write that up in Basic.

    George

  13. #13
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,597


    Did you find this post helpful? Yes | No

    Default Re: How do I disassemble?

    All this talk of Assembler makes me wish I had kept it fresh. Unfortunately I worked in COBOL and graduation dates back to 1984. I dabbled in various BASICs over the years but that was it.

    BR is Branch Register, and that sums what I've retained. Was in top 3 in Assembler class too.

    I am curious if a decompiler is within our reach. Each PBP command breaks down into one or more Assembler statements. Could we catalog these Assembler "groups", scan for matches and spit out corresponding PBP?

    Or am I missing something obviously more complicated?

    Robert

  14. #14


    Did you find this post helpful? Yes | No

    Default Re: How do I disassemble?

    Quote Originally Posted by towlerg View Post
    All things considered unless you only need to make tiny changes to the device in question,
    George
    That is EXACTLY what I need! I have an auto-acquire satellite dish system that is run by a PIC32, and I need it to shift itself just a few degrees left, and possibly a couple up or down, of where it wants to be now... that's it. Depending on how it's coded now, and what I can learn, I can either re-write it to lock onto the proper satellite, or lock onto the current satellite, and move to the desired satellite from that point. Either way, the changes I need to make are relatively minute....

  15. #15


    Did you find this post helpful? Yes | No

    Default Re: How do I disassemble?

    Ok, this is a PIC32MX440F256H.... Does this make it more complicated somehow?

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts