![]() | ![]() | ![]() |
| | |||||||
| General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion? |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| Is there any software or method which can convert Assembly Language to C Programming Language??? | |
| |
| | (permalink) |
| This is like recreating the egg from the omelette - it's not possible, the information no longer exists. | |
| |
| | (permalink) |
| Of cause there is. It's called a decompiler and it probably came with your compiler and assembler. Larry
__________________ Confucius says: "One in three is a teacher." | |
| |
| | (permalink) |
| Interesting suggestion, perhaps you could give an example? - I've never seen any such thing in all the compilers I've used over the years. | |
| |
| | (permalink) |
| | |
| |
| | (permalink) |
| Decompilers exist for many different architectures and languages. However, the output is likely to be worse code than the input. You'd learn more just doing the conversion the old-fashioned way: reading the asm and writing the corresponding C yourself. Among other things, symbol names and some other information is lost. The output will be very literal and probably not particularly easy to read. http://www.embeddedrelated.com/usene...ow/27425-1.php http://en.wikibooks.org/wiki/Reverse_Engineering/Tools Again, the tools are not perfect and it's usually easier just to learn to read the assembly. Torben
__________________ Curiosity was framed. Ignorance killed the cat. | |
| |
| | (permalink) | |
| Quote:
It's most confusing and like Torben said it would be much easier to learn ASM. Larry
__________________ Confucius says: "One in three is a teacher." | ||
| |
| | (permalink) |
| I've read many 'asm to C' attempts to decompile in a sensible symbolism, all of them are at best half-assed. They usually use simple proper noun replacement to try to help native understanding of the converted code, and it's always bad. Bob is my uncle, my uncle is 3.1415926 positive times in relation to itself and his father is 3 less than his mother is 1 more than her daughters last mood change. If you just want to use the ASM code in a C environment use an inline ASM argument, most C copilers support this if the ASM memory/code structure is known.
__________________ "Because I be what I be. I would tell you what you want to know if I could, mum, but I be a cat, and no cat anywhere ever gave anyone a straight answer, har har." | |
| |
| | (permalink) |
| Thats tough to do. There are so many assembly combinations out there for a set of C instructions, that it makes this very difficult. If you want it done right, you're best off doing it yourself.
__________________ www.salgat.net | |
| |
| | (permalink) | |
| Quote:
I'll ask again - can you give an example of any such compiler package?. | ||
| |
| | (permalink) |
| Just Google it. There are loads of them. Larry
__________________ Confucius says: "One in three is a teacher." | |
| |
| | (permalink) |
| Really all program languages are built from machine code which directly correlates to the assembly language mnemonics. You would have to reverse engineer it yourself. I suggest getting "WinDbg.exe". here's a one link: http://bytes.com/forum/thread657053.html | |
| |
| | (permalink) |
| Salgat is right. There is not a 1:1 mapping between source code and the asm generated from it. Things get even worse if the code is optimized.
__________________ search engine for electronic partsJunebug USB PIC programmer kit., USB Bit Wacker, 3v0's Homepage The 15 Minute Printed Circuit Board! (+drill time) | |
| |
| | (permalink) |
| | |
| |
| | (permalink) | |
| That's just lazy. Earlier you stated that: Quote:
Unless of course you feel like providing some links to back up your statement. It's not our job to defend your position. If you can't be bothered to, why should anyone else? Torben
__________________ Curiosity was framed. Ignorance killed the cat. | ||
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| assembly and c language | baftab | Electronic Projects Design/Ideas/Reviews | 4 | 15th April 2006 02:03 AM |
| LCD programming and connection with assembly language | microzone | Micro Controllers | 5 | 10th February 2006 04:14 PM |
| assembly language | soohino | Micro Controllers | 3 | 31st December 2004 06:35 AM |
| Assembly Language??? | amady | Micro Controllers | 58 | 27th October 2004 10:27 AM |
| Learning Assembly Programming Language | Johnson777717 | Micro Controllers | 4 | 22nd March 2004 03:00 PM |