??? 05/26/05 15:20 Read: times |
#93936 - Making sausage Responding to: ???'s previous message |
Nee Ha Wong,
This pretty close to asking what machine can un-grind meat? Maybe not quite, since C instructions are not very far removed from machine instructions, but they're far enough apart that I suspect you're not going to find such a program. There are so many things that go on when a compiler does its work that reversing the process is, well, at the risk of oversimplifying let's just say difficult. And that's before you run into any functions. Even if it is possible to do what you ask, it's easier to just learn machine code. Then you won't need to de-compile it. This is an exercise that I recommend to everyone who is learning µ-controllers, and one that I believe you will benefit from. Write a simple program in assembler (using the instruction set for your µ-controller), for example a ripple counter on one of the ports. Then assemble it manually, which is to say convert it into executable hexadecimal numbers. Then construct an Intel Hex file and download your program into your µ-controller and verify that it works. Obviously you would never do this for a significan program, but the exercise will give you a whole new level of understanding of the µ-controller. Good luck, |
Topic | Author | Date |
how to convert machine code back to c ? | 01/01/70 00:00 | |
Making sausage | 01/01/70 00:00 | |
Worse than that. | 01/01/70 00:00 | |
even worse than that | 01/01/70 00:00 | |
asm-to-C compiler | 01/01/70 00:00 | |
Debug Symbols. | 01/01/70 00:00 | |
AFAIK you are confoosed | 01/01/70 00:00 | |
Bartosz meant PC-style | 01/01/70 00:00 | |
Bartosz meant PC-style | 01/01/70 00:00 | |
the excuse![]() | 01/01/70 00:00 |