Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a program to convert assembly to C++? [duplicate]

Tags:

c++

Is there a program that will convert assembly to C or C++? I did a lot of searching but I could not find anything that works. There is a program called "Boomerang"; it looks great and just want I wanted, but it's very unstable and crashes when I try to use it. (boomerang)

Are there any other free programs that will do that?

like image 295
blood Avatar asked Jul 13 '10 05:07

blood


People also ask

Can you turn assembly into C?

You can't deterministically convert assembly code to C. Interrupts, self modifying code, and other low level things have no representation other than inline assembly in C. There is only some extent to which an assembly to C process can work.

Is assembly better than C?

Actually, the short answer is: Assembler is always faster or equal to the speed of C. The reason is that you can have assembly without C, but you can't have C without assembly (in the binary form, which we in the old days called "machine code").

How do you convert assembly to machine code?

So all you have to do is identify each opcode in the assembly language, map it to the corresponding machine instruction, and write the machine instruction out to a file, along with its corresponding parameters (if any). You then repeat the process for each additional opcode in the source file.

What converts an assembly program into machine code?

An assembler converts assembly language into machine language.


1 Answers

What you're looking for is a decompiler.

You will end up with something not really much better than the ASM source, and I'm pretty sure you're going to end up with C, not C++ anyway.

like image 144
thomasfedb Avatar answered Oct 03 '22 21:10

thomasfedb