I have only a compiled binary code (.hex) of pic microcontroller,how can i convert it to code line in mikroc in order to see the instruction of program?
Asked
Active
Viewed 427 times
1
-
3There isn't a reliable way to recover the source code used to create an executable. I'm tolerably certain this has been asked and answered before. – Jonathan Leffler Aug 12 '17 at 15:54
-
1You can disassemble it, You can probably decompile it into.. something not very useful. As @JonathanLeffler says, this must have been asked before... – Martin James Aug 12 '17 at 15:57
-
You might want to check http://boomerang.sourceforge.net/ – Uddhav P. Gautam Aug 12 '17 at 15:58
-
Related to https://stackoverflow.com/q/7798923/694576 if not a duplicate. – alk Aug 12 '17 at 16:11
-
1Disassembling without the licence is illegal as I know :) – 0___________ Aug 12 '17 at 16:25
-
A common term for this is "turning hamburger back into cows." There are tools that can convert machine code into the equivalent C source, but it won't be the *original* source code. – John Bode Aug 13 '17 at 03:49
1 Answers
3
When it's compiled, it is machine code and there's no (automatic) way of translating machine code to C. You can get a readable version of the code, assembly, using a disassembler for your target CPU. This of course requires you learning your CPU's assembly language.
-
2... and after having understood the assembler code, then rewrite the line of C code yourself. ;-) – alk Aug 12 '17 at 16:10
-
2@alk ...which will usually take longer than to write your own version from the scratch :) – 0___________ Aug 12 '17 at 16:23