Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

HEX to ASM (Source Code)

Status
Not open for further replies.

twistedreflex

Newbie level 3
Joined
Mar 17, 2011
Messages
4
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Activity points
1,320
I have been looking at the thread on here regarding this subject,.. but I am at a point where I need some good leads to fix the issue I have.

I have a circuit board that I had designed. I am in the process of making 10 proto-types to test in various subject hardware environments.

I sourced out the "code" for my project to a company which sent me a HEX file to work with and test. Seeing that the code worked for my needs I agreed to have the company make me a source code that I could evolve with my product as the industry moved in different directions.

The problem is this:
The company is gone,... no longer in existence. I paid decent money out to have a HEX file of the code installed on my products and obviously I have the file itself in HEX form. My problem is I want the software to grow with the hardware. And in its present form,.. it cant.

After looking at all the "expert" advice on this forum, I see that it would be easier to re-write the code. I have gone as far as to order books and learn the assembler language it was written in so I stand a chance.

My knowledge is at a minimum and I need to get my product on the market so I can at LEAST pay myself back for the time and materials invested.

I paid good money for this code and its my product,... just not in the form where I can use it to allow my products to change as the market changes.

Does anyone here know of places or trusted people that can take my HEX and move it back into source so I can be able to change it later on as I need to re-write it???
 

You may be able to partially reverse-assemble it but you will never be able to fully recreate the original source code.
The best you will achieve is an assembly listing which can be sent to an assembler to produce an identical HEX file. It goes some way toward being able to make changes but it will still take a lot of effort, especially if the original is written in a high level language. What device is it? Do you know what language the original source code is written in?

Brian.
 

You will need a disassembler to do this
It will give a listing of assembler code which may be later assembled that produces the exact same hex code, as pointed out by betwixt
However, understanding, rewriting or modifying this code will take a lot of effort, especially if your code is very long and if you do not have prior experience in assembly programming
As far as I know there are no ways to decompile it into a high level language
recovering partial assembly code is the best thing we may be able to do
Try searching for PIC disassemblers on the internet
check this out to begin
PIC Microchip Disassembler and HEX File Tool
I found this from Google but I don't think it is a freeware or shareware
 

I suggest a good starting place is Oshon Software Homepage, download the trial "PIC Simulator IDE" and load the hex file into the simulator. It will not only disassemble the code, it will let you run it one instruction at a time in a virtual IC. You need to register the program (not expensive) for full functionality but just to extract a listing I think you can use it in demo mode.

You can also do it in MPLAB but the procedure is more complicated and the program is many times bigger.

Brian.
 

I suggest a good starting place is Oshon Software Homepage, download the trial "PIC Simulator IDE" and load the hex file into the simulator. It will not only disassemble the code, it will let you run it one instruction at a time in a virtual IC. You need to register the program (not expensive) for full functionality but just to extract a listing I think you can use it in demo mode.

You can also do it in MPLAB but the procedure is more complicated and the program is many times bigger.

Brian.

Okay.

Thank you all for the information and directions of approach to my issue at hand.
I would just pay to have more code developed but I feel like I already forked out enough and should not have this issue to begin with.
Ive been searching out the programs needed to do MOST of my solving,.. but I need to see how much of this I can handle on my own.
What I would like to do is just hand the file over and say "fix this please",... *** only knows what that would cost....:-(

---------- Post added at 15:57 ---------- Previous post was at 15:40 ----------


What do I do with that web page?

It looks like a head hunter listing..... I need a person or company to do the work,... can you explain?
 

There are several output files when an assembler runs, did the author give you any of the others, in particular an OBJ file? With that it becomes easier to decypher the HEX file.

If you are prepared to trust me, I will look at the complexity of the file for you and at least give you some idea of what is involved. You would have to let me see at least a schematic or description of what each pin of the PIC is connected to so I could work out the type and direction of signals the program reads and produces. I will not charge you but neither will I promise to "fix this please" for you.

Brian.
 
  • Like
Reactions: bugme

    bugme

    Points: 2
    Helpful Answer Positive Rating
What do I do with that web page?

It looks like a head hunter listing..... I need a person or company to do the work,... can you explain?

you hire a coder. You can specify how much you want to pay (maximum) and coders bid. I have used them a number of times, it works.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top