On Wed, 11 Feb 2004, Glen Richards wrote:
> Is there a way to do this. I mean there is a company who converts asm to
> their wsl language and then from that to c is there a way that we can do
> this?
Normally people ask if you can convert machine language to C source. Two
reasons for this. First is that I have the binaries but lost the source
code (it happens even with backups). The second is that I have someone
else's binaries and I want to reverse engineer them.
If you want to go from machine code to C source there are programs out
there that will do something. All are operating system specific and most
are compiler specific as well. Just do a search on "reverse engineer <your
OS> <your compiler>" and you might find something. The source code they
product is difficult to read and next to impossible to maintain. It is
often easier to reverse engineer the requirements and write the program
from scratch.
If you have actual assembly source code and want to turn it into C source
code that might actually be harder. The market for people who know C but
have some assembly code is a lot smaller than people who want to reverse
engineer binaries. It would also be specific to the assembler and the
operating system. Maybe the search for reverse engineering might find
something but the results will be about the same or worse than going from
binary to C source. If you cannot find an assembly language to C source
converter you can try getting an assembler, create a binary then use
machine language to C source converts.
Bottom line, it is usually more effort to maintain the resulting source
code then it would be to write the application from scratch.
--
Send e-mail to: darrell at cs dot toronto dot edu
Don't send e-mail to